![]() |
[HTL] & [Normal] Persistant Mark Forum Read
Here's the core of a Persistant Mark Forum Read routine.
What it does and How it works: Clicking the Mark Forum Read link in a forum now adds a record to the database and marks that forum read as of the moment you click the link. New messages posted after you mark a forum read will remain "new" until you click Mark Forum Read again in that forum. To view ONLY new messages, click on the lightbulb instead of on the forum name. You'll only see threads that have been active since you marked the forum read. The mod requires 2 new tables. Displaying new messages simply hijacks the $ daysprune function by plugging in the time that the forum was last marked read. The standard Active Topics (View New Posts) function is unaffected, except that the lightbulb is no longer connected to that routine(optional). The lightbulb now indicates if the forum has been marked read with this routine. There's also a QuickScan feature which shows the unread topics in all forums (similar to the regular View New Posts routine, but the threads remain on display until you mark each forum (or all forums) read. Quickscan can be turned on and off for each forum separately. Don't install this in a production environment, try it on a test system first. Feedback and help appreciated. Ed July 14, 2004: Updated package to v0.3. This version includes a new file that will Mark ALL Forums Read. July 22, 2004: Updated package to v0.4. This version includes QuickScan. July 25, 2004: The basic package is now complete with the addition of individual forum on/off control in the quickscan. Aug 7, 2004: Added text to make navigation easier. Added additional support for subforums Aug 9, 2004: Added HTL installer |
Is there a demo somewhere?
|
Quote:
|
lol is there a problem with making it a public demo? haha
|
Quote:
You can see this mod operating on these forums: www.yestalk.org and www.afterhoursbbs.com Ed |
I've updated the package to include "Mark ALL Forums Read"
|
Very nice thanks for sharing shall install tomorrow :)
|
I assume that posts won't automatically be marked read after you enter them under this system, right? It'd be nice if posts you entered/posted in were to be marked read like usual but the rest would stay unread until you either went into them or marked forum read (sort of like a combo of how it works now and the persistant mark forum read).
|
Quote:
However, if you come back later and view the same threads and there's been no activity, the icons are gone. In order to completely tie those icons in to the new system, I'd have to get rid of the mark read cookie entirely, which would break the old system. I understand that the vBulletin team might impletement a "mark thread read" feature at some point, but that's beyond the scope of this hack. Ed |
This is AWESOME! :D Just what I've been looking for since coming to VB! Thank you! I shall try it, and hope it works. If not, we can work out the bugs. :)
EDIT: Initial testing reveals no problems! :D (other than an issue with my database table prefixes, solved by adding 'prefix_' before 'lastreads' in your mysql query. that's not something you can fix though, it's an induvidual case) :tired: |
Thanks for the feedback, I'll look into the tableprefix issue.
I've also added the Quickscan routine, which is the first step towards making this hack practical. Next on the list is to add the ability to turn individual forums on or off regarding inclusion in the quickscan. After that, what I'd really like to do is fully integrate the package with vB. Ideally, there'd be an option to select which version of Mark Read to use - the version that's included with vB, or this one. I wonder if it would be possible to set it up so each user could choose which system they prefer. For example, it would be nice to be able to toggle the use of the "go to first unread" link to be part of this routine so that the icons stay visible until the forum is explicitly marked read. That level of integration would probably require too many changes though. I wonder how I could convince Jelsoft to add this as a feature. Ed |
I'm afraid one of my users is getting this error: I think it may be in regards to this hack. Before this, I've had no problems, and I'm still using your the version without quickscan.
Quote:
|
Quote:
It kinda looks like the user is not logged in since there's no userid coming up in the query. If the user IS logged in, then I'll need to know exactly what the user is doing, then I'll have to sign up on your forum and try to reproduce the error. Note that error-checking is limited at this stage... I'm still in shock that it works at all :nervous: |
Quote:
"FROM [prefix]_lastreads" The table should be lr_lastreads, I wonder what happened there? You mentioned a problem with the table prefix, I wonder if this could be related. |
It was originally "FROM bere_lastreads", but I changed it to [prefix] to avoid confusion. This isn't an issue, it's just my database adds a prefix before the table name.
But I fixed it, I think. The issue was, the user somehow ended up without a userid. Possibly mySQL failed during registration. I fixed it by getting them to sign up again. I don't think it was your hack causing the problem. Thanks, though. :) |
Ok, if any other problems, let me know. The latest version seems be working really well. And with the ability to quickscan selected forums, the main coding is done. All I have to do now is bring it up to vB coding standards and work out a few small details.
|
Can't wait for the final version. :)
I have a quick question -- what is this lightbulb you speak of? |
Quote:
The lightbulb terminology comes from the code... the routine to display that icon is called "getforumlightbulb". Re the final version - writing the routine was the easy part. Bringing the code up to vBulletin standards will be the hard part! :cross-eyed: I also have a better idea on displaying the quickscan results, but I don't know how to accomplish it programmatically, so that will have to wait until I learn a little more about the vB code. In the meantime, I'll continue to clean up the current code in order to bring it to v1.0 so I can give it a full release. Ed |
Ahhh ok, thanks for the explanation. :)
|
One more question -- does this hack slow down the board or have any impact on the server or anything like that at all?
|
Quote:
|
I read in your instructions that it's pretty much crazy to install this on a live board right now...but do you think there'd actually be a problem? What could happen?
The board I am thinking of installing this on: http://www.tailfeathersnetwork.com/community/ |
Quote:
I would suggest setting up a backup board first and running through the install to make sure it works on your setup. If it installs ok for you, then make a backup of your database, vBulletin directories and styles, and then do the installation, being very careful to add little signposts in the code so you can uninstall if needed. Add some info to your faq or some other place to tell people how to use the mod. It's kind of confusing figuring out the diffs between the 2 mark read systems. I'm pretty comfortable using it, since I know what to expect on which page, but that isn't always obvious to someone using it for the first time. The bottom line is that there isn't much direct interaction between this module and the rest of the database, so the chances for messing up data are slim. I've only tested this on basic configurations, so I'm not quite sure how it will act on a more complex or really busy board in terms of queries and loads. I'm happy to try to help if a problem arises, but I don't guarantee success. Ed |
I'm confused about step #9 in the instructions. It says to:
Quote:
I did search for the original code in step 8 and couldn't find it exactly in level 1's template. But I did find this code: Quote:
Quote:
|
Quote:
You correctly figured out what to do. The code to display the lightbulb is right near the top, and we're just wrapping the link code around the image so that it becomes a hot link. The instruction should read: 9. Follow the same instructions for #8 except make the changes to "forumhome_forumbit_level1_post" I'll check my original templates to make sure that the code being searched for is an exact match, if not I'll update the instructs next time around. Thanks for letting me know about mistake, and let me know if you have any other problems installing or using. Ed |
Also when doing the navbar edits... I didn't have this code:
Quote:
Quote:
|
Thanks Ed... You are a quick replier and that is much appreciated. :)
|
Here is a question. Right now when you do a quickscan it shows new posts but forum by forum. Is there a way where it will show new posts across forums in the order they were posted instead of grouping them by forum? I hope my question makes sense.
|
Also - will it support subforums? I'd like to be able to mark subforums read individually. Because of the way my site's set up main forums are more like categories with subforums being the actual forums for posting.
Editted - Okay I think I've figured out how to mark subforums read. What I meant was the ability to click on the forum icon and view new posts. I'd like that for subforums as well. Is that possible? |
Quote:
Hmmm, the getnew link appears several times in the navbar template. I checked my default navbar template and I find that exact text but if you have a different style running, it might be slightly different. It's not that important though, that's just the place I selected to display those links, you might prefer them elsewhere anyway. The location of those links should not affect the operation of the mod. Ed |
Quote:
Go into the file quickscan.php and find this: ORDER BY forumid ASC,lastpost DESC Change it to: ORDER BY lastpost DESC That should return the threads in date/time order without regard to which forum they are in. |
Is that what places them in the quicklinks area? I'm having fun looking around after installing.
|
Quote:
I'll set up a test board tonight with subforums and see what needs to be added. Chances are the hot link just has to be added to the forumbit that displays the subforums. I don't know what happens when you add subforums, are there new level3 forumbits in the style editor? If so, just do the steps from 8 and 9 in the level 3 forumbits. If not, hang on and I'll look into it tonight. |
Quote:
|
Quote:
The main thing with the subforums is that clicking "mark forum read" through the forum tools option will not mark the forum read. So I'd need to be able to click on the icon to enter and then mark it read. At least that's what I think is supposed to happen from reading your explanation in the install instructions. |
Quote:
|
Quote:
Quote:
When you go into the forum using the lightbulb link, Mark Forum Read will work with my mod. When you go into the forum using the text link, Mark Forum Read will only mark the "Active Topics" as being read. I agree that this is a source of some confusion at this time. When you mouseover the selections in the drop down menu, check your status bar to see what the link looks like. If the link has this in it: "forumdisplay.php?do=markread" , then it's marking Active Topics read. If the link has this in it: "markforumread.php?do=markread", then it's marking it read for this mod. One last thing - seems I've killed the navbar entirely when reading New. You can restore it by going into the template file called fdisplaynew. Find this: $header $navbarX $qsthisforum Remove the X from the end of $navbar and your navbar will come back when viewing threads with new posts :) |
Okay I made the change. Thanks. :) I hadn't noticed it not working but maybe I just missed it.
Quote:
|
Here's something else I'd like to see. When you click on Mark Forum Read on the results screen it directs you back to the main forum page. I'd like to see it redirect back to the results. Can that be made an option? Or can you help me make that change for my board?
|
I've just uploaded v0.6.
This should clear up a lot of confusion about what is being marked while navigating. If you installed this previously, you should go over the installation text carefully to make sure you don't miss any of the new phrases. I've set up a test forum for myself with subforums. So far the mod seems to work with the subforums ok without any additional changes. I'll check further though. Changing the final link shouldn't be a problem, I can probably set that up tomorrow. |
All times are GMT. The time now is 06:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|