TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 04:24:01 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 266
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 234
  • Total: 234

FlashChat User

Started by Sakuragi, November 01, 2005, 07:24:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sakuragi

i found this block at mkportal.it
how can i use it with tinyportal :uglystupid2:
<?php

/********************************************************/
/* Flashchat block  v1.2 for Mkportal 1.0 +             */
/* By: Ice2003                                          */
/* http://www.mkportal.it                               */
/* Copyright  2005 and Beyond by Ice2003                */
/********************************************************/
global $DB;
$flashchatprefix "change this";  //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/mkportal/blocks/images/rooms.gif'></center>";
$content .= "&nbsp;&nbsp;$chatrooms: <b>$files</b><br>&nbsp;&nbsp;$amtchatters: <b>$cats</b><br></b>";
$content .="<center><img src='$sitepath/mkportal/blocks/images/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 .= "&nbsp;&nbsp;$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
?>

gerrymo

What does it do? I use Flashchat and SMF/TP, and it works fine.

bloc

I think its just MKPortals way to display the online users in the chat. But Flashchat have - as you know ;) - a script to do it, just use an iframe to display it.

gerrymo

This is the Code Bloc gave me to show the members using flashchat in a Block (php).


global $boardurl;
echo '
<iframe frameborder="0" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';

resurgence

wouldn't you change it to

height="100%"


since if it's just 100 it will not display properly in the block. (after around 2 users gets in the chat room)

gerrymo

Ah, but I changed scroll to "yes" so all users are seen.

technodragon73

I have a problem with this code.  While logged in with admin accoun t i see the block and the information that shows who's logged in to chat.  However, when i log in with my test account i still se the block, but no info in it

http://www.technodragon.net/forum/index.php

name=test
pass=test

could anyone help figure out why?

technodragon73

nm...figured it out...for some reason it has to do with changing the size from 100 to 100 %

so the problem is now, how do i make the block show all of the info without the 100%

do i just keep increasing the size from 100 to say 200?

Ray

Quotedo i just keep increasing the size from 100 to say 200?

Yes ;D

technodragon73

ok...when you integrate this chatroom into TP/SMF it makes changes to the code to show a button to open chat.

Is there a way to make it so that clicking that button opens the chat in a separate window rather than the one you are currently in?  That way you can continue to use the forum while you are in chat.