Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'toolbar'

Viewing 25 results - 476 through 500 (of 805 total)
  • Author
    Search Results
  • #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.

    danbpfr
    Participant

    i 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 !

    #156640
    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!

    bp-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);
    `

    #156622
    Hugo Ashmore
    Participant

    Has @Chouf1 not answered that question on the lst comment on this thread he linked to?:

    https://buddypress.org/support/topic/how-to-split-out-buddypress-notifications-drop-down-items-to-their-own-top-level/

    Those various references should point you to the functions you need to work with.

    #156610
    Hugo Ashmore
    Participant

    It’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’

    #156605
    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!

    #156596
    Hugo Ashmore
    Participant

    If 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__ ) .

     

    #156590
    bp-help
    Participant

    I 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);
    
    #156560
    bp-help
    Participant

    Okay 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);

    #156543
    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!

    #156523
    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!

    #156509
    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!

    #156499
    bp-help
    Participant

    This 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
    	) );
    

    notifications

    #156465
    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!

    #156454
    Hugo Ashmore
    Participant

    I 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.

     

    #156433
    bp-help
    Participant

    I 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!

    maddogmcewan
    Participant

    Hi 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

    notifications on new toolbar

    bp-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!

    #156369

    In reply to: Admin bar modification

    danbpfr
    Participant

    hi @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.html

    #155921
    Paul Wong-Gibbs
    Keymaster
    #155285
    @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! 🙂

    bp-help
    Participant

    I 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!

    #154819
    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.

    AutomatedKid
    Participant

    I 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.

Viewing 25 results - 476 through 500 (of 805 total)
Skip to toolbar