Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[VB3 RC3] Who viewed this thread? Details »»
[VB3 RC3] Who viewed this thread?
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-05-2004 Last Update: Never Installs: 48
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 05-16-2004, 08:32 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tccra
Is this working in 3.0.1? No error messages but the list isn't showing up in my thread view pages.


edit: changed "$bbuserinfo[usergroupid]==6" to "is_member_of($bbuserinfo, 6)" and voila! It worked.
Please remember there is a setting in the ACP in the "Server Settings and Optimization" that reads "Update Thread Views Immediately", by default that is set to "no" and the thread views are updated only in an hourly basis, that would mean that also the whoviewed would be updated in an hourly basis

Quote:
Originally Posted by carter876
Kentaurus compliments for your nice hack, I have a little question:
Is there the possibility to see the last date and time in which the user has read the post? (It's very important for me to know it)
This can be done but it is a little server intensive... if I find a way of doing it without taking a lot of resources I'll add it.

Quote:
Originally Posted by DCX
ok, it is working for me but i have a little problem... for some reason, it's not showing up on ALL threads.... it is showing on a majority of the threads though. any ideas?
If a thread hasn't been seen by anyone then it doesn't appear. Of course, at least you have seen the thread, right. Then just wait an hour for it to be updated, or in the ACP change the setting for thread views to be updated immediately.

Quote:
Originally Posted by Grendel
How is that done, if I want to limit the view to thread-starters only? Any idea?
In the hack, instead of

<if condition="$+++++ad">

use

<if condition="$+++++ad and $threadinfo[postuserid]==$bbuserinfo[userid]">
Reply With Quote
  #43  
Old 05-16-2004, 09:17 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can now find in the first post a second version of this hack, the who viewed thread (with time) will show the last date a user viewed the thread, and also that version adds a link to the memberinfo.

If you were using the first version and you want the new features please uninstall the last version, you will need the following queries (please keep in mind you will loose the "who viewed" list for your threads):

ALTER TABLE thread DROP w h o r e a d;
ALTER TABLE threadviews DROP w h o r e a d i d;
ALTER TABLE threadviews DROP w h o r e a d n a m e;

Undo the file changes of the first version and install the second version of the hack.

If you are installing this version for the first time you should go straight for the most recent version. (who viewed thread with time)
Reply With Quote
  #44  
Old 05-16-2004, 04:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I go about making it so when you mouseover the name it shows the date and time instead of having it behind the name? If you get enough people viewing the thread, this list would get very long with the date and time behind each name.
Reply With Quote
  #45  
Old 05-17-2004, 04:18 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
How would I go about making it so when you mouseover the name it shows the date and time instead of having it behind the name? If you get enough people viewing the thread, this list would get very long with the date and time behind each name.
It should be a template.. but right now it is hard-coded. In the hack:

Quote:
$+++++ad .= "<a href=\"member.php?u=$whodata[userid]\">".fetch_musername($whodata)."</a> (".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']], true, true, false)." ".vbdate($vboptions['timeformat'], $+++++adarray[$whodata['userid']], true, true, false)."), ";
change it to:

Quote:
$+++++ad .= "<a href=\"member.php?u=$whodata[userid]\" title=\"(".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']], true, true, false)." ".vbdate($vboptions['timeformat'], $+++++adarray[$whodata['userid']], true, true, false).")\">".fetch_musername($whodata)."</a> , ";
Reply With Quote
  #46  
Old 05-17-2004, 06:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, sir.
Reply With Quote
  #47  
Old 05-17-2004, 01:04 PM
Grendel's Avatar
Grendel Grendel is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your answer, Kentaurus.
Reply With Quote
  #48  
Old 05-17-2004, 07:09 PM
Carter876's Avatar
Carter876 Carter876 is offline
 
Join Date: Mar 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow really a good hack and a fantastic support
I have installed it and I wait the version that show the last time by the mousover the name

Install for me
Reply With Quote
  #49  
Old 05-29-2004, 09:52 AM
Carter876's Avatar
Carter876 Carter876 is offline
 
Join Date: Mar 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ehm I have another question , the hack signals me the time of the server that is different from mine (I have + 3 hours from the time of the server), Is there the possibility to modify the code of the hack to add for example + 10800 seconds?

Tnx in advance

Regards
Reply With Quote
  #50  
Old 05-30-2004, 06:49 AM
Carter876's Avatar
Carter876 Carter876 is offline
 
Join Date: Mar 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok i Have modified the code, and now it works but I hope that someone tell me if this change is good or if I have compromised something in VB funtionality


Before
Code:
// update views counter
if ($vboptions['threadviewslive'])
{
        if ($bbuserinfo['userid'])
        {
                $+++++adarray[$bbuserinfo['userid']] = time() ;
                $add+++++ad = ",+++++ad='".addslashes(serialize($+++++adarray))."'";                 
        }
After
Code:
// update views counter
if ($vboptions['threadviewslive'])
{
        if ($bbuserinfo['userid'])
        {
                $+++++adarray[$bbuserinfo['userid']] = time() + 10800;
                $add+++++ad = ",+++++ad='".addslashes(serialize($+++++adarray))."'";                 
        }
As you can see I have added the numbero of seconds to fill the offset from server time and my time

Regards
Reply With Quote
  #51  
Old 05-31-2004, 01:43 AM
weaver weaver is offline
 
Join Date: Mar 2004
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know why (December 31st, 1969 07:00 PM) is showing up as the date/time I read the thread?

ETA: Okay now it has the proper date/time. Odd....
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04624 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete