Trying to remove the top bar to the nav bar
#1
Hello everyone,

I am trying to remove the top bar completely and move everything into the nav bar instead by floating it to the right.

I have most of it working with a bit of digging, problem is the messages and logout button still remain when the user is logged out. I also can't figure out how I can move the login button with the nice popup overlay for logging in over when the user is logged out. Below is the pictures of both, and the code I have used to do this is also below.

Thanks! 

Logged in: https://imgur.com/a/GlJvAIB

Logged Out: https://imgur.com/a/i4HSPkn

<div style="float: right">
   {$usercplink}
   {$myalerts_headericon}{$modcplink}
   {$admincplink}
   <li><a href="{$mybb->settings['bburl']}/private.php">Message ({$mybb->user['pms_unread']})</a></li>
   <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span></li>

</div>
Reply
#2
Hey BlueFoot,

Can you try replacing your code with;

<div style="float: right">
{$welcomeblock} 
</div>

Not sure if it'll work but you have a backup here anyways.
Reply
#3
(2021-09-16, 07:51 AM)Emre Wrote: Hey BlueFoot,

Can you try replacing your code with;

<div style="float: right">
{$welcomeblock} 
</div>

Not sure if it'll work but you have a backup here anyways.

Yeah that does nothing, I tried that first.
Reply
#4
Then try this one, you can edit first part in your taste for guests.

<if $mybb->user['uid'] == 0 then>
<div style="float: right">
    <span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></span>
</div>
<else>
    <div style="float: right">
   {$usercplink}
   {$myalerts_headericon}{$modcplink}
   {$admincplink}
   <li><a href="{$mybb->settings['bburl']}/private.php">Message ({$mybb->user['pms_unread']})</a></li>
   <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span></li>
</div>
</if>
Reply
#5
Now I have login and register all the time, and Messages and logout all the time. Once I remove the bar the icons are also gone, so I'll take a look and see if I can find what CSS those are in

Logged in: https://imgur.com/a/nbT7Flp

Logged Out: https://imgur.com/a/odOAsNK
Reply
#6
Could you download this plugin;
http://mybbhacks.zingaburga.com/showthread.php?tid=260

And then check again.
Reply
#7
I tried putting that plugin both in the root and the plugins folder, it did not show up in the plugins page to enable, so I tested it and it does not work, additionally once I remove the ugly top nav bar, the login link doesn't work
Reply
#8
Here is the installation guide;
http://mybbhacks.zingaburga.com/announcements.php?aid=1

You can apply "style="visibility:hidden;" code instead of removing the top bar.

After following above guide, if it doesnt work, you can try this one;
*You have to place your guest usergroup id instead of x on the first line. (Default id was "1" as i remember)
<if $mybb->user['usergroup'] == X then>
<div style="float: right">
    <span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></span>
</div>
<else>
    <div style="float: right">
   {$usercplink}
   {$myalerts_headericon}{$modcplink}
   {$admincplink}
   <li><a href="{$mybb->settings['bburl']}/private.php">Message ({$mybb->user['pms_unread']})</a></li>
   <li><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span></li>
</div>
</if>
Reply
#9
Couldn't get the plugin to show up in the plugins page in the ACP on myBB version 1.8.27, so I'm just gonna stop with this.

https://imgur.com/a/NKi6ujG
Reply
#10
(2021-09-16, 06:31 PM)BlueFoot Wrote: Couldn't get the plugin to show up in the plugins page in the ACP on myBB version 1.8.27, so I'm just gonna stop with this.

https://imgur.com/a/NKi6ujG

what's your site url ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)