Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subscribe to forum link


  • sk_12
    Participant

    @sk_12

    Hi,

    Where would I be able to edit the subscribe/unsubscribe to forum link/location?

    As there is no spacing between the link and the forum name.

    example

Viewing 8 replies - 1 through 8 (of 8 total)

  • Cars10
    Participant

    @shonu

    I agree, the location is so hidden, I would have not found it without you.
    Can bbPress make this link more prominent and better located?

    Thanks

    I try to adderss this by CSS for now, but css class is same everywhere, so need to think clever ,-)


    kiwi3685
    Participant

    @kiwi3685

    I simply added this to my bbpress.css file (in my theme folder)

    #subscription-toggle {float:right;}


    Cars10
    Participant

    @shonu

    Funny, exactly what I ended up doing. Okay, I afterwards garnished the visibility a bit more:

    #subscription-toggle a {
    font-weight: bold;
    padding: 0 2px 0 2px;
    border: 1px solid navy;
    background-color: white;
    }

    Two mind, good idea – thanks for replying 😉

    You also go about it this way by adding it to your themes functions.php file or your bbpress-functions.php file in your theme directory.

    To change from Home › Forums › My ForumSubscribe
    To change to Home › Forums › My Forum (Subscribe)

    function ntwb_forum_subscription_link( $args ) {
        $args['before'] = ' (';
        $args['after']  = ')';
     
        return $args;
    }
     
    add_filter( 'bbp_before_get_forum_subscribe_link_parse_args', 'ntwb_forum_subscription_link' );

    If you don’t want to add it manually grab the entire file here and add it as a standalone plugin to your WordPress install.

    https://gist.github.com/ntwb/7686980


    sk_12
    Participant

    @sk_12

    Thanks alot guys, all sorted now.


    Cars10
    Participant

    @shonu

    ok, here my latest uüdates to custom CSS field of my theme:

    #bbpress-forums > #subscription-toggle{
       float:right;
    }
    
    #bbpress-forums div.bbp-reply-content a.subscription-toggle,
    #subscription-toggle a{
       font-weight:bold;
       padding: 0 2px 0 2px;
       border: 1px solid navy;
       background-color: white;
    }
    
    #bbpress-forums div.bbp-reply-content .is-subscribed a.subscription-toggle,
    #subscription-toggle .is-subscribed a.subscription-toggle{
       background-color: #FFE000;
    }

    thefruitnation
    Participant

    @thefruitnation

    Thanks @Shonu and @netweb, I used yours @shonu but I saved @netweb also in case I decide to change the naming or structure of it


    Evan100
    Participant

    @evan100

    Stephen – I don’t know if this has changed since your post, but this isn’t great on bbpress 2.5.6, since it also affects the text for the topic subscribe/unsubscribe. Instead of seeing Favorite | Subscribe, you get Favorite (Subscribe). To fix this, you need to post-filter the args, and check before:

    function sa_after_get_forum_subscribe_link_parse_args($args) {
       if(empty($args['before'])) {
          $args['before'] = ' (';
          $args['after']  = ')';
       }
       return $args;
    }
    
    add_filter(
       'bbp_after_get_forum_subscribe_link_parse_args',
       'sa_after_get_forum_subscribe_link_parse_args');
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.