![]() |
Ajax notification of a new personal message
A small mod that puts a flashing envelope in the top right corner of your screen when you get a new personal message, even if youre sitting idle. You dont have to open / reload any pages to see the notification
My default, it checks once per minute but its configurable in the javascript PLEASE - Read the instructions, anything in there that is asked here will be ignored or simply a RTFM reply. Ive tried it with FF2 / IE6 and Opera 9.21. Ive tried it on two forums running 3.6.5 but it should work on 3.6.0-3.6.7 Edit footer template, add this to the very bottom HTML Code:
<if condition="$bbuserinfo[userid] > 0"> HTML Code:
<script type="text/javascript" src="clientscript/vbulletin_ajax_checknewpm.js"></script> Find this HTML Code:
<strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if> HTML Code:
<if condition="$vboptions[ajaxchecknewpm_position]=='N'"> HTML Code:
<if condition="$bbuserinfo['pmunread']"> HTML Code:
setTimeout("checkNewPM()", checkdelay); Upload 1 GIF file Upload 1 Javascript file Import 1 XML product Makes 1 plugin hook into misc.php (adds ajaxchecknewpm function) History 19 July 2007 Version 1.1
if you have 1.0 installed, youll need to upload the Jaavscript file again, uninstall / reinstall the XML product and make the template changes to footer (not headerinc) and add 1 to navbar |
First post reserved
|
now this seems really usefull.. I'm going to try it out :D
great hack! |
I shall test this out!
Thanks mate! |
Cool, something similar to what vb.org has but ajax ^^ i like :)
|
as i read the instruction , it check the pm box each X min ( we can change it ) . is there anyway that JUST when we get a new pm it works and it inform us that we get new pm ? i think it s better for load the server in each X min or ..
Thanks |
Now this seems nice! Question though - I've already installed New PM Notification - would love to implement the ajax feature... Anyway - that I could have the blinking notification of your hack appear in the navbar like the New PM Notification mod?
Thanx, Jacquii. |
Good work
|
You can put the hack anywhere you like. most of the template change is to have it float but will I was working on the code, it did actually start in the navbar :)
Ill give people a couple of options, floating or in the navbar, you can pick in the options for it. Poet - Ill do that but it looks a bit strange "You have no new PMs" and then a flashing envelope :) I did find a bug this morning though, after posting this of course :( If youre a guest, it still asks the server for your PM count. As youre a guest, you get permission denied that causes two things. Firstly, IE borks on it if you have Microsoft Script Debugger installed (go figure, IE sucks) and it ups your bandwidth bill. Ill upload v1.1 tonight that will fix all that. If you dont want it to hit the server but still want the flashing floating icon, set the timer to 5 million or something insane. It still checks everytime the page is loaded. |
As promised, 1.1 attached.
|
More AJAX is always a good thing! Thanks. :)
|
When you click logout the icon hovers in the up right corner of your page.
|
Oh, Ill look at that one.
|
Nice mod. I just found out from a user and confirmed this problem.
When the user logs out, the mailbox icon appears in the upper right hand corner immediately following log out. This makes them think there is a PM when, in fact, there is no PM but it is somehow appearing during logout. |
how can we make it so it just flashes red text, I dont like this lil graphic to the right, would rather have blinking red font saying "New Private Message"
|
works great thanks
|
Quote:
HTML Code:
<td class="alt2" valign="top" nowrap="nowrap"> Since the visibility of the ajaxnewpmdiv element is controlled by JavaScript code, anything within the <span id="ajaxnewpmdiv"> ... </span> block will be "revealed" when a new private message arrives. - Dan |
I've extended this mod so when a new PM arrives, the "Unread" and "Total" counts are updated dynamically via Ajax as well.
If enough people are interested, I'll post how to do it. - Dan |
i would be interested in how you get the unread and total counts to update as well as the flashing indication
|
Interested here as well.
Also, I'd love for this to go on the left side of the welcome box. In the navbits, I believe? Is that possible? |
yeah, thats in navbar. Ive got my head deep in an integration of vb and stopforumspam.com but Ill sort them all when Im done :)
|
you can place the <DIV>code</div> anywhere you want in the navbar template, or replace the GIF with anything you like
|
Quote:
|
Sorry for the wait.
Hopefully this helps. |
Installed it but it shows up at the top right corner of my forum is there anyway so it appears just beside the your notifications or Private Messages Link ?
|
Beauts...
|
Pedigree,
Have you figured out how to do what's mentioned in posts #23,24? I'd really appreciate it! |
Dancue, PM me a link to your forum so I can look at the HTML for your template.
Coding around template / theme changes can be a real pain in the a** sometimes. You cant code for every template :( |
Why not make a js file and just link to it? It would save adding so much code to the footer.
|
Could link to a js file but Ive had other people hot linking to js files on my site before, no thanks. If people want to do that, then they can do that.
|
If they are linking to it then you are not doing it properly.
|
I just got 3.7 will this work on that forum software? Really like this mod
|
I would like to add this mod to my Live Page
http://www.dieselbombers.com/vaispy.php Can i just add the code to the php file ? |
All times are GMT. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|