Moving the WPMU Private Messaging and Chat icons through the Wordpress toolbar

Hi!

I'd like to move these icons to the right side of the bar, but to the left of the wp profile dropdown menu. That's it.

Thanks.

  • Wheel of Commerce

    Hi, man!

    Actually, these icons can't be moved to the place I want them to be using Custom Admin Bar -I can't move the isons pass a specific point in the bar, I've tried. Patrick managed to come up with a "temporary solution", as it creates a gap of blank space between these icons and the wp profile dropdown menu, unless the username has 20 characters. What I want is to position the icons in a way that places them right at the left of the wp profile dropdown menu, but adjusting themselves regarding the username length. Here's what Patrick came up with:
    This went into my custom css panel:

    #wpadminbar ul li#wp-admin-bar-wpmudev-chat-container {position:absolute; right:287px;}
    #wpadminbar ul li#wp-admin-bar-mm-button {position:absolute; right:230px;}

    And this went inside footer.php:

    <script>
    $().ready(function()
    {
    $(“#user_name”).maxlength(20);
    });
    </script>

    Thanks.

  • Predrag Dubajic

    Hey @Gabriel,

    Just to followup on our chat :slight_smile:

    Could you please try replacing Patrick's CSS with this one:

    #wp-admin-bar-wpmudev-chat-container,
    #wp-admin-bar-mm-button {
    	float: left!important;
    }

    And script with this one:

    <script type="text/javascript">
    	jQuery( document ).ready(function() {
    		jQuery("#wp-admin-bar-wpmudev-chat-container").prependTo("#wp-admin-bar-top-secondary");
    		jQuery("#wp-admin-bar-mm-button").prependTo("#wp-admin-bar-top-secondary");
    	});
    </script>

    Let us know if that works.

    Best regards,
    Predrag

  • Wheel of Commerce

    Hi, man!

    It's working perfectly now, thank you very much :slight_smile:. I've just realized wp displays a little icon that counts the number of notifications an user gets and that it also displays these notifications inside the dropdown profile menu; isn't that redundant? About that, I have some considerations:
    1)If in fact it is as I said, and the notifications are displayed at these 2 places, I'd like to get rid of the counter icon.

    2)If they have different functions, I'd like to move that counter to the right side of the dropdown profile menu, because the way it is right now looks like that counter refers to the chat icon.

    3)All the users who register on the site get registered as subscribers. Do they receive notifications if, let's say, a plugin in the network needs an update? I fo, I'd like to disable that, as it wouldn't make any sense, since my site is all at the front end.

    4)I'd also like to move the search icon to the left of the WPMU Private Messaging icon.

    Thanks again, man! Together with that "little man icon" that you solved for me, this one was bugging me for a couple of days.

  • Predrag Dubajic

    Hey @Gabriel,

    I have sent a friend request as different user and can see the notifications but there is no counter in admin bar so can you please tell me to which counter you are referring to, screenshot would help :slight_smile:

    3)All the users who register on the site get registered as subscribers. Do they receive notifications if, let's say, a plugin in the network needs an update? I fo, I'd like to disable that, as it wouldn't make any sense, since my site is all at the front end.

    Subscriber accounts are not notified of such changes/updates on your site.

    4)I'd also like to move the search icon to the left of the WPMU Private Messaging icon.

    Let's try by updating previous script to this:

    <script type="text/javascript">
    	jQuery( document ).ready(function() {
    		jQuery("#wp-admin-bar-wpmudev-chat-container").prependTo("#wp-admin-bar-top-secondary");
    		jQuery("#wp-admin-bar-mm-button").prependTo("#wp-admin-bar-top-secondary");
    
    		var lists = $('#wp-admin-bar-top-secondary li');
    		lists.filter(':nth-child(3)').insertBefore(lists.filter(':nth-child(1)'));
    	});
    </script>

    And CSS to this:

    #wp-admin-bar-search,
    #wp-admin-bar-wpmudev-chat-container,
    #wp-admin-bar-mm-button {
    	float: left!important;
    }

    Best regards,
    Predrag

  • Wheel of Commerce

    Hi, man!

    1)About the counter: I had removed it using a php snippet Patrick gave me, then I realized it's the only way to display the notifications without the user having to hover the mouse over the profile dropdown menu. What I want now is to simply move it to the right side of the dropdown menu, because the way it's being displayed right now (at the left), it looks like that counter belongs to the icon at the left, not to the profile menu.

    2)About the reporitioning of the search bar: I've made the changes as instructed, but now the search bar is between the chat icon and the notifications counter. What I want is for it to be the very last icon at the left of that group of icons, so it should be placed at the left of the chat icon -I apologize if I've expressed myself poorly in my previous post.

    3)The code you gave me works perfectly on every single page, except for one: the store admin page, that's generated by the plugin TT Marketpress Frontend Admin -its slug is /username/store-admin, as in https://www.wheelofcommerce.com/testaccount2/store-admin/. This is a very problematic plugin, it has been the cause of most of my issues, but the thing is: it's pretty much the core of my site, as it's the only plugin on the market so far that creates a complete front end interface for Marketpress, and my site is all at the front end. The worst part is that its dev seems to answers the questions at the support forums as he pleases, so I really don't expect to get any help from him.
    If you can help me find a way around this, that'd be really nice. If there's no way to apply this "floating adjustment" for the bar elements, I can deal with that type of "fixed position" solution Patrick came up with.

    Thanks once more, man! :slight_smile:

  • Adam Czajczyk

    Hey Gabriel,

    I hope you're well today!

    I've tried to register on your site just to take a look (from the user point of view) twice. When you take a look at the users list you'll notice me there as adamwpmu and adamwpmux. The first time I've provided an invalid e-mail address by mistake but the second one I gave the proper one. However, I didn't get any confirmation e-mail yet (I've got a SPAM filter totally disabled on this "dev" account).

    I know that's slightly off-topic but are you aware of any issue on your site regarding confirmation email? Or have you disabled confirmation e-mails somehow? Let me know please as I actually wanted to investigate the original issue in question :slight_smile:

    Cheers,
    Adam

  • Wheel of Commerce

    Hi, man!

    Maybe it's an issue specific to your email address? I haven't tested different email companies yet, only yahoo with my test accounts (it's easier to create different valid email accounts on yahoo), but anyway, it works fine with yahoo.

    Regarding the issues I've reported, number 3 is already solved. About number 2, besides the repositioning part, if you also know of a way to make that wp search bar search all the site, instead of only post titles, that'd be great.

    Thanks. :slight_smile:

  • Predrag Dubajic

    Hey @Gabriel,

    I have made some changes to footer script to reorder search and notification fields, it looks like this now:

    <script type=&quot;text/javascript&quot;>
    	jQuery( document ).ready(function() {
    		jQuery(&quot;#wp-admin-bar-wpmudev-chat-container&quot;).prependTo(&quot;#wp-admin-bar-top-secondary&quot;);
    		jQuery(&quot;#wp-admin-bar-mm-button&quot;).prependTo(&quot;#wp-admin-bar-top-secondary&quot;);
    
    		var lists = jQuery('#wp-admin-bar-top-secondary li');
    		lists.filter('#wp-admin-bar-search').insertBefore(lists.filter('#wp-admin-bar-mm-button'));
    		lists.filter('#wp-admin-bar-bp-notifications').insertAfter(lists.filter('#wp-admin-bar-mm-button'));
    	});
    </script>

    About number 2, besides the repositioning part, if you also know of a way to make that wp search bar search all the site, instead of only post titles, that'd be great.

    Do you have any plugins that are modifying WordPress search because content should be searchable and it is working fine on my installation but on yours it doesn't give any results.

    3)The code you gave me works perfectly on every single page, except for one: the store admin page, that's generated by the plugin TT Marketpress Frontend Admin -its slug is /username/store-admin

    Hmm, this looks good when I test it, see screenshot attached below.
    Can you tell me if I'm missing something or try clearing your browser cache?

    Best regards,
    Predrag

  • Wheel of Commerce

    Hi, man!

    I'l divide this in items again, just so things don't get all messed up:
    1)The position of the items are correct now. About the issue with the pages generated by TT Marketpress Frontend Admin, I'm pasting one of my posts from another thread that helps explaining it:
    "The dev of Pro3, which is the same guy who developed Marketpress Mojo and Revolution Slider (he used to work at WPMU), always help me through email, I've contacted him on this, and he told me the following:
    'The reasons you're not seeing those widgets on those pages generated by the frontend plugin is because the plugin use its own template, and it doesn't align with any activated theme.'
    The widgets seem to be displayed normally at pages like /login and /register though, which are two of the pages at which they shouldn't be getting shown, haha. Can this be solved in the page builder of Pro3 or something (the page builder is here: https://www.wheelofcommerce.com/wp-admin/themes.php?page=aq-page-builder)?"
    That being said, is there a way to fix the root of this problem? Because using a different code to fix all the little issues caused by it isn't really practical. This came up many times I've talked with you guys, as this plugin is quite infamous, and its dev seems to answer the questions addressed to him only when he pleases, so I really don't hope to get any help from the guy -to give you an idea: my last question on his forums has been there without an answer for almost 2 months now.
    I've reported this sort of issue on the following thread too, it might be a good idea to talk with Michael and Ashok, as they both helped me solve issues related to this whole TT Marketpress Frontend mess:
    https://premium.wpmudev.org/forums/topic/https-blocking-buddypress-features#post-898115

    2)About the native wp search mechanism at the toolbar, Tyler told me that search bar is really horrible, that it only searches for post titles, so I'm trying to find a way to have it searching on all the site, as this is what a search mechanism is supposed to do. If I can't get a search mechanism working there at the toolbar, I'd like to know if there's any plugin you recommend for a search bar.

    Thanks again, man.

  • Michelle Shull

    Hey, Gabe!

    Can you edit the template file for the Front End pages? If so, we may just need to make it sidebar ready. (That's one line of code.) http://tahirtaous.blogspot.com/2012/09/how-to-make-wordpress-themes-sidebar.html If Front End has a functions.php file, you can add the theme code at that link and it may(?) work, depending on how cruddy the coding is for Front End. (I am mildly optimistic here.)

    For admin bar search, there are not a lot of options to improve it. I ended up hiding it on my production site and using a custom Google search snippet in a sidebar widget. Which brings us back in a circle to your sidebars. :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.