Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #62  
Old 10-23-2004, 10:32 PM
trackpads's Avatar
trackpads trackpads is offline
 
Join Date: Aug 2003
Location: Armyville
Posts: 1,074
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great hack but would be alot better if you could have the information on a separate page. For example, I have a thread that was 100,000 views and honestly have that on the bottom of every page would make it look horrible. but I would like it on other pages for sure so have a link (option per usergroup) would be perfect.

Thanks again,

-Jason
Reply With Quote
  #63  
Old 10-27-2004, 08:36 AM
wi11ie1950 wi11ie1950 is offline
 
Join Date: Sep 2004
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wi11ie1950
The mouseover change doesnt work for me no matter how i do it i get:-

Parse error: parse error, unexpected T_INC, expecting T_VARIABLE or '$'
in /home/wi11iec/public_html/forum/showthread.php on line 460

Do the $+++++ go in as well cause they are not in the text file ??
Ok i worked it out.. I guess the +++++ is from VBs censor considering it spells out w h o r e

It all works great now under 3.0.3
Reply With Quote
  #64  
Old 10-27-2004, 10:10 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SaN-DeeP
Ok i have some serious issues, i wonder if someone else notice about this

My Server is located in US which mite have GMT - 8:00 timings
weras my forum timings and people are of india GMT + 5:30

Currently It is 9:02 AM here.
and i can see this thing when a user last viewed any particular thread
(Yesterday 07:15 PM)

Help me fix this please.

Thank You for nice hack.

Sandy...
any fix for this ?

thanks
Reply With Quote
  #65  
Old 10-30-2004, 01:32 AM
wi11ie1950 wi11ie1950 is offline
 
Join Date: Sep 2004
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi San from what i can see it doesnt use VB country and time settings so if you correct it for India then it will still be wrong for those outside india.
I used the hack to hide the date and time behind the name and show on mouseover
Reply With Quote
  #66  
Old 11-18-2004, 06:21 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wi11ie1950
Hi San from what i can see it doesnt use VB country and time settings so if you correct it for India then it will still be wrong for those outside india.
I used the hack to hide the date and time behind the name and show on mouseover
I have the same problem with San, my server is located in USA, while all times are using Greece time. What puzzled me, was that the way the info is shown, using vbdate function, the time should have been correct.

So, I tried using this code:

PHP Code:
$nothing=vbdate($vboptions['dateformat'].' '.$vboptions['timeformat'], time()); 
and it produces the correct time for my country. However, when it is called from the hack (admitedly with a different syntax, I have no idea what these 'true', and 'false' parameters do) , in showthread, it shows the wrong time.

So, I did some experimentation, and here is what I came up with. If you change the vbdate arguments used in the showthread, a little, you can have it show the proper time.

Change this:

PHP Code:
(".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']], true, true, false) 
to this:

PHP Code:
(".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']], true, true, true) 
Or if you do not want to see "Today" or "Yesterday", but just a plain date and time, change the code to:

[php]
PHP Code:
(".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']]) 
Here is a description of the vbdate function. The code is located in includes/functions.php

PHP Code:
function vbdate($format$timestamp TIMENOW$doyestoday false$locale true$adjust true$gmdate false
Rgds
-----------
John
Reply With Quote
  #67  
Old 11-21-2004, 09:05 AM
Morgalis Morgalis is offline
 
Join Date: Oct 2002
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there

I am installing this with your Mod Management tool, and I am running into a parse error.

vb 3.0.3

parse error - no details given - at the else in the last part of the paste

Quote:
else
{
// or doing it once an hour
$DB_site->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "threadviews (threadid)
VALUES (" . intval($threadinfo['threadid']) . ')'
);
}
Any suggestions?
Reply With Quote
  #68  
Old 01-12-2005, 11:24 AM
VitroX VitroX is offline
 
Join Date: Feb 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks sv1cec for your fix ...

now, is there a way the user list can get sorted first those who has replied and then those who doesnt?, I'm after a way to detect those who dont reply to threads and are only lurking, this could be a way to detect them and that would be very usefull for me.
Reply With Quote
  #69  
Old 01-17-2005, 04:22 PM
Lottis Lottis is offline
 
Join Date: Sep 2004
Location: Norway
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone like to help me take the time away?
Reply With Quote
  #70  
Old 01-20-2005, 01:00 PM
VitroX VitroX is offline
 
Join Date: Feb 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lottis
Anyone like to help me take the time away?
yes, in modified showthread.php file for this hack, look for:
PHP Code:
if (!empty($+++++adarray))
{
        $+++++
adids array_keys($+++++adarray);
        $+++++
sult $DB_site->query("SELECT user.* FROM ".TABLE_PREFIX."user AS user WHERE userid IN (".implode(",",$+++++adids).") ORDER BY username");
        $+++++
ad "";
        while (
$whodata $DB_site->fetch_array($+++++sult))
        {
            $+++++
ad .= "<a href=\"member.php?u=$whodata[userid]\">".fetch_musername($whodata)."</a> (".vbdate($vboptions['dateformat'], $+++++adarray[$whodata['userid']], truetruefalse)." ".vbdate($vboptions['timeformat'], $+++++adarray[$whodata['userid']], truetruefalse)."), ";
        }
        if ($+++++
ad)
        {
            $+++++
ad substr($+++++ad0strlen($+++++ad)-2);
        }
        
$total+++++ad = @count($+++++adarray);

and replace it for:
PHP Code:
if (!empty($+++++adarray))
{
        $+++++
adids array_keys($+++++adarray);
        $+++++
sult $DB_site->query("SELECT user.* FROM ".TABLE_PREFIX."user AS user WHERE userid IN (".implode(",",$+++++adids).") ORDER BY username");
        $+++++
ad "";
        while (
$whodata $DB_site->fetch_array($+++++sult))
        {
            $+++++
ad .= "<a href=\"member.php?u=$whodata[userid]\">".fetch_musername($whodata)."</a>, ";
        }
        if ($+++++
ad)
        {
            $+++++
ad substr($+++++ad0strlen($+++++ad)-2);
        }
        
$total+++++ad = @count($+++++adarray);

that should remove the date time info.
Reply With Quote
  #71  
Old 01-27-2005, 12:20 AM
James Collins James Collins is offline
 
Join Date: Dec 2003
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snake-boy
Is this working in V3.0.3 (yet)?

I would VERY much like to install this but don't want to be wasting my time.

Anyone who's running this successfully with 3.0.3, please say 'aye' ?

-snake
aye

in 3.05 as well (with patch)
Reply With Quote
Reply

Thread Tools

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 11:30 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.05001 seconds
  • Memory Usage 2,337KB
  • 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
  • (7)bbcode_php
  • (6)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
  • (3)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