Jump to content
xisto Community
miikerocks

Add Flashing Inbox To Invisionfree Forum Html code for invsiionfree

Recommended Posts

Do you find it annoying when you are on your invisionfree forum, and you get a new message, and it ends up taking you 5 minutes to notice? This code makes the inbox link flash bold red saying how many messages you have. In version 1 the word inbox stays the same, and doesnt change at all (for Example this is flashing: Inbox (2)

In version 2 (the second code) the word inbox changes to messages (constantly, so that if you have none, it says messages (0) instead of inbox (0). It still flashes Red

 

Put the following In the Header and Body Section (Admin Cp>>>Skinning and Styles>>>Board Wrapppers>>Header and Body):

Version 1:

 

<script>//New PM Flasher - By miikerocksuserLinks=document.getElementById('userlinks');if(userLinks.innerHTML.match("Inbox")){newMsg=false;a=userLinks.getElementsByTagName("A");for(i=0;i<a.length;i++)if(a[i].innerHTML.match(/Inbox\s\([0-9]+\)/)&&a[i].innerHTML.match(/[0-9]+/)>0)newMsg=i;if(newMsg){inbox=a[newMsg];inbox.style.fontWeight="Bold";inbox.style.color="red";flash();}}function flash(){if(inbox.style.visibility=="hidden")inbox.style.visibility="visible";else inbox.style.visibility="hidden";setTimeout("flash()",500)}</script><script type='text/javascript'><!--// Change the Inbox text at the user links// code by miikerocks// http://z11.invisionfree.com/FreeLoadse = document.getElementById('userlinks')a = e.getElementsByTagName('A')for (i =0; i < a.length; i++) {if (a[i].href.indexOf('act=Msg&CODE=01') != -1) {s = a[i].innerHTMLa[i].innerHTML = s.replace(/Inbox/, 'Inbox')break}}// --></script><% NAVIGATION %>

If you have anything else in the Header and Body section that is above the <% NAVIGATION %> tag, then highlight the

<% NAVIGATION %> Tag AS YOU PASTE THE CODE INTO YOUR FORUM.

 

 

If you wish to have the inbox link on your forum changed to messages, use this code I made. (AKA version 2)

 

<script>//New PM Flasher - By miikerocksuserLinks=document.getElementById('userlinks');if(userLinks.innerHTML.match("Messages")){newMsg=false;a=userLinks.getElementsByTagName("A");for(i=0;i<a.length;i++)if(a[i].innerHTML.match(/Inbox\s\([0-9]+\)/)&&a[i].innerHTML.match(/[0-9]+/)>0)newMsg=i;if(newMsg){inbox=a[newMsg];inbox.style.fontWeight="Bold";inbox.style.color="red";flash();}}function flash(){if(inbox.style.visibility=="hidden")inbox.style.visibility="visible";else inbox.style.visibility="hidden";setTimeout("flash()",500)}</script><script type='text/javascript'><!--// Change the Inbox text at the user links// code by miikerocks// http://z11.invisionfree.com/FreeLoadse = document.getElementById('userlinks')a = e.getElementsByTagName('A')for (i =0; i < a.length; i++) {if (a[i].href.indexOf('act=Msg&CODE=01') != -1) {s = a[i].innerHTMLa[i].innerHTML = s.replace(/Inbox/, 'Messages')break}}// --></script><% NAVIGATION %>

If you want it to flash a different color, or if you have problems/need help, Post below.

 

---miikerocks---

Share this post


Link to post
Share on other sites

Great Code! Except...

Add Flashing Inbox To Invisionfree Forum

 

I love this script! It works just as it should, except I have a problem.

 

On my forums, ALL links are bolded red font. I don't know too much javascript, but I could change the font color to white. Now I'd like to make it italicized instead of bolded. Is that possible?

 

If so, please email me, as I am on a public computer and cannot bookmark this page.

 

Thanks!

 

M Mazur

 

-reply by M Mazur

Share this post


Link to post
Share on other sites

My friend runs an Invisionfree Forum of which I am a member, and both of us are forever failing to notice when we have new PMs. So, thanks for this code - I think we'll both find it useful. Hey, this code should be a default function of Invision Forums!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.