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 05-16-2004 08:32 AM

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]">

Kentaurus 05-16-2004 09:17 AM

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)

Boofo 05-16-2004 04:35 PM

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. ;)

Kentaurus 05-17-2004 04:18 AM

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> , ";

Boofo 05-17-2004 06:55 AM

Thank you, sir. ;)

Grendel 05-17-2004 01:04 PM

Thank you for your answer, Kentaurus.

Carter876 05-17-2004 07:09 PM

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

Install for me

Carter876 05-29-2004 09:52 AM

Ehm I have another question :rolleyes: , 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 :)

Carter876 05-30-2004 06:49 AM

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 :rolleyes:


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

weaver 05-31-2004 01:43 AM

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....


All times are GMT. The time now is 09:37 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.01179 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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