Toggle side column
Daniel15's Forum
July 24, 2008, 12:46:51 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Adding FlashChat support to your theme  (Read 18170 times)
Daniel15
Administrator
*****

Karma: +51/-10
Offline Offline

Posts: 1,450


View Profile WWW
« on: May 06, 2007, 12:50:46 am »

Note that by default, the FlashChat mod is only installed on the default theme. To install this on your custom theme (so it shows the users in the chat under Users Online, and at the top of the page), you'll need to edit some files.

In Themes/[theme name]/BoardIndex.template.php, find:
Code: [Select]
echo '
', $context['show_who'] ? '<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'];
Replace with:
Code: [Select]
echo '
', $context['show_who'] ? '<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'], ', ', $context['num_chat'], ' ', $context['num_chat'] == 1 ? $txt['user'] : $txt['users'], ' ', $txt['fc_in_chat'];

Find:
Code: [Select]
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

Add after:
Code: [Select]
// --- Begin FlashChat integration ---
// If there's users in the chat
if (!empty($context['users_chat']))
echo '
<br />
', $txt['fc_users_online'], ':<br />', implode(', ', $context['list_users_chat']);
// --- End FlashChat integration ---

Also, open Themes/[theme name]/index.template.php, and find:
Code: [Select]
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
Add after:
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 ---

Note that this will not add the Chat button to the menu bar. If you need help on that, please ask :)
LyriC
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile WWW
« Reply #1 on: May 22, 2007, 06:05:59 am »

hello
nice work but i have a little problem
in the forum under admin in the protocol ther are
a lot of errors

Undefined index: fc_users_online
Datei: /home/wgc/public_html/forum/Themes/helios/BoardIndex.template.php (main sub template - eval?)
Zeile: 440

and

Undefined index: fc_in_chat
Datei: /home/wgc/public_html/forum/Themes/helios/BoardIndex.template.php (main sub template - eval?)
Zeile: 407

the errors are always repeatet

in the code i post you my BoardIndex.template.php from line 400 to line 450.

Code: [Select]
               </td>
                <td class="windowbg2" width="100%">';

        if ($context['show_who'])
                echo '
                        <a href="', $scripturl, '?action=who">';
echo '
', $context['show_who'] ? '<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'], ', ', $context['num_chat'], ' ', $context['num_chat'] == 1 ? $txt['user'] : $txt['users'], ' ', $txt['fc_in_chat'];

        // Handle hidden users and buddies.
        if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
        {
                echo ' (';

                // Show the number of buddies online?
                if ($context['show_buddies'])
                        echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];

                // How about hidden users?
                if (!empty($context['num_users_hidden']))
                        echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];

                echo ')';
        }

        if ($context['show_who'])
                echo '</a>';

        echo '
                        <span class="smalltext">';

        // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
        if (!empty($context['users_online']))
                echo '
                                ', $txt[140], ':<br />', implode(', ', $context['list_users_online']);
// --- Begin FlashChat integration ---
// If there's users in the chat
if (!empty($context['users_chat']))
echo '
<br />
', $txt['fc_users_online'], '--><br />', implode(', ', $context['list_users_chat']);
// --- End FlashChat integration ---                               
        echo '
                        <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
                        <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
                        </span>
                        <hr /><span class="smalltext">
                        Most users online today: '.$modSettings['mostOnlineToday'].' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).'  )

                        </span>

i hope you can help me please
thx cya
LyriC
Daniel15
Administrator
*****

Karma: +51/-10
Offline Offline

Posts: 1,450


View Profile WWW
« Reply #2 on: May 26, 2007, 12:16:24 pm »

Are you using version 1.0 of the FlashChat integration mod? This requires version 1.0.
LyriC
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile WWW
« Reply #3 on: May 28, 2007, 04:43:48 am »

yes i am using 1.0 mod
kruna
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile
« Reply #4 on: June 21, 2007, 02:44:09 pm »

Hi Daniel15,

first of all, thanks a lot for the great mod!!

"Note that this will not add the Chat button to the menu bar. If you need help on that, please ask :)" (Sorry, somehow inserting quotes didnt work)

Well, actually evrything worked very fine, just need to add the Chat button on the menu bar and dont know how to do that...

Can you please help me?

I am using the famouspadexx-theme, please take a look at www.clickyshop.com/foro

Thank you very much in advance.

Regards,
kruna
kruna
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile
« Reply #5 on: June 22, 2007, 03:49:17 am »

Hi daniel,

sorry never mind..i found it out already...(hope i made it right   as I have no idea about coding, was just a copy/paste thing)...

I have another problem though, but will post it in another thread.

Great work you are doing...hats off!!

Regards,
Kruna
clarkkent93
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile WWW
« Reply #6 on: July 02, 2007, 04:38:55 am »

Note that by default, the FlashChat mod is only installed on the default theme. To install this on your custom theme (so it shows the users in the chat under Users Online, and at the top of the page), you'll need to edit some files.

In Themes/[theme name]/BoardIndex.template.php, find:
Code: [Select]
echo '
', $context['show_who'] ? '<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'];
Replace with:
Code: [Select]
echo '
', $context['show_who'] ? '<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'], ', ', $context['num_chat'], ' ', $context['num_chat'] == 1 ? $txt['user'] : $txt['users'], ' ', $txt['fc_in_chat'];

Find:
Code: [Select]
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

Add after:
Code: [Select]
// --- Begin FlashChat integration ---
// If there's users in the chat
if (!empty($context['users_chat']))
echo '
<br />
', $txt['fc_users_online'], ':<br />', implode(', ', $context['list_users_chat']);
// --- End FlashChat integration ---

Also, open Themes/[theme name]/index.template.php, and find:
Code: [Select]
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
Add after:
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 ---

Note that this will not add the Chat button to the menu bar. If you need help on that, please ask :)

I tried to add the last bit of code in my theme but couldn't find the statement that reads:
Code: [Select]
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}

I'm using the MeshTP theme.  I'll also need help creating the button if you don't mind helping out.

Thanks.
aLyas
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile WWW
« Reply #7 on: July 03, 2007, 05:31:10 am »

Quote
Note that this will not add the Chat button to the menu bar. If you need help on that, please ask :)
here Im asking :)
http://mangaz.freehostia.com/forum/  is my forum related to the website  www.mangaaz.fr.nf
and I wondere If you can help me in adding a boutton to the menu barre
choukrane (thx)
assasinkilla
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
« Reply #8 on: July 28, 2007, 06:31:53 pm »

No offence, but... Really bad support, havent replied her yet... Msg from july 3
Raptor
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile
« Reply #9 on: August 06, 2007, 11:50:38 am »

Hello,

I have added the Flash chat mod to my SMF and the flash chat is working.

However I can not seem to add the Flash chat Button to my theme. I am using the Heavy Metal theme and it seems to add buttons different them all the post I see here. Can you help please and tell me the code to add to the Heavy Metal theme to get the Flashchat button.

Thank you
cmcmom
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile
« Reply #10 on: August 11, 2007, 08:56:55 am »

I am  using the Bright  Forest theme....here is the download:   http://custom.simplemachines.org/themes/?lemma=336


Please help me with the CHAT BUTTON

is there a way to see if the integration code given works without the TAB?


Daniel15
Administrator
*****

Karma: +51/-10
Offline Offline

Posts: 1,450


View Profile WWW
« Reply #11 on: August 11, 2007, 12:57:44 pm »

Quote
is there a way to see if the integration code given works without the TAB?
Sure, go to index.php?action=chat.

Quote
No offence, but... Really bad support, havent replied her yet... Msg from july 3
I can't visit this forum that often... School is more important for me. I'm a 17-year-old student, and need to focus a lot of my effort on school work ;).

For everyone that requested a button, please provide a link to the theme you're using! :)

Quote
I am  using the Bright  Forest theme....here is the download:   http://custom.simplemachines.org/themes/?lemma=336
In Themes/<your theme>/index.template.php, find:
Code: [Select]
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
Add after:
Code: [Select]
if ($context['current_action'] == 'chat')
$current_action = 'chat';

Also, find:
Code: [Select]
// The [calendar]!
if ($context['allow_calendar'])
echo '
<li', $current_action == 'calendar' ? ' id="actief"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';

Add after:
Code: [Select]
// FlashChat
echo '
<li', $current_action == 'chat' ? ' id="actief"' : '', '><a href="', $scripturl, '?action=chat"', (!empty($GLOBALS['modSettings']['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($GLOBALS['modSettings']['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a></li>';
Lily Flor
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


You can only see fully with the heart...


View Profile WWW
« Reply #12 on: August 12, 2007, 02:33:44 pm »

Hi I need help with the buttom too, please please... please!! help!!  :'(
I have the girlyman theme install
www.planetacandy.com/Candy

thanks!!! Thanks!! thanks!!! a million!!

Northboun
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 0


View Profile
« Reply #13 on: August 14, 2007, 04:37:50 am »

I am in need of a chat button for helios_multi11final theme (http://custom.simplemachines.org/themes/index.php?lemma=1) if possible  O0

Thanks for any help.
assasinkilla
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
« Reply #14 on: August 16, 2007, 12:00:28 pm »

I also need to add the button im using modified aa new damage
Pages: [1] 2
  Print  
 
 

Powered by MySQL Powered by PHP Powered by SMF 2.0 Beta 3 Public | SMF © 2006–2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.288 seconds with 22 queries.