Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 976 through 1,000 (of 1,167 total)
  • @bphelp

    Participant

    @hnla I finally got the images right! Thanks for your help! Here is what I added to the above code.

    
    'title' => __('<img src="' . plugins_url( '_inc/images/messages.png' , __FILE__ ) . '"> '),
    

    Just change the messages.png to the others like friends.png, and notifications.png.
    Works like a charm! Thank you!
    Now I just need to figure out how to get the individual types of notifications to display when there is notifications. I have researched this on the codex but I am kinda stuck. Any suggestions would be appreciated! Thanks again!

    @bphelp

    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!

    @bphelp

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

    @bphelp

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

    @bphelp

    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!

    @bphelp

    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!

    @bphelp

    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!

    @bphelp

    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

    @bphelp

    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!

    @bphelp

    Participant

    @maddogmcewan That looks great. I will accept any help you can share. Thanks! 🙂

    @bphelp

    Participant

    @chouf1 Also what about creating a dropdown menu? Thanks again!

    @bphelp

    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!

    In reply to: Admin bar modification

    @bphelp

    Participant

    @panoravu You will probably have to just hire a developer because all the links relative to BP in the admin bar are dynamic to each user. I have been trying to get help myself but I guess its overly complex. See this thread:
    https://buddypress.org/support/topic/how-to-split-out-buddypress-notifications-drop-down-items-to-their-own-top-level/
    Sorry I could not help more, it is above my skill level.

    @bphelp

    Participant

    @chouf1 Thanks for the better solution! 🙂

    @bphelp

    Participant

    @bdigges
    use a developer tool like firebug for firefox or chrome developer tools to target the element then add for example:
    #the-element-targeted {
    display: none;
    }

    In reply to: Admin bar modification

    @bphelp

    Participant

    @panoravu
    Have you tried:
    http://premium.wpmudev.org/project/custom-admin-bar/
    If this doesn’t do what you need then it will require custom coding and if you can’t do it then you may have to hire a developer.

    @bphelp

    Participant

    As tedious as it seems @hnla ‘s solution is probably the most straight forward approach. If someone goes in editing database tables and they are inexperienced then they will likely crash and burn their site. I would follow his advice but that is my 2 cents worth anyhow!

    @bphelp

    Participant

    Is there any BP Professionals who can help me on this? I surely would appreciate it! Thanks a million!

    @bphelp

    Participant

    @shanebp

    But most requests for this kind of plugin ask for site-wide invisibility – another beast entirely.

    isn’t that what the plugin your working on supposed to do at least as far as the activity stream, and being visible in the members directory? I really hope you can get this plugin working cause it will be very useful. Thanks for the effort so far!

    @bphelp

    Participant

    @mercime @hnla @caming I have tested what caming is referring too In WP 3.5.1 BP 1.6.4 as Well as WP 3.5.1 and BP 1.7beta2 And there is a bug. If you press “cancel friendship request” then it says “friendship request could not be cancelled” If anything it should just say “accept or deny” just as caming stated. Any suggestions?

    @bphelp

    Participant

    @shanebp Okay that sounds good.

    @bphelp

    Participant

    @sbrajesh @mercime @naijaping
    This is a rough draft of what I would like to do. All icons functional, and only appearing in header after the user is logged in. I hope this will help explain what I am doing. Thanks everyone!
    split out notifications

    @bphelp

    Participant

    @mercime Thanks but that is not going to accomplish what I am attempting to do. I can’t find anything in the codex that explains how this would be done either. The codex helped me figured out a lot of stuff about customizing BP but there doesn’t seem to be any documentation about notifications in the codex or on google. Is there anyone you can direct me too that could explain how I can get this done or better yet add some documentation to the codex regarding notifications? I would be very grateful to anyone that can help me resolve this. Thanks for your help!

    @bphelp

    Participant

    @sbrajesh actually I would like to get it like facebooks notifications somewhere in the header using similar icons to dispay friend requests, messages, notifications and when you have anything then the icon will display accordingly just like facebooks. If anyone can offer assistance I would appreciate it.

    @bphelp

    Participant

    @shanebp
    Just tried it with the change you made and I still have the same issue. it seems only the admin account is effective at blocking, while subscribers has no effect at all when blocking. If user1 blocks user2 then user2 still see’s user1’s activity and is still visible in the members page as well. The only plugins I have activated is your plugin, buddypress, and bbpress. Not sure what the issue is!

Viewing 25 replies - 976 through 1,000 (of 1,167 total)
Skip to toolbar