Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/20/2013 07:50:55 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Forum Subscriptions - Allow users to subscribe to new topics in specific forums.

  • Code largely lifted from existing Topics Subscriptions, and is based largely on forum-subscriptions.2.diff from mordauk, with edits for code consistency across bbPress components.
  • Refactor existing ambiguous function names into base functions for both forum and topic subscriptions.
  • Include new functions for getting and outputting subscriptions.
  • Modify user-subscriptions.php to show subscribed forums. This includes a modification to content-single-forum.php to include the "Unsubscribe" link if looking at a user profile page.
  • Modify templates/default/bbpress-functions.php to enqueue new JS file to handle forum subscription ajax.
  • Rename HTML element classes from bbp-topic-action to bbp-row-actions to better accommodate forum subscriptions (and any future actions.)
  • BuddyPress tested, JJJ approved.
  • See #2299. Props mordauk, netweb for the considerable effort.
  • More to do here, largely from forum-subscriptions.3.diff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/default/bbpress/loop-single-forum.php

    r4974 r5156  
    1313
    1414    <li class="bbp-forum-info">
     15
     16        <?php if ( bbp_is_user_home() && bbp_is_subscriptions() ) : ?>
     17
     18            <span class="bbp-row-actions">
     19
     20                <?php do_action( 'bbp_theme_before_forum_subscription_action' ); ?>
     21
     22                <?php bbp_forum_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
     23
     24                <?php do_action( 'bbp_theme_after_forum_subscription_action' ); ?>
     25
     26            </span>
     27
     28        <?php endif; ?>
    1529
    1630        <?php do_action( 'bbp_theme_before_forum_title' ); ?>
Note: See TracChangeset for help on using the changeset viewer.