vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Persistent Mark Forum Read (https://vborg.vbsupport.ru/showthread.php?t=32091)

ethank 11-02-2001 10:00 PM

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.

ethank 11-03-2001 09:45 PM

Mods: Can you move the other thread about thhis in here to a locked "old hacks" forum? Thanks

Ethan

ethank 11-05-2001 06:08 PM

Anyone who installed the 2.0.3 version of this try these instructions on 2.2 yet?

Ethan

LuBi 11-11-2001 08:43 PM

Does this work on 2.2? I believe in the title it says it does but has anyone tried it?

SWFans.net 11-11-2001 09:44 PM

I haven't upgraded my 2.0.3 version to 2.2 yet. I weighed the new features with what I currently had including hacks (including ethank's previous Mark Forum Read hack) and decided that there wasn't enough in the new version to warrant my upgrading.

With some time and experience using vB boards at version 2.2, I am convinced that the cookie implementation of Mark Forum read that they have included is not the least bit reliable. I have several times come back to a 2.2 vB board and found that what I had previously marked as read, is no longer displayed as read, but as new. I have also seen instances where forums I had not marked as read had suddenly become so.

Currently, I am very pleased with ethank's previous hack for 2.0.3, with a small adjustment that I made to it to send users back to the index after using a Mark forum Read link.

I have downloaded a copy of this hack, but have not installed it due to my satisfaction with how 2.0.3 is working for me.

I reviewed this hack, and liked the way that child forums could be marked as well, but the icon implementation of it seems like it may be a little complicated and confusing for my varying in age members who are most familiar with using ezboard style bulletin boards.

If the day does come that I decide to upgrade my forums to 2.2, I will in fact install this hack, because of my own issues with the unreliability of the cookie version of ?Mark Forum Read?, and the reliability I have found in ethank?s database version.

I just wanted to add my two cents and support for what ethank has provided vBulletin users. :)

LuBi 11-12-2001 10:17 PM

Hack looks great and I would love to see something like this, but it's way to long to install to not know if it works. I wish I had a fresh install so I could help out, as this again is a great hack. If anyone has any luck or can help with an auto install that would be great... goodluck ;)

LuBi 11-13-2001 09:06 PM

<<up>><<up>>:confused:

Can anyone try to get this working?

JJR512 11-14-2001 06:17 AM

In the instructions for showthread.php, you say to find this:
PHP Code:

        $postbits .= getpostbit($post);

    
updateuserforum($thread['forumid']);

        eval(
"dooutput(\"".gettemplate("showpost")."\");");
        exit; 

And replace it with various stuff. The problem I had with that in my showthread.php, in that whole section of code, on the first line ($postbits .= getpostbit($post);) it had no dot (it was $postbits = getpostbit($post);).

LuBi 11-14-2001 06:20 AM

I was just about to post a request to get this hack moving. How's the install going and how do you like the results?

JJR512 11-14-2001 07:05 AM

The install was mostly OK, aside from the one issue I just mentioned, and a few instances of not being able to find things because of the equals-sign usage... what I mean by that is sometimes, original code is in the format "x=y" and the hack instructions might say to look for "x = y", or the other way around. Those spaces mean what you're searching for and what's actually there won't match, so it makes it a bit more difficult to find what you need.

As for if the hack actually works or not, that remains to be seen. First, I can't really test it at all right now, as this is a very slow time of day for my board, and there aren't a good amount of new posts to mark as read. The board itself still works, and that is always a good sign. ;) I suspect this hack will work OK; I installed ethank's earlier version, and it worked OK, too, although there was some anomalous behavior noted by some people. But the 2.2.0 upgrade was due out soon then, and I knew that similar functionality was built in, so I didn't bother to troubleshoot it at the time. But we'll see what happens now.

I would suggest to go ahead and install it. Make sure you make a backup copy of your database first, as well as have backup copies of all files you need to modify. If you have installed any other hacks at all, make sure you actually have current backup copies of your files, and don't rely on the originals, as they will not have any hacks applied to them.

LuBi 11-14-2001 07:13 AM

Is this hack really worth it? I've installed over 17 hacks plus I have no SSH or telnet so only my server can restore their backups

Quote:

Originally posted by JJR512
The install was mostly OK, aside from the one issue I just mentioned, and a few instances of not being able to find things because of the equals-sign usage... what I mean by that is sometimes, original code is in the format "x=y" and the hack instructions might say to look for "x = y", or the other way around. Those spaces mean what you're searching for and what's actually there won't match, so it makes it a bit more difficult to find what you need. :( that's whay I always ask so many questions, so far I've been fine but this hack and another about prefix's are very unclear..

As for if the hack actually works or not, that remains to be seen. First, I can't really test it at all right now, as this is a very slow time of day for my board, and there aren't a good amount of new posts to mark as read. The board itself still works, and that is always a good sign. ;) I suspect this hack will work OK; I installed ethank's earlier version, and it worked OK, too, although there was some anomalous behavior noted by some people. But the 2.2.0 upgrade was due out soon then, and I knew that similar functionality was built in, so I didn't bother to troubleshoot it at the time. But we'll see what happens now.

I would suggest to go ahead and install it. Make sure you make a backup copy of your database first, as well as have backup copies of all files you need to modify. If you have installed any other hacks at all, make sure you actually have current backup copies of your files, and don't rely on the originals, as they will not have any hacks applied to them.


JJR512 11-14-2001 12:56 PM

Don't quote what I said like it's something special here. You should make backups before installing any hack. I just said that to remind people that if you make a backup first, you have nothing to fear by trying something out.

LuBi 11-14-2001 05:54 PM

lol well in my case you have everything to fear... either it works or you lose the forum. No telnet or ssh and the backups are daily so I'll lose most of the work anyhow... not fun!

JJR512 11-15-2001 04:27 AM

Well, I have had this hack installed for about a full day now, and I can say that I've had no problems with it, have heard no complaints about it, and it seems to do what it's supposed to do. I especially like the way if a subforum had new posts while a parent forum did not, and I mark the subforum as read, the parent forum will not continue to show as unread as it does with the built-in mark read function.

LuBi 11-15-2001 05:13 AM

Can I get a SS of what those pictures included with the hack look like and where they show up maybe.. :( ;) :confused: :D please

JJR512 11-15-2001 12:07 PM

I didn't use the pictures, I just made the links into text links using the alt tags from the images. However, because I removed the moderator column, where the links normally would go, and moved the moderator list to under the forum description, the text links create a somewhat cluttered look (although it would be even more cluttered if they were in the moderator column). I'm still working on finding a better way to set up the links, because I think I would rather have the text links.

LuBi 11-15-2001 03:08 PM

Quote:

I dont know if anyone else notices this. I found that when I go to the site, the little J's are mostly grey even though new posts are in the forum.
http://forums.jjr512.com/showthread.php?threadid=27808

I hope that doesn't have to do with this hack! I don't see those links anywhere, do I need to register on your board?

JJR512 11-15-2001 03:26 PM

The gray Js (actually, I think of them as silver) indicate there are new posts. The dark blue Js indicate no new posts. I'm sure there's a legend there somewhere, I'll have to point it out to that member.

...Yeah, there actually is a legend on the main forums page, that says this:
http://forums.jjr512.com/images/on.gif New Posts
http://forums.jjr512.com/images/off.gif No New Posts

I think if you saw the colors of my forums (same colors as here, actually), you would agree the silver J icon stands out more, and thus is a better choice for ON than the blue icon, which blends in.

If you want to see those links, try looking at a category (like Computer Stuff of General), or at a forum with subforums (like Hardware or Mindless Blabbering).

ethank 11-15-2001 11:38 PM

Sorry I wasn't available to answer questions, I've been travelling for the past 8 days.

The icon implementation seems to work OK, as I haven't found a better way of doing it.

As for the instructions, I went off of a DIFF with my code to the release code, so all the little anomolies from yours to mine came from the 2.2 original. Odd.

Anyhow, has anyone else been installing it?

Ethan

FWC 11-16-2001 02:22 AM

Quote:

Originally posted by ethank
Anyhow, has anyone else been installing it?

I'm going to do the 2.2.1 upgrade this weekend and then I'm going to go for this one.

edward 11-16-2001 04:42 PM

Quote:

Originally posted by ethank

Anyhow, has anyone else been installing it?

Ethan

I installed in on a test board, and it appears to work as advertised.

My concern is with the hand editing of the files. Is it allowable under the vbulletin license for you to offer diffs from the original source? If so, that would speed up installation and eliminate the typo element that can make troubleshooting something like this very difficult.

diff -u old new > file.diff

then you can use 'patch < file.diff' to update the file, and avoid problems caused by copy/paste.

ethank 11-16-2001 06:41 PM

Quote:

Originally posted by edward


I installed in on a test board, and it appears to work as advertised.

My concern is with the hand editing of the files. Is it allowable under the vbulletin license for you to offer diffs from the original source? If so, that would speed up installation and eliminate the typo element that can make troubleshooting something like this very difficult.

diff -u old new > file.diff

then you can use 'patch < file.diff' to update the file, and avoid problems caused by copy/paste.

If its OK with Jelsoft, then I'll do that. The only issue is my files are hacked with other enhancements as well, so the DIFF might not be accurate.

Ethan

LDT 11-17-2001 07:08 PM

Just installed this on vBB 2.2.1 and it works fine. Hack instructions aren't accurate for that version, but I found my way through it. ;)

ethank 11-17-2001 07:17 PM

Quote:

Originally posted by LDT
Just installed this on vBB 2.2.1 and it works fine. Hack instructions aren't accurate for that version, but I found my way through it. ;)
Yeah, I need to update the instructions.

Tommy Boy 12-09-2001 09:10 PM

I noticed that when I call search.php?action=getallnew, posts which were moved while leaving a redirect would show twice: once correctly, and the other one (probably the redirect), is shown as a poll, and is clickable. When you click on it, you get an empty thread.

I first want to confirm the problem is on your hack, before I complain in the vBulletin forum, and if it is, can you please fix it? :)

Thanks! I said it once, and I'll say it again: without your hack, I wouldn't have bought vB :D

ethank 12-09-2001 09:24 PM

Quote:

Originally posted by Tommy Boy
I noticed that when I call search.php?action=getallnew, posts which were moved while leaving a redirect would show twice: once correctly, and the other one (probably the redirect), is shown as a poll, and is clickable. When you click on it, you get an empty thread.

I first want to confirm the problem is on your hack, before I complain in the vBulletin forum, and if it is, can you please fix it? :)

Thanks! I said it once, and I'll say it again: without your hack, I wouldn't have bought vB :D

Not sure where the problem lies yet. Probably in my hack :) I'll look into it later, but I'm swamped right now.

EThan

DarkReaper 12-10-2001 12:01 AM

Um...doesn't vB track read/unread posts through the DB anyway?

ethank 12-10-2001 12:05 AM

Quote:

Originally posted by DarkReaper
Um...doesn't vB track read/unread posts through the DB anyway?
Nope, it uses cookies.

Ethan

DarkReaper 12-10-2001 12:08 AM

It uses cookies to login, yes, but it does the checking for unread/read posts by comparing your last visit time(in the DB) with the lastpost times in the posts(in the DB)...

ethank 12-10-2001 12:10 AM

Quote:

Originally posted by DarkReaper
It uses cookies to login, yes, but it does the checking for unread/read posts by comparing your last visit time(in the DB) with the lastpost times in the posts(in the DB)...
No, the time you marked read is not set in the database, it just uses last visit, which is set based on cookies.

So for instance, if you were idle for more than 900 seconds, it'd mark everything read. Its not persistent, hence "Persistent Mark Forum Read"

Ethan

DarkReaper 12-10-2001 12:49 AM

So what exactly does this do? What's it add, and what does it do differently?

ethank 12-10-2001 12:53 AM

Quote:

Originally posted by DarkReaper
So what exactly does this do? What's it add, and what does it do differently?
Its explained in the first post, or you can register on http://www.murmurs.com and see for yourself:

Quote:

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

Tommy Boy 12-10-2001 10:24 AM

Ethan's hack is the proper way to do it. I have no idea how anyone could manage with vB's built-in mark read feature (which was introduced only in 2.2.0 btw!).

ethank 12-10-2001 04:18 PM

Quote:

Originally posted by Tommy Boy
Ethan's hack is the proper way to do it. I have no idea how anyone could manage with vB's built-in mark read feature (which was introduced only in 2.2.0 btw!).
Well, there is the caveat that it does add a substantial amount of queries. If you use this and the sub-forums hack you'd better have a well tuned MySQL box!

Although I'm going to start using a cache engine for the sub-forums display as soon as I get the latest version of my site up and running.

Ethan

Gimp 12-11-2001 03:47 PM

this hack just wracked everything! :mad:

Meta 12-11-2001 04:16 PM

Quote:

this hack just wracked everything!
That isn't really good news.

I'm trying to install this hack on 2.2.1 ... but i have my problems with this in index.php:

PHP Code:

        // do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
          if (
$bbuserinfo['lastvisit']<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        } 

The mine looks different ... 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';
          }
        } 

Nevermind ... install it anyways? Or what would you say?

Meta 12-11-2001 05:09 PM

Same problem in forumdisplay.php.

I did it this way:

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'];
                    }
// ** CODE ADDED BY ETHANK TO SEE IF THE FORUM WAS MARKED READ SEPERATELY
        /* Select id from forum where parentlist like forumid
        cycle through, for each if lates thread is greater than mark read time or bbuserinfo, select lastpost, limit 1, if true flag
        */
        
$forum['onoff'] = 'off'

I hope, this will work.

(But i'm not finished with everything until now. Maybe in just an hour i will try to install this all.)

(The part in index.php is the same like in forumdisplay.php ... isn't it?)

Meta 12-11-2001 06:16 PM

So ... installed. Almost without problems ... but ...

i get an error:

Quote:

Missing argument 2 for getpostbit() in /home2/www/sphex/newzones/admin/functions.php on line 56
whenever i click a link.

Any ideas?

Meta 12-11-2001 06:43 PM

Hm ...

i turned the functions.php back in default status ... and now it seems to work.

I mean ... now it works ... without modifications in functions.php ... strange, isn't it?

But i am slightly afraid of i'm missing something ... this can not be, or what do you say, ethank?

Meta 12-12-2001 06:19 PM

Anybody at home? No?

Anyway ... it's still working fine, i think. Without the modifications in the functions.php ...

But i'm so curious ... i think there must be a reason why you wanted us to modify the functions.php ... or is it because of the difference to 2.2.1 ?

(And please excuse my poor english ... i do my best. If it's hard to understand me please feel free to ask me about it. And i will try better.)


All times are GMT. The time now is 04:44 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.01530 seconds
  • Memory Usage 1,869KB
  • 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
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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