Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

hiding stats from guests (Different than you expect)

Aloittaja Puchu, helmikuu 09, 2005, 03:31:36 AP

« edellinen - seuraava »

Puchu

// 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*

Oldiesmann

// 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>';
}
Michael Eshom
Christian Metal Fans

Puchu

it works... but one problem came up...  it made the left column go on top of the forums... :-/

Oldiesmann

Just play with index.template.php until you get it where you want it...
Michael Eshom
Christian Metal Fans

Advertisement: