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

charlottezweb

I'm worried about server loads, not really bandwidth.  Either way, I've emailed the author -- we'll see what he says.  :)

-Jason

babylonking

Quote from: marcnyc on October 14, 2004, 09:16:41 AM
Quote from: babylonking on October 13, 2004, 07:37:57 PM
It's paid add-on, here is the link http://www.virtualjam.net/addonhosting.htm
About the who's chatting i use this code <?php @include('http://www.babylonking.net/forum/FlashChat/info.php'); ?>

Hey Babylonking, just three questions:
1 how do you create those news in your website's index?
2 is that shoutbox the one readily available in the MODS section?
3 it's a nice theme, did you do it yourself or what?

1- it's cute news script, you can get it from this link  http://cutephp.com/
2- Yes it's the same shoutbox, i added manualy.
3- Yes i designed for bbk forum only.

babylonking

Quote from: marcnyc on October 14, 2004, 09:10:51 AM
Quote from: AxeCrazy on October 13, 2004, 07:24:34 PM
well got it working.
in the index.template.php find the part where you put in the chat button.
just before that add.
Quote$request = db_query("
            SELECT COUNT(*) AS numb
            FROM  yabbse_fc_connections
            WHERE userid IS NOT NULL", __FILE__, __LINE__);
         list ($count) = mysql_fetch_row($request);    
         mysql_free_result($request);

the yabbse_fc_connections should be replaced by your $prefix_fc_connections
next i replace the alt "Chat"in the button with alt="' . $count . ' users in chat".
Works great.
kinda quick and dirty, but ok

Hi AxeCrazy, I have tested and implemented your code. I have added some tweaks in order to make it grammatically-compliant and in order to have it appear in the index page (and if you choose to) in all the pages of the forum, at the top. Please look at the initial post of this topic (my tutorial) as I have updated the tutorial and added all of these information and explained how to implement these two changes. I have chosen to rename the variables $chatrequest and $chatcount, simply because request and count are pretty common words and I wanted to avoid possible conflicts, as I am not familiar with the internal structure of SMF and they might have already been used/reserved in other instances

Nice i really like the line to appear ONLY if there actually IS somebody in the Chat.

good work marcnyc  :)

marcnyc

You are welcome BBKing. I am glad you like it.

Is CutePHP integrated with your forum and sharing the same database?

babylonking

Quote from: marcnyc on October 14, 2004, 01:16:24 PM
You are welcome BBKing. I am glad you like it.

Is CutePHP integrated with your forum and sharing the same database?


No, main index news is different than the forum news  :)

dg

Hey Marc,

I was able to apply the first part of your post with no issues, and it worked flawlessly.

Now, for the latest 2 that you put up (in regards to showing the number of users in chat), I am not seeing any changes.  Any thoughts?

Thanks!

marcnyc

I need more info. Did you do everything and got no errors? Were you able to follow all instructions? Does the board show any errors? Are you aware of the fact that if you used the second code option you will NOT see anything until you actuall have one user in the chat and you ALSO view another page at the same time (a page that is NOT the chat page)? Are you on RC1?

dg

I found out what I did.  I happened to morono-size it :)

Great Tip/Trick yet again!!!

Thanks!

marcnyc

I don't know what you mean by morono-size it but I am glad you got it working

dennis

Hi marcnyc,

Thank you for taking time to write up this nice instruction.  I just read through and notice it does not take care the part that Flashchat and SMF share the same user login interface, and authentication.  Or is it really in there and I did not see that?

Thanks,
Dennis

marcnyc

Dennis to avoid redundancy I have not posted the instructions that are already inside the package distributed by the software manufacturer. Once you have installed the chat and followed his instructions your chat's backend will be integrated. My additional integration is only on the graphical side.

Ben_S

There is no documentation provided with the package for integrating it with smf, though if you look at the one for IPB and do the same (obviously uncommenting the line for SMF not IPB) it will work.
Liverpool FC Forum with 14 million+ posts.

DLD

ok the first part went without any probelms at all, but when I add the users online the page wont load at all it just imes out. The line of code you posted is in a different ocntext than what I have on my template this is what I have.

<a href="', $scripturl, '?action=who">', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '</a><br />

Thanks in advance for any help

James Woodcock



James Woodcock


Ben_S

Liverpool FC Forum with 14 million+ posts.

James Woodcock


James Woodcock

ahh fixed it, didnt like the { after echo...  maybe just my template!

Is there a way to make the chat room show the users visible name rather then their log in?

Ben_S

No idea, have only had a quick glance at it thus far, I imagine you just need to edit the cmssmf or whatever it's called file to select the realname rather than username.
Liverpool FC Forum with 14 million+ posts.

Advertisement: