Add Member Account Box Links/Notifications to NingBar, and Hide Account Box - - Saving Space Above Fold (Collaborative Efforts: Jen and Elson)
There are now 3 versions of this code.
Notes: #1 taking the least amount of space in Custom Code Box, and #3 taking the most space (but offers the most features):
What Will This Code Do For Your Network?


Instructions:
Version #1, No Icons, No Notifications (Just Links):
Version #2 No Notifications (Icons and Links):
The safest method of copying code below - - copy/paste from this text file: AddMemberAccountLinks_NingBarIcons.txt
Version #3, Everything (Courtesy of Elson) Icons, Links, and Notifications:
The safest method of copying code below - - copy/paste from this text file: AddMemberAccountLinks_NingBarIcons_ElsonsNotifications.txt
NOTE:The Inbox Notification doesn't show up until a refresh or going to new page.
It took some careful thought to create this tip, like would it affect any other code, etc...Please let me know if this causes any issues.
A special thanks to Elson for adding the code for notifications, and thank you Elliott for helping out with the icons.
I hope you all enjoy this tip! See it live on JenSocial.com.
Jen
Tags: Elson, JenSocial, account module, alerts, friends, hide account box, icons, inbox, invite, links, More…member account, ningbar, ningbar icons, ningbar links, notification, settings
Permalink Reply by Kos on October 10, 2012 at 9:17pm Ha! I thought I was going insane! *LOL* Suddenly "Invite" reappeared on my site after I had removed it a few years ago..........and for the life of me I can't remember how I removed it. Now i know it's not just gremlins in the code........others are experiencing things suddenly re-appearing.
Anyone remember how to remove this bugger? I only want Inbox and Settings.
I removed the others by using this and altering the "alerts" to "friend" or whatever but it doesn't work on the invite.
div#xg_module_account ul li a.xg_sprite-friend{display:none;}
#xg_friend_tab {display:none;}

<!-- NingBar Navigation Links for Member Account Box -->
<style>
.lsep { margin:10px 2px 0;float:left;color:#ccc;font-size:110%; }
.account-links { display:none!important; }
.ningbarlink a { text-decoration:underline!important; }
.ningbarlink img { padding-top:3px; }
#xn_bar li img { margin:4px 5px 0 5px!important;}
</style>
<script type="text/javascript">
if (ning.CurrentProfile != null ) {
var NingBarLinks = '<li class="ningbarlink"><a href="/profiles/message/listInbox"><img alt="Inbox" src="http://api.ning.com:80/files/UNKbObYJPtqfg2aS-dgvbW4oXlCd3U5WkjJEpeoMl6C5xN35tcqAFoslfCJEsXpcbF8P6-Xxn4I50nhLef7ns4MKoyX6OGm7/nb_mail.png"></a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/message/listAlerts"><img alt="Alerts" src="http://api.ning.com:80/files/qQrSmPU5KN3zAoKLSl-79Laa3XysHZWEL7-Zj18kXMSfY6wNNkJ6Rk5Y6Tw*sksG582rvj3*cbHut*nFvPQqbA__/nb_bell.png"></a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/friend/list?my=1"><img alt="Friends"src="http://api.ning.com:80/files/Ysd3GOwEDPYA7uPoibzkeZenfd4mM24U72C3pYGeFzwVL-ja2egQVMLHhxfODqgi9uh5CTlR-mmOov11u1fcmpBntSHGIxR5/nb_friends3.png" width="16"></a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/main/invitation/new"><img src="http://api.ning.com:80/files/6Jh2*58jpdlF21tISzcGBxmH6eHIHJ7Gdyl1BSTeWc*e5LLO6JwoA*lquR5NCgFAZTlUrdTVXJNr1S4cQAssmI2QzQmnQw9F/nb_invite.png" width="16"></a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/settings/editProfileInfo"><img src="http://api.ning.com:80/files/F9CXodZonLEtbcyTdP1TyY6xmsw37eTy4Bh5WHYpdOQS7GrETVqwzGFYcFHW*y3WWCMV3I3GzQr3YgirS*cbX8QHJEmdu1IX/nb_settings.png" width="16"></a></li>';
x$('#xn_bar #xn_bar_menu #xn_bar_menu_tabs').prepend(NingBarLinks);
};
</script>
<!-- End NingBar Navigation Links -->
Permalink Reply by Joe Paisley on November 21, 2012 at 10:45am Hello! Recently I've been experimenting with adding links to my ningbar. As it stands, the links I added to pages are showing up all wild when a user is not signed in. Is there a way to hide these links to non-members? And also in the navigation tabs? Is there a way to center the tabs?
I've tested the website on several screen resolutions, and it's okay sometimes, but not other times. Is there a better way to code it so that it can be more suiting to all resolutions?
Another related question, am I totally out of space if i wanted to add follow buttons to the ningbar as well?
Thanks so much!
Permalink Reply by Illya on December 14, 2012 at 3:17pm
Permalink Reply by irfan khan on December 17, 2012 at 7:17am thanks jen...I tried this code on www.virtualians.pk its working
Permalink Reply by Mary Jane Peterson on December 17, 2012 at 9:25am Hi Jen
Thank you so much, hope you don't mind but I have use the 3rd code, if you would like you can come and have a look www.b-yond.co it looks great thank you
Permalink Reply by Imran Baloch on March 13, 2013 at 11:54am Great work and very useful for
Kos replied to Donna Mac's discussion '3.0 Video - can someone explain?'
Crestini Activi ! replied to Rafael's discussion 'Multiple Chat rooms for Ning 3.0'
Kos replied to Donna Mac's discussion '3.0 Video - can someone explain?'
Donna Mac replied to Donna Mac's discussion '3.0 Video - can someone explain?'
Angie Fisher replied to Angie Fisher's discussion 'Help for a 3.0 Newbie Please....'© 2013 Created by Ning.
