Customizing SMF > SMF Coding Discussion
FlashChat integration (number of users on button)
dooie:
I have integrated FlashChat with the integration mod but I am curious why even though the code is there in the menu to display the number of users in the chat on the chat button in the menu bar. Instead of just saying "Chat", it should say something like "Chat [2 Users]" (assuming 2 users are in the chat) however this is not working while members are in chat.
The code in the menu is this
--- Code: ---//Start FlashChat integration
'chat' => array(
'title' => $txt['fc_chat'],
'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>]' : ''),
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),
//End FlashChat integration
--- End code ---
This is in Subs.php
Attached is my Subs.php file if someone who understands coding can explain why the number of users is not working.
This would be greatly appreciated as most of the chat users do not use the Welcome User drop down so there is no visible indication that anyone is in chat.
If possible, I would really like to integrate a flashing icon such as a small animated gif next to the chat button when someone is in the chat room.
Any help will be greatly appreciated!
Cheers.
dooie:
I neglected to mention that I am running SMF 2.0.2 Default Curve theme. I tried it in Core Theme as well and still not working. Is there something with the coding that is preventing this from behaving the way it should?
Cheers.
dooie:
I have had no luck getting assistance with the FlashChat integration mod for over a month so I decided to try another avenue of notifying members when a user is in Chat.
I am hoping someone could assist me in some code to indicate next to the Chat button, on the menu, when users are in Chat?
I have created a flashing icon animated gif that I want to use but have no idea how to implement it with the new changes in code to SMF 2.0.2
I am running SMF 2.0.2 with Default theme Curve. Attached is my Subs.php file.
Any assistance would be greatly appreciated!
I have had no assistance trying to figure out why the code for users in chat on the Chat button is not working in over a month so this may be my only other way of notifying my users.
Cheers.
Suki:
Hello dooie, sorry for the late reply.
Doing a quick look at that mod it looks like $context['num_chat'] holds the actual number of persons in the chat and that part is already included on the chat button, do you don't see the number next to the button? there is a setting somewhere in the mod admin panel to show the users count, did you have this option enable?
dooie:
--- Quote from: Suki on June 28, 2012, 09:08:40 PM ---Hello dooie, sorry for the late reply.
Doing a quick look at that mod it looks like $context['num_chat'] holds the actual number of persons in the chat and that part is already included on the chat button, do you don't see the number next to the button? there is a setting somewhere in the mod admin panel to show the users count, did you have this option enable?
--- End quote ---
Hi Suki,
Yes, in the admin panel, I do have the box checked to display number of users on Chat button
See attached.
I truly hope you can help me, I have found another SMF member seeking the same information here...
http://www.simplemachines.org/community/index.php?topic=139769.1600
Cheers.
Navigation
[0] Message Index
[#] Next page
Go to full version