2015-01-28, 01:01 PM
Pages: 1 2
2015-01-28, 01:15 PM
have you tried it ? it might work without any changes.
2015-01-29, 03:35 AM
I have not tried it, but do you think work
2015-01-29, 05:30 AM
That shouldn't work for the inferno shoutbox, only the DVZ one. A quick patch for the inferno shoutbox would be replacing in inferno.js.php
with
and in class_core.php changing
to
You will have to add a sound file yourself and add the path that you use for your sound file to inferno.js.php on this line
In this case, I have it pointing to a file in my inferno folder called sound.ogg
Good luck with this working and I probably won't add this to my copy of it, since this really is a hacky way of doing it (the sound will probably be delayed by half a second) and with the way the shoutbox works, there really isn't a cleaner way of doing it.
if (this.tab != -1)
{
this.tab = -1;
this.shoutbox_content.innerHTML = 'Loading...';
this.load_shouts();
}
if (this.tab == -1)
{
this.interval = setInterval(function() {
if (inferno.tab == -1)
{
if (inferno.is_idle() == false)
{
if (inferno.anus)
{
if (inferno.manage_anus())
{
inferno.load_shouts();
inferno.close_anus();
}
}
else
{
inferno.load_shouts();
}
}
}
}, this.refresh_rate);
inferno.update_idle_time();
}
}
with
if (this.tab != -1)
{
this.tab = -1;
this.shoutbox_content.innerHTML = 'Loading...';
this.load_shouts();
var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want.
}
if (this.tab == -1)
{
this.interval = setInterval(function() {
if (inferno.tab == -1)
{
if (inferno.is_idle() == false)
{
if (inferno.anus)
{
if (inferno.manage_anus())
{
inferno.load_shouts();
inferno.close_anus();
}
}
else
{
inferno.load_shouts();
}
if (inferno.manage_anus())
{
audio.play();
console.log("played file");
inferno.close_anus();
}
}
}
}, this.refresh_rate);
inferno.update_idle_time();
}
}
and in class_core.php changing
public function update_anus()
{
if ($this->anus)
{
$fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w');
fwrite($fp, TIME_NOW);
return fclose($fp);
}
return false;
}
to
public function update_anus()
{
if (true)
{
$fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w');
fwrite($fp, TIME_NOW);
return fclose($fp);
}
return false;
}
You will have to add a sound file yourself and add the path that you use for your sound file to inferno.js.php on this line
var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want.
In this case, I have it pointing to a file in my inferno folder called sound.ogg
Good luck with this working and I probably won't add this to my copy of it, since this really is a hacky way of doing it (the sound will probably be delayed by half a second) and with the way the shoutbox works, there really isn't a cleaner way of doing it.
2015-01-29, 05:38 AM
oh! somehow I overlooked the requirement Thank You Clank
2015-01-29, 01:44 PM
(2015-01-29, 05:30 AM)Clank Wrote: [ -> ]That shouldn't work for the inferno shoutbox, only the DVZ one. A quick patch for the inferno shoutbox would be replacing in inferno.js.php
if (this.tab != -1) { this.tab = -1; this.shoutbox_content.innerHTML = 'Loading...'; this.load_shouts(); } if (this.tab == -1) { this.interval = setInterval(function() { if (inferno.tab == -1) { if (inferno.is_idle() == false) { if (inferno.anus) { if (inferno.manage_anus()) { inferno.load_shouts(); inferno.close_anus(); } } else { inferno.load_shouts(); } } } }, this.refresh_rate); inferno.update_idle_time(); } }
with
if (this.tab != -1) { this.tab = -1; this.shoutbox_content.innerHTML = 'Loading...'; this.load_shouts(); var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want. } if (this.tab == -1) { this.interval = setInterval(function() { if (inferno.tab == -1) { if (inferno.is_idle() == false) { if (inferno.anus) { if (inferno.manage_anus()) { inferno.load_shouts(); inferno.close_anus(); } } else { inferno.load_shouts(); } if (inferno.manage_anus()) { audio.play(); console.log("played file"); inferno.close_anus(); } } } }, this.refresh_rate); inferno.update_idle_time(); } }
and in class_core.php changing
public function update_anus() { if ($this->anus) { $fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w'); fwrite($fp, TIME_NOW); return fclose($fp); } return false; }
to
public function update_anus() { if (true) { $fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w'); fwrite($fp, TIME_NOW); return fclose($fp); } return false; }
You will have to add a sound file yourself and add the path that you use for your sound file to inferno.js.php on this line
var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want.
In this case, I have it pointing to a file in my inferno folder called sound.ogg
Good luck with this working and I probably won't add this to my copy of it, since this really is a hacky way of doing it (the sound will probably be delayed by half a second) and with the way the shoutbox works, there really isn't a cleaner way of doing it.
if you've tried?
I have tried but have not come out of his voice.
2015-01-29, 09:10 PM
(2015-01-29, 01:44 PM)Newbie22 Wrote: [ -> ](2015-01-29, 05:30 AM)Clank Wrote: [ -> ]That shouldn't work for the inferno shoutbox, only the DVZ one. A quick patch for the inferno shoutbox would be replacing in inferno.js.php
if (this.tab != -1) { this.tab = -1; this.shoutbox_content.innerHTML = 'Loading...'; this.load_shouts(); } if (this.tab == -1) { this.interval = setInterval(function() { if (inferno.tab == -1) { if (inferno.is_idle() == false) { if (inferno.anus) { if (inferno.manage_anus()) { inferno.load_shouts(); inferno.close_anus(); } } else { inferno.load_shouts(); } } } }, this.refresh_rate); inferno.update_idle_time(); } }
with
if (this.tab != -1) { this.tab = -1; this.shoutbox_content.innerHTML = 'Loading...'; this.load_shouts(); var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want. } if (this.tab == -1) { this.interval = setInterval(function() { if (inferno.tab == -1) { if (inferno.is_idle() == false) { if (inferno.anus) { if (inferno.manage_anus()) { inferno.load_shouts(); inferno.close_anus(); } } else { inferno.load_shouts(); } if (inferno.manage_anus()) { audio.play(); console.log("played file"); inferno.close_anus(); } } } }, this.refresh_rate); inferno.update_idle_time(); } }
and in class_core.php changing
public function update_anus() { if ($this->anus) { $fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w'); fwrite($fp, TIME_NOW); return fclose($fp); } return false; }
to
public function update_anus() { if (true) { $fp = fopen(MYBB_ROOT . 'inc/plugins/inferno/anus.php', 'w'); fwrite($fp, TIME_NOW); return fclose($fp); } return false; }
You will have to add a sound file yourself and add the path that you use for your sound file to inferno.js.php on this line
var audio = new Audio("./inc/plugins/inferno/sound.ogg"); //Change this to the sound file you want.
In this case, I have it pointing to a file in my inferno folder called sound.ogg
Good luck with this working and I probably won't add this to my copy of it, since this really is a hacky way of doing it (the sound will probably be delayed by half a second) and with the way the shoutbox works, there really isn't a cleaner way of doing it.
if you've tried?
I have tried but have not come out of his voice.
I did try it and the code works perfectly on my end. You do need to add your own sound file though and change the line of code that I noted to the path of your own sound file.
2015-01-29, 11:47 PM
In version 2 I will add full functionality for sound so you don't have to deal with this in the future
2015-01-30, 08:29 AM
I've put the sound file in Cpanel with .ogg format but when I test no sound if I can wear .mp3 format?
2015-01-30, 05:22 PM
(2015-01-30, 08:29 AM)Newbie22 Wrote: [ -> ]I've put the sound file in Cpanel with .ogg format but when I test no sound if I can wear .mp3 format?
You can use whatever format your browser supports. I know mine uses ogg and I had an ogg file handy, so that's what I used. For best compatibility, I would suggest mp3.
Pages: 1 2