The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
What's wrong with this flashing code?
We're trying to make a flashing PM indicator. The reason why we can't use one of the others already out is because our style already uses a gif image in the background for the PM section. So what we're trying to do is to make it flash when a new PM arrives. The second image is called pmalert.gif. Ypu can ignore the mem_left.gif and mem_right.gif images. Here is the code that we've made so far:
HTML Code:
<!-- nav buttons bar --> <div align="center"> <table width="30%" cellpadding="0" cellspacing="0" align="center"><tr> <td><img src="$stylevar[imgdir_misc]/mem_left.gif" alt="" border="0" /></td> <td width="50%" class="membersbar"> </td> <td width="40%" align="center" class="membersbar"> <if condition="$show['pmstats']"> <phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if> <else /> <if condition="$bbuserinfo['pmunread']"> <img src="$stylevar[imgdir_misc]/pmalert.gif" alt="" border="0" /> </if> </td> <td><img src="$stylevar[imgdir_misc]/mem_right.gif" alt="" border="0" /></td> </tr></table> </div> <!-- / nav buttons bar --> Thanks. |
#2
|
|||
|
|||
<if condition="">
stuff <else /> stuff </if> |
#3
|
|||
|
|||
Are you saying to make it like this?
HTML Code:
<if condition="$show['pmstats']"> <phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if> <else /> <img src="$stylevar[imgdir_misc]/pmalert.gif" alt="" border="0" /> </if> Because we're getting an error when we try that: Quote:
|
#4
|
|||
|
|||
You've simply got the tags wrong.
You have: <if condition==""> stuff </if> <else /> <if condition=""> </if> What you need is: <if condition=""> stuff <else /> <if condition=""> stuff </if> </if> The basic structure is <if> blah <else /> blah </if> If youwant to embed an conditional with in the else statement then it needs to be self contained so <if> blah <else /> <if>blah</if> </if> but the wrapping conditional needs to still maintain the same structure. HTML Code:
<!-- nav buttons bar --> <div align="center"> <table width="30%" cellpadding="0" cellspacing="0" align="center"><tr> <td><img src="$stylevar[imgdir_misc]/mem_left.gif" alt="" border="0" /></td> <td width="50%" class="membersbar"> </td> <td width="40%" align="center" class="membersbar"> <if condition="$show['pmstats']"> <phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase> <else /> <if condition="$bbuserinfo['pmunread']"> <img src="$stylevar[imgdir_misc]/pmalert.gif" alt="" border="0" /> </if> </if> </td> <td><img src="$stylevar[imgdir_misc]/mem_right.gif" alt="" border="0" /></td> </tr></table> </div> <!-- / nav buttons bar --> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|