lissyhunnybee (@lissyhunnybee)

Forum Replies Created

Viewing 18 replies - 1 through 18 (of 18 total)

  • lissyhunnybee
    Participant

    @lissyhunnybee

    I’m not a theme author or a coder, I just muddle through with what I find on Google for a lot of php stuff lol but I am learning every time someone shows me a better way to achieve something 🙂

    Thank you!


    lissyhunnybee
    Participant

    @lissyhunnybee

    It may not be the most elegant solution but the following worked for me….

    In your theme’s functions.php place this code:

    //* Remove Commas in BBPress Post Tag Display
    function my_bbp_topic_tag_list( $topic_id = 0, $args = '' ) {
    	echo my_bbp_get_topic_tag_list( $topic_id, $args );
    }
    
    function my_bbp_get_topic_tag_list( $topic_id = 0, $args = '' ) {
     
    		// Bail if topic-tags are off
    		if ( ! bbp_allow_topic_tags() )
    			return;
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'before' => '<div class="bbp-topic-tags"><p>' . esc_html__( 'Tagged:', 'bbpress' ) . '&nbsp;',
    			'sep'    => '',
    			'after'  => '</p></div>'
    		), 'get_topic_tag_list' );
     
    		$topic_id = bbp_get_topic_id( $topic_id );
    
    		// Topic is spammed, so display pre-spam terms
    		if ( bbp_is_topic_spam( $topic_id ) ) {
     
    			// Get pre-spam terms
    			$terms = get_post_meta( $topic_id, '_bbp_spam_topic_tags', true );
     
    			// If terms exist, explode them and compile the return value
    			if ( !empty( $terms ) ) {
    				$terms  = implode( $r['sep'], $terms );
    				$retval = $r['before'] . $terms . $r['after'];
     
    			// No terms so return empty string
    			} else {
    				$retval = '';
    			}
     
    		// Topic is not spam so display a clickable term list
    		} else {
    			$retval = get_the_term_list( $topic_id, bbp_get_topic_tag_tax_id(), $r['before'], $r['sep'], $r['after'] );
    		}
     
    		return $retval;
    	}

    Then copy bbpress\templates\default\bbpress\content-single-topic.php into your theme bbpress folder and replace <?php bbp_topic_tag_list(); ?> with <?php my_bbp_topic_tag_list(); ?>

    Hope that helps others looking to do the same thing, and if there’s a better solution let me know lol


    lissyhunnybee
    Participant

    @lissyhunnybee

    I use the bbp style pack plugin with this shortcode in a widget to display just like that:

    [bsp-display-topic-index show='4' template = 'short']

    You can see on my home page how it displays. Mine is only set to show 4 but you can have it show however many you like.

    http://www.lissyhunnybee.com/

    In reply to: Avatar Size

    lissyhunnybee
    Participant

    @lissyhunnybee

    Perfect! Thanx so much 🙂 I saw that page wheile I was searching how to do the function but somehow missed the size section there lol

    In reply to: Avatar Size

    lissyhunnybee
    Participant

    @lissyhunnybee

    I have found that the following files have functions that might be making the size stick no matter what

    From bbpress\includes\topics\template.php

    function bbp_get_topic_author_link( $args = '' ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'post_id'    => 0,
    			'link_title' => '',
    			'type'       => 'both',
    			'size'       => 80,
    			'sep'        => '&nbsp;',
    			'show_role'  => false
    		), 'get_topic_author_link' );

    And from bbpress\includes\replies\template.php

    function bbp_get_reply_author_link( $args = '' ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'post_id'    => 0,
    			'link_title' => '',
    			'type'       => 'both',
    			'size'       => 80,
    			'sep'        => '&nbsp;',
    			'show_role'  => false
    		), 'get_reply_author_link' );

    If someone could write me a function for just the size part perhaps that would work? I don’t know enough to be able to write one myself lol

    In reply to: Avatar Size

    lissyhunnybee
    Participant

    @lissyhunnybee

    I tried looking at those files but they don’t have the same code for the avatar size as the other two I edited, so I don’t know where to do from there lol

    This forum looks to have a similar issue, the avatar for the first post has an 80px image scaled up to 100px whereas the replies are fine.

    I guess I am stuck with it for the time being lol

    In reply to: New BBPress User

    lissyhunnybee
    Participant

    @lissyhunnybee

    Thanx 🙂

    In reply to: Avatar Size

    lissyhunnybee
    Participant

    @lissyhunnybee

    I managed to fix my original issue which was caused by a social login plugin creating default avatars from facebook profile pictures, however I have come round full circle lol

    I decided I wanted the avatar on the topic page larger and so changed the sizes from 80 to 120 in the only files I can find the code in, loop-single-topic.php and loop-single-forum.php

    This has successfully changed the image sizes in the listings (kept to 50px via css) but has had no effect on the topic page. I have searched and searched and feel like I am banging my head on a brick wall lol

    In reply to: Avatar Size

    lissyhunnybee
    Participant

    @lissyhunnybee

    I have found that this is a plugin issue. Not a BBPress issue. So now I have to see if I can fix that LOL

    In reply to: New BBPress User

    lissyhunnybee
    Participant

    @lissyhunnybee

    Thanx 😀 Just need to work on some more content LOL


    lissyhunnybee
    Participant

    @lissyhunnybee

    Sorry to bump an older thread, but I just wanted to say thank you for this. I wanted to change the topic post count to a reply count and this was just the ticket 🙂


    lissyhunnybee
    Participant

    @lissyhunnybee

    Thank you 🙂


    lissyhunnybee
    Participant

    @lissyhunnybee

    I think because I had two separate functions both using bbp_before_get_breadcrumb_parse_args one cancelled out the other so changing that section worked. I prefer having it all in one though. Thanx so much for all your help 🙂


    lissyhunnybee
    Participant

    @lissyhunnybee

    Never mind, found my answer LOL just had to change one little bit 🙂

    //* Change BBPress Breadcrumb Seperator
    function filter_bbPress_breadcrumb_separator() {
    $sep = ' / ';
    return $sep;
    }
    
    add_filter('bbp_breadcrumb_separator', 'filter_bbPress_breadcrumb_separator');

    lissyhunnybee
    Participant

    @lissyhunnybee

    Hmmm, that code works but when I add it the code I added to change the seperator stops working. And if I add the function for the seperator after the code you gave me that one then stops working lol

    Here is the function I am using for the seperator, maybe they need to be combined somehow to work properly together?

    //* Change BBPress Breadcrumb Seperator
    function custom_bbp_breadcrumb() {
        $args['sep'] = ' / ';
        return $args;
    }
    
    add_filter('bbp_before_get_breadcrumb_parse_args', 'custom_bbp_breadcrumb' );

    lissyhunnybee
    Participant

    @lissyhunnybee

    Thank you SO much 🙂


    lissyhunnybee
    Participant

    @lissyhunnybee

    Thanx so much 🙂


    lissyhunnybee
    Participant

    @lissyhunnybee

    I would also like to move the breadcrumbs above the title lol

Viewing 18 replies - 1 through 18 (of 18 total)