Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Puchu - helmikuu 09, 2005, 03:31:36 AP

Otsikko: hiding stats from guests (Different than you expect)
Kirjoitti: Puchu - helmikuu 09, 2005, 03:31:36 AP
// Chat Stats
echo '
<font size="-2">-People in the chat room.<BR>
<script src="http://www.everywherechat.com/members.asp?room=', $modSettings['chatRoomName'], '"></script></font>



I know you can hide stats from guests... but I have moved the chat stats into a left column and modified it a bit...  How would I go to get something like that hidden from guests... I tried a few of the if... ['user']['is_logged'] codes, but, I either am going at it the wrong way or just don't know what to do at all...

*hopes this is one of the last things he asks about codes*
Otsikko: Re: hiding stats from guests (Different than you expect)
Kirjoitti: Oldiesmann - helmikuu 09, 2005, 06:44:15 IP
// Chat Stats (members only!)
if(!$context['user']['is_guest'])
{
echo '
<font size="-2">People in the chat room.<br />
<script src="http://www.everywherechat.com/members.asp?room=', $modSettings['chatRoomName'], '"></script></font>';
}
Otsikko: Re: hiding stats from guests (Different than you expect)
Kirjoitti: Puchu - helmikuu 09, 2005, 11:51:55 IP
it works... but one problem came up...  it made the left column go on top of the forums... :-/
Otsikko: Re: hiding stats from guests (Different than you expect)
Kirjoitti: Oldiesmann - helmikuu 10, 2005, 10:53:59 AP
Just play with index.template.php until you get it where you want it...