MyBB Community Forums

Full Version: Split the upper and lower panel apart.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey, so I've managed to get this half done... sort of. When the user is logged in they see this (ignore the white links, will be fixing when priority comes). 

This is what I have so far (logged in)
Clickidy click me 

And this is how it appears when logged out
I need your love too

How can I remove the lower panel when the viewer is a guest? 
Not sure how I can properly separate the two. I've moved the upper panel with {$welcomeblock} and put it above the logo div in the header template and manually, while removing the lower panel from header_welcomeblock_member and pasting it directly below the header so it looks like this.

Header template: http://pastebin.com/bTMjhpR4
header_welcomeblock_member:  http://pastebin.com/AfeVnhs8
header_welcomeblock_guest: http://pastebin.com/2LQdkENK

Still not used to the template system.
Any and all help is greatly appreciated,
Thanks.
members related content was added to header template - which is visible to all.
what is the reason for adding user cp, PMs .. etc links to header template ?
Quote:in the Header Templates (in general) :
* header --> contents are visible to all
* header_welcomeblock_guest --> contents are visible to guests (and not logged in members)
* header_welcomeblock_member --> contents visible to members (and the staff)
* header_welcomeblock_member_admin --> contents visible to Administrators only
* header_welcomeblock_member_moderator --> contents visible to moderators and administrators
{$welcomeblock} includes all of those doesnt it?
I wanted to move the upper/login-register panel above the logo
I wanted to lower/usercp-pms panel below it and that's the only way I was able to do it...

I'm not sure what to modify in any of the files to achieve this any other way.
content of {$welcomeblock} is based on the user group
(i.e. different groups have different type of content in the welcomeblock)

provide forum url & a test user account so that someone can check it
It's currently running on localhost so that's not possible for a few days at least.
well, if you want to hide lower part for the guests then
you can install template conditionals plugin and use condition like below in header template

http://pastebin.com/DKDvfKMm
I've gotten it up, if you, or someone else could take a look that'd be awesome.

http://globaloffenders.com/
<-- snip -->
Friendly bump.
have you added the suggested plugin ?
the admin account you had posted is not working. you may PM me temporary admin account (& wait for some time ..)
(2016-03-27, 04:01 AM)Zeagion Wrote: [ -> ]Friendly bump.


Maybe not perhaps exactly what you are looking for but here was a very simple quick and dirty toying with it for only a quick minute due to being slightly tired and such, of course  it could be further improved:

Guest view:
[Image: 21nkys9.png]

Member view:
[Image: dqhqur.png]


header:

<div id="container">
<a name="top" id="top"></a>
<div id="header">
<div id="panel">
<div class="upper">
<div class="wrapper"> {$quicksearch}
  {$welcomeblock} 
  <!-- </div> in header_welcomeblock_member and header_welcomeblock_guest --> 
  <!-- </div> in header_welcomeblock_member and header_welcomeblock_guest --> 
</div>
<div id="content">
<div class="wrapper">
{$pm_notice}
				{$bannedwarning}
				{$bbclosedwarning}
				{$unreadreports}
				{$pending_joinrequests}
				{$awaitingusers}
<navigation>
<br />


header_welcomeblock_guest:

<!-- Continuation of div(class="upper") as opened in the header template -->

<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>
</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>
<div id="logo">
  <div class="wrapper"> <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
    <ul class="menu top_links">
      <li><a href="{$mybb->settings['bburl']}/portal.php" class="portal">{$lang->toplinks_portal}</a></li>
      <li><a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a></li>
      <li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>
      <li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
      <li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
    </ul>
  </div>
</div>
</div>
<div id="panel">
<div class="lower">
  <div class="wrapper">
    <ul class="menu panel_links">
      <li> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="usercp">{$lang->welcome_register}</a></li>
    </ul>
    <ul class="menu user_links">
		      <li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
      <li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li>
    </ul>
  </div>
  <br class="clear" />
</div>
</div>


header_welcomeblock_member:
<!-- Continuation of div(class="upper") as opened in the header template -->

<span class="welcome">{$lang->welcome_back} <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span>
</div>
</div>
<div id="logo">
  <div class="wrapper"> <a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
    <ul class="menu top_links">
      <li><a href="{$mybb->settings['bburl']}/portal.php" class="portal">{$lang->toplinks_portal}</a></li>
      <li><a href="{$mybb->settings['bburl']}/search.php" class="search">{$lang->toplinks_search}</a></li>
      <li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>
      <li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
      <li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
    </ul>
  </div>
</div>
</div>
<div id="panel">
<div class="lower">
  <div class="wrapper">
    <ul class="menu panel_links">
      <li><a href="{$mybb->settings['bburl']}/usercp.php" class="usercp">{$lang->welcome_usercp}</a></li>
      {$modcplink}
      {$admincplink}
    </ul>
    <ul class="menu user_links">
      <li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup&modal=1', null, true); return false;">{$lang->welcome_open_buddy_list}</a></li>
      <li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
      <li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li>
      <li><a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}</li>
    </ul>
  </div>
  <br class="clear" />
</div>
</div>
Pages: 1 2