Re: Chatters In ViewOnline Block
Sorry, I have this php code to see who is in chat (using Flash Chat)
How can I insert it into Icy?
<?php
/********************************************************/
/* Flashchat block */
/* By: Ice2003 */
/* */
/* Copyright 2005 and Beyond by Ice2003 */
/********************************************************/
global $DB;
$flashchatprefix = "phpbb_fc"; //Edit this to refelect the prefix of flashchat ie _fc_ or smf_fc_ ect,ect
// Don't change anything under this line or your server will self destruct :)
$curchat = "Current Chat Rooms";
$chatrooms = "Chat Rooms ";
$amtchatters = "Current Chatters";
// ok lets count how many rooms are available
$result = $DB->query("SELECT * FROM ".$flashchatprefix."rooms WHERE ispublic IS NOT NULL");
$files = $DB->get_num_rows($result);
// How many chatters are currently yacking in the rooms
$result = $DB->query("SELECT userid, state, color, lang, roomid FROM ".$flashchatprefix."connections WHERE userid IS NOT NULL");
$cats = $DB->get_num_rows($result);
$content .="<center><img src='$sitepath/.../rooms.gif'></center>";
$content .= " $chatrooms: <b>$files</b><br> $amtchatters: <b>$cats</b><br></b>";
$content .="<center><img src='$sitepath/.../users.gif'></center>";
// Lets print out a list of the rooms for all to see
$content .= "<center><b>".$curchat."</b></center>";
$a = 1;
$result = $DB->query("SELECT id, name FROM ".$flashchatprefix."rooms WHERE ispublic IS NOT NULL");
while(list( $id, $name) = mysql_fetch_row($result)) {
$title2 = ereg_replace("_", " ", $name);
$content .= " $a- <a href="/forum/chat/flashchat.php?lang=en&room=$id">$title2</a><br>";
$a++;
}
unset($result);
unset($cats);
unset($files);
// yeaaaaa its the php end thingy it means i have finished
?>
...and I didn't understand how to write the .tpl......
Edit:
sorry for writing in italian, I traslated. I visit both forums and I have italian language on both, so I got confused