The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
guys, i want to combine this 2 conditional code, please help what is the right code to combine it, because its make my site a little slow to load, so maybe to combine it will make it faster to load so less queries to load
combine <if condition="$show['member']"> and <if condition="THIS_SCRIPT=='showthread'"> combine <if condition="$show['member']"> and <if condition="(THIS_SCRIPT != 'gtsearch') AND (THIS_SCRIPT != 'privacy')"> combine <if condition="$bbuserinfo['userid'] == 0"> and <if condition="(THIS_SCRIPT != 'gtsearch') AND (THIS_SCRIPT != 'privacy')"> |
#2
|
|||
|
|||
![]()
Combining your if conditions won't really make your pages load faster, since the same number of comparisons are being used, and an if condition doesn't really take long to execute in general, it's what is inside the conditional that is important.
In any case, combine them as such: <if condition="(CONDITION ONE) AND (CONDITION TWO)"> it could be two conditions in condition one for example for your last one <if condition="($bbuserinfo['userid'] == 0) AND ((THIS_SCRIPT != 'gtsearch') AND (THIS_SCRIPT != 'privacy'))" /> I trust you can do the rest on your own. |
#3
|
||||
|
||||
![]()
Braces are not needed when referring to single "elements". However, they are used like in maths. (Oh no! I have to do maths in vBulletin as well?!?
![]() |
#4
|
|||
|
|||
![]()
I just left them that way so he'd know where each one came from and can remove them later if he chooses :P
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|