Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 7,151 through 7,175 (of 14,110 total)
  • @robin-w

    Moderator

    a common signature, or a different one per keymaster ?

    @robin-w

    Moderator
    // filter to show more than 50 sub forums on a forum
     function bbp_increase_subforums_per_page( $args = array() ) {
     $args['posts_per_page'] = 100 ;
     return $args;
     }
     add_filter( 'bbp_before_forum_get_subforums_parse_args', 'bbp_increase_subforums_per_page' );

    @robin-w

    Moderator

    hmm – can’t really suggest what is going wrong, works on my test site

    @robin-w

    Moderator

    where are you putting this function ?

    @robin-w

    Moderator

    fixed – was a theme issue

    @robin-w

    Moderator

    ok,try this- same code but different “‘” !!

    // filter to show more than 50 topics on a forum
     function bbp_increase_topic_per_page( $args = array() ) {
     $args['posts_per_page'] = 100 ;
     return $args;
     }
     add_filter( 'bbp_before_has_topics_parse_args', 'bbp_increase_topic_per_page' );

    @robin-w

    Moderator

    I’ll take a further look tomorrow

    @robin-w

    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

    @robin-w

    Moderator

    you’re welcome !

    @robin-w

    Moderator

    without testing, I suspect this will work

    // filter to show more than 50 topics on a forum
     function bbp_increase_topic_per_page( $args = array() ) {
     $args[‘posts_per_page’] = 100 ;
     return $args;
     }
     add_filter( ‘bbp_before_has_topics_parse_args’, ‘bbp_increase_topic_per_page’ );
    In reply to: bbPress Moderation

    @robin-w

    Moderator

    @robin-w

    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

    @robin-w

    Moderator

    my plugin should be able to help

    bbp style pack

    In reply to: bbPress Moderation

    @robin-w

    Moderator

    sorry, I have 6 plugins of my own to support, I don’t plan answering other author’s support forums

    In reply to: bbPress Moderation

    @robin-w

    Moderator

    your child theme function file, or if you don’t know what that means, install this plugin and put it there

    Code Snippets

    In reply to: bbPress Moderation

    @robin-w

    Moderator

    you can always use this in your functions file or the snippets plugin

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	if ( $translated_text == 'more old text' ) {
    	$translated_text = 'more new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    and just keep repeating the if statement

    In reply to: bbPress Moderation

    @robin-w

    Moderator

    1. I’m not sure that it is appropriate to describe someone who has taken considerable time to write a plugin that is entirely free to you as ‘extremely lazy’.

    2. then complaining about this plugin on another plugins support site is also not appropriate.

    I did have another word in place of ‘appropriate’ above, but changed this for politeness.

    Please realise that you benefit from others free work, and that you should be ‘extremely’ grateful for this.

    @robin-w

    Moderator

    bbpress is compatible with 5.0.3 and works fine on my test site.

    It may be a conflict with your theme or plugins

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

    @robin-w

    Moderator

    There is no donation place that I know of.

    But it is great that you want to 🙂

    @robin-w

    Moderator

    @budget101 thanks for posting this – I hope it will help others and it’s great that you have detailed your experience

    In reply to: vbulletin 3.x import

    @robin-w

    Moderator

    @budget101 thanks for posting this – I hope it will help others and it’s great that you have detailed your experience

    In reply to: Import Hung?

    @robin-w

    Moderator

    @budget101 thanks for posting this – I hope it will help others and it’s great that you have detailed your experience

    @robin-w

    Moderator

    untested, but add this to your functions file or snippets

    add_filter ('bbp_before_insert_forum_parse_args' , 'rew_order' ) ;
    
    function rew_order ($args) {
    $args['menu_order'] = 10 ;
    return $args ;
    }

    Code Snippets

    @robin-w

    Moderator

    function bbp_get_reply_topic_title ($reply_id)

    @robin-w

    Moderator

    ok, bit of code that does redirect but this is via wordpress login- this will be added to my style pack plugin shortly, with some further features, such as bbpress login

    //add private forum check
    add_action( 'bbp_template_redirect', 'rew_access_if_logged_out', 3 );
    
    function rew_access_if_logged_out(){
    	$topic_slug = get_option( '_bbp_topic_slug') ;
    	//quick check if we need to do this function
    	if (strpos($_SERVER['REQUEST_URI'], $topic_slug) == FALSE) return ;
    	$login_check=0 ;
    	$forum_slug = bbp_get_root_slug() ;
    	//if check is set (ie we prefix forums with the forum slug) then part 1 will be forum slug and part 2 will be topic slug, if not part 1 will be topic slug
    	$check = bbp_include_root_slug() ;
    	$link = explode('/',$_SERVER['REQUEST_URI']);
    	//next we need to topic id (post id) of the topic so we need to check if it is a topic and if so, find the topic id
    	if (!is_user_logged_in() && $check && $link[1] == $forum_slug && $link[2] == $topic_slug ) {
    		$post = rew_get_page_by_slug( $link[3], OBJECT, 'topic' );
    		$topic_id =  $post->ID;
    		$login_check=1 ;
    		} 
    	elseif (!is_user_logged_in() && empty($check) && $link[1] === $topic_slug) {
    		$post = rew_get_page_by_slug( $link[2], OBJECT, 'topic' );
    		$topic_id =  $post->ID;		
    		$login_check=1 ;
    	}
    	//now we need to check if the topic belongs to a private forum, so can't be seen
    	if (!empty ($login_check)) {
    		$forum_id = bbp_get_topic_forum_id($topic_id);
    		//if forum is private...
    			if (bbp_get_forum_visibility( $forum_id ) == 'private' ) {
    				$redirect = home_url() . '/wp-login.php?redirect_to=' .  urlencode( $_SERVER['REQUEST_URI'] ); ;
    				wp_redirect( $redirect );
    				exit;
    			}
    	}
    }
    
    function rew_get_page_by_slug($page_slug, $output = OBJECT, $post_type = 'page', $status = 'publish' ) { 
      global $wpdb; 
       $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type= %s", $page_slug, $post_type) ); 
         if ( $page ) 
            return get_post($page, $output); 
        return null; 
    }
Viewing 25 replies - 7,151 through 7,175 (of 14,110 total)