Sound notification for DVZ Shoutbox 2.1.x, 2.2.x, 2.3.x
#1
This slight addition allows you to add a sound notification for DVZ Shoutbox when a new message is posted, using its internal hooks system.



1. Open the attached file and upload the dvz_shoutbox.mp3 file to the images/ directory on your server

.zip   dvz_shoutbox.zip (Size: 1.27 KB / Downloads: 1,438)

2. Open the dvz_shoutbox template (Global Templates) and add the following code after {$javascript}
<script>
dvz_shoutbox.callbacks['update'].push(function(){
    if ($('#shoutbox .entry.new').length) {
        var audio = new Audio(rootpath + '/images/dvz_shoutbox.mp3');
        audio.volume = 0.2;
        audio.play();
    }
});
</script>
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply


Messages In This Thread
Sound notification for DVZ Shoutbox 2.1.x, 2.2.x, 2.3.x - by Devilshakerz - 2015-01-26, 04:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)