Customizing SMF > SMF Coding Discussion

FlashChat integration (number of users on button)

<< < (5/5)

dooie:
I wonder if a mod can be made to work like the flashing email gif for new Private Messages?

The code used for that is the following;

--- Code: ---if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))
{
$context['menu_buttons']['pm']['alttitle'] = $context['menu_buttons']['pm']['title'] . ' [' . $context['user']['unread_messages'] . ']';
$context['menu_buttons']['pm']['title'] .= ' [<strong>'. $context['user']['unread_messages'] . '</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />';
}
--- End code ---

There must be something that can be done with similar code for the flashing chat icon with this.
Again, this is the variables for FlashChat in Modifications.english.php

--- Code: ---// --- Begin FlashChat Integration ---
$txt['fc_chat'] = 'Chat';
$txt['fc_flashchat'] = 'FlashChat';
$txt['fc_flashchat_settings'] = 'FlashChat Integration Settings';
$txt['fc_in_chat'] = 'in Chat';
$txt['fc_not_found'] = 'FlashChat does not appear to be installed!';
$txt['fc_no_guests'] = 'Sorry, guests aren\'t allowed to use the chat!';
$txt['fc_private_room'] = '<i>private room</i>';
$txt['fc_users_online'] = 'Users currently in chat';
// For 'Who's Online' page
$txt['whoall_chat'] = 'In the <a href="' . $boardurl . '?action=chat">Chatroom</a>';

// Settings for admin panel
$txt['fc_height2'] = 'Height';
$txt['fc_config'] = 'FlashChat Configuration';
$txt['fc_inForum'] = 'Display chat window "inside" forum?';
$txt['fc_newWindow'] = 'Open chat in new window?';
$txt['fc_showUsers'] = 'Display Users in Chat at top of forum?';
$txt['fc_showUserCount'] = 'Show number of users on Chat button?';
$txt['fc_size_desc'] = 'The height and width must me in px (eg. 600 for 600 pixels)! If no value is set it will default to 80% x 400px';
$txt['fc_width'] = 'Width';
// --- End FlashChat Integration ---
--- End code ---

Suki:
You don't need a separate mod for that, the var is already there, the query is already there, for some reason the query is not been executed and thus num_chat will always remain empty, meaning i won't display anything, it needs some more checks to know why the query doesn't get exacuted, unfortunately I don't have the time right now to do that.

dooie:
Well thank you for what time you have put in! I guess I will deal with it until someone is able to figure this out.

Cheers!

Navigation

[0] Message Index

[*] Previous page

Go to full version