News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Tutorial: how to COMPLETELY integrate FlashChat into SMF so you have a cool CHAT

Started by marcnyc, October 09, 2004, 07:21:56 AM

Previous topic - Next topic

mexie

just followed the tutorial of marcnyc to the letter and it works perfectly - just a doubt though - when I log out of the chat window  up pops a login dialog box on top of the main chat window. If i try to close this popup nothing happens.
To shut both this popup and close the main chat window (which shows as a big blank grey rectangle ) I have to hit any  nav button - for example Home .

Is this normal or have I missed something?

Thanks
/Mexie






dg

Quote from: charlottezweb on November 17, 2004, 10:03:55 PM
This isn't the right forum of course, but anyone had any luck with skinning this?  I've followed their instructions and everything loads great for me, but regular users seem to be loading a different gradient set and colors.  I've verified both files appear correct.  Just thought I'd see if anyone else had similar experiences...

Regards,
Jason

Jason,

You can't give the users an option to have anything else but the default.

It took me a while, but I've got it down on my site.  The only color I can't figure out is where the user names are listed.  The box itself is one color, but the background for every line that has a username is changed to an electric blue.

Check it out if you want...you'll need a forum account though...and excue the mess on the homepage...renovations still ;)

Jerry

Quote from: Owdy on December 05, 2004, 01:04:39 PM
How can i ad title tag in that chat/template?
Owdy this stumped me at first, I have been trying to do it since I added the page. I just made a link that made a new window with javascript to the flashchat file isntead, but after I found out how to add the title. (I kept the popup instead though)
Here is how I did it:
Open Sources/Chat.php
Find:function Chat() {
Add After:(on a new line)global $context;
$context['page_title'] = 'Chat';


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Owdy

Quote from: marcnyc on October 09, 2004, 07:21:56 AM

5. create a file called Chat.template.php with your text-only editor such as NotePad (PC) or BBEdit (Mac) and add this code inside it:
<?php
// Version: 1.0 RC1; Chat

function template_main()
{
global $context$settings$options$txt$scripturl;

echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="'
$scripturl'?action=search2" method="post" name="searchform" id="searchform">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td>'
theme_linktree(), '</td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Chat</td>
</tr><tr>
<td class="windowbg">'
;

// load the chat
echo '<iframe width="100%" height="450" src="http://www.yourserver.com/smf/FlashChat/flashchat.php"></iframe>';

echo '
</td>
</tr>
</table>
</form>'
;
}

?>

6. save this file inside /smf/Themes/default/

There is lots of unnessessery (like search form and JS) stuff. This is enough:

<?php
// Chat template
function template_main()
{
global $context$settings$options$txt$scripturl;

echo '

<table width="80%" border="0" cellspacing="0" cellpadding="3" >
<tr>
<td>'
theme_linktree(), '</td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Chat</td>
</tr><tr>
<td class="windowbg">'
;

// load the chat
echo '<iframe width="100%" height="450" src="http://www.yourserver.com/smf/FlashChat/flashchat.php"></iframe>';

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

?>
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Ride

I want to put up who is in the chat with the names linking to the smf profile on my homepage (not smf page).  Can someone help me out?  I am currently just including the info.php file.  Thanks.

ThaiAnime



AussieBill

Does anyone know how I could put the chat link in the menu bar of MKportal?

This is what I have in index_template.php (as per step 8 of marcnyc's tutorial):
<a href="', $scripturl, '?action=chat">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/chat_icon.gif" alt="FlashChat" border="0" />' : "FlashChat"),'</a>';

And this is what MKportal uses to link to it's own Chat module:
$row_link .= $Skin->row_link("$this->images/atb_chat.gif", "href='$this->siteurl/index.php?ind=chat' target='_new'", $this->lang['chat']);

btw the integration and Users in Chat worked beautifully :)

[Unknown]

href='$this->siteurl/index.php?ind=chat' target='_new'

Change that to be whatever the URL to your forum is + ?action=chat... ie.

href='http://www.simplemachines.org/community/index.php?action=chat'; target='_new'

-[Unknown]

AussieBill

That worked... nearly. The chat was inside the portal, but the whole thing opened in a new window. I tried changing target='_new' to target='_parent' and it worked!
Thanks very much for your help [Unknown].

btw SMF is absolutely wonderful :)

ldk

I just found this thread after painstakingly trying and failing to use the Integrated Chat Mod.  I'm sure it's a good Mod, I had lots of problems with it for some reason.

Anyway, I just wanted to say Wow!  and Thank you! to marcnyc for the heads up on FlashChat and writing out how to embed it into your SMF forum.  I got it all up and running on my forum in less that a half hour.

I haven't added the "users chatting" stat yet but everything else worked like a charm!

Now I just hope this program doesn't eat bandwidth and use up lots of resources!  :P
see SMF put to the test at http://www.craftster.org/

mcalan2001


JayBachatero

Quote from: DLD on November 13, 2004, 12:11:20 AM
// Chat Stats
$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 = " is ";
$singularplural2 = "";
} else {
$singularplural1 = " are ";
$singularplural2 = "s";
}
echo'
<tr>
<td class="catbg" colspan="2">', $txt['chatStats'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=chat">
<img src="', $settings['images_url'], '/chatIcon.gif" alt="', $txt['chatAlt'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">


Currently there ' . $singularplural1 . ' <font color="#FF0000">' . $chatcount . ' User'.$singularplural2.' in the Chat!</font><br>';
if ($context['user']['is_logged'])
echo '
<font size="-2">Users in chat:</font> ';
if ($context['user']['is_logged'])
{

readfile("http://www.mysite.com/yabbse/Flashchat/info.php");
}
}


How can i add this to ssi?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Motorhead

Nice one people, all the help here installed it no problem....

Some people have commented about getting logged out if they leave it open for a while (30 minutes or so)

I've checked the config and it seems to be set to 24hrs  (24 x 60 x 60) ???

oh well minor worry


babylonking

Quote from: LiL_J on January 10, 2005, 10:59:47 PM
how can i let guest join the chat???

This what i am trying to have in my integrated chat, I hope the next chat version will allow guest to chat.

HoTmetal

QuoteIt seems to be light on bandwidth, but very heavy on resources.

How heavy is "VERY HEAVY"??

I have this chat mod, but haven't installed it on my live server because my host doesn't allow chat's[ except the ones you can install via cpanel/fantastico] for this reason.

bluevoodu

nice going!

just a question though.... is there a possibility to make it so that if a user is in chat (but not active on the boards for 15 min...etc) that they still appear online on the message boards who's online area?

the reason is that if a user is idle on the board, they are dropped from the who's online list, but they are still active in chat.

Also, would it be possible that when you click the who's online (and it displays what the user is doing) that it could display "User is chatting" or something like that?

thanks,
†B†V†
We want you to join:
Chicken Dinner Gaming Community

diva_uno

This is awsome...
I used to use Goosemoose's chat mod before converting to SMF. But I think I'll try this out. Maybe by using this I can figure out to intergrate my flash movie episodes into flash.
:P

Advertisement: