SimplePortal
Customization => Custom Coding => Topic started 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 !!
-
Is there a link to this "Flashchat"?
-
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..............
-
It's quite possible. I'll look into it. :)
-
Thanks !!!
-
OK ..... I came up with a block Code that works.......
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
-
An iframe... hmmm is that possible to center *thinking*
You can try:
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
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
-
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.
-
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.
-
Hmm.. I was pretty shure that would've worked :worried:
NOw, lett me see.... :whistle:
-
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..).
-
FlashChat should work fine with both SMF 1.1 and 2.0.
-
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.
-
Do you have FlashChat installed on your server?
-
Nope, I have no chat whatsoever installed on my server =/
-
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
-
Aw, damn >: Well then I'll do without.
-
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
-
OK ..... I came up with a block Code that works.......
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!!!!
-
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!!
-
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................
-
I never tried the mod/script (whatever it is). Anyone want to try this?
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/');
-
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:
// --- 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. :-[
-
Yeah, that's it! Just make sure that you add these codes before your codes:
global $txt, $context, $modSettings;
-
Yeah, that's it! Just make sure that you add these codes before your codes:
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!
-
I just assisted. Glad that you could get it working.
-
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
-
Ok, so I put the codes together and the block works good.
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
-
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
-
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!
-
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!
-
Polite Bump.... Anyone?? :O
-
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 ?
<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>
-
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.
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?
-
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.