The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Trying to exclude a template using This Script but I keep getting errors
Ive read the posts and tried several ways but all keep giving me errors. Im using 4.2 on a php5 server. Any help would be great. Thanks.
All Im trying to do is exclude a template from one specific page using the "This Script" from that page. Code:
<if condition="THIS_SCRIPT != 'model_paint_database'"> stuff to show on all pages except model_paint_database page </if> Code:
The following error occurred when attempting to evaluate this template: %1$s This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. Code:
Warning: Invalid argument supplied for foreach() in ..../includes/functions.php on line 3822 Actually, I just noticed something and I need to exclude it from 2 pages. It runs a JS that conflicts with those 2 pages. Thanks again. |
#2
|
||||
|
||||
It looks like you're using vB 3.x template logic.
|
#3
|
||||
|
||||
I followed directions for VB4 but you may be right.
The plugin for the template is Code:
$templater = vB_Template::create('quickcalc'); $templatevalues['quickcalc'] = $templater->render(); vB_Template::preRegister('quickcalc', $templatevalues); $templater = vB_Template::create('footer'); $templatevalues['footer'] = $templater->render(); vB_Template::preRegister('footer', $templatevalues); Code:
{vb:raw quickcalc} So, any ideas on how to exclude this template from just 2 pages? |
#4
|
||||
|
||||
What I mean is you want to use the following format within the template:
Code:
<vb:if condition="THIS_SCRIPT != 'model_paint_database'"> stuff to show on all pages except model_paint_database page </vb:if> |
#5
|
||||
|
||||
Good lord, how did I not see that? Works perfectly on the one page.
Any clue how to exclude on two pages? You know This Script and This Script. I cant find how to do this. And thanks for the help.... --------------- Added [DATE]1550986504[/DATE] at [TIME]1550986504[/TIME] --------------- Nevermind I just hardcoded the 2nd page to exclude that template. Its not ideal but it works. |
#6
|
||||
|
||||
If you want to exclude multiple scripts, I would use for the condition:
Code:
!in_array(THIS_SCRIPT, array(script1, script2, ...)) |
Благодарность от: | ||
Scalemotorcars |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|