FlashChat Integration

Started by Tyrsson, January 05, 2007, 03:44:53 AM

Previous topic - Next topic

Prometheus Fire

#1360
No dice, I uninstalled Pretty URLs and there is no change. The chat tab still comes up fine in the default theme but in my custom theme there is nothing. I suppose what I need are instructions (and the code) for modifying my index.template.php for my theme.

The parse on the mod page here on the smf site doesn't work for this mod so I really don't know how to do a manual install for it.

I also tried again copying the code over from the default template's index page but I just screw it up somehow and cause the site not to load.  Attached is my working index.template.php, maybe you can give some advice how to edit it.

Tyrsson

Yes you will need to add the code to any custom theme manually. I suggest something like WINMerge to show you the edits made to the default file so that you can move the edits over. If you have not got it done by tomorrow I will have time to look into it but I am very busy at the moment.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Prometheus Fire

#1362
I loaded WINmerge up but it didn't tell me anything I didn't already know.  I tried pasting in the FC code one section at a time. I didn't get past the first section when I got a template parse error.

This is the code that caused that:
// --- 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 ---
echo ' </span>';
}


I pasted it in, directly before this:
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else



Bigguy

try 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 ---
      echo '            </span>';
   }'


or 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 ---
      echo '            </span>';
   }';

Prometheus Fire

I tried it without the echo and span line and it didn't break anything (I suppose that's a good way of measuring success...).

I also added the 2 pieces of coding for the menu button further down in the file. Nothing appears to be broken when the website loads now, but the button doesn't show up.

updated index file attached

Bigguy

There are no errors in this file so try it and see if it works. What I have done was take out the chat link you had in there and copied the link for the calendar and replaced the action in it and the txt with the ones from the chat. One downside is it runs with permissions from the calendar so if you allow guests to see it they will also see the chat.

Prometheus Fire

Your fix worked, sort of, I get a tab now that links to the chat but the tab is blank. I still need to figure out a way to get the word "chat" appear. It must have something to do with the calender code.  Any idea where the labels for the menu bar are kept?

Bigguy

index.english.php I think. There should have been text with it.

Prometheus Fire

Okay, I managed to fix it. I discovered that modifications.english.php in my theme needed to be manually modded with the FC data (this is a good example of the importance of having the manual parsing working on the mod's page - without the manual modding instructions I really didn't know where to start.)

Once I put that in, thinks started to look up. I ended up using the original FC button code instead of the one you provided above. There were some syntax issues that was preventing it from working.

Note the very small change I made - I don't even know what that syntax means.. I've marked the changes in bold.

Original button code:
Quote// FlashChat!
   global $modSettings;
   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"', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Altered code:
Quote// FlashChat!
   global $modSettings;
   if ($context['user']['is_logged'])
      echo '<li', $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"', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '</li>';

Essentially, I removed the first set of parenthesis and added in the li tag. Though I couldn't find any info about what the li tag is for, I noticed that all the other buttons were using it.  Everything seems to be working now, including the number of users in chat.

Kindred

li is for a LIST in HTML...   and you have tds inside that li (tds are for table cells) which is not valid html...

basically what you did does not parse.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kaoss

Did this:

http://forum.tufat.com/showthread.php?t=56996

Running 2.0 and trying to install FlashChatSMF_v2.1.1.tar.gz. After I upload it to my site (www.806minis.com) and click install and then I get a message saying

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

What can I do?

Tyrsson

Which version of 2.0 are you running? It has not been updated to RC2 as of yet (been busy).
PM at your own risk, some I answer, if they are interesting, some I ignore.

kaoss


lethal1320.com

Quote from: Tyrsson™ on January 02, 2010, 06:41:49 PM
Which version of 2.0 are you running? It has not been updated to RC2 as of yet (been busy).

Any idea when you will update it?, I'd be willing to pay for this mod.

snakemannva

Hello I am wondering is there away to make it where people can not enter the chat unless they make certain amount of post a day? Or have it where they can not enter unless it is a certain amount of post? If anyone knows how to do this i would appreciate all your help.

Tyrsson

Quote from: snakemannva on January 04, 2010, 05:13:57 PM
Hello I am wondering is there away to make it where people can not enter the chat unless they make certain amount of post a day? Or have it where they can not enter unless it is a certain amount of post? If anyone knows how to do this i would appreciate all your help.
I plan on adding this in the next version, but it will still be awhile before I have the chance to update the mod. I just have to much going on at the moment.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Maxtor

Does FlashChat  6.0.6 work with SMF 1.1.11?
I get this error
12. Execute Modification ./chat/inc/flashChatTag.php Test failed


But if i use FlashChat 4.7.12 with 1.1.11 everything works fine.

adbrad

the mod is only compatiable with flashchat 4.7.12
how ever you can use 6.06 with smf just not the mod

Maxtor

#1378
Quote from: adbrad on January 10, 2010, 03:50:25 PM
the mod is only compatiable with flashchat 4.7.12
how ever you can use 6.06 with smf just not the mod

ok i will try it

Matthew K.

Hey there, I am working on a SMF 2.0 RC2 Forum, and I am very experienced with manually installing mods, and how all of that works, so the fact that it's only at 1.2 right now is not a problem.

I have purchased FlashChat, how do I get a version that has SMF 2.0 on the intergration list? Or where could I find the edits to do this manually?

Thanks,
Labradoodle-360

Advertisement: