Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'change buddypress menu'

Viewing 25 results - 251 through 275 (of 845 total)
  • Author
    Search Results
  • #203977
    reuldereut
    Participant

    Good day, I installed buddypress plugin but i noticed that I do not have the “group” tab in the left admin menu so I cannot create buddypress groups! I do have the Tab”Activity” though.

    When I try to activate the component “User Groups” in the Budypress setting page, it doesnot activate !! there is even no button to Save Changes !

    I also noticed that I am missing a few buddypress php pages like buddypress.php from the theme directory.

    Could you help me?

    thank you, reul.

    #201151
    1a-spielwiese
    Participant

    Follow-up:

    7th:

    Capability Manager Enhanced to define custom user roles, if you’re not satisfied with the default wordpress roles (subscriber, contributor,…).
    The first step is to create your user roles

    https://buddypress.org/support/topic/resolved-different-profile-types-and-different-user-roles/

    As ready implied there: I did this – and it works so far.

    8th:

    Create a xprofile field (selectbox) with the title “User Role” and name the options “Band Role” and “Fan Role” – in my case. You can call them whatever you want. Place this field in the “base” profile group, otherwise it won’t be shown during registration. Also make the field “required”. In my case the user can’t decide, if the visibility of the field can be changed.

    I did it already, when I installed and activated ‘BP Profile Search’-plugin – and it works.

    However, to choosed a dropdown menu and the categories ‘team’ and ‘fan’.

    9th:

    I modified:

    ?php
    function custom_bp_core_signup_user($user_id) {
        $user_role = strtolower(xprofile_get_field_data('User Role', $user_id));
        switch($user_role) {
            case "Band Role":
                $new_role = 'band';
                break;
            case "Fan Role":
                $new_role = 'fan';
                break;
        }
        wp_update_user(array(
            'ID' => $user_id,
            'role' => $new_role
        ));
    }
    add_action( 'bp_core_signup_user', 'custom_bp_core_signup_user', 10, 1);

    into:

    function custom_bp_core_signup_user($user_id) {
        $user_role = strtolower(xprofile_get_field_data('Mitglieder-Kategorie (Team oder Fan?)', $user_id));
        switch($user_role) {
            case "Team":
                $new_role = team';
                break;
            case "Fan":
                $new_role = 'fan';
                break;
        }
        wp_update_user(array(
            'ID' => $user_id,
            'role' => $new_role
        ));
    }
    add_action( 'bp_core_signup_user', 'custom_bp_core_signup_user', 10, 1);

    (I omitted <?php, because I created not a new bp-costum.php, rather inserted the code into my yet existing bp-costum.php. I inserted the modified code above the line ?>.)

    I did not understand, which effect this insertion should have – but, however, – as far as I see – it causes no harm.

    Did anyone understood, for which purpose the above mentioned code is?

    10th:

    I inserted as well:

    //hide the user role select field in edit-screen to prevent changes after registration
    add_filter("xprofile_group_fields","bpdev_filter_profile_fields_by_usertype",10,2);
    function bpdev_filter_profile_fields_by_usertype($fields,$group_id){
    
    //only disable these fields on edit page
    if(!bp_is_profile_edit())
    return $fields;
    //please change it with the name of fields you don't want to allow editing
    $field_to_remove=array("User Role");
    $count=count($fields);
    $flds=array();
    for($i=0;$i<$count;$i++){
    if(in_array($fields[$i]->name,$field_to_remove))
    unset($fields[$i]);
    else
    $flds[]=$fields[$i];//doh, I did not remember a way to reset the index, so creating a new array
    }
    return $flds;
    }

    into my bp-costum.php – again above the line ?>.

    It does not work:

    — threre the user role is still changeable:

    http://kampfsportlerinnenneuwied.1a-spielwiese.de/wp-content/uploads/sites/2/2014/09/user_role_still_changeble.jpg

    http://1a-spielwiese.de/members/kampfsportlerinnenneuwied/profile/edit/group/1 causes an redirection error. – The redirection error disappears, when I’m not logged in as kampfsportlerinnenneuwied, rather as superadmin.

    #201090
    mabellaneda
    Participant

    Hello,

    I’m suffering a lot of issues too with the translation into Spanish, in such a way that I had to patch it several times after trying different configurations.

    So! To the point. It works for me now and I explain here my current configuration:

    1. I’ve downloaded the BuddyPress translation package from https://translate.wordpress.org/projects/buddypress/ and contributed with some translations (specifically for Spanish: https://translate.wordpress.org/projects/buddypress/dev/es/default)

    2. Saved the .mo and .po files in /wp-content/languages/plugins as recommended by the Moderators: https://translate.wordpress.org/projects/buddypress/dev/es/default.
    And configured the site in Spanish (particularly I tried to do it dinamically)

    3. Becuase I try to change the language dinamically according to the browser preferred language I use the xili-language plugin, which “helps” you to manage in what language you’ll display your WordPress, but I’m no sure if it is decisive for the BuddyPress translation. In this plugin there’s a configuration to mention and not enough documented. In case you use the plugn, in the tub “Settings for expert” there are rules to specify. My configuration is:
    Wordress rule –> translation in local
    BuddyPress rule –> no modification

    5. At this point the translation didn’t work correctly or I didn’t succeed in translating some strings that remained in English (like: “Members”, “Groups”, “Notifications”, “Activity” in the BuddyPress navigation menu and others). So, I edited the .po file with PoEdit and updated it with the BuddyPress catalog “buddypress.pot”:

    Customizing Labels, Messages, and URLs

    6. I updoaded the modified .po and .mo files to the mentioned folder /wp-content/languages/plugins and didn’t change a thing. I read then in forums the different issues with translations, for example:

    https://buddypress.org/support/topic/translation-fails-only-at-sitewide-activity/
    https://buddypress.trac.wordpress.org/ticket/5655
    https://buddypress.org/support/topic/buddypress-2-1-bp-language/
    https://buddypress.trac.wordpress.org/ticket/5887
    https://buddypress.org/support/topic/buddypress-2-1-known-issues/ (here there’s another workaround)

    7. And I added the following lines to the file functions.php of my child theme:

    function igf_my_child_theme_setup() {
    load_child_theme_textdomain( ‘my_child_theme’, get_stylesheet_directory() . ‘/languages’ );
    load_plugin_textdomain(‘buddypress’, false, basename( dirname( __FILE__ ) ) . ‘/languages/’ );
    }
    add_action( ‘after_setup_theme’, ‘igf_my_child_theme_setup’ );

    And it begans to translate correctly! I’m sorry I really don’t understand why. Furthermore I thought that the buddypress textdomain was set by the plugin xili-language but, as I said, I’m not clever enough or it is not well documented.

    I know there’s a lot of steps to do, I was really frustated with it, but if you try something like this

    Anyway, as this is my first post, I have to thank to the developers for the software and the great effort, of course; it has helped me a lot too.

    Regards.

    #200995
    wayne alex
    Participant

    Hi @mercime,

    I have changed to the Twenty Fourteen Theme and deactivated all plugins except buddypress, with the twenty fourteen theme everything works fine and there is no duplicate Buddypress profile menus with all plugins activated, I am using the bp-social child theme from wpmudev, even when all plugins are deactivated except buddypress the issue is still there with this customized child theme. Also when i switch to the parent theme bp-social there is also no duplicate menu with all plugins activated.

    Really need some help with this one!

    Thanks,

    Wayne,

    #197321
    1a-spielwiese
    Participant

    1st:

    Yes, I did not inserting at the beginning of the bp-custom.php:

    <?php
    // hacks and mods will go here
    ?>

    I would like to suggest to set there (and at all similar places) links from “bp-costum.php” to https://codex.buddypress.org/themes/bp-custom-php/

    2nd:

    But even after inserting the three above mentioned lines it does not work.

    3rd:

    With that code I had yesterday the same problem: It worked with inserting the code into the functions.php of my theme folder, but it works not with inserting it – as suggusted there – to bp-custom.php.

    4th:

    a) Currently the name of the file is:

    bp-custom.php

    b) It is placed within the folder wp-content/plugins (not inside the buddypress folder; rather on the same level as the buddypress folder).

    c) The entire content of the file is:

    
    <?php
    // hacks and mods will go here
    ?>
    
    function bbg_change_profile_tab_order() {
    global $bp;
    
    $bp->bp_nav['profile']['position'] = 10;
    $bp->bp_nav['activity']['position'] = 20;
    $bp->bp_nav['blogs']['position'] = 30;
    $bp->bp_nav['friends']['position'] = 40;
    $bp->bp_nav['messages']['position'] = 50;
    $bp->bp_nav['groups']['position'] = 60;
    $bp->bp_nav['settings']['position'] = 70;
    }
    add_action('bp_setup_nav', 'bbg_change_profile_tab_order', 999 );
    
    /**
     * Change BuddyPress default Members landing tab.
     */
    define('BP_DEFAULT_COMPONENT', 'profile' );

    d) I changed the wp-config.php and the functions.php back to their old versions. But it still does not work:

    The code of the bp-custom.php appears above the header of blog:

    http://1a-spielwiese.de/members/balletttaenzerinnenkrzbg36/

    and the “Activity”-Tab and it’s content is displayed at first.

    gibbousmoon
    Participant

    I’m working with a brand new install of WP 3.9.2, and I don’t recall whether I installed BP or the Custom Community theme first, but when I have both enabled, I get this error:

    Notice: Indirect modification of overloaded property BuddyPress::$add_root has no effect in /home/nanoedmo/public_html/wp-content/plugins/buddypress/bp-core/bp-core-functions.php on line 564

    If I switch to another theme, the error disappears. Initially the error would just load at the top of the page while the site continued to function, but now the error is the ONLY thing that displays on any page, which renders my site completely unusable. It’s quite possible that the change in behavior corresponded to when the host site upgraded me to WP 4.0.

    Now, the facts.

    * Hosted by SiteGround
    * WordPress 4.0
    * Directory install
    * In a subdirectory
    * Upgraded from WP 3.9.2
    * BP 2.0.2
    * Other plugins activated: Akismet, bbPress, BP Custom Profile Menu, BP Group Email Subscription, BP Toolbar, Captcha Pro, Counterize (and its plugins), Limit Login Attempts, NaNo Stats, ProgPress, Shortcode Reference, The Events Calendar, WordPress SEO.
    * Using Custom Community theme
    * Core files untouched
    * No custom functions in bp-custom.php
    * bbPress version 2.5.4
    * This error is almost the only one in php_errorlog. Occasionally I see this one:
    PHP Warning: Cannot modify header information – headers already sent by (output started at /home/nanoedmo/public_html/wp-content/plugins/buddypress/bp-core/bp-core-functions.php:564) in /home/nanoedmo/public_html/wp-includes/pluggable.php on line 1173

    Kostas Gogas
    Participant

    I am trying to remove some tabs from Member page.
    (I found how to remove sub items – I was hoping for something similar)
    This What I use to hide sub-nav item:

    function bp_remove_nav_item() {
        global $bp;
    
        bp_core_remove_subnav_item( $bp->profile->slug, 'change-avatar' );
    
    }
    add_action( 'wp', 'bp_remove_nav_item' );
    a-eldo
    Participant

    Hi,

    Since i have issue’s securing the BuddyPress registration pages i would like to deactivate it completely.

    But….

    It won’t let me. I get a page 500 timeout. And in the apache logs i see this error popping up:

    PHP Warning: next() expects parameter 1 to be array, null given in /var/www/ravenswp/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php on line 207

    Should i change template to deactivate this plugin?

    I have the Vantage theme from Siteorigin running and the following plugins loaded:

    Advanced Custom Fields (4.3.8)
    Akismet (3.0.1)
    Black Studio TinyMCE Widget (1.4.6)
    BuddyPress (2.0.2)
    Cookie Law Info (1.2.1)
    Email Login (4.6.3)
    Email Users (4.6.9)
    Formidable (1.07.09)
    Google Captcha (reCAPTCHA) (1.06)
    Login With Ajax (3.1.2)
    Meta Slider (3.0)
    Nav Menu Roles (1.6.0)
    Page Builder by SiteOrigin (1.5)
    Simple:Press (5.5.0.1)
    SiteOrigin Widgets Bundle (1.0.4)
    Wordfence Security (5.1.8)
    WordPress SEO (1.5.5.3)
    WPFront User Role Editor (1.2)
    WP Security Audit Log (1.2.5)
    WP Splash Page (1.1)
    WP Super Cache (1.4.2)

    I hope i can get somesort of support.

    Thanks in advance.

    #186404
    razereaz
    Participant

    i have created website with buddypress . and using some content sharing theme “i love it” .http://themeforest.net/item/i-love-it-content-sharing-wordpress-theme/698475.

    and from top bar navigation , menu , and author page its always linked to author page . and not profile page .

    how can i change website.com/AUTHOR/USER to website.com/PROFILE/USER ?

    and every post from some author will be reddirected to that author buddypress profile instead author archive

    sry bad english . thx b4

    #186326
    Daneraid
    Participant

    Specs…
    WP 3.9.2
    BP 2.0.2
    I use Bluehost
    No Core Files Changed
    Also using BuddyMenu 2.2.0 to utilize shortcode for community homepage
    I am using BuddyPress with OptimizePress 2.0 and creating a community page.
    I have enabled the members to create groups

    Everything works well except for the fact that members cannot see public groups or a group directory.

    From the Groups Menu the Sub-menus are “Memberships” and “Invitations”
    In the “order by” drop down there is no way of finding anything either.

    I want new members to be able to access the group directory and join the public groups I already created with the admin account.

    Any suggestions?

    #186064
    danbp
    Participant

    Yes i meant permalinks settings.
    https://codex.wordpress.org/Settings_Permalinks_Screen
    By going on the permalink page and simply clicking on update, without doing any change, will refresh the whole site urls. This is recommanded after heavy modification on pages, posts, menus.

    You can also check the permalink format on the “member” page, just in case off. Sometimes there is a number at the end of the URL which shouldn’t be…

    Activate debug mode and see if you receive somme other error msg
    https://codex.wordpress.org/WP_DEBUG

    If nothing works, read here and provide the whole bunch of information.

    #186017

    In reply to: Create new entrance

    danbp
    Participant

    New post or a page publication is made by WordPress, not by BuddyPress.
    The only pages BP needs are those created for each activated component. The content of these page is generated dynamically, depending of the context, and in fact, these pages are only intended for internal purpose, to fit with WordPress’s fonctionnalities.
    In a few words, BP is using the wp page system, but doesn’t use a page like WP.
    https://codex.wordpress.org/Pages

    So the question is how to allow your users to publish a blog post directly from the frontend.
    https://wordpress.org/plugins/front-end-publishing/

    For pages, it’s a bit more delicate.
    WordPress pages are generally used for displaying static content. That’s why publishing pages is under the responsability of the site owner and/or an editor, but not allowed (by default) for authors or contributors. Also, accessing to pages will need some menu adjustment.

    I wouldn’t recommend to let your authors handle pages.

    #185803
    eqerhe
    Participant

    Thanks, @henrywright

    I think TML just handles redirects after logging in or out. What I’m looking for is a way to manage the redirect when someone who isn’t logged in tries to visit a page that’s only for members, or someone visits a page that their membership type doesn’t allow them access to.

    For example, I’d like anyone to be able to see the member and group directories, but only members should be able to look at individual profiles and the group pages and forums.

    That being said, I was thinking today that I’d actually like separate pages for visitors or people who aren’t logged in to be able to see those things and other info, so maybe I’ll handle it that way. I guess then what I’m actually looking for is a way to change the top menu depending on whether someone is a logged in member or not.

    Sorry for a babble. This is my first swing at BuddyPress, so it’s all trial and error for me right now! Thanks for the help!

    #185093
    @mercime
    Participant

    username appearing twice on registration form

    @jaciando1 Change the “User Name” profile field name in the “Profile Details” box -> go to admin menu
    Users > Profile Fields and click on the “edit” button under that profile field name.

    I also appear to have two different register forms???

    You can add the following to your theme’s functions.php page:

    /* If BuddyPress is active */
    if ( class_exists('BuddyPress') ) {
    	add_action('init','mme_redirect_register');
    	function mme_redirect_register(){
    		global $pagenow;
    		if( 'wp-login.php?action=register' == $pagenow ) {
    			wp_redirect('http://buddypress.dev/join-us');
    			exit();
    		}
    	}
    }

    Change http://buddypress.dev/join-us to your site’s register page.

    Anonymous User 13895492
    Inactive

    Hi,

    I am getting a page not found error when clicking on buddy press pages in the menu of my site as they link to the wrong folder.
    Folder the links link to: http://thesocialeconomy.nl/members/admin/activity/
    Folder the plugin is installed: /root/wp-content/plugins/buddypress

    Hosted site: http://www.socialeconomy.com
    Installed WP newest version.
    Pinboard theme activated.
    Installed BudddyPress plugin via the plugin area, newest version.
    Hook up the pages of buddy press to my menu.
    In the dashboard I can see the settings page, etc.
    Permalinks settings changed according to specs.

    What am I doing wrong? And where can I change it?

    thanks,

    Simon

    lava-team
    Participant

    Hello,

    I have been trying to add 2 tabs on user profile. “posts”,”gallery”

    posts : my posted posts. it will display a custom-post-type “user-post”
    gallery : my pictures .. or any thing.. it will display a custom-post-type “user-images”

    
    // Set up Cutsom BP navigation
    function my_setup_nav() {
          global $bp;
    
          bp_core_new_nav_item( array(
                'name' => __( 'Posts', 'buddypress' ),
                'slug' => 'user-posts',
                'position' => 19,
                'screen_function' => 'jv_user_posts', 
    	  		'show_for_displayed_user' => true
    
          ) );
    
          bp_core_new_nav_item( array(
                'name' => __( 'Gallery', 'buddypress' ),
                'slug' => 'user-gallery',
                'position' => 20,
                'screen_function' => 'jv_user_gallery' 
          ) );
    
          // Change the order of menu items
          $bp->bp_nav['messages']['position'] = 100;
    
          // Remove a menu item
          $bp->bp_nav['activity'] = false;
          $bp->bp_nav['blogs'] = false;
    
          // Change name of menu item
          $bp->bp_nav['groups']['name'] = 'community';
    }
    add_action( 'bp_setup_nav', 'my_setup_nav' );
    
    // Load a page template
    function jv_user_posts() {
          bp_core_load_template( 'buddypress/bp/cst-user-posts' );
    }
    function jv_user_gallery() {
    	  bp_core_load_template( 'buddypress/bp/cst-user-gallery' );
    }
    
    


    it has successfully created 2 tabs! works ok!

    BUT it goes to own “cst-user-posts.php” page and “cst-user-gallery.php” page.

    I mean I want to add them in /buddypress/members/sigle/home.php file

    I guess the part is here on home.php

    <?php do_action( ‘bp_before_member_body’ );

    if ( bp_is_user_activity() || !bp_current_component() ) :
    bp_get_template_part( ‘members/single/activity’ );

    elseif ( bp_is_user_blogs() ) :
    bp_get_template_part( ‘members/single/blogs’ );

    elseif ( bp_is_user_friends() ) :
    bp_get_template_part( ‘members/single/friends’ );

    elseif ( bp_is_user_groups() ) :
    bp_get_template_part( ‘members/single/groups’ );

    elseif ( bp_is_user_messages() ) :
    bp_get_template_part( ‘members/single/messages’ );

    elseif ( bp_is_user_profile() ) :
    bp_get_template_part( ‘members/single/profile’ );

    elseif ( bp_is_user_forums() ) :
    bp_get_template_part( ‘members/single/forums’ );

    elseif ( bp_is_user_notifications() ) :
    bp_get_template_part( ‘members/single/notifications’ );

    elseif ( bp_is_user_settings() ) :
    bp_get_template_part( ‘members/single/settings’ );

    // If nothing sticks, load a generic template
    else :
    bp_get_template_part( ‘members/single/plugins’ );

    endif;

    do_action( ‘bp_after_member_body’ ); ?>

    How can I make “if” condition for those 2 pages?
    I don’t know how to create “bp_is_user_posts” or “bp_is_user_posts” functions.
    if I could, I just need to add … if conditions.

    Please advice me!

    Thanks,
    pulla

    DarkElement1987
    Participant

    Well if i deactivate the widget, the announcement shouldn’t be there. And if i deactivate buddypress from the plugins menu the message is gone so i don’t think it’s theme related.

    Could you tell me in simple english what i can do (Step by step) cause i’m not that good a English speaker.

    If i drag the Widget to the sidebar from the admin panel the only thing i can fill in is a title for the widget. A new message is impossible, so somethings messed up, but when i apply changes the old notification is there again.

    Screenshots of how it is right now:
    http://i62.tinypic.com/2zfilbm.png
    http://i58.tinypic.com/2mwe70k.png

    #182727
    dirtyblox
    Participant

    Hey there,

    i was wondering if it’s prossible to change the language of this menu? I’ve already changed the whole language of buddypress with a Language-Package but if you have a look at the Picture, you will see there a 4 items, which are not translated.

    I don’t see the File, which i need to edit therefore…

    Problem

    joe35
    Participant

    Hello, I am relatively new to WordPress-Buddypress, HTML and CSS and I would like your help to figure out what happened.

    Almost a year ago I had set up a website on WordPress and I had installed Buddypress, and using a child theme and CSS I made all the customizations I wanted. After I finished and for some personal reasons I did not opened the website for some months (it was password locked) and now I’m coming to see that half of the styles I applied are gone!

    The first thing I thought was that it was my mistake – that these CSS changes were made in the core files and not in the stylesheet of the child theme. But I don’t think that this is the case. Later I thought that since then it has been a long time and many updates and may now the browsers handle some elements differently (!)…but, I don’t think so! Now I think that some how and without even update my Buddypress/Wordpress installation some of the IDs changed. Is this possible?

    For example, In the User Groups page there was an ID “#groups-sort-by” for the “Order By” drop down menu. This menu lost its style and its current ID is “groups-order-by”. Another example, in the Activity Steams page there is a “What’s new…” text area field that used to have ID “#whats-new-post-in” and now it has “whats-new”. Is this correct or am I just a VERY confused Newbie???:)

    I will fix them again but I’m afraid if this happens again then there is no meaning in having a child theme or to keep backups since they can’t help if the IDs changed. Thanks for any advice you can provide!

    #182237

    In reply to: Page Hierarchy Pain

    Anonymous User
    Inactive

    Hi @localiseorg

    Socialise (sitewide activity assigned to this)
    – Members (members directory assigned to this)
    – Groups (groups directory assigned to this)
    – Forums (bbPress forum root assigned to this)

    Have you tried using a wp_nav_menu instead ?

    I think, if i was in your situation, i’d make a wp_nav_menu with your different pages.. It could be “home”, “blog”, “socialise” for instance. And from the wp_nav_menu WordPress UI, i’d attach the Members/Groups and forums as submenus of Socialise.

    Then concerning the Socialise title that is “Sitewide Activity”, i’ll begin to edit the activity page changing the title from Activity to Socialise and use a little code like the following:

    function change_activity_directory_title() {
    	buddypress()->activity->directory_title = buddypress()->pages->activity->title;
    }
    add_action( 'bp_activity_setup_globals', 'change_activity_directory_title' );
    #180708
    NordicPT
    Participant

    Hi!

    I installed buddypress a couple of days ago and the permalink then for members became medlemmar-2

    So the admin profil became:
    http://www.swedfit.se/medlemmar-2/admin/profile/

    Now I’ve changed the link to medlem so it should come upp:
    http://www.swedfit.se/medlem/admin/profile/

    But when ever i click on http://www.swedfit.se/medlem/admin/profile/, or the profil button in the menu i always end upp in http://www.swedfit.se/medlemmar-2/admin/profile/ which gives a 404 error because nothing is there.

    How do i get the links correct?

    (website is in swedish)

    #180314

    In reply to: Display Profile

    hepar
    Participant

    Hi,

    unfortunately I still have the same problem.
    I have buddy press just uninstalled and reinstalled. It changes nothing. I have disabled all plugins and activated BuddyPress. The problem arises immediately. So it can have nothing to do with the other plugins.

    The problems:
    When I click on the navigation bar on profile, the error message 404 appears.
    In the menus, no choice point for BuddyPress appears.

    Please help me as soon as possible. The site should go online these days.

    Many thanks and best regards

    #179894
    carlsandburg
    Participant

    I’m using the Twenty Fourteen theme on my test site. cchca.stevelescure.net

    I’ve set all the pages to “full-with” so that the right side-bar is hidden except on the home page.

    I’ve added BuddyPress now. When i chose an item from the BuddyPress menu in the upper-right, the page is show between the left and right sidebars. it’s looks pretty squished up. Is there a reasonably easy way to change it so those pages will also appear “full-width”?

    thanks

    wordpress 3.9.1
    buddypress 1.9.2

    #179760
    mcpeanut
    Participant

    @matthewhout Hmm, buddypress settings are located in the settings submenu in wordpress dashboard, make sure you turn on all the options you need in there, also make sure your pages are setup in there as you want them to, also dont forget to go to settings and permalinks too, and select which permalinks you prefare, hopefully everything should be fine for you then, well if i understand correctly that the issues you where having was due to having a windows server and now you have changed to a linux server? i cant see there being any problems with a fresh install.

    StijnDeWitt
    Participant

    Hi BuddyPress community,

    I am developing a BuddyPress plugin with a custom BuddyPress component in it. So far I am working off the BuddyPress Skeleton Component, but that is a bit outdated. Mostly I have been able to work around the issues, but I have found myself stuck at this one issue.

    I am creating a new component called ‘bp-env’ with slug ‘env’. It has a custom screen in the user profile (main menu next to Activity etc called ‘Env’ with a submenu with currently just one screen, ‘General’) that I also want to show in it’s separate index page. It has an env/index template so we should be able to visit mysite.com/env and see the index page for the bp-env component. This is working somewhat, but only with some nasty hacks that I feel are probably not needed if I would just understand BuddyPress better.

    I have a function

    function bp_env_load_template_filter($found_template, $templates) {

    based on the one from the skeleton component. Inside that function I see this line:

    // note: this is only really relevant for bp-default themes as theme compat
    // will kick in on its own when this template isn’t found
    $found_template = locate_template(‘members/single/plugins.php’, false, false);

    I don’t really get what this does and I really wonder whether I don’t have to change the path given to locate_template. I don’t see any relationship between members/single/plugins.php' and my templates at 'my_plugin/includes/templates/buddypress/env/'... At that location I have anindex.phptemplate that should be able to show the screen for my env component when requested separately (e.g. via mysite.com/env) and ageneral.phpfor the 'General' screen for my component that is shown when we navigate toEnv / General` within the user’s profile.

    Below that line I added this code. It was the only way I see for now to make BuddyPress pick up my index.php template, but probably that’s just because I am a n00b… 🙂

    // get template from $templates array and strip the php extension
    $template = str_replace( ‘.php’, ”, $templates[0] );

    if ($template == ‘env/index’) {
    $found_template = CC_PLUGIN_DIR . ‘/includes/templates/buddypress/’ . $template . ‘.php’;
    return apply_filters(‘bp_env_load_template_filter’, $found_template);
    }

    $bp->env->template = $template;
    // add our hook to inject content into BP
    add_action(‘bp_template_content’, create_function(”, ‘
    global $bp;
    bp_get_template_part($bp->env->template);
    ‘));

    Eventually I got this to somewhat work by copying my page template into ../env/index.php, but I don’t think it is supposed to work this way. Inside the copied page template I now have this:

    <?php
    while ( have_posts() ) : the_post();
    ?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <?php if ( ! is_front_page() ) { ?>
    <h1 class=”entry-title”><?php the_title(); ?></h1>
    <?php } ?>

    <div class=”entry-content”>

    <?php /*
    Here, we fill in the BuddyPress template. This should
    normally work by the page template requesting the_content()
    and BuddyPress selecting our template based on the URL,
    but we did not yet get this to work, so we do it hardcoded
    for now…

    // This code is not working atm…
    <?php the_content( __( ‘Read more →’, ‘ward’ ) ); ?>
    */ ?>

    <div id=”buddypress”>
    <?php do_action( ‘bp_before_member_home_content’ ); ?>

    <div id=”item-body” role=”main”>
    <?php do_action( ‘bp_before_member_body’ );

    // This should not have to be hardcoded I guess….
    bp_get_template_part( ‘env/general’ );

    do_action( ‘bp_after_member_body’ ); ?>
    </div><!– #item-body –>

    <?php do_action( ‘bp_after_member_home_content’ ); ?>
    </div><!– #buddypress –>
    </div><!– .entry-content –>

    <?php get_template_part( ‘content’, ‘footer’ ); ?>
    </article><!– #post-<?php the_ID(); ?> –>

    <?php
    comments_template( ”, true );
    endwhile;
    ?>

    As you can see I am completely copying both the page template from my theme (Ward) and the default BuddyPress code that renders the stuff around the screen on the Profile page…

    Any tips for where to look on how to do this properly would be greatly appreciated!

    -Stijn

Viewing 25 results - 251 through 275 (of 845 total)
Skip to toolbar