bbPress

Simple, Fast, Elegant

bbPress plugin browser »

Unread Topics (0.4)

Download

Version: 0.4

Other Versions

Last Updated: 2007-9-27

Requires bbPress Version: 0.8.2 or higher

Compatible up to: 0.8.2.1

Author Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(3)

Your Rating

Author: Henry Baldursson

This plugin in short, marks unread topics by putting <strong></strong> tags around them, in the vein of fel64's Indicate New Posts.

Further, it updates the links to point to the next unread post in the topic.

It works by having a new table called utplugin_log which accounts for which posts have been read by which user in what topic.

While working nicely, this also means that the plugin won't scale well for huge boards, since the amount of records in that table have a potential for reaching number of users * number of topics.

In a perfect world, I wouldn't have to do that. But I honestly can't think of another way, except implementing some accounting for this stuff that will use meta data to put milestones on each forum and then purge records from the log. But I don't like that solution either.

So I have this here plugin, that is a complete drop-in solution for indicating new posts. Requires no modification of templates or other. Just put it in your plugin directory and activate it from the admin panel.

Currently there is no feature for marking every post as read or unread. Mainly because this is intended as a feature of indicating actual browsing of the forum rather than being a personal accountant for the user.

I must give props to fel64 for Indicate New Posts. This plugin isn't designed to be a replacement for that plugin, but is rather a more sophisticated and (regrettably) more resource intensive choice.

Tags: ,

  1. Looks like a nice plugin that offers users a high degree of service. Your writeup and explanation are helpful.

    I suppose if a board does become large, it can always be decommissioned.

    You might consider adding a limitation where a fixed amount of posts are tracked per user, updated to the latest 100 or 50 when they arrive. This would make the scaling linear rather than geometrical.

    Posted: 8 months ago #
  2. andorko

    Member

    Here's a small change I made. Instead of making unread topics strong, use a span for all topics with a class of unread or read.
    It makes it a little easier to style since you can style unread and/or read items.
    Otherwise you have to style the anchor, then un-style the strong. Which makes it tough to style the anchor and have the strong inherit from elsewhere.

    #latest a .read { font-style: italic; color: blue; }
    #latest a .unread { font-weight: bold; color: inherit; }

    The downside is that you have to alter your template style to see the effects of the plugin.

    If anyone likes it, it might be worth throwing into trac.

    Was:

    if (
     utplugin_is_topic_unread($topic, $last_read_in_topic) ||
     !$last_read_in_topic ) {
    	$title = '<strong>' . $title . '</strong>';
    }

    Changed to:

    $title_class = (
     utplugin_is_topic_unread($topic, $last_read_in_topic) ||
      ! $last_read_in_topic
     ? "unread" : "read" );
    
    $title = "<span class=\"{$title_class}\">{$title}</strong>";
    Posted: 6 months ago #
  3. monstr

    Member

    hm i get a sql error. can anyone help me?

    bbPress database error: [Table 'db121606_53.bb_utplugin_log' doesn't exist]
    SELECT post_read FROM bb_utplugin_log WHERE user_id = 1 AND topic_id = 3

    Posted: 2 months ago #
  4. Pinoy.ca

    Member

    Does someone know how other boards (VBulletin, PhpBB, Invision and so forth) implement theirs? Aren't they like this one, too?

    Posted: 1 month ago #
  5. Pinoy they do it more like this:
    http://bbpress.org/plugins/topic/unread-posts
    where new posts are only tracked on topics that have been looked at previously. Otherwise hundreds of topics on new boards would be marked as new on every visit and it's pointless. New topics that have not been read are always at the top anyway when you visit since topics by default are in date order.

    Posted: 1 month ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.