Search Results for 'bp_get_displayed_user_nav'
-
Search Results
-
Hi, I am running BP 2.1.1 and WP 4.0 and I am trying to tap into the filter of bp_get_displayed_user_nav and bp_get_options_nav to do something like:
`echo apply_filters_ref_array( 'bp_get_displayed_user_nav_' . $user_nav_item['css_id'], array( '<li id="' . $user_nav_item['css_id'] . '-personal-li" ' . $selected . '> <a href="' . $link . '#item-body" rel="nofollow">' . $user_nav_item['name'] . '</a>', &$user_nav_item ) ); `
In other words, add a #item-body to the URL.
Since I don’t know how to do it, I had to create a whole new function for MY_bp_get_displayed_user_nav and MY_bp_get_options_nav and then change all of my template files!
Is there an easier way without having to change all of my template files?
My site is at underground.net
Thanks!
Charles
Quick – and quite possibly stupid – question.
In bp_get_displayed_user_nav() is an apply_filters_ref_array().
So shouldn’t my filter be receiving an array?
Yet unless I’ve lost my mind – again? – best I can tell I’m getting a string. I was expecting array(‘<l1>…‘, array of args) but only seem to be getting the ‘<l1>…‘ bit.
Specifically I want to change the value of $user_nav_item[‘name’] as defined by a plugin I’m using. Is there a way to pre-filter these before the ‘<l1>…‘ is setup?
Thanks again
mfsTopic: Menus
Hello,
I use WP3.6+BP1.8.1 at http://fablab-lannion.org.
I would like to display the equivalent of the /members/LOGIN/activity page for logged-in users that access to the home page. I copied various templates from /buddypress/members/single/ (activity.php, home.php…) and created a shortcode function that makes the following call :
include( locate_template( array( '/buddypress/members/single/home.php' ), false ) );The template is loaded but inside of it, calls to various functions like bp_get_displayed_user_nav() return nothing. It seems that $bp->displayed_user data (especially domain and userdata) are empty, which seems to be a possible cause. Is there something I could do to force BP to load appropriate data about the logged-in user in this context ?
Best regards,
YannTopic: Adding submenu to nav menus
Hi, (My second post in an hour, apologies if that’s too much!)
I’m a developer just starting out on my first BuddyPress project. Really excited about it- after researching for a few weeks and trying out other solutions I determined BuddyPress was definitely the right way to go for creating a social network.
I’m currently trying to adapt the bp-legacy templates to a Bootstrap-based theme. I’d really like to rely purely on the bootstrap css and not load any buddypress css. But some of the buddypress functions include css class names. I have been converting them to accept arguments but I really don’t want to update the buddypress core files.
For example:
from: function bp_get_options_nav() {…}
to: function bp_get_options_nav($css_selected_class = “current selected”) {…}from: function bp_get_displayed_user_nav() {…}
to: function bp_get_displayed_user_nav($css_selected_class = “current selected”) {…}It could be taken farther to include the html tags to use, but for now I just use the standard unordered lists.
Is there a better way other than modifying the buddypress core files? Or should I just give in and make CSS classes to fit buddypress?
(WordPress 3.5.1, BuddyPress 1.7.2)
I’m using bp mag and bp mag classic as my main theme. brajesh recently updated his themes and everything works fine. however if i activate bp mag classic i have a problem in this else if statement. the code is this
if(bp_is_home()){
do_action(“bpmag_member_options_nav”);
}
else if(bp_is_member ())
bp_get_displayed_user_nav ();
else
bp_get_options_nav ();i have an issue with this:
else if(bp_is_member ())
bp_get_displayed_user_nav ();when I go to another member of my site it skips this and immediately goes to
else
bp_get_options_nav ();is there a bug in this code or something else.
here is an image of what i’m talking about
http://i1060.photobucket.com/albums/t451/Bastani/bpmagclassicbug-1.jpg
buddypress 1.5.5 wordpress 3.3.2. latests versions of bp mag and bp classic
thanks in advance. hope someone can help me with this.
p.s. yes i asked Brajesh also on his forum but just want to know if its a problem with this code or if it is more complicated.
Hi there i am wondering how to make bp_friend_total_requests_count(); update in real time rather than waiting for the page to refresh my current code used is
` `
works fine however it requires the page to be refreshed before it updates…
where as the same thing in bp_get_displayed_user_nav() updates in real time any suggestions ?
Hi, i’d like to change the bp_get_displayed_user_nav() strings with images (i’m talking about Activity Profile Friends(0) Settings). Instead of having text links, i’d love to have images. Is that possible? What should I do? I’m unable to find a way to edit the function and get different elements.
Thanks for your help



should i put it somewhere else?