Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Add Flashing Inbox To Invisionfree Forum, Html code for invsiionfree!!
miikerocks
post Jul 10 2008, 09:03 PM
Post #1


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 11
Joined: 10-July 08
Member No.: 64,866



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:

CODE
<script>//New PM Flasher - By miikerocks
userLinks=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>

&lt;script type='text/javascript'>
<!--
// Change the Inbox text at the user links
// code by miikerocks
// http://z11.invisionfree.com/FreeLoads
e = 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].innerHTML
a[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.


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

CODE
&lt;script>//New PM Flasher - By miikerocks
userLinks=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>

&lt;script type='text/javascript'>
<!--
// Change the Inbox text at the user links
// code by miikerocks
// http://z11.invisionfree.com/FreeLoads
e = 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].innerHTML
a[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---
Go to the top of the page
 
+Quote Post
iGuest
post Aug 22 2008, 06:26 AM
Post #2


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



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
Go to the top of the page
 
+Quote Post
gameratheart
post Sep 6 2008, 09:02 AM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 504
Joined: 14-November 05
From: Britannia!
Member No.: 14,287



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!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Put A Phpbb Login Box On Your Main Site.(18)
  2. How To Create A Phpbb Fm(52)
  3. Phpbb Forum Site Transfer(20)
  4. Pet/animal Care Forum(18)
  5. Putting A Signature On The Forum(35)
  6. Your First Autoit(4)
  7. Simple Scripts In Html And Javascript(7)
  8. Spice Up Your Forms(11)
  9. Aef Forum Modifications [resolved](3)
  10. How To Create Forum Smilies(3)
  11. How To Make A Decent Forum(8)
  12. Adding An Aef Forum To Snews Cms(2)
  13. Html Legend(9)
  14. Nice Clean Php Layout Coding.(7)
  15. Create A Simple Html Editor With Php And Javascript(3)
  1. Install An Aef Forum Onto The Trap17(11)
  2. Creating Navigation For Html Websites(12)
  3. Want-to-start Html Tutorials(2)
  4. Html Bdo...(13)
  5. Html Span(7)
  6. Cakephp On Ubuntu(0)
  7. How To Setup A Website After Your Forum(3)
  8. [php] Clean Code Functions(5)
  9. How To: Html Tables.(8)
  10. Invisionfree Skin How-to Put On Your Forum(1)
  11. Azurian Skin(0)
  12. How To Disable Flashing In Windows Freecell(0)
  13. Create Dynamic Html/php Pages Using Simple Vb.net Code(1)


 



- Lo-Fi Version Time is now: 13th October 2008 - 03:20 AM