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

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 06:19:29 PM

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: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 130
  • Total: 131
  • @rjen

online list for x7chat

Started by deniz, September 25, 2006, 06:23:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deniz

this code lists online users in x7chat.
just put in php script block:

Quote//select the table, should be right if you didn't change the prefix in the data base
$result = mysql_query("select * from x7chat2_online");


$expire_time = 5;
$exp_time = time()-$expire_time;
      $q = mysql_query("DELETE FROM x7chat2_online WHERE time<'$exp_time'");

//grab all the content


while($r=mysql_fetch_array($result))
{

   //modify these to match your mysql table columns that you want to display

   $usersonline=$r["name"];
   $room=$r["room"];


   //display the row
echo ' ââ€"º';   
echo "$usersonline";
   
}


Svaha


jklapp

I'm getting adminOver 30 Chat (No space between user and room) using this code

  //display the row

echo "$usersonline";
echo "$room";


It should be:

admin Over 30 Chat

Also, is there a way to make a link to the rooms and the users to their profiles?

Thank you :)

crazypal24x7

heeyaaaaa mate !!!!!!1

I m gettin parse error

Parse error: syntax error, unexpected '/' in /home2/ace24x7/public_html/forum/Sources/Load.php(1613) : eval()'d code(35) : eval()'d code on line 1


any solution ?????

adios

technodragon73

Awesome code snippet...thanks a heap!  I had been trying to figure out how to make this mork, and then you came along!

jklapp

Quote from: jklapp on October 09, 2006, 09:10:39 PM
I'm getting adminOver 30 Chat (No space between user and room) using this code

  //display the row

echo "$usersonline";
echo "$room";


It should be:

admin Over 30 Chat

Also, is there a way to make a link to the rooms and the users to their profiles?

Thank you :)

Since no one responded, this was my solution to the problem. :)

//display the row

echo '<strong><font color="#FFFF00">',$usersonline, '</font></strong>';
echo '<br><strong><a
href="http://www.yoursite.com/portal/x7chat/index.php">', $room,
'</a></strong>';


It's basic, but it works :)

kran1um

#6
How do you make the Xchat a Popup so you still can use the original webpage?


Nevermind I got it... How about I got that Parse error that is stated above.

Malk

Where i can get a 7x chat script?

kran1um

http://www.x7chat.com/


ANyway, How can I get this to correspond with the Shouthistory in the Profile section that uses the old shoutbox?

tavoo

This works for me...

//select the table, should be right if you didn't change the prefix in the data base
$result = mysql_query("select * from x7chat2_online");


$expire_time = 5;
$exp_time = time()-$expire_time;
      $q = mysql_query("DELETE FROM x7chat2_online WHERE time<'$exp_time'");

//grab all the content


while($r=mysql_fetch_array($result))

{

   //modify these to match your mysql table columns that you want to display (I didn't change this)

   $room=$r["room"];
   $usersonline=$r["name"];


   //display the row (change the link to where you have the chat program installed to)

echo '
<a target="_blank" href="http://www.yoursite.com/chat">', $room,
'</a>
';
echo '
<font color="#FFFF00">',$usersonline, '</font>';

}