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 : Voodoo Tech and Scripter's Den of Scriptniquity > I want to move the login bar to a content box. Is it possible?
Arimor (New Admin) 4/13/2009 12:56 PM EST : I want to move the login bar to a content box. Is it ...

Arimor
Posts: 65
Posts With Wolves

I want to keep the custom images on the tab bar but I want to move the login that is at the top to a content box? Does anyone have the CSS code for that box?

godsend.guildportal.com
TopBottom

Mottie (MVP) 4/14/2009 9:30 AM EST : RE: I want to move the login bar to a content box. Is...
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arimor!

Yes this is possible, but I'm not sure if you have seen this post (tab bar v4)? It adds CSS classes to the tabs once you move them to the side or center content box so you can have your custom images here as well.

If that's not what you want, I'll work on the code to move the top bar... I haven't looked at it yet, but I don't think it would be too difficult to do.
TopBottom

Mottie (MVP) 4/21/2009 1:48 AM EST : RE: I want to move the login bar to a content box. Is...
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Moving the State Bar

LOL, I messed around with this after I made the above post, but didn't bother to do this write up. Basically, the script moves the State Bar (top most bar) contents into the free form text/HTML box you add this code. If you want this done on every page, you'll have to add it on every page - sorry.  Also, there is nothing to customize.

Logged in
Not Logged in

The Code
<div id="loginbox" style="text-align:center;"></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');
 });
</script>
Customizing

If you want to remove specific links, add this line to the end (above the script tag)
$('#loginbox').find('a:contains(Chat)').next().andSelf().hide();
To remove more links, just duplicate the entire line, add it to the end, then change the word in red to exactly match the link name "Chat", "Mail", "Blog" or whatever.

Edit (3/10/2011): Updated code
Edit (3/11/2011): Added code to allow removing unwanted links.
TopBottom

Arimor (New Admin) 4/22/2009 1:53 AM EST : RE: I want to move the login bar to a content box. Is...

Arimor
Posts: 65
Posts With Wolves

Omg, I think I love you. Sorry for the late response, I've been doing a lot of guild reformatting and the GP servers have just been bogged down. That is exactly what I was looking for. I've learned a lot from you and I appreciate what you've done. Cliche I know, but you deserve it. : )
TopBottom

Valdaglerion (Guild Admin) 10/17/2009 10:49 PM EST : RE: I want to move the login bar to a content box. Is...
Valdaglerion
Posts: 2473
Zomgawsh Poster

Mottie said:

The Code
<div id="loginbox" style="text-align:center;"></div>
<script type="text/javascript">
$(document).ready(function(){
 var tmp = $('div[id*="pnlTopBar"]').css('display','none').html().replace(/ : /g,"<br>");
 if (tmp.match('not logged')){
  tmp = tmp.replace(/not /,"not<br>").replace(/&nbsp;<span/,' <span')
   .replace(/&nbsp;/g,'<br><br>').replace(/:<br>/,':')
   .replace(/: <br>/,':').replace(/label>/,'label><br><br>');
 }
 $('div[id*="pnlTopBar"]').html('');
 $('#loginbox').html(tmp);
})
</script>


How can I get these to align to the left rather than centered?  I tried changing "text-align:center;" to "text-align:left;" but it made no difference.

Thanks!
TopBottom

Mottie (MVP) 10/17/2009 11:31 PM EST : RE: I want to move the login bar to a content box. Is...
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hiya Valdaglerion!

Just remove the style="text-align: center" from the div at the top of the code (the part in red below):
<div id="loginbox" style="text-align:center;"></div>
TopBottom

Valdaglerion (Guild Admin) 10/21/2009 7:53 PM EST : RE: I want to move the login bar to a content box. Is...
Valdaglerion
Posts: 2473
Zomgawsh Poster

That didn't work.  It is still lining up in the center.  When I check it with FireBug, it seems to be inheriting the center command:

Inherited fromdiv.ContentBoxBody
     element.style {
     font-size:1em !important;
     text-align:center;
TopBottom

Mottie (MVP) 10/22/2009 12:11 AM EST : RE: I want to move the login bar to a content box. Is...
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Well try changing the login box to align left
<div id="loginbox" style="text-align:left;"></div>
TopBottom

Valdaglerion (Guild Admin) 10/22/2009 12:20 AM EST : RE: I want to move the login bar to a content box. Is...
Valdaglerion
Posts: 2473
Zomgawsh Poster

I tried that too (see my first post above) but that didn't work either.  Seems that the code is being overwritten somewhere else in the CSS.

I guess the bigger issue here is that I have a side menu and want to get rid of the ugly top login/status bar.  I just want members to have the ability to log in when logged out.
TopBottom

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