Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,676 through 5,700 (of 32,518 total)
  • Author
    Search Results
  • #180069

    In reply to: signature separator

    Robin W
    Moderator

    try

    add_action ('bbp_theme_after_reply_content', rew_hr', 10) ;
     
    function rew_hr () {
    echo '<hr>' ;
    }
    #180068

    In reply to: signature separator

    senatorman
    Participant

    i get an syntax error in dreamweaver with this code

    #180066

    In reply to: signature separator

    Robin W
    Moderator

    this will be hit or miss, as it is xmas eve, and this code is entirely untried

    add_action ('bbp_theme_after_reply_content', rew_hr', 10) ;
     
    function rew_hr () {
    echo '<hr>'
    }
    #180064

    In reply to: signature separator

    Robin W
    Moderator

    do you know how to add code to your function file?

    #180055
    Robin W
    Moderator

    there is no shortcode for logout – users normally just leave the site

    you can add login/logout to the menu.

    This plugin will help you do that

    https://wordpress.org/plugins/bbp-style-pack/

    #180054
    ldesherl
    Participant

    Thank you. What is your shortode for logging out? I can’t find anything in your Documentation. I tred to create a shortcode and it shows up as code.

    This [bbp-login]

    to this:

    [bbp-logout]

    #180046
    akgt
    Participant

    Does the free model offer shortcodes ?
    Could I make a simple form or Send pm button which i could add to the sidebar ?

    #180023
    Robin W
    Moderator

    I TAKE NO RESPONSIBILITY FOR WHAT FOLLOWS !!!

    BACKUP YOUR DATABASE FIRST !!

    see

    Remove post_status Spam Posts from WordPress

    but this should do it

    DELETE FROM wp_posts WHERE post_status = "spam"

    It will not get rid of post meta for these.

    AITpro
    Participant

    @invoke_media_group – This forum topic does not have anything to do with your issue/problem. So please create a new forum topic for your different issue/problem. Also you should do standard troubleshooting steps first before posting your new forum topic: deactivate all other plugins to see if another plugin is causing the problem, comment out any custom functions you have created in your theme functions.php file, switch your current theme to a WordPress theme: 2017, 2016… When you post a bbPress forum topic you need to include these things: what WordPress version you have installed, bbPress version you have installed and what troubleshooting steps you have already performed.

    You should also probably include the relevant code in file: /bbpress/includes/core/template-function.php on line 316 (shown below) and that this function: bbp_get_template_stack() uses this filter: bbp_get_template_stack to Call the functions added to the ‘bbp_template_stack’ filter hook, and return an array of the template locations. There is also a related bug here that appears to have already been fixed: https://bbpress.trac.wordpress.org/ticket/2871

    	// Sort.
    	if ( class_exists( 'WP_Hook' ) ) {
    		$filter = $wp_filter[ $tag ]->callbacks;
    	} else {
    		$filter = &$wp_filter[ $tag ];
    
    		if ( ! isset( $merged_filters[ $tag ] ) ) {
    			ksort( $filter );
    			$merged_filters[ $tag ] = true;
    		}
    	}
    Invoke_Media_Group
    Participant

    bbpress is starting to KILL all my sites that have it. I am thinking it is time to REMOVE this from my sites. Now I cannot even access my sites. This is the error code:

    Warning: ksort() expects parameter 1 to be array, object given in /home/content/p3pnexwpnas06_data03/07/2899307/html/wp-content/plugins/bbpress/includes/core/template-functions.php on line 316

    Can anyone help?

    AITpro
    Participant

    WordPress 4.7
    bbPress 2.5.12
    Site: https://forum.ait-pro.com/
    Custom bbPress/BuddyPress Theme & tested switching to WP Twenty Seventeen Theme
    Tried creating a bug ticket on trac, but was not allowed to login and do so.

    Issue: In previous versions of bbPress this code below worked fine in my Theme functions.php file. As of bbPress 2.5.12 this code is no longer working in my Theme functions.php file. I checked output and bbPress Core code and did not see anything obvious. Output was good. ie $role and $caps, but it appeared that the filter was not being processed in time when the Activity template loaded. So I moved this code to the BuddyPress /plugins/bp-custom.php file and this code works fine. So obviously this some kind of init or loading order type of issue. ie the filter is being processed too late.

    // bbPress Disable Topic Tags for Participants
    function aitpro_get_caps_for_role_filter( $caps, $role ) {
    	
    	if ( $role == 'bbp_participant' )
    		$caps = aitpro_get_caps_for_role( $role );
    
    	return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'aitpro_get_caps_for_role_filter', 10, 2 );
    
    function aitpro_get_caps_for_role( $role ) {
    	switch ( $role ) {
    		/* Disable Topic Tags for Participants */
    		case 'bbp_participant':
    			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'     => false, // Using false disables allowing Participants to create Topic Tags
    
    			);
    			break;
    		default :
    
    		return $role;
    	}
    }
    #179991
    Dono12
    Participant

    I’m having this problem where a phantom link for the YouTube thumbnail is being shown in the excerpt portion of the Sidebar RECENT POST EXTENDED WIDGET. This phantom link, which is not clickable, takes you to the “video on YouTube” for that thumbnail.

    The weird thing is the phantom link is only being shown in the sidebar of the Buddypress Forums Plugin (BBP) page and nowhere else.
    I’ve tried the latest WP theme 2016, I’ve tried disabling all plugins, I’ve tried reverting back to older BBP Versions = (WHITE SCREEN OF DEATH) and I’ve tried digging through the codes for both plugin, got noooo where.
    I use the Automatic Featured Images from Videos plugin, to generate the YouTube Thumbnails. This plugin is also not the culprit. 🙂

    Please help, try a test version, see if the bug is a BBP plugin bug or a Recent Post Widget Extended plugin bug.

    Merry Christmas, if I don’t hear from anyone by then…. 😉

    donnaWPadmin
    Participant

    1.5 years ago, nothing’s changed. finish the stupid plugin already. What’s up with the incomplete code???

    #179978

    In reply to: Fetch different avatar

    ysiggen
    Participant

    Too late to edit my reply, I’d like to point out the fact that I was looking in the wrong area for replacing the wp avatar (with the bp one) as obviously in a forum, the avatar of each reply is attached to the… reply!

    That way I added a filter on the bbp_get_reply_author_avatar method instead of the bbp_get_current_user_avatar one.

    Personally, I’m not done as I am going to track down every part of my website where the wrong avatar gets displayed (which obviously means going through the wordpress code), but that’s not a bbpress concern anymore.

    (I don’t know if there is like a “resolved” mark to give or something, but I’m all done with this topic 🙂 )

    #179976

    In reply to: Fetch different avatar

    ysiggen
    Participant

    Okay so I am coming back here as I resolved it (it was quite easy actually, I am just very new to wordpress and also php programming).

    I just had to use the bp_core_fetch_avatar() function instead of the get_avatar() one.
    So, I had to call the correct function at the correct location and that’s all. Here is what I put in my function.php :

    //Make bbpress use the buddypress avatar instead of the wp one
    function bbp_get_bp_reply_author_avatar( $reply_id = 0, $size = 40 ) {
                    $reply_id = bbp_get_reply_id( $reply_id );
                    if ( !empty( $reply_id ) ) {
                            // Check for anonymous user
                            if ( !bbp_is_reply_anonymous( $reply_id ) ) {
                                    //Below is the old line
                                    //$author_avatar = get_avatar( bbp_get_reply_author_id( $reply_id ), $size );
                                    //Below is the new line
                                    $author_avatar = bp_core_fetch_avatar( array( 'item_id' => bbp_get_reply_author_id( $reply_id) ) );
                            } else {
                                   // $author_avatar = get_avatar( get_post_meta( $reply_id, '_bbp_anonymous_email', true ), $size );
                                    $author_avatar = bp_core_fetch_avatar( array( 'item_id' => get_post_meta( $reply_id, '_bbp_anonymous_email') ) );
    
                             }
                    } else {
                            $author_avatar = '';
                    }
    
                    return $author_avatar;
            }
    add_filter('bbp_get_reply_author_avatar', 'bbp_get_bp_reply_author_avatar');
    #179974
    Jon Fergus
    Participant

    We had this patched and it was working fine, but now the issue returned. Edits to replies are now creating multiple activity feed entries and multiple notification emails.

    We’re using:
    bbpress Version 2.5.11 (with the patch to activity.php applied)
    Buddypress Version 2.7.3

    This is what we have in activity.php:

    		// Get the activity stream item, bail if it doesn't exist
            $existing = new BP_Activity_Activity( $activity_id );
     		if ( empty( $existing->component ) )
    			return null;

    Would love some help with this.

    #179972

    In reply to: bbPress like Flarum

    Master
    Participant

    1. On bbpress.php change style.min.css to style.css and open style.css and change navbar-brand and add img. Or just edit on bbpress.php line
    <a class="navbar-brand" href="<?php echo esc_url(home_url(bbp_get_root_slug())); ?>" title="<?php bloginfo('name'); ?>" data-toggle="tooltip" data-placement="bottom"><?php bloginfo('name'); ?></a>
    2. Only topic, click To front http://prntscr.com/dldaw9

    Soulstudio
    Participant

    Hi,

    I’m using my code in functions.php file to store user’s location in the database and to display it on individual user profiles.

    function user_profile_bbp_location_information()	{
    	$location=bbp_get_displayed_user_field( 'location' ) ;
    	if ( ! empty($location) ) {
    		$label1 =  $rpi_options['item1_label'] ;
    		echo "<p>" ;
    		printf ( __( 'Location : ', 'bbpress' ));
    		echo $location;
    		echo"</p>" ;
    	}
    }
    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_location_information') ;

    However, I would like to display this value under avatar of each user on topic posts/replies as well. I figured out I need to edit themes/childtheme/bbpress/loop-single-reply.php file but I wasn’t able to make the values appear there.

    I know there is a plugin for that but I like to use childtheme + functions.php for whatever I can + I already have working code in place.

    Any ideas?

    Thank you!

    #179954
    Wasca
    Participant

    Hi Guys

    I’d like to hide the visual editor when a user is posting to a particular forum. Could some one point me to the code that helps me determine what forum is being viewed so I can then disable the visual editor at that point.

    Thanks

    #179951
    Robin W
    Moderator

    the code goes in your functions file

    Functions files and child themes – explained !

    If you are just after changing the name -then the style pack plugin will let you do this

    https://wordpress.org/plugins/bbp-style-pack/

    #179946
    moscomoon
    Participant

    Hey there, so I’ve seen LOADS of posts about this and the code provided to help you create custom roles that do the same as the others.

    Only issue is I don’t know HTML I am a total noob at all of this and in NO POST does it state WHERE to put the HTML code?

    Custom Capabilities

    This was the guide I was trying to follow and it gives me the following code:

    unction add_custom_role( $bbp_roles ) {

    $bbp_roles[‘my_custom_role1’] = array(
    ‘name’ => ‘name 1’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles[‘my_custom_role2’] = array(
    ‘name’ => ‘name 2’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles[‘my_custom_role3’] = array(
    ‘name’ => ‘name 3’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    );
    return $bbp_roles;
    }
    add_filter( ‘bbp_get_dynamic_roles’, ‘add_custom_role’, 1 );

    Which is fine

    except it doesn’t tell me where to put it? Do I just go to Plugins>edit>bbpress/bbpress.php and stick it anywhere in that big massive box of HTML?

    #179932
    adarshmadrecha
    Participant

    I researched on the BBpress forum and also on google, I found that by using [bbp-topic-tags] shortquote, I can show visitors of my site the tags which are used in all the forums.

    But the tags appear all next to each other. Is there any way to display tag with the number of topics besides them. Also, the tags are just shown in a single line. It would be better to have a show in an unordered list. And then sorted according to the number of times topics they have been tagged to.

    #179930
    en10
    Participant

    Hello,

    Is it available for phpBB 3.1.x?

    I tried the script of @hypnoticdan but I don’t have

    http://my_phpbb_domain.com/viewtopic.php?f=1&t=2
    to:
    http://my_wordpress_domain.com/forums/topic/corresponding_topic/

    I get only a redirection from phpbb to bbpress (index to index)

    #179923
    Robin W
    Moderator
    #179920
    wrspoon
    Participant

    Wordpress Version 4.7
    bbPress Version 2.5.12

    I’m very new to all of this and I just installed and activated bbpress. I’ve searched and I cannot find instructions for connecting a menu item I created “Discussion Forums” to the actual forums. I see that there are slugs and short codes in the settings menu of the dashboard, but I can’t figure out how to make it all work.

    Please help. thanks

Viewing 25 results - 5,676 through 5,700 (of 32,518 total)
Skip to toolbar