MyBB Community Forums

Full Version: Login Reg in nav with bootstrap
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. 

Trying to make my forum responsive, AND nice looking on diff devices.
As you can see on the top menu, the pic is for small devices, but I want to add Login and Register Buttons in the same nav as I have.

in header template I have added <div class="no-content userpanel pull-left"> before the {$welcomeblock} and closed it with an </div>

So my header_welcomeblock_guest looks like this



<div class="dropdown">
  <span id="User-dropdown" role="button" data-toggle="dropdown" data-target="#" href="#">
    	<img src="images/defaultavatar.png" alt="Guest" class="avatar" />
    	Hei, Gjest
  </span>
  <ul class="dropdown-menu" role="menu" aria-labelledby="User-dropdown">
    	<li><a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;" class="login">{$lang->welcome_login}</a></li>
    	<li><a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></li>
  </ul>
</div>
<div class="btn-group">
<a href="{$mybb->settings['bburl']}/member.php?action=register" class="btn btn-action navbar-btn">{$lang->welcome_register}</a> 
	<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;" class="btn btn-custom navbar-btn">Login</a>
					</div>
				<div class="modal" id="quick_login" style="display: none;">
					<form method="post" action="{$mybb->settings['bburl']}/member.php">
						<input name="action" type="hidden" value="do_login" />
						<input name="url" type="hidden" value="" />
						<input name="quick_login" type="hidden" value="1" />
						<table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
							<tr>
								<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
							</tr>
							<tr>
								<td class="trow1" width="25%"><strong>{$login_username}</strong></td>
								<td class="trow1"><input name="quick_username" id="quick_login_username" type="text" value="" class="textbox initial_focus" /></td>
							</tr>
							<tr>
								<td class="trow2"><strong>{$lang->password}</strong></td>
								<td class="trow2">
									<input name="quick_password" id="quick_login_password" type="password" value="" class="textbox" /> <a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password">{$lang->lost_password}</a>
								</td>
							</tr>
							<tr>
								<td class="trow1">&nbsp;</td>
								<td class="trow1 remember_me">
									<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
									<label for="quick_login_remember">{$lang->remember_me}</label>
								</td>
							</tr>
							<tr>
								<td class="trow2" colspan="2">
									<div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
								</td>
							</tr>
						</table>
					</form>
				</div>
				<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));
				</script>

Guess the problem is within the 
<div class="btn-group">
<a href="{$mybb->settings['bburl']}/member.php?action=register" class="btn btn-action navbar-btn">{$lang->welcome_register}</a> 
	<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;" class="btn btn-custom navbar-btn">Login</a>
					</div>

 
But need some help in here
But then just at the pic, the buttons (ok have not maked any background for the btn jet) the buttons comes under the navbar.

Using bootstrap

Oh,
this is a nice theme.

It looks better there.
Mind showing me the site, it looks super sexy Big Grin
lol, it was just the navbar, but got it kinda fixed,,, not totally as I wanted but seems ok.