MyBB Community Forums

Full Version: Need Header button showing to registered user?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey there, I've edited my header templates and added a few buttons which is for registered or staff users, I would like to make them visible to those who are login only, not guests, what should I add to the code? Thank you
Open the template header and cut him a passage:
			<div class="menu">
				<ul>
					<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
					<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
					<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
				</ul>
			</div>

Następnie przejdź do szablonu header_welcomeblock_member i wklej wcześniej wycięty kod w wybrane miejsce, w którym ma się wyświetlać menu.
No you dont get my point mate.

Check out my site, http;//symbianism.net

You can see the SD Manager and Mood Manager on the header.

I want those 2 buttons to only show to users who are login, NOT TO GUEST(s).

What code do I need to add to the 2 button(s)'s code to prevent guest from seeing it.
Show code templates header and header_welcomeblock_member and theme name.
(2010-02-16, 07:16 PM)virus4 Wrote: [ -> ]Show code templates header and header_welcomeblock_member and theme name.

It doesnt have anything to do with header_welcomeblock_member

Just header only, see code below of my header:-
Quote:<a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.png" alt="" title="" />{$lang->toplinks_search}</a><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.png" alt="" title="" />{$lang->toplinks_memberlist}</a><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.png" alt="" title="" />{$lang->toplinks_calendar}</a><a href="{$mybb->settings['bburl']}/newpoints.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/Money.png" alt="" title="" />SD Manager</a><a href="{$mybb->settings['bburl']}/mood.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/mood.png" alt="" title="" />Mood Manager</a><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.png" alt="" title="" />{$lang->toplinks_help}</a>
</div>

I want the bold one to be hidden to guest. What should I add before and after it?
(2010-02-16, 07:38 PM)RateU Wrote: [ -> ]You need this plugin:

http://community.mybboard.net/thread-31860-page-1.html

I've installed the plugin, but I have no idea what it does or how I should use it though. =S Mind helping?
Move the bold code above in this code:

<if $mybb->user['uid'] > 0 then>
The bold text (links to be hidden to guest)
</if>
Competent, that has much in common with header_welcomeblock_member. I do not want me now buried in the code but I'll tell you how I see it, and you do it himself if you know HTML and CSS.

Remove the entire menu template header. What then will be available to all of you give the template header_welcomeblock_guest, and what is for users to header_welcomeblock_member template.

While this plugin is is interesting and easy to use so you can use it.
(2010-02-16, 07:49 PM)RateU Wrote: [ -> ]Move the bold code above in this code:

<if $mybb->user['uid'] > 0 then>
The bold text (links to be hidden to guest)
</if>

Thanks it worked!!
Pages: 1 2