[Request] Who Viewed a Topic

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
sam_xp
Registered User
Posts: 213
Joined: Fri Feb 08, 2008 8:05 pm
Location: Lebanon
Contact:

Re: [Request] Who Viewed a Topic

Post by sam_xp » Thu May 22, 2008 1:01 pm

théonaute wrote:Hello,

Open : viewtopic.php
Find :

Code: Select all

'S_DISPLAY_TOPIC_VIEWERS'	=> true,
Replace with :

Code: Select all

'S_DISPLAY_TOPIC_VIEWERS'	=> $auth->acl_get('u_'),
I don't test this code, because i don't have an access to a phpbb3, but it will work.
Please tell me if it doesn't.

Bye, ;)
Thanks a lot ... I will try it now,
Could you please also provide me with the needed code to make the link in viewtopic_body.html viewable only by moderators ....
Image
مجتمع محبي الكوميكس الناطقين بالعربية http://arabcomics.net

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Thu May 22, 2008 1:04 pm

There is no modification in the .html file, because the link is displayed only if S_DISPLAY_TOPIC_VIEWERS is true.
So, with the patch i've given in the last post, if the user is a moderator, S_DISPLAY_TOPIC_VIEWERS = true and if he isn't, S_DISPLAY_TOPIC_VIEWERS=false, so the link isn't displayed.
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

sam_xp
Registered User
Posts: 213
Joined: Fri Feb 08, 2008 8:05 pm
Location: Lebanon
Contact:

Re: [Request] Who Viewed a Topic

Post by sam_xp » Thu May 22, 2008 1:06 pm

théonaute wrote:There is no modification in the .html file, because the link is displayed only if S_DISPLAY_TOPIC_VIEWERS is true.
So, with the patch i've given in the last post, if the user is a moderator, S_DISPLAY_TOPIC_VIEWERS = true and if he isn't, S_DISPLAY_TOPIC_VIEWERS=false, so the link isn't displayed.
I just figured that out when I re-checked the code :oops: , I was going to edit my post, but you already saw it ... thanks ...
Image
مجتمع محبي الكوميكس الناطقين بالعربية http://arabcomics.net

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Thu May 22, 2008 1:48 pm

No problem.

I made a mistake, it's not $auth->acl_get('u_'), but $auth->acl_get('m_'),

Have a nice day, ;)
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

sam_xp
Registered User
Posts: 213
Joined: Fri Feb 08, 2008 8:05 pm
Location: Lebanon
Contact:

Re: [Request] Who Viewed a Topic

Post by sam_xp » Thu May 22, 2008 1:58 pm

I figured that by myself , because the u_ will make this option available to all users, and from what I read m_ should make it available to moderators only , but unfortunately using this option made the link viewable to moderators with full access over the forum only , I don't know why exactly this happened , maybe I need to modify some permissions from ACP , I really don't know :?:
Image
مجتمع محبي الكوميكس الناطقين بالعربية http://arabcomics.net

sam_xp
Registered User
Posts: 213
Joined: Fri Feb 08, 2008 8:05 pm
Location: Lebanon
Contact:

Re: [Request] Who Viewed a Topic

Post by sam_xp » Thu May 22, 2008 2:10 pm

after a little bit trial and errors , I found what I was looking for by using this :

Code: Select all

		'S_DISPLAY_TOPIC_VIEWERS'	=> $auth->acl_getf_global('m_'),
It finally worked for me .... thanks alot for the your wonderful help :D
Image
مجتمع محبي الكوميكس الناطقين بالعربية http://arabcomics.net

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: [Request] Who Viewed a Topic

Post by marian0810 » Thu May 22, 2008 5:49 pm

I'm still a bit confused about that percentage bar. Somehow it's always at 100% - but 100% of what exactly?
You and me, time and space. You watch us run!

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Thu May 22, 2008 11:37 pm

Hi,

sam_xp > It's a good thing ;)
marian0810 > percents are used in prosilver. Results bars are in a <div> and the bar's width is a percent of this div's width (the percent of the bar is the result of the option).
In subsilver, the image's width is calculated in viewtopic.php :

Code: Select all

		$option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
		$option_pct_txt = sprintf("%.1d%%", ($option_pct * 100));

		$template->assign_block_vars('poll_option', array(
			'POLL_OPTION_ID' 		=> $poll_option['poll_option_id'],
			'POLL_OPTION_CAPTION' 	=> $poll_option['poll_option_text'],
			'POLL_OPTION_RESULT' 	=> $poll_option['poll_option_total'],
			'POLL_OPTION_PERCENT' 	=> $option_pct_txt,
			'POLL_OPTION_PCT'		=> round($option_pct * 100),
			'POLL_OPTION_IMG' 		=> $user->img('poll_center', $option_pct_txt, round($option_pct * 250)),
			'POLL_OPTION_VOTED'		=> (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false)
		);
and in styles/subsilver/templates/viewtopic.html :

Code: Select all

<td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
I don't have time to adapt my MOD for subsilver, but I think you'll be able to do this with this example.

Bye, ;)
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

yais
Registered User
Posts: 306
Joined: Sun Jun 17, 2007 12:45 pm

Re: [Request] Who Viewed a Topic

Post by yais » Fri Jun 06, 2008 11:33 pm

I am getting this error after having installed the mod:

Code: Select all

[phpBB Debug] PHP Notice: in file /viewtopicviewers.php on line 264: Undefined index: VIEW_TOPIC_VIEWERS
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3577: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3579: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3580: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3581: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
any ideas?

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Sun Jun 08, 2008 6:04 pm

Hi,

The modifications in languages/en/viewtopic.php must be in languages/en/common.php
It's an error in the install.xml file.

++
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

wollez
Registered User
Posts: 4
Joined: Tue Jun 24, 2008 3:39 pm

Re: [Request] Who Viewed a Topic

Post by wollez » Thu Jun 26, 2008 5:24 pm

Hello,

excuse my English. I have it on google translated ;)

I have been trying a few days in vain the mod for me to install. the changes in the files I have carried out but if I mod in the ACP will enter, I find it in the list of mods.
my board uses the German language. I have the changes in the English and German files. I have the cache emptied. the board used prosilver and is the version 3.0.0

what can I do?

wollez

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Fri Jun 27, 2008 4:10 pm

Hi,

I'm sorry i don't understand.

You can PM me in german if you want.

++
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

Fazid
Registered User
Posts: 8
Joined: Tue May 20, 2008 9:54 pm

Re: [Request] Who Viewed a Topic

Post by Fazid » Fri Sep 05, 2008 7:58 pm

Hi!

Do you have an updated link to this mod? Download link from here doesn't work... It would be great, if someone could post a new link to this mod, please ;)

User avatar
Théonaute
Registered User
Posts: 341
Joined: Sun Jan 22, 2006 10:31 am

Re: [Request] Who Viewed a Topic

Post by Théonaute » Fri Sep 05, 2008 8:19 pm

Here is the link : http://forums.nosce-te-ipsum.net/viewtopic.php?f=10&t=8

(the website is in my signature)

Best, ;)
Théonaute | ex-MOD Team member on phpbb-fr.com
No more phpBB's activities. No MODs updates, no new MODs... Thanks.

Fazid
Registered User
Posts: 8
Joined: Tue May 20, 2008 9:54 pm

Re: [Request] Who Viewed a Topic

Post by Fazid » Fri Sep 05, 2008 8:36 pm

I tried there, but the direct download link seems to be broken. I mean, this one: http://www.modsphpbb3.fr/download/file.php?id=58

Locked

Return to “[3.0.x] MOD Requests”