Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 11 Feb 2009, 21:29
dfc005 dfc005 is offline
 
Join Date: Mar 2008
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 11 Feb 2009 at 21:32 ---------------

I'd also like to know if the same can be found out about the standard redirect as well.
__________________
Stick Sports

Last edited by dfc005 : 11 Feb 2009 at 21:32. Reason: Auto-Merged DoublePost
Reply With Quote
  #2  
Old 12 Feb 2009, 05:52
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Add plugins at error_generic and redirect_generic and create a variable that sets to true. Check this variable in your templates.
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 12 Feb 2009, 09:31
dfc005 dfc005 is offline
 
Join Date: Mar 2008
OK, have created a plugin at error_generic that has this simple bit of code....


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And the in my template I have this....


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Doesn't seem to be working though. Doesn't look like the template has the variable set.
__________________
Stick Sports
Reply With Quote
  #4  
Old 12 Feb 2009, 09:59
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Make sure that the variable is in global scope, add the following line as 1st line of that plugin:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #5  
Old 12 Feb 2009, 10:06
dfc005 dfc005 is offline
 
Join Date: Mar 2008
Nope, still doesn't set any value. I must be missing something....
__________________
Stick Sports
Reply With Quote
  #6  
Old 12 Feb 2009, 11:17
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Which template are you putting your code in?
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 12 Feb 2009, 11:22
dfc005 dfc005 is offline
 
Join Date: Mar 2008
It's a custom template that gets included via a different plugin. Could that be the problem?
__________________
Stick Sports
Reply With Quote
  #8  
Old 13 Feb 2009, 09:53
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
If the template is called before the variables are defined, it is not going to work.
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #9  
Old 13 Feb 2009, 10:28
dfc005 dfc005 is offline
 
Join Date: Mar 2008
So which gets called first? error_generic or parse_templates?
__________________
Stick Sports
Reply With Quote
  #10  
Old 13 Feb 2009, 11:37
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
parse_templates
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #11  
Old 13 Feb 2009, 11:39
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul Marsden
Turn debug mode on and you will see all the hooks that are called and in what order.
__________________


Lead Developer, vBulletin.Org & vBulletin.Com
Please do not PM me about custom work - I no longer undertake any.

Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Cable Forum - DigiGuide
Reply With Quote
  #12  
Old 15 Feb 2009, 22:04
dfc005 dfc005 is offline
 
Join Date: Mar 2008
Originally Posted by Dismounted View Post
parse_templates
Well then, I can't set a variable in error_generic to be used in parse_templates can I?

Any other ideas?
__________________
Stick Sports
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 08:41.

Layout Options | Width: Wide Color: