Social Web Directory :: Social Network Directory :: Ning Tips and Ning Support
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):
<!-- 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; }
</style>
<script type="text/javascript">
if (ning.CurrentProfile != null ) {
var NingBarLinks = '<li class="ningbarlink"><a href="/profiles/message/listInbox">Inbox</a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/message/listAlerts">Alerts</a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/friend/list?my=1">Friends</a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/main/invitation/new">Invite</a></li>' + '<span class="lsep">|</span>'
+ '<li class="ningbarlink"><a href="/profiles/settings/editProfileInfo">Settings</a></li>';
x$('#xn_bar #xn_bar_menu #xn_bar_menu_tabs').prepend(NingBarLinks);
};
</script>
<!-- End NingBar Navigation Links -->
Version #2 No Notifications (Icons and Links):
The safest method of copying code below - - copy/paste from this text file: AddMemberAccountLinks_NingBarIcons.txt
<!-- 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; }
</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">Inbox</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">Alerts</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">Friends</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">Invite</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">Settings</a></li>';
x$('#xn_bar #xn_bar_menu #xn_bar_menu_tabs').prepend(NingBarLinks);
};
</script>
<!-- End NingBar Navigation Links -->
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
<!-- 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 { margin-top:7px!important; }
</style>
<script type="text/javascript">
var getinbox;
var getalert;
var getrequest;
if (ning.CurrentProfile != null ) {
getinbox = x$('.xj_messages_present .xj_count_unreadMessages').html();
getalert = x$('.xj_alerts_present .xj_count_unreadAlerts').html();
getrequest = x$('.xj_count_friendRequestsReceived .xj_multiple_friend_requests a').html();
var NingBarLinks = '<li id="ninbox" class="ningbarlink"><a href="/profiles/message/listInbox"><img alt="Inbox" src="http://api.ning.com:80/files/UNKbObYJPtqfg2aS-dgvbW4oXlCd3U5WkjJEpeoMl6C5xN35tcqAFoslfCJEsXpcbF8P6-Xxn4I50nhLef7ns4MKoyX6OGm7/nb_mail.png">Inbox</a></li>' + '<span class="lsep">|</span>'
+ '<li id="nalert" 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">Alerts</a></li>' + '<span class="lsep">|</span>'
+ '<li id="nfriends" 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">Friends</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">Invite</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">Settings</a></li>';
x$('#xn_bar #xn_bar_menu #xn_bar_menu_tabs').prepend(NingBarLinks);
};
var ninboxa = x$('#ninbox a').html();
var nalerta = x$('#nalert a').html();
var nfriendsa = x$('#nfriends a').html();
if(getinbox > '0') x$('#ninbox a').html(ninboxa + ' ( ' + getinbox + ' ) ');
if(getalert > '0') x$('#nalert a').html(nalerta + ' ( ' + getalert + ' ) ');
if(getrequest.indexOf( 'xj_count') <= 0) x$('#nfriends a').html(nfriendsa + ' ' + getrequest);
</script>
<!-- End NingBar Navigation Links -->
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.
For more exciting tips like this one, and much more - - join Jen's VIP Club Today! We'd love to have you in our special private club.
VIP Ning Club:
Jen’s always cooking up new & exciting Ning Tips!
Discover the best Ning Support you’ll find anywhere! Just ask our VIP Members! ;-)
A special thanks to Elson for adding the code for notifications!
I hope you all enjoy this tip!
Jen
Tags: Elson, account module, alerts, friends, hide account box, icons, inbox, invite, links, member account, More…ningbar, ningbar icons, ningbar links, notification, settings

Permalink Reply by OregonShout _YoUNITY on April 1, 2012 at 1:56pm Hey this worked ...I think http://OregonShout.ning.com Trying to get Hitech like you folks....
Permalink Reply by JenSocial on April 2, 2012 at 1:56pm Hi Everyone,
I have updated this tip to include Version #3. Elson added his awesome code to provide the notifications to the Inbox Links.
Thanks Elson!
Jen

Permalink Reply by Mujer a los pies de Jesùs on April 11, 2012 at 7:40am hi .. I have tried pasting the version two, but not grab me, not if I'm doing something wrong.
sorry if something is misspelled, is that I wrote in Spanish and translated into English.
Permalink Reply by JenSocial on April 11, 2012 at 1:50pm Two Questions:
1. Did you add ALL code to Custom Code Box? My Network/Tools/Custom Code
2. Did you use the Text file, instead of copy/paste from the tip?
Best,
Jen

Permalink Reply by Mujer a los pies de Jesùs on April 12, 2012 at 8:54am yes, I've tried several times and nothing. I follow all the steps.
Permalink Reply by JenSocial on April 12, 2012 at 10:28am Part of the problem, you have the NingBar hidden. Go to your Advanced CSS and find this code:
#xn_bar{display: none !important;}
remove this code.
Hope that helps,
Jen

Permalink Reply by Mujer a los pies de Jesùs on April 12, 2012 at 10:57am Thanks, now if I work, thanks, thanks!

Permalink Reply by Mujer a los pies de Jesùs on April 12, 2012 at 11:17am


Permalink Reply by English WorldWide on April 22, 2012 at 1:22pm Once again, JenSocial rocks!
Easy and worked like a charm.
However, I need to change the background color of the top bar, and can't find it in the Custom Code OR in the Appearance or Appearance/Advanced code =
Where / How do I change the background color of my bar?
[http://englishworldwide.ning.com]
Thanks all,
Holly
Permalink Reply by JenSocial on April 22, 2012 at 1:35pm Glad to hear it!
Try the following code in Advanced CSS, changing the hex color value to your colors:
/* NingBar Background Color */
#xn_bar {
background-color:#FFFFFF!important;
}
/* NingBar Links Color */
#xn_bar a {
color:#CC0000;
}

Permalink Reply by English WorldWide on April 22, 2012 at 2:34pm Jen to the rescue again. Thanks. Playing with brighter colors now.
Smiles,
Holly



Started by JenSocial. Last reply by English WorldWide Apr 18. 35 Replies 0 Favorites
Started by JenSocial. Last reply by Mandy P. Mar 6. 13 Replies 0 Favorites
Started by Fire-Tech. Last reply by Fire-Tech Feb 18. 14 Replies 3 Favorites
© 2013 Created by JenSocial.
Powered by
© Copyright JenSocial.
