MyBB Community Forums

Full Version: Ajax PM Notification
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use this plugin http://mods.mybb.com/view/ajax-pm-notification
And i add sound when PM.
And i want when PM change title of page, but with it i have problem.

And will be cool if it will be blink, like:
*** One PM **** >> Again original Title "MyBB forum">> *** One PM ****
Any help?
still need help...
(2012-12-12, 09:31 PM)blackHat Wrote: [ -> ]And i want when PM change title of page, but with it i have problem.

And will be cool if it will be blink, like:
*** One PM **** >> Again original Title "MyBB forum">> *** One PM ****

Open /inc/plugins/ajaxpmnotice.php and go to line 109.

Find:
function ajaxpmnotice()

And replace it with:
var orig_title = document.getElementsByTagName("title")[0].innerHTML;
var new_title = "New unread PM";
var blink_interval = 1000

setInterval(function() {
    if ($(\'ajaxpmnotice\').innerHTML.length > 0) {
        title = document.getElementsByTagName("title")[0];

        title.innerHTML = (title.innerHTML == orig_title) ? new_title : orig_title;
    }
}, blink_interval);
function ajaxpmnotice()

Change 'new_title' to whatever you want the blinking title to be, and 'blink_interval' to the amount of milliseconds of delay between each blink.
(2012-12-18, 02:01 PM)Beardy Wrote: [ -> ]
(2012-12-12, 09:31 PM)blackHat Wrote: [ -> ]And i want when PM change title of page, but with it i have problem.

And will be cool if it will be blink, like:
*** One PM **** >> Again original Title "MyBB forum">> *** One PM ****

Open /inc/plugins/ajaxpmnotice.php and go to line 109.

Find:
function ajaxpmnotice()

And replace it with:
var orig_title = document.getElementsByTagName("title")[0].innerHTML;
var new_title = "New unread PM";
var blink_interval = 1000

setInterval(function() {
    if ($(\'ajaxpmnotice\').innerHTML.length > 0) {
        title = document.getElementsByTagName("title")[0];

        title.innerHTML = (title.innerHTML == orig_title) ? new_title : orig_title;
    }
}, blink_interval);
function ajaxpmnotice()

Change 'new_title' to whatever you want the blinking title to be, and 'blink_interval' to the amount of milliseconds of delay between each blink.
Super! Big Grin
Thx