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-topic.php

    r4995 r5156  
    1818            <?php if ( bbp_is_favorites() ) : ?>
    1919
    20                 <span class="bbp-topic-action">
     20                <span class="bbp-row-actions">
    2121
    2222                    <?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
    2323
    24                     <?php bbp_user_favorites_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '&times;' ) ); ?>
     24                    <?php bbp_topic_favorite_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '&times;' ) ); ?>
    2525
    2626                    <?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
     
    3030            <?php elseif ( bbp_is_subscriptions() ) : ?>
    3131
    32                 <span class="bbp-topic-action">
     32                <span class="bbp-row-actions">
    3333
    3434                    <?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
    3535
    36                     <?php bbp_user_subscribe_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
     36                    <?php bbp_topic_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
    3737
    3838                    <?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
Note: See TracChangeset for help on using the changeset viewer.