Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 9,651 through 9,675 (of 14,333 total)
  • @robin-w

    Moderator

    ok, I’ve just loaded your code to my test site, and I can set a user to member and it holds

    Suspect either theme or other plugins

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    In reply to: Background Color

    @robin-w

    Moderator

    ok, all I get is

    Oh bother! No forums were found here!

    I’m guessing you forums are private?

    @robin-w

    Moderator

    you would need to know how to copy a bbpress template, modify it and then load it to your child theme

    so you would need FTP access to your site

    If that sound possible, the come back and I’ll try to help further

    posting this untested code in here just so I don’t lose it !

    <?php
    					$user_id = wp_get_current_user()->ID;
    					$topic_id = bbp_get_topic_id() ;
    					$topic_author = bbp_get_topic_author_id( $topic_id ) ;
    					$is_topic_author = ($topic_author == $user_id ? true : false) ;
    					if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) && $is_topic_author ) : ?>
    

    @robin-w

    Moderator

    and asked very nicely, can you create suitable topic titles for future request ‘HELP!’ isn’t really a good title – everyone who posts on here needs that, and it doesn’t help others searching later.

    @robin-w

    Moderator

    Shortcodes

    [bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
    [bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.

    @robin-w

    Moderator

    I suspect it could be done, but can you repost onto my bbp user ranking plugin website, and I’ll take a look

    https://wordpress.org/support/plugin/bbp-user-ranking

    @robin-w

    Moderator

    so you want your users to be able to create new forums?

    In reply to: bbpress link error

    @robin-w

    Moderator

    bbpress hates local installations

    try adding

    add_filter( ‘bbp_verify_nonce_request_url’, ‘my_bbp_verify_nonce_request_url’, 999, 1 );

    function my_bbp_verify_nonce_request_url( $requested_url )
    {
    return ‘http://localhost:8888&#8217; . $_SERVER[‘REQUEST_URI’];
    }

    @robin-w

    Moderator

    ok, I can’t immediately see an error in your coding

    two thoughts

    1. does professional stick – I know you don’t want to use that, but it would help show if it is the whole code or just part that is not working.

    2. since lots of people copy code, it may be that your function names are not unique – eg function add_new_roles may exist elsewhere.

    Try making them unique

    ie change

    function add_new_roles

    to

    function kajzh_add_new_roles

    and change then filter that calls that function

    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );

    to

    add_filter( 'bbp_get_dynamic_roles', 'kajzh_add_new_roles', 1 );

    and do this for all the functions – each has a name and then a filter that calls it.

    @robin-w

    Moderator

    As far as I can see that is down to the rest api, not bbpress – it does the same with posts ie not show author.

    I suspect barry is way ahead of me in knowledge but these two links seem to show that you write api callbacks into your website and then add them to the api

    http://wordpress.stackexchange.com/questions/224332/how-to-get-author-meta-into-post-endpoint-in-api-v2

    http://v2.wp-api.org/extending/adding/

    @robin-w

    Moderator

    what is dashboard>settings>forums>auto role set to?

    @robin-w

    Moderator

    great – glad you are fixed !

    @robin-w

    Moderator

    the code for if… needs two = signs so try

    function none_people_discuss() {
    $voice_count = bbp_get_topic_voice_count(); 
    if ( $voice_count == 1 )
    echo '<span class=”no_support”>[No support]</span>';
    }
    add_action( 'bbp_theme_before_topic_title', 'none_people_discuss' );
    In reply to: Background Color

    @robin-w

    Moderator

    can you post a link to your site?

    @robin-w

    Moderator

    that code should put [no_support] before the topic title – is this what you are trying to achieve?

    @robin-w

    Moderator

    no problem !!

    @robin-w

    Moderator

    yet unbelievably there seems to be no-one who has a solution after all the years of BBpress being around.

    I suspect that this is because it is the symptom of many problems.

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    @robin-w

    Moderator

    so did you change the post author in wp_posts?

    In reply to: Per forum admin?

    @robin-w

    Moderator

    2.6 alpha apparently has per forum moderation

    @robin-w

    Moderator

    Ok, then who is the culprit?

    you are

    go to

    dashboard>plugins>add new and serach and install bbpress

    In reply to: bbpress link error

    @robin-w

    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    @robin-w

    Moderator

    this is a theme not a bbpress plugin error.

    that is install it as a new plugin not as a theme !

    @robin-w

    Moderator

    quickest way is to add this to your .css file

    .bbp-topic-started-by {
      display: none;
    }

    @robin-w

    Moderator

    I found that the above code took away the Forums, Topics and Replies from the dashboard in bbpress.

    I found some other code and modified it as follows

    /**
      * Add REST API support to an already registered post type.
      */
      add_action( 'init', 'rew_custom_post_type_rest_support', 25 );
      
      function rew_custom_post_type_rest_support() {
      	global $wp_post_types;
      
      	$post_type_name =  bbp_get_reply_post_type();
      	if( isset( $wp_post_types[ $post_type_name ] ) ) {
      		$wp_post_types[$post_type_name]->show_in_rest = true;
      		$wp_post_types[$post_type_name]->rest_base = $post_type_name;
      		$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
      	}
    	$post_type_name =  bbp_get_topic_post_type();
      	if( isset( $wp_post_types[ $post_type_name ] ) ) {
      		$wp_post_types[$post_type_name]->show_in_rest = true;
      		$wp_post_types[$post_type_name]->rest_base = $post_type_name;
      		$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
      	}
    	$post_type_name =  bbp_get_forum_post_type();
      	if( isset( $wp_post_types[ $post_type_name ] ) ) {
      		$wp_post_types[$post_type_name]->show_in_rest = true;
      		$wp_post_types[$post_type_name]->rest_base = $post_type_name;
      		$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
      	}
    	  
      }

    @barryhughes-1 – thoughts – can this be done better?

    @robin-w

    Moderator

    @rajaindian – I have done some coding, but do you have the ability to test this first on a test site to make sure it works?

Viewing 25 replies - 9,651 through 9,675 (of 14,333 total)