You can manipulate the welcome_block_ templates to do that, seeing the code you already have would make it easier to give guidance, URL?
(2012-04-21, 10:50 PM)Alan Shepperson Wrote: [ -> ]You can manipulate the welcome_block_ templates to do that, seeing the code you already have would make it easier to give guidance, URL?
Ok, if you don't mind i'll get back to tommorow and give it to you then
But thanks anyway
(2012-04-21, 10:50 PM)Alan Shepperson Wrote: [ -> ]You can manipulate the welcome_block_ templates to do that, seeing the code you already have would make it easier to give guidance, URL?
Ok so header code is
<a name="top" id="top"></a>
<navigation>
<div id="header">
<div class="logo"><a href="http://www.zeeworld.org/"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
<div id="panel">
{$welcomeblock}
</div>
<br class="clear"/>
<hr class="hidden" />
</div>
<div class="menu">
<ul>
<li class="menutext"><a href="http://www.zeeworld.org/">Home</a></li>
<li><a href="http://forums.zeeworld.org">Forum Index</a></li>
<li><a href="/memberlist.php">Members</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php">{$lang->toplinks_calendar}</a></li>
<li><a href="/member.php?action=login">Profile</a></li>
<li class="float_right"><a href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></li>
</ul>
</div>
<div id="container">
<hr class="hidden" />
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
I haven't dipped into editing MyBB much files, yet.. But this is what I did to check if the user is logged in or not for a page outside of the forums.
if ($mybb->session->uid == 0) {
// do something here if they're not logged in
} else {
// do something here if they are logged in
}
If you're new to PHP and all, and if this works for you. I'm not sure where you'll place this in the forum theme files but to put HTML in the if statement....
<?php if ($mybb->session->uid == 0): ?>
<p> Import HTML here when they're not logged in </p>
<?php else: ?>
<p> Import HTML here if they're logged in </p>
<?php endif; ?>
You can do this the NON plugin way, or the plugin way.
The non plugin way is to have the nav bar inside the welcome blocks. Then the members see the members nav bar, the non members see the guest navbar.
The plug-in way is to get the templates conditional plugin from mybb hacks and then hide links in the nav bar using template conditionals.
<div class="menu">
<ul>
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
<if !in_array($GLOBALS['mybb']->user['usergroup'], array(1,5,7)) then>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
</if>
<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
</ul>
</div>