Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,226 through 12,250 (of 32,521 total)
  • Author
    Search Results
  • #144677
    tharsheblows
    Participant

    Oh no, I know that – I am doing a somewhat bad thing and suggesting that I add in a hook to line 447 (ish – after line 446 at any rate and before the current line 448) eg — I want the mail send to happen *after* the page redirects:

    do_action( 'bbp_after_new_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author, false, $reply_to );

    then in bbp-functions (or something like this)

    remove_action( 'bbp_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    add_action( 'bbp_after_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    #144676
    Stephen Edgar
    Keymaster

    It already is…

    bbp_new_reply_handler as linked above line #426 -> do_action( 'bbp_new_reply'...

    /includes/core/actions.php#L229

    
    229	add_action( 'bbp_new_reply',    'bbp_notify_subscribers',                 11, 5 );
    230	add_action( 'bbp_new_topic',    'bbp_notify_forum_subscribers',           11, 4 );
    
    #144670
    Stephen Edgar
    Keymaster

    @tharsheblows I think your looking at bbp_edit_reply_handler rather than bbp_new_reply_handler, you should be looking here (I think, if I’m following you correctly) scroll up to /includes/replies/functions.php#L426

    #144663
    Stephen Edgar
    Keymaster

    Checkout bbPress’ ‘Conditional Tags’ https://codex.bbpress.org/bbpress-conditional-tags/

    I think they are pretty straight forwardly named so then checkout WordPress’ page and this specific sidebar example:
    https://codex.wordpress.org/Conditional_Tags#Variable_Sidebar_Content

    #144659
    nirgalo
    Participant

    Thanks Stephen. So I managed to get about same design for the forum’s home page, that is forums in a widget on the leftside bar, and recent topics in the page space (using the shortcode). I used a page template in a child theme for this. Now when I open a forum, I want to have forum content as the page (will use bbp-single-forum shortcode), and forum info as the widget in sidebar. But how can I set up thing so a specific sidebar appears when a forum content is being displayed?

    #144650
    Robin W
    Moderator

    Phew ! I read the first post and thought oh dear, then your second came through, glad it’s working.

    I’ll add a settings page to the code so that you can set which page it goes to for future users.

    #144643
    Magic-Komplex
    Participant

    Ok now, I installed your plugin and after spending some time removing another wordpress error I can say it works great, there’s just one problem for me.
    I’m using buddypress login and signup and cannot change to bbpress version of this, cause I’m also using super socializer plugin, which is written for buddypress.
    So now I’m getting a 404 error when I’m not logged in and try to enter one of my forums. I tried to change the permalink of my registration page to “sign-up”, as described in your doc, that didn’t work. I guess this is because I’m using buddypress sign up instead of bbpress.
    About changing the code in the php file, I’m not sure what to change. I tried adding the url of my registration page in line 103, that didn’t work as well.
    Do you have an idea how to fix this?

    #144640
    Robin W
    Moderator

    1. if you need these adding to bbpress roles, then as per previous:

    “what capabilities do you need for the other role?

    see

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    It’s quite east to add, just let me know what you need.”
    come back, and I’ll do a quick plugin.

    2. On your rank thing, can you specify

    the rank names you want
    what levels you want them at eg 50 posts
    what counts as a post – ie topic or topics and replies

    and I’ll tinker with the posts plugin to display this instead as a one off, and maybe cut it into a more general plugin later

    lasmanis
    Participant

    Hi all,

    I have a function tied to the filter bbp_theme_before_reply_form_submit_wrapper and I noticed that this function was called twice every time I refreshed the topic page. This happens only when pretty permalinks are on (/%postname%/) and only on FireFox.

    After investigating bbpress and WordPress source code I found out that the template_include filter (found in wp-includes/template-loader.php) is applied twice.

    It only happens on bbpress pages, only on FireFox, only with pretty permalinks on.

    I’m using WordPress 3.8 and bbpress 2.5.3

    I’m using a custom theme but I already tested on TwentyThirteen and I experience the same problem.

    Any help would be appreciated!!!
    Thanks!!

    #144637
    jslom
    Participant

    @peterwsterling No problem, thank you. Will do!

    I could suggest you sell on some of the popular wordpress plugin sites, as the exposure is much greater..

    One of them
    http://codecanyon.net/category/wordpress

    #144624
    MartyWebb
    Participant

    Hello anyone who would like to help. I’d like some assistance, I have the plug-in to insert a chat into my site. In the /community/forums page, it shows the forum index AND the chat at the bottom. But when I go into a forum, it’s forums/forum/*id*, and the nav-tree keeps it in /forums/ not /community/forums. So regardless of that issue, is there a way to make it so each page, and or just the index page shows the forums as they are, and below insert the code for the Ajax-Chat?

    I hope that all made sense, have a great evening and weekend.

    Robin W
    Moderator

    ahh! that’s it

    difference between

    ‘bbp_before_get_topic_subscribe_link_parse_args’

    and

    bbp_before_get_topic_subscription_link_parse_args

    So

    function hide_before2 ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscription_link_parse_args','hide_before2');
    

    will do it !

    Majijiboo
    Participant

    Thanks. I entered the below function and it did not fix the issue. Any idea why? Thx.

    
    function hide_before2 ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscribe_link_parse_args','hide_before2');
    
    Stephen Edgar
    Keymaster

    Rather than the forum subscribe link we are actually in a topic πŸ˜‰

    bbPress has the two default links ‘Favorite’ and ‘Subscribe’ seperated by a |

    The default before args forbbp_get_topic_subscription_link is 'before' => ' | ', so the below fork of Robin’s code should do what you need.

    function hide_before ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_topic_subscribe_link_parse_args','hide_before')
    #144611
    Robin W
    Moderator

    what capabilities do you need for the other role?

    see

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    It’s quite east to add, just let me know what you need.

    On ranking, you can have no. posts quite easily using

    https://wordpress.org/plugins/bbp-topic-count/

    #144610

    In reply to: PM button in posts

    Stephen Edgar
    Keymaster

    Do you have BuddyPress and the messaging component activated?

    Also depending on how you have modified your templates you need to make sure that your loop-single-reply.php template has the bbp_theme_after_reply_author_details hook still in place.

    Robin W
    Moderator

    I’ve had a look, but I can’t find what is doing this – must be buried deep

    If you keep toggling the | comes back, so my original code isn’t doing anything.

    The codes resolves as

    <span id=”subscription-toggle”>
    |
    <span id=”subscribe-2072″>
    Click to receive an email notification when a member responds below

    so it’s in the subscription part, but not part of the url.

    #144601
    Robin W
    Moderator

    Ok, so my plugin I taking longer to develop than I thought – but they always do!

    But I have been through the code needed for what you are after, and it neatly cuts into a plugin of it’s own, so that is what I’ve done.

    The plugin and instructions are here

    bbp Private Forums Visibility

    Read you way through, and let me know if you have any difficulties.

    Because I have cut this for you, I haven’t made it very pretty as a plugin, so there aren’t settings for the permalink – you’ll see what I mean when you read the link.

    If this doesn’t do what you want or you find issues, please come back, I should be able to fix fairly easily whilst the code is fresh in my brain.

    Have a great weekend !

    #144589
    Robin W
    Moderator

    ‘…as I am not really firm in php code ‘ – your coding skills don’t look at all bad to me πŸ™‚

    Without testing, that looks fine to me – give it a go.

    You could choose to just edit that file, but if you do, keep a note of what you changed, as bbpress updates will overwrite it – purists will say you should never alter core files, but as this is already a plugin, I am less fussy (expecting to be criticised for this!), but do know what you’ve changed.

    To do it “properly” you’d need to either

    create these as new widgets by copying the code to your functions file and renaming it.
    create this as a plugin.

    If you need help in how to rename come back, and I’ll make a list of what you need to change, but you’ll need to be a bit patient, as I have loads of queries os, and you’ll need to join a queue !

    #144587

    In reply to: User Permission

    Robin W
    Moderator

    ‘Sorry still newbie to all these codes thing πŸ™‚ ‘ – Don’t worry I was there only last year, you’ll soon pick it up.

    Start with

    https://codex.wordpress.org/Functions_File_Explained

    So you need to add this to your theme’s function file.

    If you are using a main theme, then any updates to the theme may overwrite your addutions, so a child theme is better. However if you put it in your main theme, just keep a note of the changes so that you can add them back if needbe.

    Ideally you should create a child theme – google ‘child theme videos’ and you’ll see how to create this – it is very simple, and just lets you ‘add stuff’ to your main theme without any risk of losing it.

    Have fun !

    #144586

    In reply to: User Permission

    batmanfan
    Participant

    Oh. Where do I place this code. Sorry still newbie to all these codes thing πŸ™‚

    #144585

    In reply to: User Permission

    Robin W
    Moderator

    Try

    function annointed_admin_bar_remove() {
            global $wp_admin_bar;
    
            /* Remove their stuff */
            $wp_admin_bar->remove_menu('wp-logo');
    }
    
    add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

    (stolen from the wordpress support forum, so haven’t tested)

    #144580

    In reply to: Private Messaging

    Stephen Edgar
    Keymaster

    Also BuddyPress, you need only enable the features you want to use πŸ™‚

    BuddyPress Components and Features

    #144569
    Nino
    Participant

    I think I found it at line 811:

    <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>

    What do You mean (as I am not really firm in php code :-/ )? If I replace it by:

    <?php if ( is_user_logged_in() ) ?>
       //old code for logged in user
       <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php 
       bbp_topic_title( $topic_id ); ?></a>
    <?php else ?>
       //new code for NOT logged in user
       <a class="bbp-forum-title" href=""><?php bbp_topic_title( $topic_id ); ?></a>
    <?php endif ?>
    #144567
    Stephen Edgar
    Keymaster

    The [bbp-topic-index] shortcode will use the default 15 topics based on bbPress ‘Topics per page’ setting, upping this to 25 will show 25 topics per page on the topics view (example.com/topics), the topics page for each single forum and again the same for any place you use the above shortcode.

Viewing 25 results - 12,226 through 12,250 (of 32,521 total)
Skip to toolbar