Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,676 through 4,700 (of 32,481 total)
  • Author
    Search Results
  • #188830

    In reply to: Feature requests

    Robin W
    Moderator

    where do you want that to put something – I presume in the content of a topic/reply? and what doe that shortcode do ?

    #188828

    In reply to: Feature requests

    Jacob N. Breetvelt
    Participant

    Thank you, this works great!

    One thing left: i can not find the filter to filter forum posts/replies, so i could do:

    function my_process_shortcodes($content) {
      return do_shortcodes($content);
    }
    add_filter( '...??...', 'my_process_shortcodes' );
    
    #188822
    ToddB
    Participant

    @robin-w For some reason I have the same problem with the bbpress forum index. It does not work.

    Here is the site link. But at the Forums level, no index.
    The [bbp-forum-index] code is on the Forum created.

    Any help would be great.

    #188813

    In reply to: Feature requests

    Robin W
    Moderator

    thanks for the post

    bbpress includes a version of the wordpress ‘after..parse_args’ which will let you do this so for

    •File …/wp-content/plugins/bbpress/includes/common/template.php line 1735:
    change ‘tinymce’ => false, into ‘tinymce’ => true,
    •File …/wp-content/plugins/bbpress/includes/common/template.php line 1736:
    change ‘teeny’ => true, into ‘teeny’ => false,

    you could put this code into a functions file or plugin

    //editor bbpress
    function rew_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        $args['teeny'] = false;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'rew_enable_visual_editor' );

    and the ability to filter functions so for

    •File …/wp-content/plugins/bbpress/includes/common/template.php line 1858:
    Remove array_push( $buttons, ‘image’ ); to remove the ‘standard’ image insert button that asks for a full url to an image, since we are replacing this by the [photo] shortcode generator.

    use this code in your functions file or plugin

    function rew_remove_image_button ($buttons) {
    	if (($key = array_search('image', $buttons)) !== false) {
    		unset($buttons[$key]);
    	}
    return $buttons ;
    }
    
    add_filter( 'bbp_get_teeny_mce_buttons', 'rew_remove_image_button' );

    The you don’t need to alter bbpress files

    Let me know if I can help further

    #188799

    Topic: Feature requests

    in forum Installation
    Jacob N. Breetvelt
    Participant

    To make it possible for other plugins to add buttons to the editors toolbar, please make it possible to run the wp_editor() for posts/replies with the switches ‘tinymce’ => true and ‘teeny’ => false.

    Also, make it please possible to get the posts/replies passing the ‘the_content’ or at least the ‘do_shortcode’ filter. This would enable other plugins to enter their shortcodes into the posts/replies and get them rendered in the final display of the posts/replies.

    For more information why i ask this, please read this ducumentation page of the plugin wp-photo-album-plus.

    #188787
    Robin W
    Moderator

    ok, put it into the child theme and remove form the parent theme – that way it doesn’t get lost on updates

    so you have a bbpress specific sidebar as per

    Layout and functionality – Examples you can use


    yes ?

    If so then in your new bbpress.php replace

    line 49 ish

    <?php get_sidebar(); ?>

    with

    <?php dynamic_sidebar( 'bbp-sidebar'); ?>

    #188782
    webgardengeek
    Participant

    That was it!

    So… filters need to be passed a variable which gets returned in order to function properly?

    Good to know, definitely not clear in the bbpress codex.

    Thanks, Robin. Means alot!

    -Dave

    #188779
    Robin W
    Moderator

    Try this

    function cxr_subforum_filter($args) {
     $args = (array (
    'before' => '<tr>',
    'after' => '</tr>',
    'link_before' => '<td>',
    'link_after' => '</td>',
    'separator' => '<br>',
     ));
     return $args ;
     }
    add_filter( 'bbp_before_list_forums_parse_args', 'cxr_subforum_filter' );
    #188778
    webgardengeek
    Participant

    Perhaps I am missing something, but your code and my code seem to be identical… nevertheless, I copied and pasted your filter into the functions.php file in the child theme and it did not work…

    Same result (502) errors.

    Any other ideas?

    #188776
    Robin W
    Moderator

    This is a known bug

    add this to your functions file

    // Blocked users should NOT get an email to subscribed topics
    function bbptoolkit_fltr_get_forum_subscribers( $user_ids ) {
            if (!empty( $user_ids ) ) {
                    $new_user_ids = array();
                    foreach ($user_ids as $uid) {
                            if (bbp_get_user_role($uid) != 'bbp_blocked') {
                                    $new_user_ids[] = $uid;
                            }
                    }
                    return $new_user_ids;
            } else {
                    return $user_ids;
            } 
    }; 
    // add the filter 
    add_filter( 'bbp_forum_subscription_user_ids', 'bbptoolkit_fltr_get_forum_subscribers', 10, 1 );
    #188746
    Robin W
    Moderator

    I’d suspect issues with the quotation – different systems seem to alter these – try making them consistent – this might work

    function cxr_subforum_filter() {
     bbp_list_forums(array (
    'before' => '<tr>',
    'after' => '</tr>',
    'link_before' => '<td>',
    'link_after' => '</td>',
    'separator' => '<br>',
     ));
     }
    add_filter( 'bbp_before_list_forums_parse_args', 'cxr_subforum_filter' );

    If it doesn’t then come back and I’ll take a deeper look, midnight here and on way to bed !

    strike3
    Participant

    When a new topic goes to moderation and is approved, some, but not all, of the regular new topic actions take place. One thing that does not seem to happen is sending out the new topic notification email. If possible, can the bbp_notify_forum_subscribers action be added when a forum topic is approved by a moderator (after checking to make sure notifications are enabled)? The new topic notifications are a great way to drive visitors to our forums, so this is turning into an issue on our site. The site owners want to be able to moderate most (or even all) of the new topics, but then no notification emails are sent out.

    If this is something I should try to figure out on my own, please let me know and I’ll give it a shot. I didn’t want to mess with the bbpress core code since it would get overridden on the next update.

    Thanks!

    Matt

    Wordpress Version: 4.7.8
    BBPress Version: 2.5.14

    #188744
    webgardengeek
    Participant

    I thought I followed the codex instructions pretty clearly, but this add_filter in my functions.php file is resulting in a 502 error and… I have no clue why!

    Sorry, bbpress newbie here… any help that anyone can offer would be awesome.

    Thanks in advance,

    -Dave

    PS Here’s the code I popped in my functions.php file:

    function cxr_subforum_filter() {
    bbp_list_forums(array (
    ‘before’ => ‘<tr>’,
    ‘after’ => ‘</tr>’,
    ‘link_before’ => ‘<td>’,
    ‘link_after’ => ‘</td>’,
    ‘separator’ => ‘<br>’,
    ));
    }
    add_filter( ‘bbp_before_list_forums_parse_args’, ‘cxr_subforum_filter’ );

    #188711
    Bharat Karavadra
    Participant

    Hello,

    I followed the instructions at the link below to create a bbPress specific sidebar and it appears in the admin widgets section but the sidebar does not appear on the user side whether or not any content is added to that bbPress sidebar.

    Layout and functionality – Examples you can use

    Can anyone help?

    Thank you in advance,

    Bharat

    #188708
    Robin W
    Moderator

    I’ve now incorporated the code above into my bbp style pack

    bbp style pack

    dashboard>settings>bbp stylepack>forum order

    #188707
    Robin W
    Moderator

    I’ve now incorporated the code above into my bbp style pack

    bbp style pack

    dashboard>settings>bbp stylepack>forum order

    #188706
    Robin W
    Moderator

    Issue resolved.

    Usernames had ‘ Disable the visual editor when writing’ switched off in profile

    I’ve now incorporated the code above into my bbp style pack

    bbp style pack

    dashboard>settings>bbp stylepack>topic/reply form item 9

    #188687
    ytwebdesigns
    Participant

    @elhardoum
    Hi thanks your code works well..

    Only the second part of code you added for returning exerpt isnt working for me.
    I was using the bbpress topics for posts plugin only it is quuite old now and causes conflicts.

    I would like to return in the new topics the post exerpt + a link back to the original post like this [See the full post at: post-title]
    Would appreciate your help.

    (:

    #188683
    DragoWeb
    Participant

    Could be usesful for some…

    Creating Content

    #188658

    It looks like a conflict is causing the WPML language parameter to be added before bbPress adds its /edit/ endpoint.

    I suppose it’s possible inside bbPress to try and handle that differently, but I’m reluctant to make it too fancy since it might break something else.

    Without really looking, my guess is that WPML should filter the permalink at a later priority (as late as possible) so that all other filters have a chance to hook in normally first.

    #188655
    Robin W
    Moderator

    @dreuezekiel – ok try adding this to your functions file

    add_filter('bbp_before_has_forums_parse_args', 'order_by_freshness', 10, 2);
    
    function order_by_freshness ($args='') {
    	$args = array(
    	'meta_key'   => '_bbp_last_active_time',
    	'orderby'    => 'meta_value',
    	'order'      => 'DESC',
    	);
    	return $args ;
    }

    if you don’t know how to do that, come back and I’ll wrap it in a baby plugin for you

    #188654
    Robin W
    Moderator

    @confusedneedhelp – ok try adding this to your functions file

    add_filter('bbp_before_has_forums_parse_args', 'order_by_freshness', 10, 2);
    
    function order_by_freshness ($args='') {
    	$args = array(
    	'meta_key'   => '_bbp_last_active_time',
    	'orderby'    => 'meta_value',
    	'order'      => 'DESC',
    	);
    	return $args ;
    }
    

    if you don’t know how to do that, come back and I’ll wrap it in a baby plugin for you

    #188649
    Robin W
    Moderator

    ok, I can only imagine that the code is not in the right place, or that a character is affecting (one character out of place and nothing works !)

    ok, remove the code above completely

    I’ve put the code into a small plugin

    go to

    add visual aditor

    and download it to your PC, noting where it is downloaded to

    go to

    dashboard>plugins>add new>upload plugin and upload the file you downloaded and activate

    If that doesn’t work, then I’m stumped, but please come back and let us know

    #188642
    Robin W
    Moderator

    I appreciate your frustration that you have not had answers posted, but not sure who you expect to answer them?

    People write open source software in their own time and offer it for free. Under the open software foundation the software is offered without any warranty or support. You use it if you like and not if you don’t. It is perhaps a bit much to then expect software authors to answer every question someone might have about that software, or indeed having offered that software to the world for free, that they should invest any time to this unless they wish to. To then complain that they won’t tell you how to modify their error free code to do something you want but they didn’t design seems even more insulting.

    If someone gave you a car for free, would you then tell them that they suck because they don’t come and service it for you? or whinge about it because they won’t re-spray it for you because you wanted it in red not green?

    I am not a bbpress author, I’m just a guy who uses this software, and in turn spends some of my time in trying to help others. I am too frustrated that people who ask questions on here so rarely then try and help others, and wish that more people would give up free time to help people like you.

    But I am just me and we are here to try and help where we can, but please lay off the insults and accept that free software does not come with a right to free support, and if people don’t answer your questions, it is maybe because wee like to help people who appreciate free help.

    To work out an answer for you will probably take 1/2 hour of my free time. I’ll take a look tomorrow maybe.

Viewing 25 results - 4,676 through 4,700 (of 32,481 total)
Skip to toolbar