Skip to:
Content
Pages
Categories
Search
Top
Bottom

[New Plugin] BuddyPress Group Forums – New Posts Since Last Visit

  • @3sixty

    Participant

    <<Alpha “Bug Stampin’ Hootenanny” Release – Not submitted to WP repo yet>>

    Plugin Name: BuddyPress Group Forums – Posts Since Last Visit

    Plugin URI (recursive): <<here>>

    Download Link: http://bpanswers.com/buddypress-forums-posts-since-last-visit.zip

    Description: Keeps track of the 25 most recent topics a user has visited and “lights up” a new post icon if there are new posts in the thread. Topic visit data is stored in the BP DATABASE, not user cookies.

    TEMPLATE EDIT REQUIRED. Open forums-loop.php, find <class="td-title">, and after that, add: <?php if (function_exists('bp_show_new_posts_indicator')) bp_show_new_posts_indicator(); ?>

    Change the number of recent topics stored per user by changing the $record_limit value in the main plugin file.

    Future development should include a “new posts in thread” indicator and a “mark all read” link. If you found this plugin useful, and to support further development, please consider a small donation. Thanks!

    Version: 0.0.2

    Author: 3sixty

    Author URI: http://buddypress.org/developers/3sixty/

Viewing 15 replies - 1 through 15 (of 15 total)
  • @stwc

    Participant

    Thanks, 3sixty! Exactly what my users have been asking for — will implement and test ASAP. (The ‘mark all read’ will be a major Good Thing too.)

    @stwc

    Participant

    No joy so far. Showing icons all the time, visited or not… will continue to mess around.

    @3sixty

    Participant

    Showing icons all the time, visited or not…

    This is actually correct. There will always be an icon displayed. It will be the “lit up orange” icon if there are new posts, and a “non-orange” icon if no new posts.

    In certain browsers, such as Google Chrome, I noticed you need to reload the page to see the “lit up” icon switch off after you visit the thread. Firefox did not need this. Is there a way to force a refresh in php code?

    The best way to test this plugin would be to go to another computer or open a different browser and log in as a different user. Post some nonsense posts, then return to the first computer/browser and reload the page. You should see the icons “switch on.”

    @3sixty

    Participant

    Hold the phone!

    I found an obsolete conditional that is causing the plugin to fail on certain browsers. Probably the source of your issue.

    Need to update.

    @3sixty

    Participant

    Updated: version 0.0.3

    Same Download Link: http://bpanswers.com/buddypress-forums-posts-since-last-visit.zip

    @stwc

    Participant

    I’ll try again later, thanks.

    @stwc

    Participant

    Question: is this on a per-user basis? In other words, can I log out as admin, log in as a test-user, and expect to see new posts made as admin correctly flagged as new using the same browser?

    It doesn’t matter too much either way, that I can see, just verifying…

    @stwc

    Participant

    Looking good — works on refresh of forums listing page, same user.

    Now to dive into the code. I’m going to go for minimalism in the UI — no icon, just a CSS class manipulation to make it an a:link rather than an a:visited in appearance, I think, and maybe a small ‘X Posts Since Last Visit’ with a count, if possible.

    Nice work!

    @stwc

    Participant

    Working flawlessly so far. Logging out, posting as a testuser, logging back in, thread’s marked new.

    If there’s no major performance impact involved, I think we’re good!

    Also, I’m using the famfamfam icons (black and yellow bullets) instead for the moment because my child theme is a dark one with yellow highlights. Looking nice, may or may not go with pure css for read/unread.

    Thanks again for this — it was a user request literally just a few days ago.

    @3sixty

    Participant

    Thanks again for this — it was a user request literally just a few days ago.

    No problem – I had already coded it, but your request inspired me to turn it into a plugin.

    What code are you using to pull “X Posts Since Last Visit”?

    @stwc

    Participant

    None, as yet!

    I think I found a bug — the indicators don’t seem to be working properly in the /root/groups/groupname/forum/ listing of threads, just on the main forums list (at least for me)…

    @stwc

    Participant

    Fixed by removing && bp_is_page( BP_FORUMS_SLUG )

    from line 60.

    Not sure if that’s a smart fix or not, but it works for the moment anyway! ;-)

    @ch8rt

    Member

    Really interested in this if your still developing, it would be nicer to add a class for me, rather than the icons. And the mark as read is a good idea. When I first turned it on, all the posts we’re lit up, so presumably all users will see this, and will probably not want to go through and mark as read.

    Maybe set everything as read upon activation?

    @sadr

    Participant

    here’s to seeing this plugin appear in the plugin directory :)

    @sadr

    Participant

    Has this plugin been abandoned?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[New Plugin] BuddyPress Group Forums – New Posts Since Last Visit’ is closed to new replies.
Skip to toolbar