The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Standard Error Page
Is there some global function or check I can use to see if the current page is an error page? I have a custom right hand menu that I'd like to hide some stuff in when an error page is shown.
--------------- Added [DATE]1234391543[/DATE] at [TIME]1234391543[/TIME] --------------- I'd also like to know if the same can be found out about the standard redirect as well. |
#2
|
||||
|
||||
Add plugins at error_generic and redirect_generic and create a variable that sets to true. Check this variable in your templates.
|
#3
|
|||
|
|||
OK, have created a plugin at error_generic that has this simple bit of code....
PHP Code:
HTML Code:
<if condition="$hide_stuff != 'true'"> <div style="width:300px;float:left;margin-bottom:5px;"> $poll_sidebar </div> </if> |
#4
|
|||
|
|||
Make sure that the variable is in global scope, add the following line as 1st line of that plugin:
PHP Code:
|
#5
|
|||
|
|||
Nope, still doesn't set any value. I must be missing something....
|
#6
|
||||
|
||||
Which template are you putting your code in?
|
#7
|
|||
|
|||
It's a custom template that gets included via a different plugin. Could that be the problem?
|
#8
|
||||
|
||||
If the template is called before the variables are defined, it is not going to work.
|
#9
|
|||
|
|||
So which gets called first? error_generic or parse_templates?
|
#10
|
||||
|
||||
parse_templates
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|