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: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 589
  • Total: 589

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.

kontroldkhaos

i got it figured out it black text in a white box, but better that not seeing it all .heres the code i used if any one needs it

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" #roomList { margin: 0; padding: 0; color: #C0C0C0; }allowtransparency="true"></iframe>';

bloc

The problem is that it is embedded.php that decides the text color..so either change that one or use what you do now.

kontroldkhaos

im a noob to all this stuff,so its not easy for me to just change it,lol.im still learning ,id rather change the color of the text but at this point i happy to just see it,haha no what i mean ..thanks

katers

I don't get it.  Can someone please explain a simple way to change the font color for this?  I have a black block.  Thank you.

bloc

Check the code kontroldkhaos gave 3 posts up - it does indeed set the color to a lighter one.

katers


hypnoticstate

Surely there must be a way of getting info_embedded.php to use the current themes css ?

Golin

#47
Quote from: Torsten on May 14, 2006, 02:55:37 PM
I bought FlashChat today and uploaded to my root. I did follow all the steps as told on the site www.tufat.com

I having problems to find the last code i have to replace: Add Flashchat to the CMS interface.

i need to replace:
else
     echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
     '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
     . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
     . '" style="margin: 2px 0;" border="0" />' : $txt[108]),    '</a>';


with:
else {
     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>';

    echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
    '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
    . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
    . '" style="margin: 2px 0;" border="0" />' : $txt[108]),'</a>';
}


I'm using the Black22 theme, so i need the change the code in Themes/TP_Black22_11rc2/index.template.php?

I looked in this file and tried many ways but nothing works fine  :(

I can't find the exact first code, the only code i can't find there is:
        // Otherwise, they might want to [logout]...
        else
                echo $bef.'
                                <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', strtoupper($txt[108]) , '</a></td>';


Can someone please help me out here?

Quote from: G6â„¢ on May 14, 2006, 04:18:46 PM
You dont add it in to Black22.
You make all the editing of the codes and integrations in the default themes files. that way you all you have to do is add a button for the ret of the themes you are using, the rest is fetched from the default files
Torsten refers to http://tufat.com/docs/flashchat/smf.html which is the method for the older SMF versions.

Check here for FlashChat Integration with 1.1.1 Final, 1.1RC3 & 1.1RC2 Default Theme. It also works for 1.1.2.

Doh! Save yourself the trouble of manually adding this! Use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=611

ash

#48
Hi,

I also use a black background and had to change the background and text colors of the info_embedded.php file.

You're welcome to use my code, though really all you have to do is open the info_embedded.php file and monkey around with the two color options until you find one that you like.

I tried to color the scrollbard to match the forum theme as well, though couldn't get it quite right so I scraped it.  Colored scrollbars only work in IE anyways, so maybe thats a good thing  ^^

Anyways, this works well with the black theme background.  here's what it looks like on my forum: (I have it loaded in a center block so that people browsing the forum can tell right away who is in there).
http://thegamedomain.org/tgdmain/index.php?action=forum

here's the codes:

PHP Block Code (already provided)
global $boardurl;
echo '
<iframe frameborder="2" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width: 99%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="yes" border="0" allowtransparency="true"></iframe>';


info_embedded.php code (Replace your existing file or just change the two colors on your own ^^ )
<?php

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0"false);
header("Pragma: no-cache");


/**
If this file is not in the FlashChat root folder, then change this
path to the location of the inc/common.php file.
*/
require_once('inc/common.php');

ChatServer::purgeExpired();

/**
Retrieves the number of users who are chatting in any room.
Leave the $room parameter empty to return the number of users in all room.
*/
function numusers$room "" )
{
if($room) {
$stmt = new Statement("SELECT COUNT(*) AS numb FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL AND userid <> ? AND roomid=?");
$rs $stmt->process(SPY_USERID$room);
} else {
$stmt = new Statement("SELECT COUNT(*) AS numb FROM {$GLOBALS['fc_config']['db']['pref']}connections,{$GLOBALS['fc_config']['db']['pref']}rooms
  WHERE userid IS NOT NULL AND userid <> ? AND ispublic IS NOT NULL
  AND 
{$GLOBALS['fc_config']['db']['pref']}connections.roomid = {$GLOBALS['fc_config']['db']['pref']}rooms.id");
$rs $stmt->process(SPY_USERID);
}

$rec $rs->next();

return $rec?$rec['numb']:0;
}

/**
Retrieves a list of the users (by login ID) who are in $room.
Leave the $room parameter empty to return a list of all users in all rooms.
*/
function usersinroom$room "" )
{
$list = array();

if($room) {
$stmt = new Statement("SELECT userid, state, color, lang, roomid FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL AND userid <> ? AND roomid=?");
$rs $stmt->process(SPY_USERID$room);
} else {
$stmt = new Statement("SELECT userid, state, color, lang, roomid FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL AND userid <> ?");
$rs $stmt->process(SPY_USERID);
}

while($rec $rs->next())
{
$usr ChatServer::getUser($rec['userid']);
if($usr == null && $GLOBALS['fc_config']['enableBots']) $usr $GLOBALS['fc_config']['bot']->getUser($rec['userid']);
$list[] = array_merge($usr$rec);
}

return $list;
}

/**
Retrieves a list of all available rooms, as an array.
*/
function roomlist()
{
$list = array();

// populate $list with the names of all available rooms
$stmt = new Statement("SELECT * FROM {$GLOBALS['fc_config']['db']['pref']}rooms WHERE ispublic IS NOT NULL order by ispermanent");
$rs $stmt->process();

while($rec $rs->next()) $list[] = $rec;

//result will be an array of arrays like ('id' => <room id>, 'updated' = <timestamp>, 'created' => <timestamp>, 'name' => <room name>, 'ispublic' => <public flag>, 'ispermanent' => <autoclose flag>)
return $list;
}


$rooms roomlist();
$roomnumb sizeof($rooms);
$usernumb numusers();
?>

<html>
<head>
<title>Who's in the chat?</title>
<meta http-equiv=Content-Type content="text/html;  charset=UTF-8">
<style type="text/css">
<!--

body { background-color: #444444; margin: 0; padding: 0; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size: 10px;}
....normal {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
margin: 0; padding: 0;
        text-align: center;
}

#roomList { margin: 0; padding: 0; }
#roomList a { color: black; text-decoration: none; } #roomList a:hover { text-decoration: none; }
....userList { margin-left: 7px; margin-right: 0; margin-bottom: 0; margin-top: 0;  padding: 0; }

-->
</style>
<script type="text/javascript">
function toggleUserList(id) {
   if (l = document.getElementById(id)) {
      if (l.style.display == '' || l.style.display == 'block') l.style.display = 'none';
      else l.style.display = 'block';
   }
   return false;
}

</script>
</head>
<body>
<p class=normal><?php echo $usernumb ?> user<?php if ($usernumb != 1) echo "s" ?> in <?php echo $roomnumb ?> room<?php if ($roomnumb != 1) echo "s"?>.</p>
<ul id="roomList">
<?php if($roomnumb) { ?>
<?php foreach($rooms as $room) { ?>
<li><strong><a href="#" onclick="javascript:toggleUserList('room_<?php echo $room['id']?>')"><?php echo $room['name']?> (<?php echo numusers($room['id']) ?>)</a></strong>
<?php

$users usersinroom($room['id']);
                                        if (
$users) {
                                          echo 
"<ul class=\"userList\" id=\"room_".$room['id']."\">";
                                          foreach( 
$users as $user ) {
    echo "<li>".$user['login'] . "</li>";
  }
                                          echo 
"</ul>";
                                        }

?>
</li>
<?php ?>
<?php ?>
</ul>

</body>
</html>

eminent

#49
Quote from: IchBinâ„¢ on January 19, 2006, 01:01:57 AM
I think something like this might work. Of course changing your dimensions...
<a href="http://www.yourlink.com" onclick="window.open(this.href, 'popupwindow', 'width=500,height=500,scrollbars,resizable'); return false;">Chat</a>

Hey how do you go on about using this code but instead of "a href" I am using a submit button(instead of text), that ones clicked will pop up the window in dimension I want, just like this code..

I tried playing around with it, couldnt manage fixing it for phpbox..

heres my code so far that works[edited the site out of course cause its still in construction]

echo ' <form name="doomz" action="http://[website-here]/forum/chat/flashchat.php" target="_blank">
<input type="submit" target="_blank" value="Doomz Flash" onsubmit="doomz()">';
global $boardurl;

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

This website is proudly hosted on Crocweb Cloud Website Hosting.