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

Simplemachines Cowboy

My SMF forum: The Open Range

eriktm

Does it works with the default themes in color variations? ::) ::)

Simplemachines Cowboy

Bert,
If you installed FlashChat from the beginning in CMS mode, then it will use the SMF database. If you installed it as a stand-alone chat, then it will not (if you did this, uninstall it and re-install it - no harm done).

You have a MySQL database for your SMF forum. If you have installed FlashChat as to use that database, then there will be a bunch of new tables in your database that are used by FlashChat.

I think, from what you showed, your database path would be:

uswxorg_flacha_fc_connections
My SMF forum: The Open Range

Simplemachines Cowboy

Erik™,
As long as you are using the SMF 1.1RC2 default theme, it will work. All that is changed in the color variations, is, well, the color... :D

It will work in any other theme as well, you just have to do more working figuring out where the code goes.
My SMF forum: The Open Range

Glander

Quote from: Simplemachines Cowboy on February 14, 2006, 01:15:40 PM
Bert,
If you installed FlashChat from the beginning in CMS mode, then it will use the SMF database. If you installed it as a stand-alone chat, then it will not (if you did this, uninstall it and re-install it - no harm done).

You have a MySQL database for your SMF forum. If you have installed FlashChat as to use that database, then there will be a bunch of new tables in your database that are used by FlashChat.

I think, from what you showed, your database path would be:

uswxorg_flacha_fc_connections

Hi  Cowboy,

Thanks for the reply, but still 2 questions.
I can't find in thee list the RC2 CMS when I want to install.
What can I use for that?

And i guess I have to install FC in the mode user will normaly used name and pass?
or do I have to put it in free connection?

Thanks again.

Bert

Simplemachines Cowboy

http://www.tufat.com/docs/flashchat/integration.html
There is a choice for SMF 1.1 in the list.

I don't quite follow the 2nd question. If you install it as per the above link, that if someone is logged into your smf forum, and opens the chat, they will automatically be logged in to the chat with their smf user name.
My SMF forum: The Open Range

patsbrady

Quote// Show the [chat] button.
   if ($context['user']['is_logged'])
      echo ($current_action=='chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=chat" target="_blank">' , $txt['chat_1'] , '</a> 
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

No matter what I do, it wont show the "Chat" next to eg Home or where I place it. It is simply just left out.

Here is what my code looks like

Quote// Show the start of the tab section.
   echo '
         <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
            <tr>
               <td class="maintab_' , $first , '">&nbsp;</td>';

   // Show the [home] button.
   echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '">' , $txt[103] , '</a>
            </td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
            

   // Show the [help] button.
   echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
            </td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Show the [chat] button.
   if ($context['user']['is_logged'])
      echo ($current_action=='chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=chat" target="_blank">' , $txt['chat_1'] , '</a> 
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

   // How about the [search] button?
   if ($context['allow_search'])
      echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
            </td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Simplemachines Cowboy

Did you do this?
(from the first post in this thread)

B. Somewhere in smf/Themes/default/languages, add this code:
Code:

   $txt['chat_1'] = 'Chat';


C. Add Chat to the list of current actions:
In smf/Themes/default/index.template.php, find:
Code:

   if ($context['current_action'] == 'search2')
      $current_action = 'search';


Add this code AFTER the above:
Code:

   if ($context['current_action'] == 'chat')
      $current_action = 'chat';
My SMF forum: The Open Range

patsbrady

#48
Did you do this?
(from the first post in this thread)

QuoteB. Somewhere in smf/Themes/default/languages, add this code:
Code:

   $txt['chat_1'] = 'Chat';

Yes placed in index.english.php

QuoteC. Add Chat to the list of current actions:
In smf/Themes/default/index.template.php, find:
Code:

   if ($context['current_action'] == 'search2')
      $current_action = 'search';


Add this code AFTER the above:
Code:

   if ($context['current_action'] == 'chat')
      $current_action = 'chat';

Also done.

hxxp:www.noertov.com/forum [nonactive]

Extra edit...

Ok, I managed to figure it out on another testsite, but the script

hxxp:www.mysite.com/smf/ [nonactive]index.php?action=chat brings me back to the indexpage of the forum instead of to the flashchat. Nothing happens. I have tried to figure out where it calls the script and in Chat.template.php the URL is correct as i points to flashchat.php.

Here is what it looks like

Quote<?php
// Version: 1.1 RC2; 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.name.substr(0, 3) == "brd")
               document.searchform.elements.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="500" src="hxxp:www.mysite.com/smf/chat/flashchat.php [nonactive]"></iframe>';

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

?>

Otherwise great guide

krustyop

Hi guys,
Anyone has an idea how we could hardcode info.embeded.php so that the output generated in the who's chatting block would automaticly use the color set of the theme we are using (windowbg, titlebg...)
(the X users in X rooms and the rooms names)

tks..

Dom

yardbird

#50
OK this might sound like a small thing but it's bugging me and I'm at work trying to do all this between meetings...

I have removed the "target=_blank" so that flashchat opens in the current window. It WORKS fine, but there are scroll bars at bottom and right side of the chat "window" and you have to scroll down just a little to see the whole text entry area and when you do that you lose a little bit of the top... mostly title info, not the chat screen itself...

so is there a way to get that window to not have scroll bars?

ack... I might be answering my own question here... it doesn't happen in IE (which I DON'T use... only in Firefox and I THINK it's being caused by the extra stuff that AdBlock is adding to the content of the window.

sheeesh....

*************
update
*************

yup... this was caused by Adblock Plus extension. Disabling AdblockPlus for my site fixed it.

****** resolved *******

bar

#51
Thanks but there seems to be a problem:

The link which reads http://www.mysite.com/smf/index.php?action=chat brings me back to the index page of the forum instead of to the flashchat.

Thanks.

Simplemachines Cowboy

Then the action=chat hasn't been defined properly in your set up.
If the software can't parse action=chat, it defaults to the index.php page.
My SMF forum: The Open Range

patsbrady

QuoteThe link which reads hxxp:www.mysite.com/smf/index.php?action=chat [nonactive] brings me back to the index page of the forum instead of to the flashchat.

Exactly the same problem as I described above - and I've followed the guide step by step several times. Look above.

dguywill

Greetings,
I your documentation I am not sure I really understand what you mean by this:

QuoteMAKE SURE YOU CHANGE "YOURDATABASENAME_FC_CONNECTIONS" TO THE PROPER PATH!
Yes, you will place the above code in index.template.php also.

I have inserted that piece of code in question into BoardIndex.template.php, but it seems to be saying that I should also insert it into index.template.php.  If so where do I insert it.

Thanks,
Dee.

houston

#55
Quote from: dguywill on March 08, 2006, 05:24:58 PM
Greetings,
I your documentation I am not sure I really understand what you mean by this:

QuoteMAKE SURE YOU CHANGE "YOURDATABASENAME_FC_CONNECTIONS" TO THE PROPER PATH!
Yes, you will place the above code in index.template.php also.

I have inserted that piece of code in question into BoardIndex.template.php, but it seems to be saying that I should also insert it into index.template.php.  If so where do I insert it.

Thanks,
Dee.

When you add this code make sure that you change it to the prefex name of your database table. By default it is set to be named as smf_fc_connections. When you installed the script did you change the default prefix name? If so you need to replace smf with the prefix name you used.

As far as the rest of your question, have a look at the directions again. You need to find this code



<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';



which is right near the bottom of the index.template.php file and then replace it with the code given in the directions.

meyersmp

I'm having some problems with the classic template. When I attempt to change the index.template.php file and add the following code
// Show the [chat] button.
if ($context['user']['is_logged'])
echo ($current_action=='chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat" target="_blank">' , $txt['chat_1'] , '</a> 
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


No chat button appears and all buttons after this code appear at the top of the screen. I don't know php so the problem is probably staring me right in the face but without me understanding how to read it. Could someone translate for me what I need to do to fix this? I don't even see any evidence in this  code for an image file to be used as the chat button.

Simplemachines Cowboy

These instructions are for the Default Theme specifically.
A lot of this will work with the classic theme but the button set-up is different.
My SMF forum: The Open Range

krustyop

#58
EDIT
any idea why the who's online page still reports unknown action?

Here are a couple isues i'm wondering about,
This is not related to the fact that I use a custom theme, nor that my forum is in french,
I have the same issues in all themes/languages:

I want the chat to open inside the Iframe, that is working fine, exept for the following:


1-Linktree does not show that we are in the chat see image:

As a matter of fact, I have the same issue with coppermine gallerie opened in a Iframe, Linktree does not show
Any ideas?



2-The action in the who's online page of the forum reports Unknown Action as shown here

Coppermine works fine, since some code was added in coppermine file, but where should I add this code, or what should I modify for the action=chat to be reported in the Who's online section ???



Hope anyone can guide me on this one!

Dom

Simplemachines Cowboy

In all the versions of SMF that I had used it showed Unknown Action. I never bothered to find out why, 'cause I knew that it meant the user was in chat.

And the linktree I never even noticed it until you pointed it out.

I suspect they are tied together; SMF & FC aren't communicating on some level.
I'll do some playing around.
My SMF forum: The Open Range

Advertisement: