vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [VB3 RC3] Who viewed this thread? (https://vborg.vbsupport.ru/showthread.php?t=61225)

Kentaurus 02-05-2004 10:00 PM

[VB3 RC3] Who viewed this thread?
 
I know there is already one version of this by Gary W but I already made (and documented) my own so I thought I would post it.

Advantages of my hack:

My hack adds only 1 query to showthread, and it only queries the user table, so it is less server intensive. That is important to any busy board or anyone that wants to save some resources. It integrates with the "thread views" system to update the people that have seen the thread.

Disadvantages:

Well.. with mine even if you browse the forum as "invisible" you would end up showing in the "who read" list.


Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.

Boofo 02-06-2004 03:32 AM

Looks good. I trust how you support your hacks much more than the other one. ;)

*arie 02-06-2004 04:14 AM

cool. :)

any way to limit the view only to admins?

gmarik 02-06-2004 08:44 AM

Great. Could it be that the add-on who downloaded this attachment would be combined with this?

Kentaurus 02-06-2004 03:45 PM

Quote:

Originally Posted by *arie
cool. :)

any way to limit the view only to admins?

in the template showthread, this:

Quote:

<if condition="$+++++ad">
<table cellpadding="10" cellspacing="0" border="1" width="100%">
<tr valign="top">
<td class="alt1">Users that have seen this thread: <b>$+++++ad</b></td></tr></table><br/>
</if>
replace it white:

Quote:

<if condition="$+++++ad and $bbuserinfo[usergroupid]==6">
<table cellpadding="10" cellspacing="0" border="1" width="100%">
<tr valign="top">
<td class="alt1">Users that have seen this thread: <b>$+++++ad</b></td></tr></table><br/>
</if>

Then only admins would be able to view it



those '+' are a w h o r e a d, seems that the forum is censoring it.

Kentaurus 02-06-2004 03:49 PM

Quote:

Originally Posted by gmarik
Great. Could it be that the add-on who downloaded this attachment would be combined with this?

Do you mean Rein's Who Downloaded? It shouldn't be any problem if both hacks are installed.

Kentaurus 02-06-2004 04:23 PM

An update for this hack:

With this modification the "who viewed" list will be ordered alfabetically, the original behaviour was to order the users as they saw the thread, but that's not very reliable. Apply this modification only if you would like to see the list ordered.

search for this

Code:

                if ($threadidcache)
                                {

replace that with
Code:

                if ($threadidcache)
                                {
asort($+++++adarray);

search for this

Code:

                                $+++++adarray[$bbuserinfo['userid']] = $bbuserinfo['username'];
replace that with

Code:

                                $+++++adarray[$bbuserinfo['userid']] = $bbuserinfo['username'];
asort($+++++adarray);

TXT and HTL updated of course :)

And... all the +++++ are the word: w h o r e

the complete word is w h o r e a d
being censored

Allan 02-06-2004 04:57 PM

Thank you Kentaurus, very nice hack !

Boofo 02-07-2004 04:17 AM

Hey, buddy, I have a request. Is there a way to have the names follow the color and intensity (html mark-up, I think it is called) like Admins and Supermods and users and such? It would make it easier to identify with a quick glance as the list grows. ;)

And maybe the total numbers of members and guests (if they are allowe to read the threads like mine are) who have read the thread so far?

Boofo 02-07-2004 04:57 AM

The sorting feature doesn't seem to be working for me. I have me (Boofo) in the list, the next one strats with an M and the next one strats with an A. They are not going alphabetically. ;)


All times are GMT. The time now is 10:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01098 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete