Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Pimp My Site! > Hiding mail notification in login box ?
nkitch77 (New Admin) 9/16/2011 8:20 AM EST : Hiding mail notification in login box ( Need Help )
nkitch77
Posts: 143
Posts With Wolves

Hi,

Here's what I'm using to hide some of the features in my login box and it works fine apart from when I receive a new mail I get the flashing envelope and two brackets displayed in the login box, I have a popup mail notification (great mod btw) that works great so I'm looking to remove the envelope & brackets.

<div style="text-align: center;" id="loginbox"></div>
<script type="text/javascript">                                    
 $('div[id*="pnlTopBar"]').appendTo('#loginbox').html();                                    
 $('#loginbox').html(function(i,h){                                    
  return h.replace(/\u2022/g,'<br>').replace(/Password/,'<br>Password');                                    
 });                              
$('#loginbox').find('a:contains(Chat)').next().andSelf().hide();                                                                              
$('#loginbox').find('a:contains(Blog)').next().andSelf().hide();                                                                              
$('#loginbox').find('a:contains(Mail)').next().andSelf().hide();                                                                  
$('#loginbox').find('a:contains(Support)').next().andSelf().hide();                                                                               
$('#loginbox').find('a:contains(GuildPortal)').next().andSelf().hide();                        
$('#loginbox').find('a:contains(Control Panel)').next().andSelf().hide();                        
$('#loginbox').find('a:contains(Member Admin)').next().andSelf().hide();                                      
</script>

Here's an image of what I mean ....



Thanks

Imperator Mos
TopBottom

Mottie (MVP) 9/17/2011 11:13 AM EST : RE: Hiding mail notification in login box ?
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi nkitch77!

Try this:
// hide envelope & mail link
$('#icoMailBlink').parent().next().andSelf().hide();
// hide post count, then the parentheses
var num = $('#gpIMCount').hide()[0];
num.previousSibling.nodeValue = '';
num.nextSibling.nodeValue = '';
TopBottom

nkitch77 (New Admin) 9/17/2011 5:41 PM EST : RE: Hiding mail notification in login box ?
nkitch77
Posts: 143
Posts With Wolves

Hi Mottie,

That does the job but with a small problem the pop up notification now says "you have NaN new message(s)" instead of the amount.

If its not possible to hide it all then maybe just the () brackets.

Any ideas ?
TopBottom

Mottie (MVP) 9/17/2011 6:36 PM EST : RE: Hiding mail notification in login box ?
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hmmm, try adding the above code into your custom footer HTML (Control Panel > Custom HTML & Script > Footer Area) so that is it run after the login bar is moved.
TopBottom

nkitch77 (New Admin) 9/17/2011 6:43 PM EST : RE: Hiding mail notification in login box ?
nkitch77
Posts: 143
Posts With Wolves

Thanks for the reply Mottie,

But still a no go i'm afraid
TopBottom

Mottie (MVP) 9/20/2011 7:56 AM EST : RE: Hiding mail notification in login box ?
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi nkitch77!

Hmm, maybe because the content is being duplicated, as well as the ID, which should be unique... so instead of using ".hide()" try using ".remove()" and see if that works.
TopBottom

nkitch77 (New Admin) 9/30/2011 4:41 AM EST : RE: Hiding mail notification in login box ?
nkitch77
Posts: 143
Posts With Wolves

Hi,

I still can't get this to remove/hide from the log in box, but I notice that the link for it has now changed and instead of having the envelope and mail link its just the envelope, so I'm kinda back to square one in any case.

$('#loginbox').find('a:contains(Mail)').next().andSelf().hide();  is now irreverent as there is no "Mail" link to hide.

Any more ideas please
TopBottom

nkitch77 (New Admin) 10/7/2011 4:33 AM EST : RE: Hiding mail notification in login box ?
nkitch77
Posts: 143
Posts With Wolves

Seems there been yet another chnage to the Mail system, the mail link as now returned and the command $('#loginbox').find('a:contains(Control Panel)').next().andSelf().hide(); no longer does anything.

In addition the mail notification MOD now constantly pop's up saying you have 0 messages.

Any help plz ?
TopBottom

Mottie (MVP) 10/7/2011 5:03 AM EST : RE: Hiding mail notification in login box ?
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi nkitch77!

I've updated the mod, hopefully it'll get approved some time today and fix the problem - the mail never showed zero messages before, so I didn't anticipate that.

As for hiding the control panel and the mail, try this code:
$('#loginbox').find('a[title*="Control Panel"]').hide();
var num = $('#gpIMCount').hide();
num[0].previousSibling.nodeValue = '';
num[0].nextSibling.nodeValue = '';
num.prevUntil('br').hide();
TopBottom

nkitch77 (New Admin) 10/7/2011 10:53 AM EST : RE: Hiding mail notification in login box ?
nkitch77
Posts: 143
Posts With Wolves

Hi Mottie,

Thats sorted the hide mail notification, I look forward to the MOD update.

Is there a command to hide the member admin icon too I can't seem to nail it down ? not to bothered about this.

Thanks alot
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%