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

Reply
 
Thread Tools
Details »»

Version: , by ethank ethank is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-02-2001 Last Update: Never Installs: 25
 
No support by the author.

Hack: Persistent Mark Forum Read
Version of VB: 2.2.5
Current version: 1.3
Description: This hack replaces the bahavior of vBulletin's "Mark Forum Read" and "Mark All Forums Read" with a system that uses a database to track when forums are set read. By eliminating the use of cookies for this feature, a user can come onto your boards, read a bit, mark forums read as they go through and logout. The next time they come into the forums, the status of which forums they've read and which they haven't, as well as new posts since the last time they read is preserved.

This functions a lot like EZBoard and Chatspace's Webboard.

Included in this hack are three search routines: searing the entire forum for new messages, an individual forum and a section of the hierarchy (parent + children)

Also: Mark All Forums Read, Mark Individual Forum Read and Mark Hierarchy Section (Parent + Children) Read

Note: The install is not all pretty yet and requires a degree of knowledge of MySQL (to add a table) and PHP (as it requires heavy modifications to core files). It is recommended that you backup everything before using this.

After installation, behavior might be a bit odd until a default "markread" record is created for users. This is created when they first login if one does not exist.

This hack has been tweaked to now not add more than two queries to your index page. It will add load on sub-forum pages currently if you have a lot of nested forums. This will be fixed in the next release.

Instructions:

Follow the instructions in the included text file TO THE LETTER. If you run into problems, post here so we can work through them and improve the instructions. Look for a better install utility soon.

I recommend doing the text editing using a DIFF utility to see where you made changes, it honestly helps.

Place the images in your vbulletin image folder. I included PSD files for them if you want to change colors.

Show Your Support

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

Comments
  #72  
Old 05-18-2002, 03:46 PM
dslteam dslteam is offline
 
Join Date: Apr 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question: What about an automatic Mark as Read?

The difference being, not only does it utilize database tracking instead of the default use of a cookie, but it doesn’t require a user to physically click the “Mark as Read” button.

This is similar to what would occur if a member reads a new thread. If they read the thread, they are not required to mark it as read in order to make it reset; it just occurs.

With an automatic mark as read for forums, they would not be required to mark the forum as read; it just resets itself as read once all new posts within the forum have been read.
Reply With Quote
  #73  
Old 05-18-2002, 05:44 PM
pirotess pirotess is offline
 
Join Date: May 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I go to modify this portion of my index.php:

PHP Code:
        // do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
                    if (isset(
$bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
                        
$userlastvisit=$bbforumview[$forum['forumid']];
                    } else {
                        
$userlastvisit=$bbuserinfo['lastvisit'];
                    }
          if (
$userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        } 
with the appropriate code as posted in the install document my boards white screen when you load them and in my error logs I get a PHP parse error of:

unexpected $ in index.php on line 420

Any ideas? I'm running 2.2.5 and all the other updates for this hack in index.php seem to work fine.

Also I get an undefined function updatelocation{} in search.php when I add the 3rd search type into the file.
Reply With Quote
  #74  
Old 05-19-2002, 02:50 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know how to fix the index.php error, but the other, saddly, no. Add another } after that code, so it looks like this:
PHP Code:
// do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
                    if (isset(
$bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
                        
$userlastvisit=$bbforumview[$forum['forumid']];
                    } else {
                        
$userlastvisit=$bbuserinfo['lastvisit'];
                    }
          if (
$userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        }
        } 
Reply With Quote
  #75  
Old 05-19-2002, 03:03 PM
dslteam dslteam is offline
 
Join Date: Apr 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You developed a such big hack but the most important feature that is not so hard - is not in it !?

I talk about this automatic Mark as Read. Is it hard to add this feature??

Please !!!

Thanks !
Reply With Quote
  #76  
Old 05-20-2002, 02:13 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The reason why Automatic Mark as Read was not included is because some of use go and preview a post, but don't actually read it, and don't want it to be marked as read. Better to click on the Mark All Read link once you feel you have read all posts.
Reply With Quote
  #77  
Old 05-20-2002, 05:30 AM
dslteam dslteam is offline
 
Join Date: Apr 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Erwin - Thanks for your answer, but there are many users (https://vborg.vbsupport.ru/showthrea...threadid=38214) that need such automatic tool too.

All good other board has got this feature ?!

Because a new user simply visit a thread and want that the visited thread is marked as read.

Please ! Can anyone add this feature !?
Reply With Quote
  #78  
Old 06-27-2002, 08:10 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone have this running as written on 2.2.6?
Reply With Quote
  #79  
Old 06-27-2002, 08:48 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup - it's running fine with my site on 2.2.6

And ethanks deliberately left out the automatic mark thread read - it's easy to put in though.
Reply With Quote
  #80  
Old 06-27-2002, 08:55 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet! I am going to load it now. It was a life saver on 2.0.3 all this time.

Reply With Quote
  #81  
Old 06-27-2002, 10:49 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm -- I am getting the same parse error in index.php.

unexpected $ in index.php on line 417 (the end of the file).

The brackets weren't the issue -- they are all in there.

Any ideas?
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 05:38 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.04984 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_php
  • (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