vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Flashing new PM'S (https://vborg.vbsupport.ru/showthread.php?t=142948)

FRANKTHETANK 2 03-23-2007 06:43 PM

Flashing new PM'S
 
I have this code that makes pm's flash, my buddy made this in java and now i have no clue were to put it. I was gonna share this if someone can tell me what template to put it in.

Quote:

<script>//
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.vi sibility="visible";
else inbox.style.visibility="hidden";
setTimeout("flash()",500)
}
</script>

FRANKTHETANK 2 03-25-2007 06:52 PM

anyone?

MaestroX 03-25-2007 07:36 PM

I would paste the code into your "headerinclude" template right at the bottom. That should work :)

But i'm wondering why you are choseing to use a script when a vb template conditional will do just fine. Any reason?

FRANKTHETANK 2 03-26-2007 05:45 PM

Caz i could't find anything. I have no patience, once i look through 5 pages I give up. Bad trait to have on such a big site. Can you give me a name of something i can use.

MaestroX 03-28-2007 03:49 PM

You can use this conditional in your template:

Quote:

<if condition="$bbuserinfo['pmunread']">
<a href="private.php?$session[sessionurl]" rel="nofollow"><img src="$stylevar[imgdir_misc]/newpm.gif" alt="You have a new PM" border="0" align="right" /></a> </if>
It will display an image when a user has an uread pm. This can be modified to anything you need. :)


All times are GMT. The time now is 10:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01068 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete