Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,201 through 6,225 (of 32,505 total)
  • Author
    Search Results
  • #176075

    In reply to: Styling nested replies

    Robkk
    Moderator

    You can use this class before another class in a reply to style the threads.

    .bbp-threaded-replies

    This class only appears if you enabled threaded replies.

    https://codex.bbpress.org/features/reply-threading/

    #176060
    khunmax
    Participant

    BUMP

    Robin I have installed your OK FINAL ANSWER code listed above and all works as it should with one small BUG.

    If I am logged in as admin and then click on your MY profile link I am not taken to my BBpress front end profile page but rather to an error page:
    ———-
    Oops! That page can’t be found.

    It looks like nothing was found at this location. Maybe try searching?
    ———-
    Can anyone assist me to edit the code so when someone logged in as admin click on the my profile link they are taken to his or her BBpress front end profile.

    Thanks in advance for any assistance you can provide.

    Kind Regards

    Max

    khunmax
    Participant

    BUMP

    I can confirm that if you install the above code in your functionality plugin and then use the
    WP NICE SEARCH plugin set to all you can display your bbpress content in a nice ajax drop down in your sidebar.

    Nice Search also has the option to limit the search parameters by configuring its shortcode:

    [wpns_search_form only_search=”my_custom_post_type”]

    I want to use this shortcode in the sidebars for my forum conent and limit the search to just Forums, Topics and Replies (no WP stuff included). However, I can not figure out what I should put in the NICE SEARCH shortcode as the BBpress custom post types.

    I have tried both of the following as a trial but they didn’t work:

    [wpns_search_form only_search=”bbp_register_topic_post_type”]

    and

    [wpns_search_form only_search=”ntwb_bbp_topic_cpt_search”]

    Can anyone assist me with what the correct format of the BBpress custom post type(s) that I should be entering into the NICE SEARCH short code.

    Thanks in advance for any assistance that is offered.

    Kind Regards

    Max

    #176049
    Robin W
    Moderator

    several ways to achieve this, you can do it by creating different roles

    eg

    Custom Capabilities

    #176043

    In reply to: Freshness Link

    Fuskeduske
    Participant

    Found a solution, if anyone is looking for the same i found the following in /includes/forums/template.php

    bbp_forum_last_reply_url which seems to have resolved my issue.

    #176038

    In reply to: Freshness Link

    Fuskeduske
    Participant

    Noone? 🙂

    I have tried the following

    bbp_forum_last_reply_permalinkinstead of bbp_forum_last_topic_permalink but that links to the reply only.

    I have too tried using bbp_reply_url, but that does not seem to work either.

    Is it true that there are no function for this yet, and it therefore have to be created? If so, where is bbp_reply_url – bbp_forum_last_reply_permalink – bbp_forum_last_topic_permalink located? Because then i might be able to figure the rest out myself.

    #176028
    Robin W
    Moderator

    This plugin has a shortcode that lets you display recent topics by forum or forums

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

    see dashboard>settings>bbp style pack>shortcodes for options

    #176016
    arnalyse
    Participant

    I encountered the same Problem as Loc: The count returned by bbp_get_user_reply_count does not update with the user’s activities in the forums. The bbp_get_user_reply_count_raw computes the count directly from the database, which is computationally more expensive, but delivers a correct count.

    Furthermore Robkk is right: I just had a look at the source code of bbPress 2.6-alpha, and has added and hooked some functions to correctly increase and decrease the post count on user’s actions such as creating and deleting posts.

    #176015

    In reply to: Search not working

    Robin W
    Moderator

    This is probably because in the bbPress default theme package, there is a template called content-search.php. In some newer themes there is also a template of the same name. And since the bbPress templates don’t necessarily need to be in a bbPress folder, the bbPress plugin is choosing the template from your theme before the template that is actually in bbPress.

    Copy content-search.php from the bbPress plugin templates and place it in a child theme in a folder called bbpress.

    https://bbpress.org/forums/topic/bbpress-search-only-showing-last-item/#post-175880

    Functions files and child themes – explained !

    So create a directory on your child 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-search.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-search.php
    bbPress will now use this template instead of the original

    #175992
    IndigoO
    Participant

    Oh, wait. I got that one too! LOL

    I found that a code block had been added to my member home page by the second code snippet. I deleted that block and all good now.

    Thanks for your help!

    #175990
    IndigoO
    Participant

    EDITED: I first added the second code snippet you provided, then realized I needed to other one, so I deleted that second snippet and used the first at the end of the functions.php file in my child theme. It does not place a small “edit profile” link centered at the top of my forum main page, which is a help (thanks), but it also places the following text at the bottom of my members home page when logged in: “Click edit button to change this code.”

    That is not a clickable link and it is also not in the right location. Also, I can’t see where that specific text is being defined to edit the wording, which I’d want if it was a working link. It would be great to also have the edit link on the members home page, not just the forum main page, or even better to be able to add it to the sidebar that shows on all member area pages, but at least I’d like to remove this text from the non-forum page.

    Thanks in advance if you can sort this.

    #175989
    Robin W
    Moderator

    ok, I’d either

    change the theme to parent briefly and try it again – see if this fixes

    or try replicating to a test site, where you can play with it

    https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/

    #175980
    MD FAKRUL ISLAM
    Participant

    Thanks Robin W, it worked!. The working code is below for others help.

    /**
    * Add bbp user profile link in WP nav menu
    * Filter wp_nav_menu() to add profile link
    */
    function prefix_bbp_profile_link_nav_menu($menu) {
    	
        if ( !is_user_logged_in() )
            return $menu;
        else   
            $current_user 				= 	wp_get_current_user();
            $user					=	$current_user->ID;
            $bbp_profile_url			=       bbp_get_user_profile_url( $user);
            $bbp_profile_menu_link	  	        = 	'<li>
    			        				<a href=" '. esc_url( $bbp_profile_url ) .' "> '. __('Edit Profile', 'text-domain' ) .' </a>
    							</li>';
            $menu         	= 	$menu . $bbp_profile_menu_link;
            
            return $menu;
      
    }
    add_filter( 'wp_nav_menu_items', 'prefix_bbp_profile_link_nav_menu' );
    #175976
    Robin W
    Moderator

    the last set of code in this thread should give you what you want

    https://bbpress.org/forums/topic/adding-user-profile-button/

    #175975
    Stephen Edgar
    Keymaster

    It’s been a while since I tried it, I’ll have to re-attempt it in a couple of days when I have an opportunity to try it again.

    Cool

    As I recall, it imported the users fine, and then it looked like it was doing the posts, but after, I want to say about 150 posts, it froze there, never indicated further imports. When I checked the database tables, it didn’t appear that it actually brought the content from Dizkus over to bbPress at all.

    Ok, so it did something, thats a good sign in that the database name and password were correct.

    If you’ve ever used Chrome/Firefox “inspect” debugger, you can right click and select “inspect” or (view the source code of the web page) and there is some extra debugging MySQL statements you will see there, if when testing you have issues take a look at the last query and include that MySQL code here when posting back, it will help determine what went wrong.

    As to the localhost problem, I mirrored the Zikula site to my local WIn 10 machine, and then tried to import on a local WP/bbP site and it didn’t do anything. Seems like it just couldn’t find data.

    If it can’t find any data it should thrown an error message to that affect, if you don’t select Dizkus from the dropdown menu on the importer screen and use the default AEF that can be one of the causes, another is that the database is not in the same database server as your WordPress install.

    Did you import that database to your Win 10 machine or were you trying to connect to it remotely?

    MD FAKRUL ISLAM
    Participant

    Hi, I am trying to add forum user profile link into wp_nav_menu_items.
    Is there any way to get the forum root slug field value dynamically (just like user nickname, see $user in below code) to making the profile link dynamic? I am thinking to adding a setting option for getting the forum root slug from users in case no way to get the forum root slug fieled value.

    Could anyone help? Thanks in advance.

    /**
    * Add bbp user profile link in WP nav menu
    * Filter wp_nav_menu() to add profile link
    */
    function prefix_bbp_profile_link_nav_menu($menu) {
    	
        if ( !is_user_logged_in() )
            return $menu;
        else
    	$home_url     		= 	home_url( '/' );    
            $current_user 		= 	wp_get_current_user();
            $user         		= 	$current_user->user_nicename ;
            $profilelink  	= 	'<li>
    			            <a href="' . esc_url( $home_url ) . '/forum-slug/users/' . $user . '/edit"> '. __('Edit Profile', 'text-domain' ) .' </a>
    			        </li>';
            $menu         	= 	$menu . $profilelink;
            
            return $menu;
      
    }
    add_filter( 'wp_nav_menu_items', 'prefix_bbp_profile_link_nav_menu' );
    #175962
    Robin W
    Moderator

    I’d look in wp-config for

    define( 'WP_DEBUG', false );
    

    and change it to

    define( 'WP_DEBUG', true );
    

    This will switch debugging on, and you should get an error shown when you try and access the site.

    Post this error back here, and we’ll try to help further.

    #175958
    Robin W
    Moderator

    yes it goes in the functions file of your child theme

    Functions files and child themes – explained !

    #175957
    IndigoO
    Participant

    Where would this code be added? I’m trying to do the same by adding it to my child theme’s bbpress.php file, but is just showing the raw code on the page. I may be in the wrong file, or else have something else missing. Thanks if you can direct.

    #175954
    IndigoO
    Participant

    It took me a ridiculous amount of time to find where to make this change and make it, and even then it is in the main bbPress code. I couldn’t get it to see anything I put in my child theme, because it is accessed through plugins, not themes. I know I’ll have to update the file again manually as soon as I update bbPress.

    Also, that plugin only allows you to add new fields, not display existing ones. Doesn’t it seem odd that you would be prompted to enter data in fields on user profile edit, but then not have any of them show on view? By default the user fields should be available to show, at least standard ones like description, website, and social media profiles.

    If you use that plugin to manually create some of those fields, your users will see two of each, the original ones that won’t show in view mode, and the custom ones you created. Not workable.

    So really I see nothing to do other than manually editing the user-profile.php file to line by line include each field you want to show. How are some people not caring about this? It just seems so fundamental to me. Why go all the way to something like BuddyPress when all you want is field data already being collected to actually show?

    #175953
    Robin W
    Moderator

    The functions file of your theme might hold code that relies on bbpress – look for lines that include

    add_action (‘bbp_something…
    or
    add_filter (‘bbp_something…

    #175951
    danbp
    Participant

    Answering to myself:

    bbp_buddypress_loaded fires before everything is, in fact, fully loaded. bbPress’s component-specific extensions aren’t loaded until bp_init:7 (ty @boonebgorges for this explanation).

    Changing add_action to bp_init with a priority of 8 did the job !

    This may work for Site Activities, Members and Group activities

    function bpfr_remove_activity_dropdown_label() {
       // Remove forum filters in site wide activity streams
       remove_action( 'bp_activity_filter_options',        array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10    );
    
       // Remove forum filters in single member activity streams
       remove_action( 'bp_member_activity_filter_options', array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10   ); 
    
       // Remove forum filters in single group activity streams
       remove_action( 'bp_group_activity_filter_options',  array( bbpress()->extend->buddypress->activity , 'activity_filter_options'   ), 10   );
    }
    add_action( 'bp_init', 'bpfr_remove_activity_dropdown_label', 8 );
    #175936

    Topic: Bbcode

    in forum Showcase
    montanaseize
    Participant

    Hey ! I’m searching for a way to add text in image. Juste like <quote>blabla</quote> but visible and with the image i decided to put before. Google did’nt help me at all and i’m a bit frustrated.
    Thanks in advance for help.

    #175932
    montanaseize
    Participant

    Hey ! First, forgive me for my english, i’m french user of Bbpress.
    So, as you can see here Title i have the same title for two different category. Even if the second has for parent the first. I put this code http://pastebin.com/QypF9bhA in loop-forum-php. I’d like to have different title and mostly the true title of my category.
    I saw someone with the same problem, cause permission plugin. For information i have bbp-private-groups, buddypress, buddymenu.
    I hope this is clear.
    In advance, thank you for your help.

    #175929

    In reply to: What does Robkk do?

    Pascal Casier
    Moderator

    @robkk, @peter-hamilton,

    Ahhh ‘herd’, I read ‘nerd’ as a start.

    There is a showcase list on our codex: https://codex.bbpress.org/showcase/
    EDIT: Check this list: https://bbpress.org/about/examples/
    Then there is a top100 of some years ago: http://bbshowcase.org/forums/view/top100

    Let me see to update our codex showcase list a bit…

    Pascal.

Viewing 25 results - 6,201 through 6,225 (of 32,505 total)
Skip to toolbar