Search Results for 'change buddypress menu'
-
AuthorSearch Results
-
August 24, 2015 at 4:14 am #243519
In reply to: bp_core_remove_nav_item
danbpParticipantHi @muskokee,
BP nav menu code is in bp-core-template.php:3050 to EOF.To change the position of an item on profiles page, use this from within bp-custom.php
Position is defined by the numeric value:function bpfr_profile_menu_tab_pos(){ global $bp; $bp->bp_nav['activity']['position'] = 30; $bp->bp_nav['forums']['position'] = 50; $bp->bp_nav['profile']['position'] = 25; $bp->bp_nav['messages']['position'] = 10; $bp->bp_nav['notifications']['position'] = 40; $bp->bp_nav['friends']['position'] = 20; $bp->bp_nav['groups']['position'] = 60; } add_action('bp_setup_nav', 'bpfr_profile_menu_tab_pos', 100);
You can also add some condition on the template. Ie
if ( is_user_logged_in() ) : your custom menu stuff else something for non logged user endif;
Other reference: https://codex.buddypress.org/themes/members-navigation-menus/
August 6, 2015 at 6:08 am #242826In reply to: help needed for my theme menu
djstevebParticipantI am a total noob with this stuff – a quick look with my limited tools and understanding of all things that make this stuff work…
I THINK your rule here:
.buddypress ul li { background: transparent none repeat scroll 0% 0%; padding: 0px; }
Is over-writing the rule here:
.main-nav li { white-space: nowrap; float: left; font: 12px "OpenSansBold"; text-transform: uppercase; padding: 7px 20px 11px 0px; letter-spacing: -1px; text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.3); }
Which is what is being used on your home page.
I think if you find the padding 0px on the .buddypress ul li line and change it to padding: 7px 20px 11px 0px; — that will fix your top nav current issue – now will that adversely affect some other ul li / menu or list somewhere (like a widget or something) – I don’t know.
I am guessing that someone smarter then me can craft a rule that would work better and more specific.. something like
.buddypress main-nav ul lipadding: 7px 20px 11px 0px;
}I have no idea if that would work – my understanding of css is like level 1 and bp is like level 1/2 – lol
I also THINK that you have a weird triple css / child theme thing going on – again I don’t know, but looking at your css code rules in the firefox inspector, it looks like your pages are loading the exact same css file three times?
I made a similar mistake with my first child theme – copying the whole shebang into a new child theme folder.. actually what you want is a relatively blank new folder and a relatively blank style.css that only includes rules you are going to overwrite / change from the parent theme.
I don’t have access to your files or know the exact setup and may even be wrong in my understanding of what the firefox property inspector is showing – but you may want to look into why every rule appears to load the exact same three times and overwrites itself twice..
hope this helps – not sure any of this is right..
July 10, 2015 at 6:06 am #241666RollercoasteriderParticipant@djteveb,
Thanks for responding.
Re: Pretty Permalinks
I think I was getting mixed up with pretty urls at my smf forum which were a disaster. When I moved my blog I had to change embedded links and that was a nightmare and I was thinking it was due to pretty permalinks since ?I had a nightmare changing links at the forum as well. But my blog does use pretty permalinks and I have them set up on this other WP install as well.I have just disabled all plugins–checking in between deactivations occasionally. I deactivated Simple:Press last and before that the logout link was still going to the forum index and now it just goes to the members page which is still acting as the front/home page even though I have the page titled HOME selected as being the front page–I checked this again after deactivating all the other plugins.
But partway through I did notice a message only on the members page shown as a small pop-up ONLY when I click chrome in my footer bar and see all the open window options. When I choose to view the wondow in full the message disappears.
<br/> <b>Warning</b>:strstr() [<ahref=’function.strstr’>function.strstr ]: Empty delimiter in <b>/home/…wp-content/plugins/buddypress/bp-core/bp-core-filters.php</b> on line <b>781</b> Members | – Google Chrome
I had to take a screen shot of it just to have enough time to read it because the pop-up didn’t stay very long and I had to type it manually here, so I might have messed up the spacing.
The activity, profile, notifications and settings links on the menu go to the same file not found message as before.
My next step will be to uninstall and reinstall through cpanel or ftp. But first I’ll wait and see if anyone else has ideas and come back to it tomorrow.
July 6, 2015 at 9:33 am #241482In reply to: How to edit tabs content?
whoaloicParticipantI just add that I could unset profile public tab:
/* remove subtabs*/ function remove_submenu_item() { bp_core_remove_subnav_item( 'settings', 'profile' ); bp_core_remove_subnav_item( 'profile', 'public' ); } add_action( 'bp_setup_nav', 'remove_submenu_item', 100 );
But I need to change the Profile landing subnav to avoid 404 page.
I found this piece of code but this only for main tab.
/** * Change BuddyPress default Members landing tab. */ define('BP_DEFAULT_COMPONENT', 'profile' );
June 28, 2015 at 4:40 am #241199In reply to: Reverting to older profile design template?
jimjasParticipantThanks Hugo. I found your article on companion styles, but the only thing I found on deregulating the new styles was:
function dequeue_bp_twentyfifteen() {
wp_dequeue_style(‘bp-twentyfifteen’);
}
add_action(‘wp_enqueue_scripts’, ‘dequeue_bp_twentyfifteen’);However I’m not using a twentysomething theme.
The current default profile menu runs horizontal across the page
https://drive.google.com/file/d/0B0PCT5EGd34SN0JIQzdJNWswVEU/edit?usp=drivesdk
But what I’d like is for the profile menu to run vertically down the page under the profile pic (like it does on the Buddypress site itself)
https://drive.google.com/file/d/0B0PCT5EGd34STnhqYnM4NXZSVDQ/edit?usp=drivesdk
Sorry if my pics are not that clear.
Do you still suggest the dequeue code in the function file as the approach I should follow? And if so, should I change the references to be for the theme I’m using instead of 2015?
IF not, is there some other code I should use to restore the old profile template format?
Thanks Hugo!
jas
June 28, 2015 at 4:20 am #241198In reply to: show entire activity stream – global activity stream
Quinn GoldwinParticipantThanks dan, I have the all activity on the specific page, but I wanted it in my profile. i ended up seeing this link on buddydev and it’s exactly what I need it to do http://buddydev.com/buddypress/show-buddypress-communitysitewide-activity-on-user-profile/ , I just wish I knew how to default it to that link when clicking on the activity link.
When i hit the activity link, it goes to my personal activity instead of the “all activity” tab. Could you direct me in how I could change the default sub menu tab in activity.
Thanks for your help! Have a wonderful independence day!
June 4, 2015 at 3:29 am #240168In reply to: Group tab questions
mrjarbenneParticipantJune 4, 2015 at 3:23 am #240166In reply to: Fatal Error When Plugin activated
mrjarbenneParticipantWell, I just tested it and it didn’t work. Hopeful someone can come in and suggest an alternate fix. One of the issues is that the code I’ve pasted there was pulled from a source that switched to smart quotes rather than regular quotes, but that doesn’t seem to be the only issue as I’ve rectified that on my test and it didn’t help.
Here’s the source:
How to Add, Remove, and Change the Order Of BuddyPress Component Menu
June 4, 2015 at 2:26 am #240162In reply to: Fatal Error When Plugin activated
mrjarbenneParticipantUse, or create, the bp-custom.php file in your plugins folder: https://codex.buddypress.org/themes/bp-custom-php/
Add this to it (make sure you add a
<?php
tag if you are creating a bp-custom file for the first time.function bbg_change_profile_tab_order() { global $bp; // Change Menu Order $bp->bp_nav[‘profile’][‘position’] = 10; $bp->bp_nav[‘friends’][‘position’] = 20; $bp->bp_nav[‘groups’][‘position’] = 30; $bp->bp_nav[‘blogs’][‘position’] = 40; $bp->bp_nav[‘messages’][‘position’] = 50; $bp->bp_nav[‘settings’][‘position’] = 60; // Remove a menu item $bp->bp_nav['activity'] = false; } add_action( ‘bp_setup_nav’, ‘bbg_change_profile_tab_order’, 999 );
I haven’t tested this. I hijacked it from here: http://themekraft.com/customize-profile-and-group-menus-in-buddypress/
June 4, 2015 at 1:58 am #240157In reply to: Fatal Error When Plugin activated
mackeykevinParticipantOk since you are my godsend I hate the activity page.. How do I edit the buddypress menu to remove the page from the menu? Matter of fact how do I change the order of the items in the menu? You are the man remember that always
April 27, 2015 at 5:48 pm #238464In reply to: Change slug without touching core files?
@mcukParticipantSo what appears to be happening is that the Buddybar adopts the slug changes immediately (I’ve just removed the display:none CSS for the main nav tabs on Buddybar to check because I don’t use it).
But the top menu (created via the Menus in WP Dashboard) is where the tabs are disappearing due to the slug changes. Tried with
define ( 'BP_MESSAGES_SLUG', 'notes' );
to confirm it wasn’t an isolated effect. All is fine there now though, they just need replacing into the menu via the WP Dash once the slug has been changed and then they appear again.Are the slugs of subnav tabs changed using the define code too? I haven’t come across it.
Out of interest, have I misunderstood this link where it says the various defines at the bottom are deprecated, or is it just in need of updating? :
April 27, 2015 at 4:39 pm #238454In reply to: Change slug without touching core files?
danbpParticipant- a slug is a human friendly URL. (as of your topic title)
- a tab name or a menu item is just a name, on which applies an URL. (as of your given example)
This means that your tab or menu can be written Cow-Boy and his URL can can be completely different, for example your-site/members/mcuk/amigos/
For consistancy and SEO logic, most prefer the same wording for both.
Related to “friends”, open bp-friends/bp-friends-loader.php and see how it works.You will discover that
// Define a slug, if necessary if ( !defined( 'BP_FRIENDS_SLUG' ) ) define( 'BP_FRIENDS_SLUG', $this->id );
is not deprecated.
In other words, to change the slug, you can use from within bp-custom.php
define ( ‘BP_FRIENDS_SLUG’, ‘whatever’ ); whatever should be exclusively alpha numeric, lower case, without any special character or ponctuation.To modify tabs and menu items, simply use the language file.
April 25, 2015 at 9:17 pm #238348caniwigirlParticipantI tried it on some of the default WordPress themes and couldn’t get it to work… and it no-longer works on the previous theme used two years ago when I first configured BuddyPress on our site.
My suggested work-around for you until someone is able to get it going again would be to create a password-protected or private page in WordPress for your mods to chat via the comments function. If you use a plugin that allows menu items to only be shown to mods, then no one will know the page even exists.
I use Nav Menu Roles to manage the visibility of menu items on my site. Unfortunately, it’s not compatible with my theme’s menu… so every time I want to add or change a menu item’s visibility, I have to change to another theme to use it , then change back. Clumsy, but it works! https://wordpress.org/plugins/nav-menu-roles/screenshots/
April 1, 2015 at 6:20 pm #237138In reply to: Trying To Get Access BBPress In My BuddyPress Plugin
David BissetParticipantThe change to ‘bp_ready’ gets past the “crapstop” but my plugin no longer shows up in the menu. Although i’ve always thought ‘bp_loaded’ was the proper hook here, for the moment i’ll take it.
Here’s the full bit of code. Perhaps i’m not init the class properly here?
function curgi_group_import_init() {if ( !function_exists('bp_forums_new_forum') ) { echo "crapstop"; exit; }
buddypress()->curgi_group_import = new CurrikiGroupImport();
}
add_action( 'bp_ready', 'curgi_group_import_init', 20 );
March 31, 2015 at 10:57 pm #237082In reply to: Activity page template?
@mercimeParticipant@mrgiblets @ihavetodothis you can change the name of Sitewide Activity when you create a New Page and name it as “Vavoom” for example (leave text area blank) and publish that page. Then you go to admin menu Settings > BuddyPress > Pages and assign “Vavoom” for example to the Activity component and save.
March 24, 2015 at 10:14 am #236491In reply to: Scheduled Posts
@mercimeParticipant@buddypresslost
1) The default WordPress Role for all BuddyPress members is the Suscriber role. In order to allow any/some members to go to the backend to create a blog post, you need to navigate to the wp-admin menu Users > All Members and change the role of the member/s from Suscriber to either: :
– “Contributor” – cannot publish, can only submit a post for review. The Editor or Administrator can schedule the post at future date and the post automatically gets published at the scheduled date.
– “Author” – can set the publish date to future date and the post gets published at the scheduled date.2) Not sure why you need a system as the post does get published at a future date set in the “Publish” attribute within the “Publish” box in the panel.
March 5, 2015 at 11:50 pm #235524StuddlypigParticipant@hugo
Thank you for taking the time to respond. The advice on changing the name in the plugin folder allowed me to get back into the wp-admin log in. After reading what you said about I looked at the ‘Activation’ drop down and it was set to login so I think that is where I went wrong. When I change it to none buddypress informs me ‘The following active BuddyPress Components do not have associated WordPress Pages: Activate. Repair’ what kind of page so I have set for that drop down menu? Do I need an additional plug in or do I just make a new page for it? Any advice would be much appreciated.Thank you again!
March 1, 2015 at 10:15 am #235298In reply to: Profile menu visibility
danbpParticipantsnippets published on the forum are generally related to a specific topic/question. And of course, dependant of theme and/or bp version, if not php or mysql or server settings. Over the time, they stop working or can’t be used anymore because the Core changed or because of other evolutions….
Despite having a kind of snippet store accessible by forum menu seems to be a usefull idea, it is not. Each usage case is different and can not be extended to all case. FYI information, i had the same idea a few years back, and was quickly discouraged to do so by our Core dev. I was first disapointed, but i finally had to admit they where right. And today, i’m absolutely persuaded and on the same line.
That’s why you have Codexes. For WP, BP or bbP with general explanation of default usage and more rarely, with usage examples. If you find a snippet example in Codex, in 95% of cases, you have to adapt it to your personnal usage.
To answer your question, as you know, BuddyPress is (only) a WordPress plugin. When installed, the site continue to work with WordPress and WP dashboard. Nothing is modified in WP Core, only that BP was added to the site. As a plugin.
How to handle WordPress is explained and widly documented in his Codex.
Menu management, CPT management or how to modify menu items on Toolbar or Admin bar is also documented. And the’re so many sites giving WP tips (from excellent to awfull), you can read.February 13, 2015 at 7:44 am #234388In reply to: Custom Profile menu
barodscheffParticipantThank you but your solution is outdated. I’ve found it also while searching.
And thats the big problem with buddypress. There was an update about one year ago and everything changed. So nearly all common customizations do not work any more.Thats the reason why the plugin ‘buddypress custom profile menu’ also doesn’t function anymore.
Fortunately I found the solution. It looks like this:
function profile_new_nav_item() { global $bp; bp_core_new_nav_item( array( 'name' => 'Contact Athlete', 'slug' => 'contact_athlete', 'default_subnav_slug' => 'extra_sub_tab', 'position' => 160, 'screen_function' => 'view_manage_tab_main' ) ); } add_action( 'bp_setup_nav', 'profile_new_nav_item', 10 ); // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function view_manage_tab_main() { add_action( 'bp_template_content', 'bp_template_content_main_function' ); bp_core_load_template( 'template_content' ); } function bp_template_content_main_function() { if ( ! is_user_logged_in() ) { wp_login_form( array( 'echo' => true ) ); } } // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = function profile_new_subnav_item() { global $bp; bp_core_new_subnav_item( array( 'name' => 'Extra Sub Tab', 'slug' => 'extra_sub_tab', 'parent_url' => $bp->loggedin_user->domain . $bp->bp_nav[ 'contact_athlete' ][ 'slug' ] . '/', 'parent_slug' => $bp->bp_nav[ 'contact_athlete' ][ 'slug' ], 'position' => 10, 'screen_function' => 'view_manage_sub_tab_main' ) ); } // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = add_action( 'bp_setup_nav', 'profile_new_subnav_item', 10 ); function view_manage_sub_tab_main() { add_action( 'bp_template_content', 'bp_template_content_sub_function' ); bp_core_load_template( 'template_content' ); } function bp_template_content_sub_function() { if ( is_user_logged_in() ) { bp_get_template_part('my-contact-form'); } else { wp_login_form( array( 'echo' => true ) ); } }
I hope it helps anyone.
Finally I’d like to say that I have never seen such a bad documentation in development as in buddypress. I know buddypress is free but WordPress is free too and they have a great doc.
February 5, 2015 at 5:10 pm #233742In reply to: Buddypress 2.2 and Links page
ScaffiesParticipantSame problem here .. pretty annoying, to be honest:
NSFW: http://scaffies.nl/wordpress/wp-content/uploads/2015/02/BuddyPress-Links-gone.png
“☠ [16:50 GMT – @scaffiesadmin ] Through the BuddyPress Update the page “Links Elsewhere” was broken – all Links disappeared. Hmph! Removed t from the menu.”
We had lots (!) of links entered on the page(s) under “Links” and many ‘up’ and ‘down’ votes. ALL are lost, it is now completely empty and I had to remove the page from the menu.
When I stated on our change log I had upgraded Buddypress to the latest version, I added “let’s see what it fixed and what it broke” .. something always seems to go wrong, and with over 260,000 users, it is a bummer.
NSFW: http://scaffies.nl/change-log-2015/
Sadly, I was proven right 🙁This is a bad day for open source development.
We (all the admins) are clueless about “classes” and “skeleton components” – we just use the software, pay / donate for what we do use, and hope it works … and does not render the work and efforts of thousands worthless in a single, badly tested software update.
I am afraid to install updates – the last one required some code changes do be done manually to fix something else which was broken – yet have to, in order to avoid security problems.
We are not using Multi-Site (i.e. single site, WP 4.1, and all plugins in their latest revisions).
Brandon, London
January 10, 2015 at 1:49 am #231715In reply to: How To: change navigation?
Henry WrightModeratorHi @eversatile
I have been trying to find the file location of the profile and group navigation menus, with no luck
There isn’t a template file which you can change if that’s what you mean, but…
I would like to change “forums” to “discuss” and remove the “members” from groups menu, etc
You can customise slugs quite easily. See the Customizable Slugs in BuddyPress article.
bp_core_remove_nav_item()
will let you remove nav items from the navigation. There is alsobp_core_remove_subnav_item()
for removing sub nav items.December 26, 2014 at 7:40 pm #231076In reply to: Buddybar issues with wordpress 4.1
VibralParticipantYes, I was just playing around – I don’t intend using it – I was actually looking for the theme that’s currently used on the buddypress.org site – this theme with the red bar on top – would you happen to know where I can find it? I like it since the buddybar isn’t right up top, so it’s more noticable.
I’ve also been looking for a way to extract the menu that you get from the buddy bar so as to use it as a sidebar widget. I have used the “(Buddy Press) Log in”, but when you log in, it doesn’t show the other options that you get with buddy bar, i.e. activity, profile, …, settings with the nice submenus.
I did try trawling the php code but I haven’t found it as yet. Is there an easy way to extend the Buddy Press login widget so that once you log in you get these other options as well?
Apologies if this is now going into another subject area – should I repost the new question as a new topic?
As to the original question, I think you solved it way back when you asked me to empty the pages trash and to rename the slugs. I still don’t know why my FF doesn’t work. I suspect that it is just not accpeting my log in, and that’s why I don’t get the bar. Also would explain why the login and register options don’t change. Perhaps the reason it doesn’t accept logins because I do all my wp admin through firefox? Anyway I’m prepared to live with it since it seems only the firefox on my local machine doesn’t get the bar.
Many thanks for all your help
December 22, 2014 at 7:08 am #230893In reply to: Change Login & Register Links in Admin Bar
webplayerParticipantI stumbled upon this post suggesting a snippet to put into bp-custom.php (a tweaks and snippets file for buddy press located in the plugins directory), but I can’t get it to work. I think there is an issue with my coding.
I am using BuddyPress 2.1.1
Here is my bp-custom.php file:
<?php // hacks and mods will go here //Change Admin Bar Login Links function custom_bp_adminbar_login_menu() { global $bp; global $wp; remove_action('bp_adminbar_menus', 'bp_adminbar_login_menu', 2); if (is_user_logged_in()) return false; echo '<li class="bp-login no-arrow"><a data-reveal-id="tmpl_reg_login_container" href="javascript:void(0);" onClick="tmpl_login_frm();">' . __('Log In', 'buddypress') . '</a></li>'; // Show "Sign Up" link if user registrations are allowed if (bp_get_signup_allowed()) { echo '<li class="bp-signup no-arrow"><a data-reveal-id="tmpl_reg_login_container" href="javascript:void(0);" onClick="tmpl_registretion_frm();">' . __('Sign Up', 'buddypress') . '</a></li>'; } } add_action('bp_adminbar_menus', 'custom_bp_adminbar_login_menu', 1); ?>
December 20, 2014 at 9:57 am #230821In reply to: Why is the UX of buddypress.org/support so bad?
Hugo AshmoreParticipantit would be incredibly helpful to add dividers or typographical rules/hierarchy to the buddypress.org documentation ‘subpages’ panel
And that is exactly the sort of thing that is being worked on as part of the codex initiative, you can see what is proposed by following posts on bpdevel, the BP development blog. It does take time to get changes, even to this degree, tested and pushed up to the production site, bp.org is actually a more complex site setup than might be realised and it’s codebase handles all the BP and bbP sites and access is very limited to these sites as they run on WP servers and time is quite tight for the lead developers.
BP Trac has a current ticket and patches addressing a few issues one of which is the Codex page menu to both introduce a sectional page menu and typographical styles to denote parent/child links so things are clearer
December 16, 2014 at 12:21 pm #230656In reply to: Displaying members favorite activities
colabsadminParticipantSorry I thought I was clear. I dont need an example of how to create the tab and the submenus.
What I did was write a class that creates a top level member area tab called Favorites that consolidates all types of favorites within a single tab. https://github.com/colabsadmin/bp-favorites/blob/master/bp-favorites.php
The submenus that have been created so far are Activity, Topics, Posts and a few more for some CPTs that I’ve written. This will make it easier for my users to find their favorites when they cant remember if it came from a topic, posts, activity, etc. Instead of jumping around from tab to tab, its all in one tab. The only submenu that doesnt work is Activity. The code, which I provided in my first question, was copied directly from Buddypress core code with one change to use ‘bp_core_new_subnav_item’. I used similar code to display content in all the other submenus. For example, the following shows the favorite topics
// Favorite topics bp_core_new_subnav_item( array( 'name' => __( 'Topics', 'kleo' ), 'slug' => "topics", 'parent_url' => $bp->displayed_user->domain . $bp->bp_nav['favorites']['slug'] . '/', 'parent_slug' => $bp->bp_nav['favorites']['slug'], 'screen_function' => 'bbp_member_forums_screen_favorites', 'position' => 10, 'item_css_id' => 'favorites' ));
So, my question, does bp_activity_screen_favorites() only work within the context of /members/membername/activity action? Or can it be used elsewhere as in /members/membersname/favorites?
-
AuthorSearch Results