Ok once again this seems to be working. I wasn't able to do a lot of testing on my test site because it's not posted to very often. LoL
This modification will allow a registered user to "Mark All Read" all new threads/posts or just one board at a time by clicking on the lighted light bulb. (the yellow one)
The instructions are inside the markallread.6.1.php file. Download the zip and view with your favorite editor, change the affected files and upload them and the markallread.6.1.php script to your threads and/or template directories.
I just noticed a glitch on my test site. A few of the forums had every post/reply marked as new in the forum list when they shouldn't have. Clicking on the "Mark All Read" fixed it though. I think I may have a bug or two in the individual marking of the boards. I'll have to look through everything and see what may be the cause.
Hi, I played a little to make your hack language-file aware. Hope I didn't mess up code
In the ubbt_registerednav, I changed your code like this:
code: | <script language="javascript" type="text/javascript"><!-- function MarkAllRead(board,title){ if(board) { document.markall.oneboard.value=board; if (confirm("{$ubbt_lang['MARKALL_READ2']} "+title+" {$ubbt_lang['MARKALL_READ3']} {$ubbt_lang['MARKALL_READ4']}")) { document.markall.submit(); } } else { if (confirm("{$ubbt_lang['MARKALL_READ1']} {$ubbt_lang['MARKALL_READ4']}")) { if (confirm('{$ubbt_lang['MARKALL_READ9']}')) { document.markall.submit(); } } } } // --> </script>
and added code in the Generic language files:
code: // Hack MarkAllRead (for Javascript Alerts, so: no " or ' or & ): $ubbt_lang['MARKALL_READ1'] = "You are about to mark all posts/threads as read."; $ubbt_lang['MARKALL_READ2'] = "All threads/posts for"; $ubbt_lang['MARKALL_READ3'] = "will be marked as read."; $ubbt_lang['MARKALL_READ4'] = "\\nThis action can not be reversed! \\n \\nPress OK to continue..."; $ubbt_lang['MARKALL_READ9'] = "R E A L L Y ???\\n\\nReset ALL posts as READ????";
It's a good thing to get the text moved into the language files.
Are you having any problems with the individual board marking? As far as I can tell there shouldn't be. This was just a concern I had while making it. I'm not big on cookies. LoL
Yes, on my board I have cases, where, when I hit the bulb to markread an individual board, All messages are set as NEW (on all boards!) instead.
Could be that something's wrong with my hack implementation (and language file inclusion), and not with your original code. - That's why I am wondering whether anybody else experienced this with the hack too.
Dave, just wanted to say we've been using this for several weeks now on our testboard (only about 10 users), and we haven't had a single problem. It's worked perfectly every time. Thank you!
I attached the post I made to try to explain it to our members. It probably has a lot more detail than most other boards would want, but anyone is free to use it.
This hasn't been tested on UBB.threads 6.1 as of yet. The name of the file should never have been 6.1 as it was originally 6.0 but needed fixes to work with UBB.threads 6.0 and once I made the changes I changed the file to 6.1 to reflect the changes.
Has anyone been able to make this one work on their board?
Here we are using "Mark All Read" and not "Mark All or One Read". There didn't seem to be any changes needed for "Mark All Read" as it worked with 6.1 right away.
Dear JustDave, would it be possible to have this for 6.2. I hate not having the option to mark only one forum, marking all many times ok, but far from always...
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.