News:

Join the Facebook Fan Page.

Main Menu

Hiding a Menu Button

Started by SG, October 22, 2004, 12:19:24 PM

Previous topic - Next topic

SG

First I would like to say that you have a wonderful product and keep up the good work. I have been looking over this forum for quite some time and have found alot of useful information. I'm looking for an answer to a question and can't seem to find it within your forum so I hope you can help me.

I have added a chat button on my forum. I would like this chat button to show only to those that are logged in. Is this possible and how?

Thanks in advance.

A.M.A

easy way in index.template.php look for:
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

or
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

or
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

add you chat button after any of them.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Oldiesmann

#2
Actually, you should do it like this:

if (!$context['user']['is_guest'])
echo '
// Chat button goes here
Michael Eshom
Christian Metal Fans

Advertisement: