PDA

View Full Version : Mark Forum Read Hack


11-13-2000, 07:21 AM
I, personally, think that ezboards best feature is the Mark Forum Read hack.

I don't especially like how vbulletin has a cookie timeout instead. I have a particularly active forum, and it's almost impossible to read every topic. Thus, I think implementing an alternative to the cookie timeout would be great.

Is there anyway someone could create this useful hack? Here is a basic breakdown of how it works:

Inside of every individual forum, there is a Mark Forum Read link. It marks every post in that individual forum read. On the ForumHome page, there is a Mark All Forums Read link. This would (obviously) mark every forum read.

I would certainly prefer this over the cookie timeout. Let me know if it can be done.

11-13-2000, 01:59 PM
There have been a couple of topics about this in the past. You best look the up (I don't remember the outcome)

11-13-2000, 03:39 PM
I've searched around, but all I've found is a few. They're all unresolved.

11-13-2000, 03:49 PM
yes this would be nice in version 2.0 :)

11-13-2000, 06:04 PM
I've done that before.

Make a table called timestamps, fields userid and forumid.

Then just make a script that updates or adds the timestamp, and modify the main page so it looks to that instead of the cookie. Maybe if anyone really wants it I'll write up instructions...

11-13-2000, 07:36 PM
I would love that on version too, I hate how vbb handles cookies, it's horrible, if you can't read all new threads at once then you'll have to browse one by one later on, since they all become checked as read!

11-13-2000, 10:05 PM
Originally posted by JohnM
I've done that before.


Well then, maybe you can find the time to write up instuctions, if it's alright? If not you, anyone?

See, lots of people want this, and I think it'd be an excellent feature.

11-14-2000, 07:21 PM
<a href="http://vbulletin.com/forum/showthread.php?threadid=4583" target="_blank">http://vbulletin.com/forum/showthread.php?threadid=4583</a>

Onslo
04-30-2001, 11:16 PM
Greetings all,

I was just wondering if anyone has managed to implement the instructions that JohnM speaks of?

I could really use the feature, and would appreciate any further updates on this matter.

Kind Regards

Onslo

GimmeTech
05-01-2001, 12:10 AM
Agreed,

Mark individual forum read needed. Or a hack to do such. Wish it could be a 2.0 funtion.

ethank
05-01-2001, 03:24 AM
Originally posted by GimmeTech
Agreed,

Mark individual forum read needed. Or a hack to do such. Wish it could be a 2.0 funtion.

I'm going to try to do it with databases. It will mean changing any code that references the time-stamped cookie to look at two tables instead. I've got a prelim design done. Of course I've never programmed PHP before, but I know Java so it shouldn't be too difficult to learn.

I'm going to spend the week doing some hacking, I'll post my results.

EThan

RSergey
05-01-2001, 03:36 AM
Where can i get Mark Forum Read hack 1st version???

ethank
05-01-2001, 03:37 AM
Originally posted by RSergey
Where can i get Mark Forum Read hack 1st version???

Does it exist? If so count me in for it!

Ethan

Chris Schreiber
05-01-2001, 03:55 AM
Mark all Forums Read is a standard feature in vB 2.0

ethank
05-01-2001, 03:56 AM
Originally posted by Chris Schreiber
Mark all Forums Read is a standard feature in vB 2.0

We're talking about marking individual forums as read....

Ethan

Chris Schreiber
05-01-2001, 03:59 AM
Originally posted by ethank
We're talking about marking individual forums as read....


Sorry, I didn't read the entire thread carefully enough :)

RSergey
05-01-2001, 05:04 AM
I know that this function is in vB 2.0

But i'm using 1.1.5 and i want to download hack, just to make all forums read, not neccesary individual forums read... just all forums read

Onslo
05-01-2001, 07:02 PM
The Mark Forums Read feature is not really that much use on an extremely busy forum. People are always posting, and so marking the entire forum as read is not an option. The feature that I speak of is the abilty to mark an individual forum as Read so as to show the correct folder when leaving. The VBulletin method is not really that good for a busy forum, and the only way to actually tell if the forum has been added to since your last visit is to keep checking the status of the last post. I would prefer the folder display to show the correct status of that thread/s immediately rather than waiting for the cookie to timeout.

Is there anyone out there that has managed it? I belive that JohnM has been able to do it (see his post on the first page of this thread).

Kind Regards

Onslo

GimmeTech
05-01-2001, 07:27 PM
Onslo,

That is what we are talking about. We need a hack don't we? ;)

Onslo
05-01-2001, 08:33 PM
:) Indeed we do!

This feature is really important to a lot of users, I can'r see why it can't be added :confused:

C'mon guys, it must be possible. ;)

Kind Regards

Onslo

conan
05-01-2001, 10:16 PM
I for one requested this feature or hack 1000's of times :)
According to Wluke the problem would be that the cookie must be less than 4k in size and this would increase the size of the cookie, especially on board with lots of forums

ethank
05-01-2001, 10:19 PM
Use a database then. Ezboard does it, Webboard did it, etc. Not too much overhead if you cache the results in the session possibly. I'm going to try my hand at doing it with a database in much the same way that Webboard did it.

Ethan

ethank
05-02-2001, 05:23 AM
I made the first step toward fixing the issue. I got it so that instead of relying on a cookie to do the "lastvisit," which is basically how it sets what is read and what isn't, I modified the code in sessions.php to use a database instead. Two columns.


+----------+------------------+
| Field | Type |
+----------+------------------+
| readtime | int(10) unsigned |
| userid | int(10) unsigned |
+----------+------------------+


So all the code that uses $bbuserinfo[lastvisit] to set whether things are new or not now gets said date from the database instead. I also modified the code to "member.php" which contains the "mark all forums read" code.

Very simple, after I learned some PHP.

I should have the marking of individual forums as read done tommorow evening. It will use a seperate table. I could probably do them in one table (just using a null in the forumid field to indicate a global mark, or a 0), and I actually might now that I think about it.

To do the forum thing, I'll put a line in the global.php to check if the user is displaying anything within a forum (threads, forum listing) and if so, checks the forums mark-read timestamp, compares it against the master all forum mark read time, and if the one for the forum is more current, sets $bbuserinfo[lastvisit] to the forums instead.

The only thing that needs some tricky stuff is the "find new messages." I'm still not certain how I'm going to do it. What I think I'll do is have a "mark all read" clear the individual forum-marks when its clicked. So that way when a user checks for new messages, they could have a blanket "mark all read" and a few forum-specific timestamps. The search would look for anything newer than the mark-all-read timestamp for any forum, unless it has a timestamp that is newer than the all-forum one. In that case it looks at those forums individually for new messages....its an idea. Need to figure that one out a bit more.

Till tommorow!

I'll try to package this hack nicely. I'm really new to this whole vBulletin thing, so what is the best way for me to distribute this once its done?

EThan

tubedogg
05-02-2001, 06:26 AM
post it in the releases v2.x forum ;)

Onslo
05-02-2001, 09:18 AM
Wow! :)

Many Thanks Ethank

Looking forward to it :)

Kind Regards...

Onslo

conan
05-02-2001, 08:13 PM
Awesome ethank, I'm looking forward to this hack!

ethank
05-03-2001, 05:18 AM
Good news! I finsihed the Mark Forum Read hack pretty much, including the search for new messages functionality.

I need to go through and clean up code, also marking where I put modifications. What is the standard procedure for doing this in terms of making it easy for you all to put the code in? Should I do them as seperate files that you include in certain spots?

EThan

tubedogg
05-03-2001, 06:06 AM
Just mark down in a file like

"Find xxxx and below/above/replace it add/remove/with yyy"

Make it clear what file you're referring to. If you refer to a file in the admin directory, call it "admin/index.php" for example.

Zip up any files you need to give us (like markread.php for example) with the instructions and attach them to a new thread in the releases v2.x forum.

Onslo
05-04-2001, 10:30 AM
Well Done Ethank,

Those who need this hack all appreciate your work very much :)

How long before we can get our grubby little mits on the code then? :p

Onslo

ethank
05-04-2001, 12:15 PM
Originally posted by Onslo
Well Done Ethank,

Those who need this hack all appreciate your work very much :)

How long before we can get our grubby little mits on the code then? :p

Onslo

Hopefully today. I developed it on my dev workstation (win2k). I'm going to go through and clean up the code, and then do a test install on the production box before packaging it up for you all. If not today, this weekend.

EThan

Onslo
05-04-2001, 04:43 PM
Excellent......you are a true star!

Regards

Onslo

ethank
05-04-2001, 11:24 PM
Here's an RTF document with a summary of the changes I made. Not elegant, yet. I'll follow this post with a zip of the actual files.

You can see it in action at http://tony.murmurs.com

The UI for this feature needs some work, but we're working on it.

Ethan

ethank
05-04-2001, 11:35 PM
Couldn't post the rtf, so I posted it at http://www.murmurs.com/codechanges.rtf

ethank
05-04-2001, 11:41 PM
Zip of the changed files...

<zip removed due to violation of licensing agreement>

Hooper
05-04-2001, 11:41 PM
Forgive me if I am mistaken, but I did not see a mark thread read function on your site as of yet. Did I miss something?

ethank
05-04-2001, 11:42 PM
Also if anyone has tips on database tuning, if you think I should index a column or what not, do tell.

Ethan

Grunt_X
05-05-2001, 02:55 AM
Uhhh, how did he violate the licensing agreement?

Mike Sullivan
05-05-2001, 03:03 AM
Posted several complete files.

tubedogg
05-05-2001, 03:04 AM
He posted full vB2 files, I assume.

Sorry if I wasn't clear, ethank. I meant if you create any new files for the hack (like with my stars hack, I created a new file called stars.php), to put those up. You should not put up vBulletin files themselves.

ethank
05-05-2001, 03:45 AM
So I understand :) live and learn. Anyhow, the rtf has the code modifications, but isn't clear as of yet where they go. So I'll work on that documentation tommorow.

EThan

Onslo
05-05-2001, 08:42 AM
You can see it in action at http://tony.murmurs.com

Excellent, works a treat Ethank! :)

Forgive me if I am mistaken, but I did not see a mark thread read function on your site as of yet. Did I miss something?
Hooper, the function is underneath the thread titles :)

Couldn't post the rtf, so I posted it at http://www.murmurs.com/codechanges.rtf

Thankyou :)

So I understand live and learn. Anyhow, the rtf has the code modifications, but isn't clear as of yet where they go. So I'll work on that documentation tommorow.

Many thanks Ethank, all look good so far. We await your documentation.

Kind Regards

Onslo