2012-05-30, 05:26 PM
Hey!
I want to add a text on my homepage to welcome users. It should be only seen when not logged in.
For that i wanted to add the text to the template "index" using "if".
Now i read somewhere that it's not possible to use if in an template - is that right - so how should i do it then?
i tried following codes:
<?php
if($mybb->user['uid'] == 0) <- Gast
{?><p>TEXT</p><?}
?>
and also: (which i found on the internet)
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
My text here
<!-- ENDIF -->
both just place the text without looking after if somebody is logged in or not.
Does anybody now how to do that?
thanks
karo
I want to add a text on my homepage to welcome users. It should be only seen when not logged in.
For that i wanted to add the text to the template "index" using "if".
Now i read somewhere that it's not possible to use if in an template - is that right - so how should i do it then?
i tried following codes:
<?php
if($mybb->user['uid'] == 0) <- Gast
{?><p>TEXT</p><?}
?>
and also: (which i found on the internet)
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
My text here
<!-- ENDIF -->
both just place the text without looking after if somebody is logged in or not.
Does anybody now how to do that?
thanks
karo