View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01288 seconds
  • Memory Usage 1,769KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete