Who is online?
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests None
Most users ever online was 246 on Tue 31 Jan - 2:47
Statistics
We have 150 registered usersThe newest registered user is Luxic
Our users have posted a total of 2050 messages in 200 subjects
Latest topics
» A small shareby Flora Today at 21:03
» Edit the 404 page on Forumotion
by LGforum Today at 15:29
» How to Change The Homepage?
by LGforum Today at 15:28
» Counter for my notices box
by Niko Today at 15:03
» 21. Show Recent Topics Preview In Accordion
by ReBoRN Yesterday at 19:08
AvacDom: Private Message Pop Up List
Page 1 of 1 • Share •
AvacDom: Private Message Pop Up List
This tutorial is based off of this: http://www.avacweb.com/t161-avacdom-selector-method
If you haven't read that thread then you should do so now, as it is needed for this tutorial.
The script in this tutorial is based off of my own selector system, which you will have seen in the topic above.
This is the first tutorial out of (hmm, not decided how many yet) of my tutorials based off of the topic above.
What the script will do, is it will add an onclick function to the link in the navbar which when clicked will pop up a nice little box underneath showing you your private messages. This means you can view your private messages from any page. AND each time you click the link (to open the box) the messages will be updated, so you can check if you have new messages without even refreshing!
Here's an image of the box:

Underneath it has the button to close it, and also a button to visit the inbox page.
So after installing the script, your Private message link in the navbar will pop up that box.
First of all you will need to add this to your CSS:
And then go to either an announcement box, or a new custom widget and place this in it:
(for phpbb3)
This code is for PHPBB3, in the next few days I will maybe share it for invision and PunBB.
The code uses AvacDom selectors for selecting elements. It also uses the avacLoad function which is used to load the inbox page, and grab the messages, then display it on the page.
In the meantime I wonder if anyone can figure it out for other board types. As it is only one line which needs change and that is this line:
var selector='#privmsgs-menu+[3](ul[1])';
But some CSS will need changing too.
So try learning this new AvacDom selector method and you'll be able to figure it out
Learn about it here: http://www.avacweb.com/t161-avacdom-selector-method
If you haven't read that thread then you should do so now, as it is needed for this tutorial.
The script in this tutorial is based off of my own selector system, which you will have seen in the topic above.
This is the first tutorial out of (hmm, not decided how many yet) of my tutorials based off of the topic above.
What the script will do, is it will add an onclick function to the link in the navbar which when clicked will pop up a nice little box underneath showing you your private messages. This means you can view your private messages from any page. AND each time you click the link (to open the box) the messages will be updated, so you can check if you have new messages without even refreshing!
Here's an image of the box:

Underneath it has the button to close it, and also a button to visit the inbox page.
So after installing the script, your Private message link in the navbar will pop up that box.
First of all you will need to add this to your CSS:
- Code:
#LGprivs {
position: absolute;
padding: 5px;
background: #e1ebf2;
border: 1px solid #c05;
max-width: 300px;
z-index: 999;
box-shadow: 3px 3px 3px #888;
}
#LGprivs .mark, #LGprivs input { display: none; }
a.avbtn {
background: #105289;
color: #fff;
cursor: pointer;
border: 1px solid #105289;
padding: 3px;
width: 50%;
display: block;
margin: 1px auto;
text-align: center;
font-weight: bold;
font-size: 11px;
}
a.avbtn:hover {
background: #e1ebf2;
color: #c05;
}
And then go to either an announcement box, or a new custom widget and place this in it:
(for phpbb3)
- Code:
<div id="LGprivs" style="display: none"></div>
<script>
var x=avac('#i_icon_mini_message<');
x ? x : avac('#i_icon_mini_new_message<');
x.setAttribute('onclick','loadPrivs(event);'); x.href="#";
function loadPrivs(e){
var x=avac('#LGprivs');
avac('body').appendChild(x);
var selector='#privmsgs-menu+[3](ul[1])';
x.style.top=e.clientY+10+'px';
x.style.left=e.clientX-20+'px';
avacLoad('/privmsg?folder=inbox '+selector,x,function(){
this.style.display="block"
this.innerHTML+='<br><a href="/privmsg?folder=inbox" class="avbtn">Visit Inbox</a><br><a onclick="jQuery(this.parentNode).hide()" class="avbtn">Close</a>';
});
}
</script>
This code is for PHPBB3, in the next few days I will maybe share it for invision and PunBB.
The code uses AvacDom selectors for selecting elements. It also uses the avacLoad function which is used to load the inbox page, and grab the messages, then display it on the page.
In the meantime I wonder if anyone can figure it out for other board types. As it is only one line which needs change and that is this line:
var selector='#privmsgs-menu+[3](ul[1])';
But some CSS will need changing too.
So try learning this new AvacDom selector method and you'll be able to figure it out
Learn about it here: http://www.avacweb.com/t161-avacdom-selector-method

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Re: AvacDom: Private Message Pop Up List
not working for me


pidot101
Status: . . .
Posts: 58
Join date: 2011-12-09
Age: 16
Re: AvacDom: Private Message Pop Up List
If I remember correctly, you use phpbb2, which this is for phpbb3.

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Re: AvacDom: Private Message Pop Up List
I switched to phpbb3..
i'm gonna try the codes again
i'm gonna try the codes again

pidot101
Status: . . .
Posts: 58
Join date: 2011-12-09
Age: 16
Re: AvacDom: Private Message Pop Up List
Today can't open messages unless get new message. Last two days working well.

redindian- Posts: 14
Join date: 2011-11-28
Age: 36
Location: Malaysia

Re: AvacDom: Private Message Pop Up List
i have the same problem...

pidot101
Status: . . .
Posts: 58
Join date: 2011-12-09
Age: 16
Re: AvacDom: Private Message Pop Up List
I'll look into it.

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum