The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am working on some template modifications and have come across a problem on my 3.7.2 test board. I am trying to get something to show up in all areas of the forum except for a showthread page, blog page or social groups page.
Check out these following code samples and please tell me if I am doing something wrong... Code:
<if condition="THIS_SCRIPT != 'showthread'">not showthread<br /></if> <if condition="THIS_SCRIPT != 'blog'">not blog<br /></if> <if condition="THIS_SCRIPT != 'group'">not group<br /></if> Code:
<if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'memberlist' OR THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'faq'">if is script test<br /></if> Code:
<if condition="THIS_SCRIPT != 'showthread' OR THIS_SCRIPT != 'blog' OR THIS_SCRIPT != 'group'">not conditionals combined<br /></if> Why? Is it supposed to behave this way? What am I doing wrong? ![]() |
#2
|
||||
|
||||
![]()
That last example will of course always return true.
THIS_SCRIPT will always be not equal to either showthread, blog or group. Try using AND instead of OR. /SK |
#3
|
||||
|
||||
![]()
Nice and compact is always good
![]() Code:
<if condition="in_array(THIS_SCRIPT, array('index', 'forumdisplay', 'usercp', 'private', 'memberlist', 'search', 'faq'))">if is script test<br /></if> Code:
<if condition="!in_array(THIS_SCRIPT, array('showthread', 'blog', 'group'))">not conditionals combined<br /></if> |
#4
|
|||
|
|||
![]()
Brilliant! Thanks so much to both of you!
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|