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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 316
  • Total: 316

Flashchat (Members in Chat Block)

Started by gerrymo, November 08, 2005, 06:01:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gargoyle

Would anyone know how to make it show the number of people in chat in the link to chat for the RC-1 and RC-2 style tabs ??

You know like the PM link shows how many PM's you have in the link I would like to do the same with the chat button.

Any ideas ?

JediAaron

An idea/question. This block works good for me, but can we add in a link to the chatroom (ie flashchat.php)? I'm not good with code. Any help? :)

Thanks,
Aaron

godrockzzz

just paste this into a php block and it'll show a link
echo '<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php">',
     ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
     . '/chat_icon.gif" alt="FlashChat" style="margin: 2px 0;"
     border="0" />' : "FlashChat"),'</a>';

knat

this code in my index.template.php is showing users in chat on all pages. But how do i center that information ? Right now its aligned to the left !

// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';
     $chatrequest = db_query("
            SELECT COUNT(*) AS numb
            FROM  smf_fc_connections
            WHERE userid IS NOT NULL", __FILE__, __LINE__);
         list ($chatcount) = mysql_fetch_row($chatrequest);   
         mysql_free_result($chatrequest);
         
if ( @$_GET['action'] != "chat" ) {
if ( $chatcount == "1" ) {
$singularplural1 = "";
$singularplural2 = "";
} else {
$singularplural1 = "";
$singularplural2 = "mer";
}
if ( $chatcount != 0 )
echo 'Lige nu er der ' . $singularplural1 . ' <font color="#FF0000">' . $chatcount . ' Medlem'.$singularplural2.' inde på chatten!</font>';
}


Please help me center this because it looks stupid when it all the way to the left  :P

Gargoyle

there are no <td> tags in that code ??

knat

nope.. there is no td tags  ::)

and i try center the table but didnt work  :-\

i got the code from smf but there is no support there  :(

RealityRewind

Quote from: gerrymo on November 08, 2005, 06:01:39 PM
This will show which members are using chat in a php block.


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>';


The path should be your path to the chat directory (Above it is: /chat/info_embedded.php)
Scrolling can be changed to suit you.

(Code written by Bloc)

Hi,
I am new to TP and I do not know code.  I tried adding this to a phpbox and I can't get it to work.  I have tried changing the file url a coulpe of ways and still nothing works.  I get a page can not be found error.

I KNOW it's something I am doing wrong.  I would greatly appreciate the help!


This url works for the info_embedded.php

http://www.realityrewind.com/Chat/info_embedded.php

and this is exactly what I have in the phpbox.

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

knat

in your path you need to remember to spell chat with a capital C


it should be Chat not chat ... so thats why it wont find your file  ;)

knat

Quote from: Gargoyle on January 25, 2007, 11:26:05 PM
there are no <td> tags in that code ??

I fixed the problem by simply adding some center tags :D Thanks anyway !

RealityRewind

Quote from: knat on January 28, 2007, 06:53:26 AM
in your path you need to remember to spell chat with a capital C


it should be Chat not chat ... so thats why it wont find your file  ;)

I didn't catch that in all my changes.....BUT I just changed it to the capital C and it still isn't working :(

This website is proudly hosted on Crocweb Cloud Website Hosting.