SimplePortal

Customization => Custom Coding => Topic started by: TW1ST3D on September 27, 2008, 02:26:49 PM

Title: Flashchat Block
Post by: TW1ST3D on September 27, 2008, 02:26:49 PM
I have found that I really need a Flashchat block but am finding it impossible to code one with my little knowledge of php.
I have tried to pluck diffent lines of code and cobble them together but to no avail.

it should contain a button for going to the flashchat app and a members in chat listing (much like a members online block)............is this possible?

Thanks in Advance !!
Title: Re: Flashchat Block
Post by: Nas on September 28, 2008, 03:11:10 AM
Is there a link to this "Flashchat"?
Title: Re: Flashchat Block
Post by: TW1ST3D on September 28, 2008, 02:10:15 PM
Here is a link to the integration Mod , which has the code to "lift or Copy" the users online for SMF
http://custom.simplemachines.org/mods/index.php?mod=611
(I personally use the Googlebots and Spiders version)


I think all the code that is needed is in the integration mod..............
Title: Re: Flashchat Block
Post by: ccbtimewiz on September 28, 2008, 02:11:06 PM
It's quite possible. I'll look into it. :)
Title: Re: Flashchat Block
Post by: TW1ST3D on September 28, 2008, 02:19:09 PM
Thanks !!!
Title: Re: Flashchat Block
Post by: TW1ST3D on October 02, 2008, 06:34:50 PM
OK ..... I came up with a block Code that works.......
Code: [Select]
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>';

Now.........How can I center the above code result in the Block?
~TW1ST3D
Title: Re: Flashchat Block
Post by: ???1031 on October 03, 2008, 02:02:25 AM
An iframe... hmmm is that possible to center *thinking*

You can try:

Code: [Select]
global $boardurl;
echo '
<iframe frameborder="0" align="center" 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>';

Or

Code: [Select]
global $boardurl;
echo ' <div align="center">
<iframe frameborder="0" align="center" 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>';
</div>

I don't know if one of this work with iframes...

Bye
DIN1031
Title: Re: Flashchat Block
Post by: Nas on October 03, 2008, 03:01:25 AM
Code: [Select]
global $boardurl;
echo ' <div align="center">
<iframe frameborder="0" align="center" 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>';
</div>


Theoretically that should work.
Title: Re: Flashchat Block
Post by: TW1ST3D on October 03, 2008, 03:40:41 PM
Thanks Guys !!  No.....Neither one of those will center the iFrame. I can be happy with the results that I have now.

Thanks Again for your responses.
Title: Re: Flashchat Block
Post by: Nas on October 03, 2008, 04:03:28 PM
Hmm.. I was pretty shure that would've worked  :worried:

NOw, lett me see....  :whistle:
Title: Re: Flashchat Block
Post by: Kosedragen on October 03, 2008, 06:33:47 PM
Ohohoh, I'd like this too D: But does it exist a flash chat to make this possible in SMF 1.1.6? I only get an error when trying to install it (as expected..).
Title: Re: Flashchat Block
Post by: Oldiesmann on October 04, 2008, 02:54:48 AM
FlashChat should work fine with both SMF 1.1 and 2.0.
Title: Re: Flashchat Block
Post by: Kosedragen on October 04, 2008, 06:41:34 AM
Nah, it didn't work with me. I get the error "missing files" or something like that. Look at the attacked image, and you see my problem =/ I used the flash chat mod mentioned earlier in this topic.
Title: Re: Flashchat Block
Post by: ccbtimewiz on October 04, 2008, 10:01:42 AM
Do you have FlashChat installed on your server?
Title: Re: Flashchat Block
Post by: Kosedragen on October 04, 2008, 10:11:58 AM
Nope, I have no chat whatsoever installed on my server =/
Title: Re: Flashchat Block
Post by: ccbtimewiz on October 04, 2008, 10:34:41 AM
That's the reason then. You need to have the FlashChat environment installed on your server in order for the modification to operate correctly.

You can purchase FlashChat for $5.00 USD: http://www.tufat.com/s_flash_chat_chatroom.htm
Title: Re: Flashchat Block
Post by: Kosedragen on October 04, 2008, 02:44:24 PM
Aw, damn >: Well then I'll do without.
Title: Re: Flashchat Block
Post by: cme1st2302 on October 20, 2008, 01:40:41 PM
I used the code supplied by TW1ST3D and it works!!!  Thanks very much.

Now how would i change the font color to white?  It is black now.

EDIT - I figured out the color issue, had to modify the info_embedded file. 

Another question - How would I get the users name to show up colored like it does on the online list?  I know I would have to add it in the info_embedded.php file but I have no clue what to add.

Chris
Title: Re: Flashchat Block
Post by: Tyrsson on November 05, 2008, 06:17:57 PM
OK ..... I came up with a block Code that works.......
Code: [Select]
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>';

Now.........How can I center the above code result in the Block?
~TW1ST3D
If you use this code make sure you add the "%" after the height. If you have many rooms without this it will cut the bottom rooms off (or at least it did on mine).

Thanks for the info and the help!!!!

You all rock!!!!
Title: Re: Flashchat Block
Post by: Tyrsson on November 05, 2008, 06:35:47 PM
Well, I still have a problem. I have the chat block working and it list all the users in the chat etc. However, you can not enter the chat from the block by clicking on the room name. I have the flash chat integrated so that it pulls the usernames etc. from the database.

My question:

Is there anyway that I can add the url to the chatroom in html and have it linked from the block?

I am kinda slow when it comes to all this....

Oh yeah, I am using SP 2.0.5 and SMF 1.1.6.

Thanks in advance!!
Title: Re: Flashchat Block
Post by: TW1ST3D on January 09, 2009, 09:32:37 PM
Well, I still have a problem. I have the chat block working and it list all the users in the chat etc. However, you can not enter the chat from the block by clicking on the room name. I have the flash chat integrated so that it pulls the usernames etc. from the database.

My question:

Is there anyway that I can add the url to the chatroom in html and have it linked from the block?

I am kinda slow when it comes to all this....

Oh yeah, I am using SP 2.0.5 and SMF 1.1.6.

Thanks in advance!!

I embedded a HTML image with the link to the Chatroom................
Title: Re: Flashchat Block
Post by: [SiNaN] on February 03, 2009, 07:30:12 AM
I never tried the mod/script (whatever it is). Anyone want to try this?

Code: [Select]
global $boarddir, $context, $txt, $modSettings;
global $db_server, $db_user, $db_passwd, $db_name, $db_prefix;
global $txt, $boardurl, $context;

if ($context['user']['is_guest'])
return $txt['fc_no_guests'];

$context['chat_width'] = (!empty($modSettings['fc_width']) ? $modSettings['fc_width'] : '100%');
$context['chat_height'] = (!empty($modSettings['fc_height']) ? $modSettings['fc_height'] : '600');

if (!file_exists($boarddir . '/chat/inc/common.php'))
return $txt['fc_not_found'];

require($boarddir . '/chat/inc/common.php');

echo '
<script language="JavaScript" type="text/javascript" src="chat/javascript/ActivateFlash.js"></script>
', flashChatTag($context['chat_width'], $context['chat_height'], array(), $boardurl . '/chat/');
Title: Re: Flashchat Block
Post by: Manu on February 03, 2009, 08:41:45 AM
I use the flash chat too in our forum, but I won't add the chatroom itself to a block. What I want to add is the "Who is online in the chat". I'm using the overview theme and there is no space for this little think. In the the default it wasn't a problem. The code which has to been add to the index.template.php was this:

Code: [Select]
// --- Begin FlashChat Integration ---
// Do we need to display a list of the users in the chat?
// Are there users online?
if (!empty($modSettings['fc_showUsers']) && !empty($context['users_chat']))
echo '
', $txt['fc_users_online'], ': ', implode(', ', $context['list_users_chat']), '<br />';
// --- End FlashChat Integration ---
Is this code only for need or what must been add to show this in a block?

I don't know if you get it what I want to ask.  :-[
Title: Re: Flashchat Block
Post by: [SiNaN] on February 03, 2009, 08:59:08 AM
Yeah, that's it! Just make sure that you add these codes before your codes:

Code: [Select]
global $txt, $context, $modSettings;
Title: Re: Flashchat Block
Post by: Manu on February 03, 2009, 09:11:36 AM
Yeah, that's it! Just make sure that you add these codes before your codes:

Code: [Select]
global $txt, $context, $modSettings;
Thanks I will give it a try asap and let you know if it works without errors. ;)

Works like a charm!  ;D
Thanks Blue Dream for your help!
Title: Re: Flashchat Block
Post by: [SiNaN] on February 03, 2009, 12:33:13 PM
I just assisted. Glad that you could get it working.
Title: Re: Flashchat Block
Post by: fl4pj4ck on February 27, 2009, 10:01:01 PM
Aw, damn >: Well then I'll do without.

you can always use this one https://blueimp.net/ajax/
it's free and works like a charm
Title: Re: Flashchat Block
Post by: J-Bird on March 15, 2009, 11:27:45 PM
Ok, so I put the codes together and the block works good.

Code: [Select]
global $txt, $context, $modSettings;
// --- Begin FlashChat Integration ---
      // Do we need to display a list of the users in the chat?
      // Are there users online?
      if (!empty($modSettings['fc_showUsers']) && !empty($context['users_chat']))
         echo '
                     ', $txt['fc_users_online'], ': ', implode(', ', $context['list_users_chat']), '<br />';
      // --- End FlashChat Integration ---

Things I need help with, that i would like to improve on.

1. Create a link, possible Title, that would open the chat.
2. When Noone is in chat, to have it display Noone in chat or 0 users, or something similar, intead of being just blank as it is now.

J-Bird @ gearsofgaming.com
Title: Re: Flashchat Block
Post by: cme1st2302 on March 16, 2009, 12:40:55 PM
If you take a look at my site I modified the code in chat/info_embedded.php to show "No users in chat"  when no one is in there.  I also stripped down the code so it only shows the users in chat when users are on, not the room names and number of people as I only have one room.  If you need help let me know.

Chris
Title: Re: Flashchat Block
Post by: J-Bird on March 16, 2009, 06:49:30 PM
If you take a look at my site I modified the code in chat/info_embedded.php to show "No users in chat"  when no one is in there.  I also stripped down the code so it only shows the users in chat when users are on, not the room names and number of people as I only have one room.  If you need help let me know.

Chris

Thanks for the help in PM Chris, you were a huge help!
Title: Re: Flashchat Block
Post by: Killer-B on March 17, 2009, 03:27:06 AM
What about AjaxChat and their shoutbox version? Any way to get that as a box on my index page?

I see on East Coast Astro forum - that he has this "users in chat" - I've also seen the shoutbox run horizontally across the top...

I have "Chat" tabs showing... just need a box or 2 to show people the door in :D

Might help if I gave the link eh? www.f-1chat.com - thanks!
Title: Re: Flashchat Block
Post by: Killer-B on March 22, 2009, 10:23:31 AM
Polite Bump.... Anyone??  :O
Title: Re: Flashchat Block
Post by: Divecall on May 25, 2009, 06:47:43 PM
Hello all !

I´m using the Flashchat version 5.0.8.

But no Block-Code ist working for me.

Before i was using 4.7.8 an with the following code all was fine.

What i need to change, please. Any suggestion ?

Quote
<iframe frameborder="0" height="100%" src="http://www.mypage.de/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>
Title: Re: Flashchat Block
Post by: noelleon69 on May 29, 2009, 08:40:20 AM
I'm using Flashchat version 5.0.9 and SMF 1.1.9. The block codes mentioned here so far didn't work for me except for the below code. So if your flashchat is version 5 I believe it should work.

Code: [Select]
   global $boarddir, $context, $txt, $modSettings;
   global $db_server, $db_user, $db_passwd, $db_name, $db_prefix;
   global $txt, $boardurl, $context;

   if ($context['user']['is_guest'])
      return $txt['fc_no_guests'];
   
   $context['chat_width'] = (!empty($modSettings['fc_width']) ? $modSettings['fc_width'] : '100%');
   $context['chat_height'] = (!empty($modSettings['fc_height']) ? $modSettings['fc_height'] : '600');
   
   if (!file_exists($boarddir . '/chat/inc/common.php'))
      return $txt['fc_not_found'];
   
   require($boarddir . '/chat/inc/common.php');

   echo '
      <script language="JavaScript" type="text/javascript" src="chat/javascript/ActivateFlash.js"></script>
      ', flashChatTag($context['chat_width'], $context['chat_height'], array(), $boardurl . '/chat/');

But there are still some things that I want done:
1) I want a block with both the current Who's Online information and the above together.
2) I would like the same format where there is a bullet next to Users in Chat and a list of the users with the icon next to the name.
3) The names in Users in Chat support member colours.

Is there anyone who could do this?
Title: Re: Flashchat Block
Post by: noelleon69 on June 07, 2009, 03:21:01 AM
Could anyone provide some help? Pardon me if I'm asking in the wrong place, let me know if I should be asking this in the SMF forum on coding help instead of here :)

I thought I asked here as this could be developed into an integrated Who's Online/Flashchat block that would benefit flashchat users.
SimplePortal 2.3.8 © 2008-2024, SimplePortal