Friend request notification code for private message notification.
Posted January 15th 2012, 7:05pm
How i use friend request notification popup code for private message notification too ?
with friend request notification popup, just it disappear (even with making refresh) when i click close, and this is good! because auto refresh code is installed in the forum.

What is the wrong here?

    var CopyrightNotice = 'Friend request notification for forumotion phpBB3 and IPB2/Invision boards. Copyright © 2011 by Dion Designs. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified script. Distribution is not allowed without written consent from Dion Designs.';

    var Modification="Slight Modification from LGforum @ AvacWeb.com, for PunBB. Credits to Dion";
    function setupbox() {
            var z=document.getElementById('privMsgPopUp');
            var x=z.firstChild.lastChild.previousSibling.previousSibling.innerHTML;
            if (x.indexOf('title="Accept"')>0) {
                z.innerHTML='<a href="/privmsg?folder=inbox">You have a new Private Message</a>';
                document.getElementById('privMsgPopUp').style.display='block';
            }
            else { z.innerHTML=""; }
        }

        $(function() {
            x=document.createElement('div');
            x.id='privMsgPopUp';
            x.style.display='none';
            x.innerHTML='<div id="privMsgPopUp"></div><a style="cursor:pointer" class="button2" onclick="$(\'#privMsgPopUp\').fadeOut()">Close</a>';
            document.body.insertBefore(x,document.body.firstChild);
            $('#privMsgPopUp').load('/privmsg?folder=inbox #main-content .main', function() { setupbox();});
        });

φ
Posts: 63
Joined: November 7th 2011, 12:00am
Likes Received: 4
Friend request notification code for private message notification.
Posted January 16th 2012, 5:41am
You don't want to use this code for private message pop up. This code uses Ajax, which is not needed for private message pop up.

Take a look at this thread: [url=/t8590-private-messages-counting]http://www.diondesigns.org/t8590-private-messages-counting[/url]

It gets the number of new messages when there are new messages. You will be able to edit the codes in that thread to make something pop up.
φ
Posts: 509
Joined: July 9th 2011, 11:00pm
Location: England
Likes Given: 15
Likes Received: 26
Friend request notification code for private message notification.
Posted January 16th 2012, 10:18am
I cannot understand what you mean.

Ok, can i edit your code (pop up for PM's) here
[url=/t8564-a-christmas-gift-vm-notifications#11521]http://www.diondesigns.org/t8564-a-christmas-gift-vm-notifications#11521[/url]
to make it disappear just when i click close.
φ
Posts: 63
Joined: November 7th 2011, 12:00am
Likes Received: 4

Who is online

Users browsing this forum: No registered users and 0 guests