kriskl (@kriskl)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 51 total)
  • @kriskl

    Participant

    thanks Robin,

    I did not look st the style pack for few weeks. did not know/remember it was there!

    cheers
    Kris

    @kriskl

    Participant

    2 months ago it worked OK, because threaded replies on BBpress was enabled

    yesterday/today I have turned it off, only then when I have noticed it

    @kriskl

    Participant

    I guess, one way to fix it would be to change number of replies in a topic to 100 or 200

    if there is no easy fix

    @kriskl

    Participant

    hi, no, I had to turn off threaded replies feature of BBpress and therefore the plugin
    as some users were complaining πŸ™

    it was difficult for them to find recent replies in topics where there were 50 or more replies..

    do you think I should turn the plugin back on?

    @kriskl

    Participant

    Hi Robin,

    Sorry to re-open this.

    the latest topics pagination works great! thanks to the code above,

    BUT when I turned off threaded replies. the normal pagination in topics is strange..

    here is what I mean

    https://opentuition.com/forums/

    the page numbers it shows are : 1, 2, 4
    instead of 1, 2, 3, 4, or 1,2, 4

    and when I go to some topic

    and click on page 3
    it shows like this:

    1, 1, 2, 3

    here is the example

    https://opentuition.com/topic/obu-period-40-results-post-your-comments-instant-poll/page/3/

    is there anything that can be done? do you think?

    thanks
    Kris

    @kriskl

    Participant

    I use “bbPress Do Short Codes” plugin

    maybe it will help

    @kriskl

    Participant

    Hi Robin!
    You are a star! it’s back and it’s working great!

    so, I hope it will make it into trac in the future release

    Many thanks
    Kris

    @kriskl

    Participant

    I second that.
    any fix would be really appreciated

    @kriskl

    Participant

    Hi Robin,

    thanks for the suggestion, of course I was looking at the code in the plugin before.. but it had overwhelmed me :))

    so, after your tip, here is what I ended up with,

    add_action ( 'bbp_template_before_single_forum', 'new_topic_button' ) ;
    
    function new_topic_button () {
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
    	$text=__('Create New Topic') ;
    	$href = apply_filters ('new_topic_button' , '#new-post' ) ;
    	echo '<a class="new_topic_button" href ="'.$href.'">'.$text.'</a>' ;
    	}
    }
    

    probably there is a more elegant solution.. as the button didn’t want to go to a line below the breadcrumbs.. had to use css

    .new_topic_button {
    background-color: #0066CC;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    text-decoration: none;
    width: auto;
    display: block;
    width: 200px;
    margin-top: 30px;
    }

    @kriskl

    Participant

    Hi Chuckie,
    yes, I was using your idea already, but with 8 forums and over 20 sub forums – it was not ideal therefore I wanted the create topic – like it is and should be in BBpress by default

    @kriskl

    Participant

    I use wp rocket caching plugin and it seems to work great with bboress

    @kriskl

    Participant

    oh Robin, you are a star! πŸ™‚

    the code did wonders.

    I’ll leave the dots as they make sense when going through the pages later.. so it’s consistent.

    and thanks! I was so silly, not realising about editing out the code
    <?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>
    in templates

    I thought there was some function code trick :))

    I hope you have a nice weekend, thanks again!

    ps. maybe you should add this filter as an option
    add_filter (‘bbp_before_paginate_links_parse_args’ , ‘rew_pagintion’ ) ;

    in your plugin?

    it seems many users might find it useful

    @kriskl

    Participant

    I see, pity, but thanks for your help πŸ™‚

    BY the way, How on this BBpress forums – it was possible to remove top pagination and leaving the one at the bottom?

    css display none kills both πŸ™

    @kriskl

    Participant

    yes,

    I have disabled all plugins but BBpress. and changed to WordPress default theme.
    with your code
    this is what it looks like:

    1 2 … 2,843 β†’
    it still shows the last page: 2,843

    https://opendev.leetdns.com/forums/

    @kriskl

    Participant

    it does not work on another site with 0 πŸ™

    I am using genesis framework by the way.

    @kriskl

    Participant

    yhm,
    I will try on another test site
    maybe some plugin conflict..
    here is some code above and below

    //ONLY BBPress below
    //create vertical list subforum layout
    function custom_bbp_sub_forum_list() {
      $args['separator'] = '
    ';
      return $args;
    }
     add_filter('bbp_after_list_forums_parse_args', 'custom_bbp_sub_forum_list' );
     
    
    function ra_bbp_increase_pagination($args) {
        $args['end_size'] = 0;
        $args['mid_size'] = 3;
        return $args;
    }
    add_filter( 'bbp_topic_pagination', 'ra_bbp_increase_pagination' );
    
    function rk_hot_topics() {
       $reply_count = bbp_get_topic_reply_count();
      
       if ( $reply_count > 5 )
          echo '<span class="hot">HOT</span>';
    }
      
    add_action( 'bbp_theme_before_topic_title', 'rk_hot_topics' );

    @kriskl

    Participant

    hi,

    yes it is in the correct child theme πŸ™‚

    I have also tried this code – which seems similar to yours, and I can make more page numbers – front and end. but I can’t remove the end with 0

    function ra_bbp_increase_pagination($args) {
        $args['end_size'] = 0;
        $args['mid_size'] = 2;
        return $args;
    }
    add_filter( 'bbp_topic_pagination', 'ra_bbp_increase_pagination' );

    @kriskl

    Participant

    In the functions file

    – I can increase the number of β€œpages” but 0 doesn’t work

    @kriskl

    Participant

    Thanks for quick reply,

    I have just tried the code and nothing has changed :((

    @kriskl

    Participant

    Hi Robin,

    for example on this page:

    https://bbpress.org/forums/

    to remove / hide 981 982 983 pages

    the css class seems to be the same, so not sure how to hide it

    In reply to: user profile

    @kriskl

    Participant

    I know about aravatars. when I turned them on after migration fro phpbb – lost of users got pissed off, and left to other similar forums which provide what our forum does…

    But at least buddypress allows uploading the avatar..

    IMHO not being able to upload their own avatar.. but having to register and use aravatars.. is a major drawback in otherwise great BBPress

    @kriskl

    Participant

    OK. the problem was with this custom code, which stopped working it would seem..

    //* Correct Gravatars 
    function bp_remove_gravatar ($image, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	if( $image && strpos( $image, "gravatar.com" ) ){ 
    		return '<img src="' . $default . '" alt="avatar" class="avatar" ' . $html_width . $html_height . ' />';
    	} else {
    		return $image;
    	}
    }
    add_filter('bp_core_fetch_avatar', 'bp_remove_gravatar', 1, 9 );
    
    function remove_gravatar ($avatar, $id_or_email, $size, $default, $alt) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	return "<img alt='{$alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
    }
    
    add_filter('get_avatar', 'remove_gravatar', 1, 5);
    
    function bp_remove_signup_gravatar ($image) {
    	$default = get_stylesheet_directory_uri() .'/images/mystery-man.jpg';
    	if( $image && strpos( $image, "gravatar.com" ) ){ 
    		return '<img src="' . $default . '" alt="avatar" class="avatar" width="60" height="60" />';
    	} else {
    		return $image;
    	}
    
    }
    add_filter('bp_get_signup_avatar', 'bp_remove_signup_gravatar', 1, 1 );

    @kriskl

    Participant

    where can I download the latest Release Candidate 4?
    thanks

    In reply to: Spam Forum Posts

    @kriskl

    Participant

    enable BBpress again, BUT disable that anyone can post,
    let only registered to users post,. and see if it makes any difference,

    @kriskl

    Participant

    maybe you did not enable an option in wordpress settings to allow registrations?

Viewing 25 replies - 1 through 25 (of 51 total)