View Full Version : Persistent Mark Forum Read
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
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. :)
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 ;)
<<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:
$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);).
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.
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
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.
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.
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.
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
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
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
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
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
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
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
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
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
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:
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
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
this hack just wracked everything! :mad:
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:
// 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:
// 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?
Same problem in forumdisplay.php.
I did it this way:
// 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?)
So ... installed. Almost without problems ... but ...
i get an error:
Missing argument 2 for getpostbit() in /home2/www/sphex/newzones/admin/functions.php on line 56 whenever i click a link.
Any ideas?
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?
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.)
ethank
12-12-2001, 11:39 PM
Originally posted by Gimp
this hack just wracked everything! :mad:
More specifics needed, its running fine here.
EThan
ethank
12-12-2001, 11:42 PM
Your missing the new indicators by the post in the thread. THe changes in funcitons.php were to makepostbit.
EThan
VirtueTech
12-18-2001, 07:40 AM
How many queries does this add per process.
And when and what scripts are they added to please.
I'm very interested in using this along with Bira's Shrink old posts hack.
Also...what if the users do not mark the forum as read...does the system keep the threads as read forever...or does it kick into the cookies then.
Is there anyway to have it setup so that once the user reads the thread it then marks the thread as read immediately?
ethank
12-18-2001, 04:14 PM
Originally posted by VirtueTech
How many queries does this add per process.
And when and what scripts are they added to please.
I'm very interested in using this along with Bira's Shrink old posts hack.
Also...what if the users do not mark the forum as read...does the system keep the threads as read forever...or does it kick into the cookies then.
Is there anyway to have it setup so that once the user reads the thread it then marks the thread as read immediately?
1. Depends how deep your hierarchy is.
2. The instructions are in that document, although I need to revise it when I get some time to.
3. This replaces cookies used for forums as read, but not for threads read in the current session, that works the same.
Ethan
Arathorn
01-17-2002, 04:35 PM
This was one HUGE hack to install, but it works beautifully. In fact, I could never use Bira's Contract Old Posts hack to it's full effect (stupid cookie timeout...) until I added this hack.
THANKS! :)
Erwin
02-26-2002, 09:27 AM
Nice hack. I love it! :)
Erwin
02-26-2002, 06:20 PM
By the way, the server load increase is there, but marginal. My users love it - we recently merged with an ezboard forum and the migrated members had requested this. They are now ecstatic!
Infernus
02-28-2002, 10:58 PM
When I installed this, After trying to mark a forum read I would just get a white screen. Not sure what the problem was, but im guessing its one of the places where I had to guess on the code because the directions didnt match.
Tommy Boy
03-16-2002, 12:55 AM
This is a wonderful hack, I've said it before, and I'll say it again!
I just wanted to mention that in my forum, in order to display the forum home page, more than 260 sql queries are being performed! The situation is not much better with the forumdisplay.php script as well.
The good news are that after hours of intense optimization, the forum home page is now done with only 21 queries, and the forumdisplay.php with 23.
I know ethank is too busy to work on this hack anymore, but maybe these scary numbers will encourage him to come back to us. ;)
Erwin
03-17-2002, 04:56 AM
Tommy Boy - do you mind sharing your optimizations? :)
Tommy Boy
03-17-2002, 02:19 PM
It will be a bit difficult, since for starter, I didn't install the complete hack on my board, but only the parts I needed, and also I don't have the original hacked version to compare the differences with...
If you really want me to do it, and ethank approves, I guess I could work on something though... (you'll have to send me the originally hacked versions of some files).
JulianD
03-21-2002, 08:47 PM
Hi tommy, My members are requesting this hack all the time, but I don't want to install it due to the increase load to the server.. But after hearing you, you are my last hope!
I would really like to see such optimizations to the hack... If there's something I can do, just tell me :)
Erwin
03-21-2002, 09:13 PM
Well, it's all working like a charm for me - I also have not put in everything, only the relevant bits. :)
nafae
03-21-2002, 11:16 PM
tommy, you must help us, you are our only hope! </leia-like voice>
SHalliday
03-30-2002, 05:12 PM
What would those "relevant bits" be. I really want to use this hack but am not sure what parts to install. Would really appreciate the help.
TWTCommish
03-30-2002, 09:28 PM
Has anyone else had any problems with this? The "Mark Forum Read" link on the board I installed it on doesn't seem to work anymore...
ethank
04-20-2002, 10:36 PM
Well, I spent some time today optimizing this hack and got it so the forum index page is done using only 2 additional queries. That is a good thing :) I cut the total queries down to virtually nothing. You can eliminate one of the queries most of the time if you use PHP-Cache.
I also added PHP-Cache to handle sub-forum display, but thats another hack entirely.
So..I'll redo the instructions and repost them. With the new code it doesn't add much load at all to the forums. I still have to optimize forumdisplay the same way, but that one isn't as bad because usually there aren't as many forums on that page.
Ethan
JulianD
04-21-2002, 01:00 AM
Thanks Ethank! I'm going to try it right now!
ethank
04-21-2002, 06:47 AM
I haven't updated the instructions, so don't :) This week I will.
Erwin
04-21-2002, 07:21 AM
Your beautiful hack works like a miracle on 2.2.5 anyway at the moment... just so you know... :)
ethank
04-21-2002, 07:25 AM
Originally posted by Erwin
Your beautiful hack works like a miracle on 2.2.5 anyway at the moment... just so you know... :)
Hmm...well I'll post new instructions for index.php tomorrow.
Erwin
04-23-2002, 11:32 AM
Is it possible to post an upgrade text file from the previous version for those with the previous version already installed?
ethank
04-23-2002, 01:34 PM
Basically just do the changes in that file for /index.php only. It helps to start on a fresh copy of it. I can see about doing an upgrade, but my code base for index.php is probably way different than yours.
JulianD
04-23-2002, 09:05 PM
Originally posted by ethank
I haven't updated the instructions, so don't :) This week I will.
Just keep us informed ;)
ethank
04-23-2002, 09:33 PM
Instructions were updated for index.php in the first message. I have some more speed tweaks I can do as well, which I'll do when I get back from Seattle next week.
Once fully optimized this hack won't add much load at all and should hold people over that want this feature until V3
JulianD
04-24-2002, 03:33 AM
Thanks ethank, going to check them right now.
Erwin
04-26-2002, 08:34 AM
Your new index.php reduced my homepage queries by a LOT. Thanks! :)
ethank
04-26-2002, 02:10 PM
I'm going to also re-release the subforums hack for those that use
PHP-Cache. It will further reduce query load. I've got my main index
page to 32 queries minus the queries to do all my navigation.
ethank
04-26-2002, 02:10 PM
I'm going to also re-release the subforums hack for those that use
PHP-Cache. It will further reduce query load. I've got my main index
page to 32 queries minus the queries to do all my navigation.
SWFans.net
04-29-2002, 04:40 PM
I absolutely love this hack and have been using a version or another of it since vB version 2.0.3. :)
I was curious though if there was a way to modify the behaviors of the two different markread functions just a little.
What I am requesting may not be possible, but I sure think its logical. At least to me.
When a user goes to mark a forum read using this feature, it normally implies that they are done with that particular forum, but by default, when this action is performed they are returned to the same forum.
I have found a way to have it so that using either of the markread functions will return a user to the main forum index, but what I would like to see and perhaps a few others who use this, is that the user is returned to the Parent forum after the link to mark is clicked.
I?m really not very good with PHP, or else I probably would have come up with some kind of routine to achieve this for the users of my forum and added it here for others who may be interested.
For those interested in how I managed to get users to be redirected to the forum index when using this feature, have a look at this topic and apply what information it contains to the markforumread functions here within ethank?s hack to get that behavior.
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32384
If its not feasibly possible to do this I understand, but logistically it just seems to me to make more sense when a user marks a forum read that they be returned to the parent forum without having to make any extra click to either leave the forum they just marked or as the case is at my board, to go from the forum index back into the subforums they were browsing.
Great hack ethank! :) Now I just need to figure out what changes you made to optimize index.php, since my version of this is more or less from your original release of this hack with the mark forum and children forums function added in just recently.
dslteam
05-18-2002, 03:46 PM
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 doesnt 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.
pirotess
05-18-2002, 05:44 PM
When I go to modify this portion of my index.php:
// 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.
SWFans.net
05-19-2002, 02:50 PM
I know how to fix the index.php error, but the other, saddly, no. Add another } after that code, so it looks like this:
// 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';
}
}
}
dslteam
05-19-2002, 03:03 PM
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 !
Erwin
05-20-2002, 02:13 AM
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.
dslteam
05-20-2002, 05:30 AM
@Erwin - Thanks for your answer, but there are many users (https://vborg.vbsupport.ru/showthread.php?s=&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 !?
Christine
06-27-2002, 08:10 PM
Does anyone have this running as written on 2.2.6?
Erwin
06-27-2002, 08:48 PM
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.
Christine
06-27-2002, 08:55 PM
Sweet! I am going to load it now. It was a life saver on 2.0.3 all this time.
:)
Christine
06-27-2002, 10:49 PM
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?
ethank
06-28-2002, 05:43 AM
I do not yet. I will be doing the upgrade next week once I get moved
into my apartment. I also did some fixes I have to update the
instructions with.
Christine
07-01-2002, 04:35 PM
I got it working. :)
I am not using parent and children forums, so I used the same // do light bulb code for index.php as you are using in fourmdisplay.php and it all seems to be functioning correctly.
Thanks for staying on top of this one, Ethan. My members are thrilled with the functionality!
:)
Erwin
07-02-2002, 02:45 AM
Can't wait for the update, ethank. Good job all around! :)
ethank
07-03-2002, 03:41 PM
I've settled into my new apartment now, so I'm getting back into the swing of things on my forum.....right as July 4th rolls around :)
But I'm making progress. Will do the 2.2.6 upgrade then modify the docs.
Cynthia Blue
07-03-2002, 04:14 PM
I'm installing this hack to my newly upgraded board.. just got 2.2.6
Question, in forumdisplay.php where it says to find:
Find:
// display threads
$limitlower=($pagenumber-1)*$perpage+1;
$limitupper=($pagenumber)*$perpage;
My file doesn't say that. Instead it says:
// display threads
$limitothers="";
if (!$getperms[canviewothers]) {
$limitothers="AND postuserid='$bbuserinfo[userid]' AND '$bbuserinfo[userid]'<>0";
}
Since I'm a newb and not good at coding this stuff, what should I do?
Thanks. :)
Cynthia Blue
07-03-2002, 08:27 PM
Ok nevermind that question I guessed and got it right. :) Hack seems to be working fine so far. :)
I do have a question, though. I had applied the Mark Forum Read redirection hack... so when you are inside a forum and you mark it read, it will redirect you to the main page, and not keep you in the same forum after it's read.
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32057&highlight=mark+and+forum
Now, it seems, that hack leads to the member.php file instead of the forumdisplay.php file... and so that hack has been nulled. How would I go about applying that hack to the member.php file, or would that even be the right place?
Thanks. :)
Cynthia Blue
07-03-2002, 08:39 PM
Ok.. actually, it's not quite working right, either. I don't have child forums, I have different categories. When you click one forum in a category as read, it marks all the forums in that category as read.
This is my site: http://www.ilsikhaucil.com
This is the code that is in the template next to each individual forum... in the forumhome_forumbit_level2_post template:
<a href="member.php?s=$session[sessionhash]&action=markforumread&forumid=$forum[forumid]"><img src="{imagesfolder}/mark_read.gif" border=0 title="[Mark This Forum Read]"></a>
help... thanks. :)
Cynthia Blue
07-05-2002, 12:21 PM
I figured my problems out on my own... had to fiddle with some of the code, but it seems to be working okay now.
I put it on 2.2.6 today. It works great. It's worth the effort. :)
ethank
07-11-2002, 02:43 AM
Originally posted by FWC
I put it on 2.2.6 today. It works great. It's worth the effort. :)
So did I :) I need to make better instructions for the optimized one.
InvictuZ
09-25-2002, 10:25 AM
Anyone get this going with 2.2.7? I really want too. The default Vb mark all read, and new post indicators are driving me to bits. I'm sick of looking at a new post indicator on my main page, then going into the thread to see nothing new. Or nothing is being mark'd read and the post indicators are off, when there is a new post... :devious:
SWFans.net
10-14-2002, 10:07 PM
I still have the hack working (as it was in this release) in 2.2.8, but have one problem. The query count in forumdisplay is petrifying when a forum contains several forums with sub-forums. Im thinking that the replacement code for forumdisplay.php needs to be optimized like index.php was. I've played with it a little trying to emulate what was done in index.php and it does knock the query count down, but new post indications don't appear for subforums when viewing forumdisplay.php. :\
SWFans.net
10-15-2002, 03:16 AM
Nevermind my previous post. Using the same replacements for index.php in forumdisplay.php did work, I was just putting one piece in the wrong place, and it did fix the query counts as well. Down from over 300 to now only 18 :)
Originally posted by Cynthia Blue
Ok.. actually, it's not quite working right, either. I don't have child forums, I have different categories. When you click one forum in a category as read, it marks all the forums in that category as read.
This is my site: http://www.ilsikhaucil.com
This is the code that is in the template next to each individual forum... in the forumhome_forumbit_level2_post template:
help... thanks. :) Mind telling us how you fixed it? I'm having the same problem...
Nevermind, fixed it by moving all forums out of a category (I was going to do that eventually anyway, the category being there was just a result of the conversion from phpBB to vBulletin)
I must say, this hack is farking genius :D
The more I use it, the more I become addicted to it... damn, now gotta add it to my other board! :D
Arshes Nei
03-28-2003, 01:57 AM
Also I get an undefined function updatelocation{} in search.php when I add the 3rd search type into the file.
I get this error as well. Does someone have a solution to this? I'm using 2.3.0 right now
I'm about to try and install this on 2.3.0... I'll post the results we get :)
Arshes Nei
04-21-2003, 09:54 PM
Nevermind, I didn't realize that the version I was using was not the most recent hack.
I have one problem however, in 2.3.0 whenever one marks a post as read it marks the entire forum. Anyone know how to fix this?
sraposa
05-01-2003, 04:21 PM
so, has anybody successfully installed this on a vb2.3.0 site? if so, is it a public site i can play with?
i'd like to have something better than the default read/unread functionality, but i'm concerned that this hack hasn't quite made it into 2.3.0 territory.
-s
InnerSelf
05-04-2003, 04:41 PM
in some way it wont work here.
i installed the hack on a fresh new board to see where the problem was.
its the modification in index.php with me.
i have to replace this and then it goes wrong
REPLACE:
// 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:
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']='on';
} else {
// ** 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';
// Need to find forum children
$children_array = find_children($forum['forumid']);
for ($i=0;$i<count($children_array);$i++)
{
$childrenid = $children_array[$i];
$forum_array = $forumsarray_markread[$childrenid];
$readtime = $forum_array['readtime'];
$latest_thread = $forum_array['lastpost'];
$forum['last_thread'] = $latest_thread;
//Check to see if this thread's last read is < than the markread or base mark read
if ($readtime != '')
{
if ($readtime<$latest_thread)
{
$forum['onoff']='on';
}
}
else
{
$forum_info = $forumsarray_list[$childrenid];
$latest_thread = $forum_info['lastpost'];
if ($bbuserinfo['lastvisit']< intval($latest_thread))
{
$forum['onoff'] = 'on';
}
}
}
anyone can see if there a sign missing or too much??
Christine
05-21-2003, 01:34 AM
Hi Ethan!
Still going strong on this hack -- from 2.0.6 through 2.2.6!
I am working on upgrading straight to 2.3.0 and haven't stayed on top of the code changes. Does anyone know where bbarraycookie (forumdisplay.php line 34 and 294, member2.php line 450, showthread.php line 192, 311, etc..... ) came from? How does it relate to the vbsetcookie that it seems to be replacing in some of these locations?
If anyone can get this running in 2.3.0, post and let us know what you find!
Somebody should re-release this for the later 2.2.X vb versions... :(
sip217
10-30-2003, 09:19 PM
I just installed it on 2.3.2 and it seems to be working fine.
sip217
10-30-2003, 09:22 PM
I know people have asked this question before in this thread but it's never been answered.
I'd like users to be taken to the forums list, not the forum they just marked as read. Prior to this hack I made the modification in the following post:
https://vborg.vbsupport.ru/showpost.php?p=197967&postcount=2
This hack (god bless it.. wonderful!!) has not negated that change, yet the redirection now goes to the forum they were just in, instead of the forums list.
Anyone have ideas?
zsmom
11-24-2003, 03:48 PM
And ethank deliberately left out the automatic mark thread read - it's easy to put in though.
If you see this, could you post how to do this? And I'm assuming that I would have to install this hack first, right?
Thanks! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.