MyBB Community Forums

Full Version: Hide Contact Us From Guests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone tell me please how to hide the Contact Us link from guests?
Go to Templates current template>>footer template>>footer look for
<a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a>

Cut this line of code, cut as in right click cut.

then go to header template>>header_welcomeblock_member and you can paste the code in front of

<strong>Welcome back, {$mybb->user['username']}.</strong> <a class="logout" href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}<img src="{$theme['imgdir']}/logout.png" />
This is around the logout button so only members logged in can see.
or anywhere convenient to you Smile
This way only logged in members can see the link.
You can do this easily with a simple CSS aswell. Wrap the Contact Us link with;
<div class="contact_link_{$mybb->user['usergroup']}">CONTACT US LINK GOES HERE</div>
Now add the following code in global.css;
.contact_link_1{
display: none;
}

This'll hide the link from Usergroup 1 and its the usergroup of guests. Smile
Would this trick work in the header to hide links as well?
(2012-09-20, 09:16 PM)MadComp Wrote: [ -> ]Would this trick work in the header to hide links as well?

Mien should.
Thanks Yaldaram!