Search Results for 'toolbar'
-
AuthorSearch Results
-
March 19, 2013 at 10:13 pm #156821
danbpfr
Participant@shahzaib147, so far i know there is only one Toolbar in WP
If the code works on the backend bar it should also work on the frontend !
That’s the case on my test site. Have you refreshed the page (F5) ?Or have you an extra theme with an extraaaaaa Toolbar ? Give more details about your config or a picture, because i don’t see what you’re talking about.
March 18, 2013 at 7:16 pm #156720danbpfr
Participanti have already helped you here for the same question: https://buddypress.org/support/topic/how-to-add-images-to-a-custom-toolbar/#post-156520
Let me tell you that you don’t ask for help now, but search somebody doing that plugin at your place. 👿
Go to the job board and hire a dev, if you don’t know go further with all the elements you already received. I’m not at your personal service !
March 17, 2013 at 10:24 pm #156640In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@hnla since the topic name is “How to add images to a custom toolbar” then if you could kindly mark this as resolved. Thanks again for your help!
March 17, 2013 at 10:20 pm #156639bp-help
Participant@chouf1 with your help and hnla’s I have this working but even with the above examples in how to get the counts in a drop down I am not certain how to do this. Where do I place:
echo bp_friend_get_total_requests_count( $user_id );
echo bp_get_total_unread_messages_count($name );
echo count($notifications);
In the code because it either fires off an error or it actually echo’s the code. What am I doing wrong? Thanks again for all your help! 🙂
`
function custom_toolbar($wp_toolbar) {
global $wp_admin_bar;if ( is_user_logged_in() ) {
$wp_toolbar->add_node(array(
‘id’ => ‘bp-notifications’,
‘title’ => __(‘
‘),
‘href’ => bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/notices/’,
/*’meta’ => array(‘class’ => ‘notifications’)*/
));$wp_toolbar->add_node(array(
‘id’ => ‘user-friends’,
‘title’ => __(‘
‘),
‘href’ => bp_loggedin_user_domain() . bp_get_friends_slug() . ‘/requests/’,
/*’meta’ => array(‘class’ => ‘menupop’)*/
) );$wp_toolbar->add_node(array(
‘id’ => ‘user-messages’,
‘title’ => __(‘
‘),
‘href’ => bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/view/’,
/*’meta’ => array(‘class’ => ‘menupop’)*/
) );
}
}
add_action(‘admin_bar_menu’, ‘custom_toolbar’, 999);
`March 17, 2013 at 6:50 pm #156622In reply to: [Resolved] How to add images to a custom toolbar?
Hugo Ashmore
ParticipantHas @Chouf1 not answered that question on the lst comment on this thread he linked to?:
Those various references should point you to the functions you need to work with.
March 17, 2013 at 4:21 pm #156610In reply to: [Resolved] How to add images to a custom toolbar?
Hugo Ashmore
ParticipantIt’s in the codex searching on ‘WP plugins_url()’ ought to find it.
It may not work if you have odd folders but yours look standard-ish oh and if you copied my example I added a typo _incl / _inc – personally much prefer ‘assets’
March 17, 2013 at 2:13 pm #156605In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@hnla is there any documentation how to implement using the plugins_url function. I can’t seem to find anything and I am having trouble to get it working. Thanks!
March 17, 2013 at 10:38 am #156596In reply to: [Resolved] How to add images to a custom toolbar?
Hugo Ashmore
ParticipantIf you haven’t already you probably ought to use the plugins_url function to find those images :
. plugins_url( '_incl/images/my-image.png' , __FILE__ ) .
March 17, 2013 at 6:07 am #156590In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
ParticipantI made some changes now all the icons link to the pages but I need help to show the drop down menu for each individual notification. Here is what I have so far and I really am not certain of the id of each type of notification! Thanks in advance!
function custom_toolbar($wp_toolbar) { global $wp_admin_bar; if ( is_user_logged_in() ) { $wp_toolbar->add_node(array( 'id' => 'bp-notifications', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/notifications.png" /> '), 'href' => bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/', /*'meta' => array('class' => 'notifications')*/ )); $wp_toolbar->add_node(array( 'id' => 'user-friends', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/friends.png" />'), 'href' => bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/', /*'meta' => array('class' => 'menupop')*/ ) ); $wp_toolbar->add_node(array( 'id' => 'user-messages', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/messages.png" />'), 'href' => bp_loggedin_user_domain() . bp_get_messages_slug() . '/view/', /*'meta' => array('class' => 'menupop')*/ ) ); } } add_action('admin_bar_menu', 'custom_toolbar', 999);March 16, 2013 at 6:01 pm #156560In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
ParticipantOkay with this code I got all links to work. Thanks @chouf1 for helping. Now I just need the get the friend requests and messages to have a drop down to display when there is a message. If anyone has a better idea I am totally open to suggestions. I would like to get this working like facebooks if possible. Also I was wondering in the below code how can I get the images loaded dynamically from plugins /images folder I created? Thanks again!
function custom_toolbar($wp_toolbar) {
global $wp_admin_bar;if ( is_user_logged_in() ) {
$wp_toolbar->add_node(array(
'id' => 'bp-notifications',
'title' => __('
'),
'meta' => array('class' => 'notifications')
));$wp_toolbar->add_node(array(
'id' => 'friends-requests',
'title' =>__('
'),
'href' => bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/',
) );$wp_toolbar->add_node(array(
'id' => 'messages-inbox',
'title' => __('
'),
'href' => bp_loggedin_user_domain() . bp_get_messages_slug() . '/view/',
) );
}
}
add_action('admin_bar_menu', 'custom_toolbar', 999);March 16, 2013 at 1:33 pm #156543In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@modemlooper @mercime @sbrajesh @chouf1
Is there anyone who can give me a hand please? I’m stuck trying to get this working. Thanks everyone!March 16, 2013 at 2:41 am #156523In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@chouf1
Hey sorry to be a pain but that code gives the same error.Parse error: syntax error, unexpected ‘id’ (T_STRING), expecting ‘)’ in C:\xampp\htdocs\mydev\wp-content\plugins\custom-toolbar\custom-toolbar.php on line 48
I’m a noob so I really appreciate the help!
March 15, 2013 at 11:53 pm #156509In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@chouf1
That didn’t work and it fired off this error.Parse error: syntax error, unexpected ‘id’ (T_STRING), expecting ‘)’ in C:\xampp\htdocs\mydev\wp-content\plugins\custom-toolbar\custom-toolbar.php on line 48
Got any more idea’s on how to get these links working!
March 15, 2013 at 9:31 pm #156499In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
ParticipantThis is the code I have and the images are now visible but the links for friend-requests and messages doesn’t work. I am not sure of the id or href. Can someone please help me out on this code? Thank you everyone! 🙂
$wp_toolbar->add_node(array( 'id' => 'bp-notifications', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/notifications.png" /> '), 'meta' => array('class' => 'notifications') )); $wp_toolbar->add_node(array( 'id' => 'friend-requests', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/friends.png" /> '), 'href' => $notification->href ) ); $wp_toolbar->add_node(array( 'id' => 'messages', 'title' => __('<img src="http://localhost/mydev/wp-content/plugins/custom-toolbar/_inc/images/messages.png" /> '), 'href' => $notification->href ) );
March 15, 2013 at 3:57 pm #156465In reply to: [Resolved] How to add images to a custom toolbar?
bp-help
Participant@hnla Hi, I am having a hard time getting the image to show up. Also what is the node id for friend request, and private messages? I can’t seem to find it to use in my custom toolbar to add these as top level items! Thanks!
March 15, 2013 at 10:56 am #156454In reply to: [Resolved] How to add images to a custom toolbar?
Hugo Ashmore
ParticipantI wouldn’t expect what you have above to work ‘title’ is the link name the character text for the anchor ‘href’ is the actual link href and there are few other parts one can manipulate in this way however looking at admin-bar.php seems to suggest ‘title’ is a little more confusing than suggested by the WP codex.
I would look at admin-bar.php around line 140 on to see how WP add the user avatar.
March 15, 2013 at 2:46 am #156433Topic: [Resolved] How to add images to a custom toolbar?
in group forum Installing BuddyPressbp-help
ParticipantI made a plugin for a custom toolbar and this is what I got so far but the image doesn’t show up in the toolbar:
function custom_toolbar($wp_toolbar) { $wp_toolbar->add_node(array( 'id' => 'bp-notifications', 'title' => __( '<img src="/wp-content/plugins/custom-toolbar/_inc/images/notifications.png" />' ), 'meta' => array('class' => 'menupop') )); } add_action('admin_bar_menu', 'custom_toolbar', 999);I will appreciate any help! Thanks!
March 14, 2013 at 8:23 pm #156409maddogmcewan
ParticipantHi not sure if this is what you are trying to do, if you go to http://smeak.com you can see it at work, we split the notifications intro 3, and into a custom toolbar we built for the network. Let me know to see if we can help
March 14, 2013 at 7:35 pm #156403bp-help
Participant@chouf1 Hey thanks for your help. Is there anyway to get the number of these individual types of notifications you have beside the links or image kinda like it does in the toolbar? Cheers!
March 14, 2013 at 12:31 pm #156369In reply to: Admin bar modification
danbpfr
Participanthi @panoravu,
for css styling, be inspired by this: http://www.php-ease.com/code/wordpress-style-admin-bar.html
If you want to code something into the Toolbar, you have to play with the wp_admin_bar filter.
The function goes then to your theme functions.php
Based ons omething like this
function my_function( $wp_admin_bar )
{
/* Â what you need here */}
add_filter( ‘admin_bar_menu’, ‘my_function’ );Google around to find many answers about the WP Toolbar, like this one:
http://technerdia.com/1140_wordpress-admin-bar.htmlMarch 9, 2013 at 6:56 pm #155921In reply to: [Resolved] Can't revert to buddybar
Paul Wong-Gibbs
KeymasterMarch 6, 2013 at 6:52 pm #155285In reply to: BP Member Notes – beta
@mercime
Participant@shanebp in view that you made this bug test for mercime, I tested the plugin in the same installation and it’s working as expected. If BP is activated, I see the notice showing up right under the adminbar/toolbar and right above Dashboard menu. If I deactivate BP, there’s no notice.
EDIT – @djpaul awesome! 🙂
March 2, 2013 at 1:28 pm #154875bp-help
ParticipantI would like to know how to do this, I am not a buddypress expert so It will take some explaining and even better some code on a github link. I would like to add this to my header and get rid of the toolbar, I would also like to add the BP links that is usually in the right of the toolbar into the the header. Reason being I don’t want that bar up there and it would make it look more custom without the toolbar that gives it away that it is a WP/BP social network. I like how facebook has their notifications, messages, and friend request split out. This is what I am trying to do. I got a little info on this link but not enough to do anything with : http://wordpress.stackexchange.com/questions/27888/how-to-split-out-buddypress-notifications-drop-down-items-to-their-own-top-level @boonebgorges explains it but not in much detail. I would appreciate any guidance on how to get this done. Thanks!
March 1, 2013 at 10:01 pm #154819In reply to: Required Profile fields don't work
bp-help
Participant@supernaturalbrews user profile extended fields doesn’t show up in the dashboard. you can however click on a member in the front end then as an admin you will see the toolbar change up near the left where it says edit member. click edit member/edit profile and then you can see what info they entered in the extended profile fields.
March 1, 2013 at 7:00 pm #154810AutomatedKid
ParticipantI really like the added benefit of utilizing the WP menu item (upper left) with the fly out menu and having the Anonymous user show (far right when not logged in) and I was wondering the following:
1. How did you add the fly out menu to the WP menu item?
2. How did you add the Anonymous user menu to show to logged out users?
3. In addition to #1, what’s the easiest way to change the logo to wording?Thanks to whoever can assist me.
-
AuthorSearch Results
'),
'),
'),
