Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
NAME: Mark all read for single forum
VERSION: 1.0.1
DESCRIPTION: Mark all posts in a single forum as read.
WORKING UNDER: UBB.threads 6.2.x
PREREQUISITES: none
AUTHORS: Astaran
CREDITS: JustDave, who created the first MarkAllRead hack
DEMO: none
FILES ALTERED: ubbthreads.php,markallread.php, domarkallread.php,templates/ubbthreads.tmpl, templates/markallread.tmpl
DATABASE ALTERED: no
NEW FILES: none

HISTORY:
2003-03-20 Astaran - 1.0.0 Release of the hack
2003-03-25 Astaran - 1.0.1 Added a title tag to the image
Attachments
73721-marksingleforum_1_0_1.txt (0 Bytes, 69 downloads)

Last edited by Astaran; 03/25/2003 1:02 PM.
Sponsored Links
Joined: Mar 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 13
Hm, I must be missing something. I made all the changes and it's marking all the forums still. Time to debug...

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Are you clicking on the bulbs/newpost icons that appear right before the forum name?
Attachments
73796-screen.jpg (0 Bytes, 35 downloads)

Joined: Mar 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 13
aha, ok. I was looking for it to be within the forum itself. Since if you go into a forum and read say 3 out of 30 new threads, i looked at it as having the option there so that you could clear those threads of new posts after going in and seeing nothing else you wanted to read.

Once you go into the thread, you can't do the markforum from the index.

Last edited by ChrisBeveridge; 03/21/2003 2:30 PM.
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Nice mod... a great addition to this would be a mouse over that said it would mark this forum topics as read.

Sponsored Links
Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
Not sure if this is a problem, but it lets someone create entries into w3t_Last for forums that don't exist.

I was trying to add this into postlist.php/tmpl and ended up with some odd entries when I was doing something wrong.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I'm with smilesforu. I installed and it's working great, but I would have been in the same boat as Chris. There needs to be something that let's the users know they have this option.

Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
Installed, works. Only been in use for half a day.

I added this where the post button is on a forum instead.
Works great in expanded mode where not all the messages are marked as read when leaving the forum.

Next step: Mark Category read?

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
I added a title tag that is displayed when the user hovers over the image.
You can define the text in your language files.

For upgrading just search for "marktitle" in the instructions and add this lines to your code.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
If you're willing to share the instructions for adding the button on postlist.php, I'll update the instructions accordingly.

Expanding that to work with categories should be too hard.
You'll could use the existing "question mark" button or create a extra button.

Sponsored Links
Joined: Mar 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 13
[]RandyJG said:
I added this where the post button is on a forum instead.
[/]

Randy, can you post what you did for that? I'm having a hell of a time getting it to work right and must be missing something silly on my part.

Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
Reason I didn't share it was I haven't bothered to work it into the php/language files and to block it from annonymous.

For now I just have it hardcoded as an active link in the template for postlist.tmpl:

<!-- Under construction -->
<td class="navigation" nowrap="nowrap">
<a href="/ubbthreads/markallread.php?Cat=$Cat&singleforum=$Board">Mark Read</a>
</td>

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
[]RandyJG said:
Reason I didn't share it was I haven't bothered to work it into the php/language files and to block it from annonymous.
[/]

I'll do that tomorrow and update the intructions.

Joined: Mar 2003
Posts: 8
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 8
It'd be nice if the new posts icon remained (along with the ability to mark the forum) in the Main Index after you visited a forum if you haven't marked that particular forum yet. Can this be done?

Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
In the first instruction instead of replacing with this:

// --------------------------
// Which folder do we display
$boardfolder = "nonewposts.gif";
$markallstart = "";
$markallend = "";
$marktitle = "";
if ( ($checker < $Last) ){
$boardfolder = "newposts.gif";
if ($Username) {
$markallstart = "<a href="{$config['phpurl']}/markallread.php?Cat=$Cat&singleforum=$Keyword">";
$markallend = "</a>";
$marktitle = "title="". $ubbt_lang['MARK_TEXT'] . """;
}
}

Replace with this (Move the inner if to the outside of the new check):

// --------------------------
// Which folder do we display
$boardfolder = "nonewposts.gif";
$markallstart = "";
$markallend = "";
$marktitle = "";
if ( ($checker < $Last) ){
$boardfolder = "newposts.gif";
}
if ($Username) {
$markallstart = "<a href="{$config['phpurl']}/markallread.php?Cat=$Cat&singleforum=$Keyword">";
$markallend = "</a>";
$marktitle = "title="". $ubbt_lang['MARK_TEXT'] . """;
}

Joined: Mar 2003
Posts: 8
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 8
Sweet deal! Thanks RandyJG.

Joined: Mar 2003
Posts: 8
Lurker
Lurker
Offline
Joined: Mar 2003
Posts: 8
I can now mark the forum even if the "no new posts" icon appears in the Main Index, but the icon in the main index changes to the "no new posts" icon even though there are still unread posts in that specific forum. Is there a way you can keep the "New posts" icon untill a user marks that specific forum?

Joined: Mar 2003
Posts: 215
Junior Member
Junior Member
Offline
Joined: Mar 2003
Posts: 215
[6.2]

While trying to setup new indicators for anonymous users I noticed that this line is possibly not doing what it should:

preg_replace ("-$singleforum=(\d*?)-", '', ${$config['cookieprefix']."w3t_visit"})

It appears to be replacing, for example:

-myforum=1234567-

with this:

-1234567-

and then adding the new entry to the end of the cookie leaving some garbage behind each time a user uses 'mark read' for a specific forum.

When I replaced the pattern with this instead it appears to work as expected:

"/-$singleforum=(.*?)-/"

(this pattern is the pattern found in existing code to check if a forum in in w3t_visit cookie string)

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Thx, RandyJG!

I updated the instructions and reposted them HERE


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)