Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: fanSte- on May 01, 2012, 01:43:07 PM

Title: How to hide something from guest?
Post by: fanSte- on May 01, 2012, 01:43:07 PM
How to hide something from guest
<div id="nav">
',template_menu(),'
</div>
<a class="ucp" href="http://summer-life.info/ucp/"></a>
</div>
<div id="userinfo">';

Quote<a class="ucp" href="http://summer-life.info/ucp/"></a>
This is my code, how to hide it from guests?
Title: Re: How to hide something from guest?
Post by: kat on May 01, 2012, 03:14:36 PM
Something like...

   if ($context['user']['is_guest'])
      redirectexit('action=login');

???
Title: Re: How to hide something from guest?
Post by: fanSte- on May 01, 2012, 06:37:40 PM
-.- nothing
Title: Re: How to hide something from guest?
Post by: fanSte- on May 06, 2012, 01:08:28 PM
Refresh
Title: Re: How to hide something from guest?
Post by: Storman™ on May 07, 2012, 04:51:12 AM
Quote-.- nothing

K@ made a suggestion so did it not work for you ?
Title: Re: How to hide something from guest?
Post by: Colin on May 07, 2012, 09:32:23 AM
Will you copy and paste the entire code you have on that page including the PHP snippet K@ gave you.