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

Reply
 
Thread Tools
Who Viewed This Thread - Enhanced Version Details »»
Who Viewed This Thread - Enhanced Version
Version: 1.3.1, by Ocean Ocean is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-29-2004 Last Update: 12-14-2004 Installs: 69
DB Changes
 
No support by the author.

Who Viewed This Thread - Enhanced Version v1.3.2


Version: 1.3.2
vB Version: 3.0.3
Developer: Ocean
Install Difficulty: Moderately Easy



The original hack this references was done by Gary King (https://vborg.vbsupport.ru/showthread.php?t=61222). I modified his hack in order to gain some additional functionality.

This hack is meant to be installed instead of Gary's original version - not in addition to it (for sanity's sake, as far as managing the code is concerned).


(This was submitted as a seperate hack with Gary's permission. If this belongs in a different group, I'm sure a Moderator will move it accordingly. )


Description:

This hack will allow you to see which users have viewed any given Thread. In addition, there is a second section that is resettable. What this means, is that there are two sections that show a list of users who have viewed the Thread in question.

The first section is a Master List - it shows all users who have viewed that thread at ANY point in time (since the hack was installed).

The second section works like your car's Trip Meter. You can Reset that second section at any time and it will then show only the users that have viewed that thread FROM THAT POINT ON. In addition, this second section will show you the Date/Time of the last Reset, so that you know from what point that second list is showing. This is useful, for example, if you want to be able to see which users have viewed a thread after you have updated it, or after a particular post of interest has been made.

You can choose which UserGroups can view the Who Viewed information, or even if you want all users to be able to see the first section - but only certain UserGroups to see the second.

You can also choose whether you want the Who Viewed information to be displayed directly on the ShowThread page, or if you would prefer to only show a link that opens a Pop Up Window with the Who Viewed information there.




Release Notes:


v1.3.2

Fixed the problem where the Pop-Up Link was visible to users who didn't have permission to view that information. (They still wouldn't be shown the information - but the link shouldn't have been visible to them in the first place)


v1.3.1

Minor modifications to the Aesthetics of the ShowThread page, as well as the Who Viewed Pop Up Window. No functional changes. If you are using v1.3.0, you do not need to upgrade, unless you wish to have the new aesthetics.


v1.3.0

Added the ability to choose whether you want the Who Viewed information to be displayed directly on the ShowThread page (as it was for all prior versions of this hack), or if you would prefer to only show a link that opens a Pop Up Window with the Who Viewed information there. Also consolidated and cleaned up the code.


v1.2.6

Fixed the problem with the "Who Viewed Since" table collapsing the wrong object


v1.2.5

Minor changes to optimize code. No functional changes. If you have v1.2.4, you do not need to upgrade to v1.2.5.


v1.2.4

Reworked the Security Sections so that they are exponentially easier to set. Now, other than choosing which UserGroups you want to have access to this hack, you only need to change ONE variable in order to choose which Security Layout you want to use.


v1.2.3

Updated all of the Security Sections to allow for more flexibility in selecting which UserGroups may view the WhoViewed Information.


v1.2.1

Upgrade Notes have been updated, and an Upgrade Script provided for those who have Gary's original version installed. If you have already successfully installed v1.2 of this hack, there is no need to do anything further.


v1.2

The original hack allowed you to see which users had viewed any particular thread on your board. It was and is an excellent hack - however, I desired some additional functionality, and so I made the following changes:


1. The format of stored User IDs has changed to a comma delineated format. This was done to optimize the code by stripping out the need for an additional explode() and implode().

2. An additional set of information is now being kept and maintained. However, unlike the first set (which will show you who has viewed a particular thread - ever), the second set is resettable at any time by Admins. This gives you a "tripmeter" of sorts, as you can now tell who has viewed a particular thread from the last time you reset that counter for that thread.

3. The date and time of the last reset for each thread is kept and displayed. Otherwise, it would be self-defeating, as you wouldn't remember when you last reset it.

4. This hack has been written so that all functions are for Admins only. Instructions are included for modifying this, if you wish. (Note: Even if you make ALL information viewable to ALL users, only Admins are allowed to Reset Counters. It is recommended that you do not change this)

5. I have the template additions being added at the bottom of the ShowThread page (right above the posting permissions). It seems to make more sense putting it there, as it doesn't get in the way, aesthetically speaking. Basically, if you want to check that section, it's there - if not, you'll never be bothered by it. If you prefer to have it somewhere else, feel free to insert the ShowThread Template portion of the code wherever you wish.



UPGRADE NOTES:

The instructions for this hack assume that you do NOT have any prior version installed.

At the moment, if you already have Gary's original 1.0 version installed, you will either need to completely clear out the existing data, before installing this hack - or you can download the "WhoViewedUpgradeFormat.php" script in order to convert the data format over to the new style.

Instructions are included for upgrading.

Show Your Support

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

Comments
  #32  
Old 10-02-2004, 06:02 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ocean
The Pop-Up window is something that I will probably add to the next version of this hack.
that'd be nice


Quote:
As to your question, unfortunately it does not show when a post has been read. But that is also why I added the second resetable counter. This way, you can add a post, for example, and reset the second counter so that you can see who has viewed that thread from that point on. This allows you to easily see who has viewed that thread at all, and who has viewed it after that particular change has been made.
then you can record IDs of those who has view thread in successive order. so it can be show as who viewed last with be displayed last (or first).
This include when you view the thread AGAIN, the script will check if your ID is already in the list, if it is, then your ID is moved to the end (or beginning) of the list. It might help knowing the sequence of reading (but losing the order of first reading)


Quote:
Adding a date/time stamp would mean an additional Query for every thread view on your board. I'm not sure it would be worth the overhead - especially on larger boards.
The information is important, but another query wouldnt be good.
Reply With Quote
  #33  
Old 10-02-2004, 06:25 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rjordan

Perhaps, then, instead of storing a bit that indicates that it has been viewed (assuming that is how you are doing it), you store the time and date value and check for a nul entry in the event that is has not been viewed? Doing this should not increase the queries as you are just querying for different data.
Unfortunately, it's more than that. Right now, when a thread is viewed, the code will query the DB and check to see if that person's UserID is present in the list of users who have viewed that thread.

If it's present, than it leaves things be. If not, then it takes an additional query to add that UserID.

If we wanted to keep track of the date/time that each user last viewed each thread - than every thread view would need to look for and then add or edit the current date/time stamp.

Plus, since the user and date/time stamp would be stored together - and all users + date/time stamps are stored in a single field per thread, the added parsing adds no small amount of processing that needs to be done. Or rather, it's a small addition by itself - but not cumulatively when 5,000 users are all viewing threads simultaneously.

I'm not sure it's worth the processing time/power for any boards except small ones. However, I might add it in a future version, nevertheless.


Quote:
Originally Posted by rjordan

The value I have seen in this is when an announcement is made in the forums for whatever reason, people have stated that they never read the message. If there was a time limit on response to a message, if they had read the message, the time stamp would indicate that they saw it in the time allowed and had the chance to respond.

In any case, it is a great hack. This is just that extra function that I would not mind seeing.
Actually, you can accomplish that function right now. In fact, it's easy when it's a new and single announcement - because all you have to do is save the user list once the time is up, and you'll know who viewed it by that point and who didn't.

Where it gets tricky, is if you edit or add to that announcement - because then the question is who read it since it was updated. It's for that reason that I added that second counter. Now, once you edit or add to an Announcement/Bulletin/Post, just reset the second counter for that thread. Now you'll know exactly who read it before your changes and who read it afterwards.
Reply With Quote
  #34  
Old 10-02-2004, 06:28 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha

then you can record IDs of those who has view thread in successive order. so it can be show as who viewed last with be displayed last (or first).
This include when you view the thread AGAIN, the script will check if your ID is already in the list, if it is, then your ID is moved to the end (or beginning) of the list. It might help knowing the sequence of reading (but losing the order of first reading)
That would also add an additional query to every thread view. In addition, it's usefulness - in my opinion - is somewhat limited. Not to mention the fact that it would confuse a lot of people.

If we were going to go that route, we might as well add the full date/time stamp. (Which still may happen)


Reply With Quote
  #35  
Old 10-03-2004, 03:41 AM
Roms's Avatar
Roms Roms is offline
 
Join Date: Jun 2004
Location: Witness ProtectionProgram
Posts: 1,841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome!! *Clicks install!
Reply With Quote
  #36  
Old 10-09-2004, 12:51 PM
bnn121 bnn121 is offline
 
Join Date: May 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorta confused...I do not have Garys hack installed...I would like ot install this enhanced version.

The instructions seem to be geared towards upgrades from previous versions.

Do you have a step by step to install this version?

Thanks
Reply With Quote
  #37  
Old 10-09-2004, 01:01 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bnn121

I'm sorta confused...I do not have Garys hack installed...I would like ot install this enhanced version.

The instructions seem to be geared towards upgrades from previous versions.

Do you have a step by step to install this version?

Thanks
bnn121, the instructions you are referring to are the upgrade instructions given in subsequent posts.

If you want the full instructions - you need to download the TXT file from the very first post in this thread - the same as you would do for any other hack on this site.
Reply With Quote
  #38  
Old 10-09-2004, 01:12 PM
bnn121 bnn121 is offline
 
Join Date: May 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay...I have downloaded the txt file from first post. Please dont hurt me...LOL...I'm just trying to figure out this hack and how to install it...it refers to some php files which are not located in either of the two files you have in the first post of this thread.

Where exactly does the fresh install portion start?

I see release notes section, then a UPGRADE NOTES section.

>Choice One or Choice Two

After that is shows

File Modifications:
showthread.php
misc.php

Template Modifications:
ShowThread

New Phrases:
already_viewed_this_thread
already_viewed_this_thread_since

Number of SQL Queries: 3

After that I see nothing to indicate...begin here for a fresh or new install

Is this the begining of the install process? I do not have those files listed above...the showthread.php or misc.php
********************************

1. Run the following SQL Queries (Adjust accordingly, if you use Table Prefixes):

**********

ALTER TABLE thread ADD whoviewed TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedcounter TEXT NOT NULL;
ALTER TABLE thread ADD whoviewedreset INT(10) UNSIGNED NOT NULL;
Reply With Quote
  #39  
Old 10-09-2004, 01:57 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bnn121

Okay...I have downloaded the txt file from first post. Please dont hurt me...LOL...I'm just trying to figure out this hack and how to install it...it refers to some php files which are not located in either of the two files you have in the first post of this thread.

Where exactly does the fresh install portion start?

I see release notes section, then a UPGRADE NOTES section.

>Choice One or Choice Two

After that is shows

File Modifications:
showthread.php
misc.php

Template Modifications:
ShowThread

New Phrases:
already_viewed_this_thread
already_viewed_this_thread_since

Number of SQL Queries: 3

After that I see nothing to indicate...begin here for a fresh or new install

Is this the begining of the install process? I do not have those files listed above...the showthread.php or misc.php
The Upgrade Notes section tells you what you need to do in order to modify the Full Install instructions - which start at Step 1.

As for the PHP files listed - the reason they are listed as files which need to be modified is because they are your files that need to be modified.

Those two PHP files in question are supposed to be in the root of your vB folder, not supplied by me. After all, if I supplied them - why would you need to further modify them?
Reply With Quote
  #40  
Old 10-09-2004, 02:13 PM
bnn121 bnn121 is offline
 
Join Date: May 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL...I just relized those two files are in the root of VB...hmm...I've been looking over the instructions...and theres some files I cant find...eith in the showthread.php or even in any other folder?

5. Open the "SHOWTHREAD" template and Find

I'm unsure of where this is within VB

I did a search of the entire VB folder and within showthread.php and coame up with no such file or phrase.

Is it obviouls I have never done tis before...HEHE...guess you got to start somewhere...why not your hack...which I like, just wish I could figure this out
Reply With Quote
  #41  
Old 10-09-2004, 02:36 PM
robert_2004 robert_2004 is offline
 
Join Date: Sep 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay, go into your vb Admin section.

open 'Styles & Templates' from the left menu.
choose 'Style Manager'
press the [ << >> ] button on the right hand side. that will show you all the templates that are used on the site.
(i.e. the file forum.php [for instance] only holds all the coding for that particular page. all the looks and style of the page will be kept in the template system under a similar name )

Okay, now it's showing templates - but only the custom-added ones. press the, now standard font << >> link, and it will open up every single group.
[ctrl] + [f] and type in 'showthread' then just click 'edit' or 'customise' next to the template, select all and copy and paste into dreamweaver to get better search and replace capabilites.

hope that helps.
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 04:26 PM.


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.09349 seconds
  • Memory Usage 2,323KB
  • 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
  • (8)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