News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

FlashChat Integration with 1.1.1 Final, 1.1RC3 & 1.1RC2 Default Theme

Started by Simplemachines Cowboy, January 18, 2006, 10:54:47 PM

Previous topic - Next topic

ivo2296

Can we have a little help with the classic theme for RC3 please - like buttons and some tips about differences with the default theme.

Thank you!

ivo2296

I have managed to add chat button to the classic theme but when i try http://www.myhost.com/index.php?action=chat  comes the main page of the forum, not http://www.myhost.com/chat/flashchat.php .


I really need a little help!

Thank you!

^DooM^

#122
You didn't follow the instructions properly.

Quote from: Cowboy
1. Open smf/index.php.

2. Find this line:
Code:

'boardrecount' => array('Admin.php', 'AdminBoardRecount'),


and AFTER that code add this code (about line 220):
Code:

'chat' => array('Chat.php', 'Chat'),

Remember this is for RC2 as well not RC3
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

ivo2296

Quote from: ^DooM^ on September 24, 2006, 05:05:12 PM
You didn't follow the instructions properly.

Quote from: Cowboy
1. Open smf/index.php.

2. Find this line:
Code:

'boardrecount' => array('Admin.php', 'AdminBoardRecount'),


and AFTER that code add this code (about line 220):
Code:

'chat' => array('Chat.php', 'Chat'),

Remember this is for RC2 as well not RC3


My ftp programm had not uploaded index.php - and that was the problem.

Thanks a lot - it works

CrayZ

Quote from: SekondeR on April 10, 2006, 02:53:26 PM
i have only one room in my chat place.
so i want to make users in chat list  as horizontal not vertical..

like this -> user1, user2 , user3

not like this :D
user1,
user2,
user3

could someone help me?

I was wondering about same thing. Since if in chat are more than, let us say 6 or 7 users then on the bbottom of your forum it will just show only 2 or 3 and the rest you have to select the users and to drag the selection with the mouse in order to see the rest, because is not a scrollbar on that place if there are to many users, so me to I want some help if possible so that window on the bottom of your forum to display the users horizontally instead of vertically

Thank you all once again

^DooM^

In your chat dir find info_embedded.php. Make a backup of it just in case :)

Now scroll about half way down till you see the start of the HTML.

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

body { background-color: transparent; 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: underline; }
....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>

<ul id="roomList">
<?
if($roomnumb)
{
    if($usernumb <= "0")
    {
        ?><strong>There are currently no users online!</strong><?
    }
    else
    {
        foreach($rooms as $room)
        {
            $users = usersinroom($room['id']);
            if ($users)
            {
                foreach( $users as $user )
                {
                        echo( $user['login'] . ", ");
                }
            }
        }
    }
} ?>
</ul>
</body>
</html>


I hope this helps.
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

CrayZ

Thanks for your help ^DooM^

I did exactly what you told me and the users according to your coding they appear the way  I wonted but there is a problem because is not saying any more how many users are on how many rooms and the room list was not there to. So basically was just the users separated by a coma. This is cool I really liked it but it will be way better if the room list is there and the small line that it said how many users are in how many rooms. Ex 2 users in 1 room

I hope you manage to fix it somehow because I think many users will benefit by this change.

Thanks again  :)

^DooM^

Ahh yes sorry.

I only use the one room on my site and didn't want any room info on there just who was in the chat. I'll look at the source again for you and see about getting it the way you want it.
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

^DooM^

Ok looking at the original source find this line (Around line 132)

echo "<li>".$user['login'] . "</li>";

change it to this.

echo "".$user['login'] . ", ";

I haven't tested this so let me know if it works or not.
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

CrayZ

hmmm I think I ruined everything. I made an upgrade to my forum from 1.1 RC2 to 1.1 RC3 and now when I klick to my chat link it redirect me to the forum index. I think I have to wait for a fix for this because I don't know anything about coding. But the integrations it look fine though. When I acces my chat indirectly it recognize me as a forum user and I can log in. The only problem is that when I clik on the Chat button or to the proper link /index.php?action=chat it send me to the forum index

Sorry that I took your time but as soon as this problem be fixed somehow then I will let you know about the userlist.

Thanks again.

^DooM^

Make sure this is in your index.php

Quote from: Cowboy
1. Open smf/index.php.

2. Find this line:
Code:

'boardrecount' => array('Admin.php', 'AdminBoardRecount'),


and AFTER that code add this code (about line 220):
Code:

'chat' => array('Chat.php', 'Chat'),
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

noahpiepenbrink

is it possible to install this feature on RC3? If so, is the instalation different than is described for RC2?

CrayZ

I'm using it on RC3 and is working fine. I just did same steps carefully :)

unrelenting

Any of you coders know how I can add a if/then statement to this code. It is a table for my index.template.php that will show between the info section at the top and the linktree.

I have it looking the way I want it but I would like it to only show if there are 1 or more members in chat. The rest of the time it should disregard this code all together. How should that be coded?




<table cellspacing="0" cellpadding="10" border="0" align="center" width="95%" class="tborder">
	
	
<
tr><td valign="top" style="background-color: #ffffff;">';
	

	
echo '
	

	
    <
span class="normaltext">', template_flash_chat(), '</span>
	
	
	
	
<
iframe frameborder="0" height="15" src="http://myboard/chat/info_embedded.php" style="width: 
	
100%; margin: 0; padding: 0; border: 0; overflow: hidden;" 
scrolling="no" border="0" allowtransparency="true"></iframe>
	

	
    </
td></tr>
	
</
table>';

^DooM^

This should do what you want.

   
$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 ( $chatcount >= "1" )
{
    echo'
        <table cellspacing="0" cellpadding="10" border="0" align="center" width="95%" class="tborder">
          <tr>
            <td valign="top" style="background-color: #ffffff;">';

    echo '
              <span class="normaltext">', template_flash_chat(), '</span>
              <iframe frameborder="0" height="15" src="http://myboard/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>
            </td>
          </tr>
        </table>';
}


Let me know if it works or not :)

Cheers!
Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

unrelenting

Quote from: ^DooM^ on November 05, 2006, 03:45:13 PM
This should do what you want.

   
$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 ( $chatcount >= "1" )
{
    echo'
        <table cellspacing="0" cellpadding="10" border="0" align="center" width="95%" class="tborder">
          <tr>
            <td valign="top" style="background-color: #ffffff;">';

    echo '
              <span class="normaltext">', template_flash_chat(), '</span>
              <iframe frameborder="0" height="15" src="http://myboard/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>
            </td>
          </tr>
        </table>';
}


Let me know if it works or not :)

Cheers!

;D

Man, you are good. You know your stuff.

Thanks a lot.

^DooM^

Never argue with an idiot, they will simply bring you down to their level and then beat you with experience

tradenet

Has anyone been able to do this without using iframes? ie. include("flashchat.php");

szinski


Daniel15

Hi everyone,
I've posted a mod that completely integrates FlashChat into SMF. You may download the mod at http://custom.simplemachines.org/mods/index.php?mod=611
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Advertisement: