Search Results for 'change buddypress menu'
-
AuthorSearch Results
-
January 24, 2016 at 11:50 pm #249079
In reply to: Undefined index: position in Buddybar
ch1n3s3b0y
ParticipantThis is what I changed in functions.php. It was do to with adding subnav items, removing subnav items and renaming some of them:
/* BP Add subnavigation on profile */ add_action('bp_setup_nav', 'bp_profile_submenu_profile' ); function bp_profile_submenu_profile() { global $bp; if(!is_user_logged_in()) return ''; bp_core_new_subnav_item( array( 'name' => 'Seminar Bookings', 'slug' => 'seminar-bookings', 'parent_url' => $bp->loggedin_user->domain . $bp->bp_nav['profile']['slug'] . '/' , 'parent_slug' => $bp->bp_nav['profile']['slug'], 'position' => 20, 'screen_function' => 'seminar_bookings' ) ); } function seminar_bookings() { add_action( 'bp_template_content', 'seminar_bookings_screen' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function seminar_bookings_screen() { locate_template( array( 'buddypress/members/single/profile/seminar-bookings.php' ), true ); } /* BP Remove unneeded subnav items */ function remove_bp_subnav_items() { global $bp; bp_core_remove_subnav_item('profile','change-avatar'); bp_core_remove_subnav_item('profile','change-cover-image'); } add_action( 'bp_setup_nav', 'remove_bp_subnav_items'); /* BP Rename subnav items */ function rename_bp_subnav_items(){ global $bp; $bp->bp_options_nav['profile']['edit']['name'] = 'Edit Profile'; $bp->bp_options_nav['profile']['public']['name'] = 'View Profile'; } add_action('bp_setup_nav', 'rename_bp_subnav_items', 201);The only time I had mentioned ‘position’ was when setting up a new subnav item.
December 20, 2015 at 4:35 pm #247934In reply to: bp-custom.php bp nav
codyt
ParticipantIt’s working now but the priority didn’t change anything. I’m not sure why it’s working now. I did figured out how to turn some of the tabs off courtesy of this site. However I still can’t find a way to add my own tab named “characters”. Maybe I just have to make a copy of a tab, change the name and then link it to the the page I want. If I find out how, I will let you know.
Thanks Henry!
October 23, 2015 at 11:19 am #245915In reply to: Problems with TopBar
flopfeil
Participantis here anybody who knows where buddypress established the topmenu?
if i check the to different sites with my inspector tool, i can see he loads the mainmenu and not the topmenu. So i want to know in which php.file buddypress establish the topmenu.on the sites where it shows up the right topbar it looks like…
<div class=”social-header header-color”>
<div class=”container”>
<div class=”top-bar”>
<div id=”top-social” class=”col-sm-12 col-md-5 no-padd”> </div>
<div class=”top-menu col-sm-12 col-md-7 no-padd”>
<ul id=”menu-topmenu” class=””>and on the other sites, where i have the wrong menu….
<div class=”social-header header-color”>
<div class=”container”>
<div class=”top-bar”>
<div id=”top-social” class=”col-sm-12 col-md-5 no-padd”> </div>
<div class=”top-menu col-sm-12 col-md-7 no-padd”>
<ul id=”menu-mainmenu” class=””>so there must be any code from buddpypress which put here the mainmenu.
Did anyone know where i can change that part of code?
October 22, 2015 at 1:38 pm #245836In reply to: Problems with TopBar
flopfeil
ParticipantThanks for your help, but its not the solution.
My TopMenu got the content you see on that screen.
http://www.pic-upload.de/view-28637544/Top_normal.jpg.html
I try to explain my problem better.
The TopMenu works when the Buddypress Plugin is deactivated. Its on all Sites that Menu I want to have.
After I activate the Plugin on some of the sites(Buddypress specific sites) changes the TopMenu and show the content from the NavigationBar.So I think there is a piece of code in any PHP-File which overwrites my TopMenu.
Any ideas???
October 9, 2015 at 8:53 pm #245310In reply to: How to make nice looking tabs in groups
Philosopher Rex
ParticipantNote that this doesn’t just change tabs in groups, but in the profile as well. I had some issues ‘fitting’ in some words without making the text too small or resorting to wrapping the word (another CSS rule); so instead I used poedit to change the menu text.
You can read about how to do that here: https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/
October 1, 2015 at 9:20 pm #244987In reply to: Profile Tabs
September 10, 2015 at 12:48 am #244207danbp
Participanthi,
first snipppet removes the mention tab.
Second remove the mention item from the top right usermenu below howdy.Condition is set to site admin. If you use custom capabilities, change that to your need.
Code goes to bp-custom.phpfunction bpfr_hide_mention_nav() { //if ( bp_current_user_can( 'bp_moderate' ) ) if ( is_super_admin() ) { return; } bp_core_remove_subnav_item( 'activity', 'mentions' ); } add_action( 'bp_ready', 'bpfr_hide_mention_nav' ); function bpfr_admin_bar_remove_activity_mentions(){ global $wp_admin_bar; if ( is_super_admin() ) { return; } $wp_admin_bar->remove_node('my-account-activity-mentions'); } add_action('wp_before_admin_bar_render','bpfr_admin_bar_remove_activity_mentions');An alternate (IMO better) solution, is this premium plugin: http://www.philopress.com/products/buddynotes/
September 5, 2015 at 3:36 am #244065In reply to: [Resolved] How To Get Notification Count? (Code)?
AilyRoot
ParticipantHi guys
we are looking for solution to get buddypress notifications work on our theme, we know it will be shown on wordpress’s default top tool bar but we want it to show somewhere else.We are using WP 4.3 with buddypress 2.3.3, we have added these to theme’s functions.php
function bpfr_add_notification_to_page_title( $title, $original_title, $sep ) { //do not change if the user is not logged in if( ! is_user_logged_in() ) return $title; $user_id = get_current_user_id();//logged in user's id $count = bp_notifications_get_unread_notification_count( $user_id ); if( $count > 0 ) $title = sprintf( "You Have %d New Notification(s) - ", $count ); return $title; } add_filter( 'wp_title', 'bpfr_add_notification_to_page_title', 100, 3 );then we add these to theme ‘s menu location
<?php echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ); ?>but it is showing nothing, what is the correct steps to make this work please?
thanks
August 24, 2015 at 4:14 am #243519In reply to: bp_core_remove_nav_item
danbp
ParticipantHi @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
djsteveb
ParticipantI 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 #241666Rollercoasterider
Participant@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?
whoaloic
ParticipantI 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?
jimjas
ParticipantThanks 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 Goldwin
ParticipantThanks 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
mrjarbenne
ParticipantJune 4, 2015 at 3:23 am #240166In reply to: Fatal Error When Plugin activated
mrjarbenne
ParticipantWell, 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
mrjarbenne
ParticipantUse, 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
<?phptag 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
mackeykevin
ParticipantOk 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?
@mcuk
ParticipantSo 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?
danbp
Participant- 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 #238348caniwigirl
ParticipantI 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 Bisset
ParticipantThe 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?
@mercime
Participant@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
@mercime
Participant@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 #235524Studdlypig
Participant@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!
-
AuthorSearch Results