• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
TaigaChat Pro Alert Sound Notification

TaigaChat Pro Alert Sound Notification 1.3

No permission to download
#1
it_ submitted a new resource:

TaigaChat Pro Alert Sound Notification - Adds a sound to each new massage in TaigaChat Pro

This mod will add a sound to each new message send in TaigaChat Pro.

Note: This mod will play the sound on each site you are displaying TaigaChat Pro at.

Note: It's not possible to disable or enable this mod somehow yet. This may are just some small lines to add though. Feel free to contribute your code to the discussion, I would highly appreciate it!

First download the resource and upload the files inside the upload folder to your forum's root directory.

edit: taigachat.js...
Read more about this resource...
 
#4
Thanks for this!

I have a big need for an on/off feature, though. I have users browsing at work, sound effects are not ideal for them, but I'd still like to use this feature. For their sake I will probably have to remove it unless I can give them the ability to disable sounds.

Maybe create a custom profile field and surround the play() commands with a conditional? That way muting is persistent across multiple sessions. I don't know enough to say whether that is possible or a desirable way of going about it.
 
Last edited:

oVR

Active member
#6
This might me out of the scope of this addon but can you develop a general notification for Taiga Chat?

I'm looking for it to show notification on top of the shoutbox/chatbox tab when there is an unviewed chat message.

To make this current addon more appealing you can implement something like this on top of the sound notification and let people toggle one or the other or both.
 

Junior

Well-known member
#9

CNK

Active member
#10
How users can temporarily stop the sound
1. Open up your Adblock Options (Requires adblock Plugin)
2. Click the Customize Tab
3. Manually Enter A Filter
4. Filter out :
http://www.YOURSITE.com/tcp_sound.mp3
http://www.YOURSITE.com/tcp_sound.ogg
I create a new custom user field:

Basic Information:
Field ID: SoundChat
Title: Alert sounds in the chat
Description: Enable / disable sound in chat
Display Location: Preferences

Options for Choice Fields:
Radio Buttons:
  • yes
  • no
General Options:
  • Field is required
  • Show during registration
  • User editable

I copied the file: taigachat.js and changed its name to taigachatSound.js
Then edited the taigachatSound.js according to: http://xenforo.com/community/resources/taigachat-pro-alert-sound-notification.2365/


I edited the template dark_taigachat_chatbox and dark_taigachat_popup:

In dark_taigachat_chatbox replaced:
Code:
<xen:require js="js/dark/taigachat.js?{xen:raw $taigachat.js_modification}" />
to:
Code:
<xen:if is="{$visitor.customFields.SoundChat} == 'yes'">
<xen:require js="js/dark/taigachatSound.js?{xen:raw $taigachat.js_modification}" />   
<xen:else />
<xen:require js="js/dark/taigachat.js?{xen:raw $taigachat.js_modification}" />   
</xen:if>


In dark_taigachat_popup replaced:
Code:
<script type="text/javascript" src="js/dark/taigachatSound.js?{xen:raw $taigachat.js_modification}"></script>
to
Code:
<xen:if is="{$visitor.customFields.SoundChat} == 'yes'">
<script type="text/javascript" src="js/dark/taigachatSound.js?{xen:raw $taigachat.js_modification}"></script>   
<xen:else />
<script type="text/javascript" src="js/dark/taigachat.js?{xen:raw $taigachat.js_modification}"></script>
</xen:if>

Now users can decide themselves whether they want to have enabled the sounds in account Preferences ;)
 

CNK

Active member
#15
Hmm .. If you have edited dark_taigachat_chatbox and dark_taigachat_popup it should work ok, check if the same thing {$visitor.customFields.SoundChat} display yes or now.
 
#19
Is there a way to adjust the volume on the sounds without users just adjusting the volume on their computer? The reason I ask is we use the chat while listening or watching a stream at the same time. The sounds plays a lot louder than everything else that is running sound.
 
#20
Template Errors: forum_list
  1. filemtime(): stat failed for js/dark/taigachat.js in /var/www/vhosts/xxxx/httpdocs/library/Dark/TaigaChat/Helper/Global.php, line 77:
    76: if ($xenOptions['xengalleryForumListRecent'] AND $xenOptions['xengalleryForumListPosition'] == ('top'))
    77: {
    78: $__output .= '