Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '+.+default+.+'

Viewing 25 results - 1,126 through 1,150 (of 6,788 total)
  • Author
    Search Results
  • #193254
    Robin W
    Moderator

    ok

    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

    #193229
    Robin W
    Moderator

    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

    #193132

    Topic: Widgets

    in forum Plugins
    tyrsdei
    Participant

    Hi, I’d like to make a custom widget with the default bbpress forum list widget as a code starting point. Where would I locate these, and where should I place them once I make it? Should i turn it into a personal plugin so i can use it on other sites if I wish?

    It’s just that the default one is meant for a side bar, and I want one for under my header on my main page.

    #193018
    inevitablebliss
    Participant

    Hello there!

    Ever since starting to work with bbPress (and Learnpress), all new users were assigned the site roles ‘subscriber, and participant’ and the forum role ‘instructor’.

    I don’t want all forum users to have the role ‘instructor’, since they aren’t. I have checked, but my default is really set to participant.

    See screenshots:

    https://drive.google.com/open?id=1RlJVw0QHIVV3Hp-MWvOdtYjh5cKAM6MR

    https://drive.google.com/open?id=1EAzfa2gQLyv20hmCVHGW65ueb8KBNUyV

    How can I make sure people will be assigned a normal forum role instead?

    My current versions (but I have had this issue for about 1,5 years now):

    WordPress 4.9.6
    BbPress Version 2.5.14
    BuddyPress Version 3.0.0
    LearnPress Version 3.0.8
    LearnPress BbPress integration Version 3.0.1
    LearnPress BuddyPress integration Version 3.0.2

    My website: http://www.InevitableBliss.com
    The forum: https://inevitablebliss.com/community/

    #193004
    yusareba
    Participant

    I would like to change my default post type from standard to video.

    Is there any way to do this?

    willallen83
    Participant

    Hi!

    I am trying to make any topics and replies submitted on the front end have a default category (I have extended the custom post type of bbPress to support categories). This works for everything submitted on the back end, but not everything submitted on the front end. I have played around with this a lot, and have not made any progress.

    I am using WordPress 4.9.5, bbPress 2.5.14 and the site I am working on (locked so this link probably won’t do any good) is https://gateway.aishasalem.com

        // adding possibilities to have categories for custom post types
        public function gt_custom_post_type_categories() {
          register_taxonomy_for_object_type( 'category', 'topic' );
          register_taxonomy_for_object_type( 'category', 'reply' );
        }
        add_action( 'init', 'gt_custom_post_type_categories', 11 );

    And this code to assign the categories as default when a post is saved / published. It works on the back end, but only partially on the front end.

        // setting default post catagory when saving
        public function gt_set_default_category( $post_id, $post, $update ) {
    
            // Slugs of the custom post types
            $slugs = array('topic', 'reply');
            // current post type
            $current_post_type = $post->post_type;
    
            // If this post isn't a custom posty type, don't update
            if ( !in_array($current_post_type, $slugs) ) {
              return;
            }
    
            // Sets the default category depending on the current post type
            switch ($current_post_type) {
              case 'topic':
                $default_category = 'livingroom-topics';
                break;
              case 'reply':
                $default_category = 'livingroom-replies';   // does not hook in on the fron end
                break;
              default:
                return;
            }
    
            // sets the default category
            $default_term = get_term_by('slug', $default_category, 'category');
            wp_set_object_terms(get_the_ID(), $default_term->term_id, 'category');
        }
        add_action( 'save_post', 'gt_set_default_category', 9, 3 );

    I have tried hooking into ‘bbp_new_reply’ but this doesn’t seem to help (maybe I am doing it wrong). Do you have any advice of how to do this? Where to hook into? If it should be a filter and a function of a different form (if so, please give as much info as possible, I am new to php wordpress and especially filters)?

    Thank you so much!!

    #192965
    scare31125
    Participant

    Hello,
    I have a bbPress site. I want to change some role permission.
    1. Participant Role will be able to delete their post and topic.
    2. Annonymous user can delete their post and reply.
    For number 1. I tried to follow this post but i am very confused. I added this code to theme child function.php

    add_filter ('bbp_get_topic_trash_link', 'topic_dont_delete');
    add_filter ('bbp_get_reply_trash_link', 'reply_dont_delete');
    
    function topic_dont_delete( $args = '') {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'sep'          => ' | ',
    			'trash_text'   => esc_html__( 'Trash',   'bbpress' ),
    			'restore_text' => esc_html__( 'Restore', 'bbpress' ),
    			'delete_text'  => esc_html__( 'Delete',  'bbpress' )
    		), 'get_topic_trash_link' );
    
    		$actions = array();
    		$topic   = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) );
    
    		if ( empty( $topic ) || !current_user_can( 'delete_topic', $topic->ID ) ) {
    			return;
    		}
    
    		if ( bbp_is_topic_trash( $topic->ID ) ) {
    			$actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-restore-link">' . $r['restore_text'] . '</a>';
    		} elseif ( EMPTY_TRASH_DAYS ) {
    			$actions['trash']   = '<a title="' . esc_attr__( 'Move this item to the Trash',      'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash',   'topic_id' => $topic->ID ) ), 'trash-'   . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-trash-link">'   . $r['trash_text']   . '</a>';
    		}
    		
    		if ( bbp_is_topic_trash( $topic->ID ) || !EMPTY_TRASH_DAYS ) {
    		if ( bbp_is_user_keymaster()) {
    		$actions['delete']  = '<a title="' . esc_attr__( 'Delete this item permanently',     'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete',  'topic_id' => $topic->ID ) ), 'delete-'  . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-topic-delete-link">' . $r['delete_text'] . '</a>';
    		}
    		}
    
    				// Process the admin links
    		$retval = $r['link_before'] . implode( $r['sep'], $actions ) . $r['link_after'];
    
    		return $retval ;
    	}
    	
    	function reply_dont_delete( $args = '' ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'sep'          => ' | ',
    			'trash_text'   => esc_html__( 'Trash',   'bbpress' ),
    			'restore_text' => esc_html__( 'Restore', 'bbpress' ),
    			'delete_text'  => esc_html__( 'Delete',  'bbpress' )
    		), 'get_reply_trash_link' );
    
    		$actions = array();
    		$reply   = bbp_get_reply( bbp_get_reply_id( (int) $r['id'] ) );
    
    		if ( empty( $reply ) || !current_user_can( 'delete_reply', $reply->ID ) ) {
    			return;
    		}
    
    		if ( bbp_is_reply_trash( $reply->ID ) ) {
    			$actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-restore-link">' . $r['restore_text'] . '</a>';
    		} elseif ( EMPTY_TRASH_DAYS ) {
    			$actions['trash']   = '<a title="' . esc_attr__( 'Move this item to the Trash',      'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash',   'reply_id' => $reply->ID ) ), 'trash-'   . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-trash-link">'   . $r['trash_text']   . '</a>';
    		}
    
    		if ( bbp_is_reply_trash( $reply->ID ) || !EMPTY_TRASH_DAYS ) {
    		if ( bbp_is_user_keymaster()) {
    		$actions['delete']  = '<a title="' . esc_attr__( 'Delete this item permanently',     'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete',  'reply_id' => $reply->ID ) ), 'delete-'  . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-reply-delete-link">' . $r['delete_text'] . '</a>';
    		}
    		}
    
    		// Process the admin links
    		$retval = $r['link_before'] . implode( $r['sep'], $actions ) . $r['link_after'];
    
    		return $retval ;
    	}

    But as I understood that, it was trashing post not deleting them. What I have missed? This code didnot worked for me. May be I have missed some steps.

    And for 2, I don’t know if its possible or not. Searched a lot but haven’t found any solution yet. My understanding is annonymous is not a role, nore a user. So how we can achieve that?

    Thank You

    #192944
    Robin W
    Moderator

    This can be done, but requires you to be able to use FTP and edit a file

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-statistics.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-statistics.php
    bbPress will now use this template instead of the original
    and you can amend this.

    so open the file and you will see starting at line 17

    <dt><?php _e( 'Registered Users', 'bbpress' ); ?></dt>
    	<dd>
    		<strong><?php echo esc_html( $stats['user_count'] ); ?></strong>
    	</dd>

    remove this and save the file back to wp-content/themes/%your-theme-name%/bbpress/content-statistics.php

    #192920
    Robin W
    Moderator

    need a link to your site and an example, but

    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

    yusareba
    Participant

    I love the default bbpress Forum Statistics widget, however I don’t want everyone knowing how many members are registered to the site. Is there a way that I can remove this?

    I tried to do it with developer console and CSS but couldn’t find an identifier.

    Preferably, I would truly remove it rather than hide it.

    I will be monitoring this thread. Thank you!

    #192780

    In reply to: Forum/Topics Order

    Robin W
    Moderator

    sorry, not sure what I can do to help from that description.

    All I can suggest is that you check whether you have any caching software – that frequently causes issues with things showing.

    If that is not the issue, then the best advice I can give is

    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.

    #191815

    Topic: add new roles

    in forum Installation
    veepay
    Participant

    Hello,
    I would like to create new roles in bbpress.
    Since this is not easy, I have used this code

    /**
     * Neue Benutzerrollen
     */
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called Super-Administrator */
        $bbp_roles['bbp_super-administrator'] = array(
            'name' => 'Super-Administrator',
            'capabilities' => custom_capabilities( 'bbp_super-administrator' )
            );
    
        /* Add a role called Administrator */
        $bbp_roles['bbp_administrator'] = array(
            'name' => 'Administrator',
            'capabilities' => custom_capabilities( 'bbp_administrator' )
            );
    
        /* Add a role called VIP-Member */
        $bbp_roles['bbp_vip-member'] = array(
            'name' => 'VIP-Member',
            'capabilities' => custom_capabilities( 'bbp_vip-member' )
            );
    
        /* Add a role called Member */
        $bbp_roles['bbp_member'] = array(
            'name' => 'Member',
            'capabilities' => custom_capabilities( 'bbp_member' )
            );
    
        /* Add a role called Trial-Member */
        $bbp_roles['bbp_trial-member'] = array(
            'name' => 'Trial-Member',
            'capabilities' => custom_capabilities( 'bbp_trial-member' )
            );
    
        /* Add a role called User */
        $bbp_roles['bbp_user'] = array(
            'name' => 'User',
            'capabilities' => custom_capabilities( 'bbp_User' )
            );
     
        return $bbp_roles;
    }
     
    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
     
    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_super-administrator' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_administrator' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_vip-member' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_member' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_trial-member' )
            $caps = custom_capabilities( $role );
    
        if( $role == 'bbp_user' )
            $caps = custom_capabilities( $role );
       
        return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
     
    function custom_capabilities( $role )
    {
        switch ( $role )
        {
     
            /* Capabilities for 'Super-Administrator' role */
            case 'bbp_super-administrator':
                return array(
                
    				// Keymasters only
    				'keep_gate'             => true,
    
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    				'moderate'              => true,
    				'throttle'              => true,
    				'view_trash'            => true,
    
    				// Forum caps
    				'publish_forums'        => true,
    				'edit_forums'           => true,
    				'edit_others_forums'    => true,
    				'delete_forums'         => true,
    				'delete_others_forums'  => true,
    				'read_private_forums'   => true,
    				'read_hidden_forums'    => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'edit_others_topics'    => true,
    				'delete_topics'         => true,
    				'delete_others_topics'  => true,
    				'read_private_topics'   => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => true,
    				'delete_replies'        => true,
    				'delete_others_replies' => true,
    				'read_private_replies'  => true,
    
    				// Topic tag caps
    				'manage_topic_tags'     => true,
    				'edit_topic_tags'       => true,
    				'delete_topic_tags'     => true,
    				'assign_topic_tags'     => true
                );
    
            /* Capabilities for 'Administrator' role */
            case 'bbp_administrator':
                return array(
                
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    				'moderate'              => true,
    				'throttle'              => true,
    				'view_trash'            => true,
    
    				// Forum caps
    				'publish_forums'        => true,
    				'edit_forums'           => true,
    				'read_private_forums'   => true,
    				'read_hidden_forums'    => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'edit_others_topics'    => true,
    				'delete_topics'         => true,
    				'delete_others_topics'  => true,
    				'read_private_topics'   => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'edit_others_replies'   => true,
    				'delete_replies'        => true,
    				'delete_others_replies' => true,
    				'read_private_replies'  => true,
    
    				// Topic tag caps
    				'manage_topic_tags'     => true,
    				'edit_topic_tags'       => true,
    				'delete_topic_tags'     => true,
    				'assign_topic_tags'     => true,
    			);
    
            /* Capabilities for 'VIP-Member' role */
            case 'bbp_vip-member':
                return array(
                
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
    
            /* Capabilities for 'Member' role */
            case 'bbp_member':
                return array(
                
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
    
            /* Capabilities for 'Trial-Member' role */
            case 'bbp_trial-member':
                return array(
                
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
    
            /* Capabilities for 'User' role */
            case 'bbp_user':
                return array(
                
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
     
                break;
     
            default :
                return $role;
        }
    }

    Unfortunately, I have the problem that the rights are all set to deny, as soon as the user changes something in his profile.
    Can I prevent that?

    In addition I have installed the plugin “bbPress Advanced Capabilities”

    VeePay

    #191725

    In reply to: 404s

    Robin W
    Moderator

    can only suggest

    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

    #191699
    Robin W
    Moderator

    so it is wordpress not bbpress

    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

    #191671
    loiruca
    Participant

    Hi, the admin email has been set up with the domain name. All plugins have been deactivated and default theme has been tested. he email is not sending to the user. I’m receiving a notification that a new user has been registered but the user is not receiving the email. We are losing people on your forums because of this issue.

    #191670
    Robin W
    Moderator

    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

    #191640
    Robin W
    Moderator

    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

    #191614
    p1s4
    Participant

    I know this topic is very old, but is the most recent i found about this argument.

    I need different colors for authors link ( topic and replys) .

    I solved using the filters bbp_get_reply_author_link and bbp_get_topic_author_link in function.php of my child theme.

    I changed the class $link_class in $author_link, you can found the original code in bbpress/includes/topics/template.php and bbpress/includes/reply/template.php.

    This is the complete code in my function.php child’s theme:

    //custom color LINK AUTHOR roles
    add_filter( 'bbp_get_reply_author_link', 'addrole_reply_author_links', 10, 2);
    add_filter( 'bbp_get_topic_author_link', 'addrole_topic_author_links', 10, 2);
    function addrole_topic_author_links($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' );
    
    		// Used as topic_id
    		if ( is_numeric( $args ) ) {
    			$topic_id = bbp_get_topic_id( $args );
    		} else {
    			$topic_id = bbp_get_topic_id( $r['post_id'] );
    		}
    
    		// Topic ID is good
    		if ( !empty( $topic_id ) ) {
    
    			// Get some useful topic information
    			$author_url = bbp_get_topic_author_url( $topic_id );
    			$anonymous  = bbp_is_topic_anonymous( $topic_id );
    
    			// Tweak link title if empty
    			if ( empty( $r['link_title'] ) ) {
    				$link_title = sprintf( empty( $anonymous ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_topic_author_display_name( $topic_id ) );
    
    			// Use what was passed if not
    			} else {
    				$link_title = $r['link_title'];
    			}
    
    			// Setup title and author_links array
    			$link_title   = !empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : '';
    			$author_links = array();
    
    			// Get avatar
    			if ( 'avatar' === $r['type'] || 'both' === $r['type'] ) {
    				$author_links['avatar'] = bbp_get_topic_author_avatar( $topic_id, $r['size'] );
    			}
    
    			// Get display name
    			if ( 'name' === $r['type'] || 'both' === $r['type'] ) {
    				$author_links['name'] = bbp_get_topic_author_display_name( $topic_id );
    			}
    
    			// Link class
    			//ADD ROLE CLASS TO LINK 
    			$role        = str_replace(' ', '-', strtolower(bbp_get_user_display_role( bbp_get_topic_author_id( $topic_id )) ));
    			$link_class = ' class="'.$role.' bbp-author-' . esc_attr( $r['type'] ) . '"';
    
    			// Add links if not anonymous
    			if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_topic_author_id( $topic_id ) ) ) {
    
    				$author_link = array();
    
    				// Assemble the links
    				foreach ( $author_links as $link => $link_text ) {
    					//ADD ROLE CLASS TO LINK 
    					$role        =  str_replace(' ', '-', strtolower(bbp_get_user_display_role( bbp_get_topic_author_id( $topic_id )) ));
    					$link_class = ' class="'.$role.'  bbp-author-' . esc_attr( $link ) . '"';
    					$author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text );
    				}
    
    				if ( true === $r['show_role'] ) {
    					$author_link[] = bbp_get_topic_author_role( array( 'topic_id' => $topic_id ) );
    				}
    
    				$author_link = implode( $r['sep'], $author_link );
    
    			// No links if anonymous
    			} else {
    				$author_link = implode( $r['sep'], $author_links );
    			}
    
    		} else {
    			$author_link = '';
    		}
    
    return $author_link;
    }
    
    function addrole_reply_author_links($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' );
    
    		// Used as reply_id
    		if ( is_numeric( $args ) ) {
    			$reply_id = bbp_get_reply_id( $args );
    		} else {
    			$reply_id = bbp_get_reply_id( $r['post_id'] );
    		}
    
    		// Reply ID is good
    		if ( !empty( $reply_id ) ) {
    
    			// Get some useful reply information
    			$author_url = bbp_get_reply_author_url( $reply_id );
    			$anonymous  = bbp_is_reply_anonymous( $reply_id );
    
    			// Tweak link title if empty
    			if ( empty( $r['link_title'] ) ) {
    				$link_title = sprintf( empty( $anonymous ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_reply_author_display_name( $reply_id ) );
    
    			// Use what was passed if not
    			} else {
    				$link_title = $r['link_title'];
    			}
    
    			// Setup title and author_links array
    			$link_title   = !empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : '';
    			$author_links = array();
    
    			// Get avatar
    			if ( 'avatar' === $r['type'] || 'both' === $r['type'] ) {
    				$author_links['avatar'] = bbp_get_reply_author_avatar( $reply_id, $r['size'] );
    			}
    
    			// Get display name
    			if ( 'name' === $r['type']   || 'both' === $r['type'] ) {
    				$author_links['name'] = bbp_get_reply_author_display_name( $reply_id );
    			}
    
    			// Link class
    			//ADD ROLE CLASS TO LINK  
    			$role        =  str_replace(' ', '-', strtolower(bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) )));
    			$link_class = ' class="'.$role.' bbp-author-' . esc_attr( $r['type'] ) . '"';
    
    			// Add links if not anonymous and existing user
    			if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) {
    
    				$author_link = array();
    
    				// Assemble the links
    				foreach ( $author_links as $link => $link_text ) {
    					//ADD ROLE CLASS TO LINK 
    					$role        =  str_replace(' ', '-', strtolower(bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) )));
    					$link_class = ' class="'.$role.'  bbp-author-' . $link . '"';
    					$author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text );
    				}
    
    				if ( true === $r['show_role'] ) {
    					$author_link[] = bbp_get_reply_author_role( array( 'reply_id' => $reply_id ) );
    				}
    
    				$author_link = implode( $r['sep'], $author_link );
    
    			// No links if anonymous
    			} else {
    				$author_link = implode( $r['sep'], $author_links );
    			}
    
    		// No replies so link is empty
    		} else {
    			$author_link = '';
    		}
    
    		return $author_link;
    	}

    Then you have to add the CSS to the new class added to author’s link.

    Hope will be useful,
    bye,
    Marco.

    #191480
    Robin W
    Moderator

    I can’t replicate this

    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

    #191479
    Robin W
    Moderator

    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

    #191453
    Robin W
    Moderator

    bbpress uses the wordpress default avatar as set in

    dashboard>settings>discussion

    There are plugins that let you add additional defaults eg

    Add New Default Avatar

    or use code in your functions file or a snippets plugin (https://en-gb.wordpress.org/plugins/code-snippets/) such as

    add_filter( 'avatar_defaults', 'mytheme_default_avatar' );
    function mytheme_default_avatar( $avatar_defaults ) 
    {
        $avatar = get_option('avatar_default');
    
        $new_avatar_url = get_template_directory_uri() . '/images/default_avatar.png';
    
        if( $avatar != $new_avatar_url )
        {
            update_option( 'avatar_default', $new_avatar_url );
        }
    
        $avatar_defaults[ $new_avatar_url ] = 'Default Avatar';
        return $avatar_defaults;
    }
    #191438
    Robin W
    Moderator

    bbpress just uses the display name as set in

    dashboard>users>all Users>edit user

    so you could change your users to what you want.

    users can change their individual if you give them access to their wordpress profile or their bbpress profile.

    There are some plugins and code that can change stuff eg

    Quick Tip: Set the Default Display Name for WordPress Users

    I googled ‘wordpress change display name for all users’ and lots lots of stuff.

    #191347
    Pascal Casier
    Moderator

    @fabioweb

    Ciao Fabio,
    As you can see on https://translate.wordpress.org/locale/it/default/wp-plugins/bbpress , bbPress is translated in stable and dev at 100%, so I confirm that all strings have been translated in Italian.

    What you show in your screenshots is however coming from a theme or an extra plugin and not from bbPress.

    So identify the theme or plugin that adds this string and translate it. More information on how to translate can be found on https://it.wordpress.org/traduzioni/

    #191278
    Robin W
    Moderator

    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

    #191274
    tvirtual
    Participant

    I am looking to do just what the original poster was looking for:
    When a user creates a new topic, the menu assigned to this new topic should be the same menu as the forum. It is currently using the default WordPress menu. Can someone point me to the right code and where to add it to automatically assign the right menu to new topics? I appreciate your help.

Viewing 25 results - 1,126 through 1,150 (of 6,788 total)
Skip to toolbar