Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 06 Jan 2017, 15:51
JamesAB JamesAB is offline
 
Join Date: Jan 2004
Is it possible to use SERVER variables in templates?

I'm looking to do something like this PHP code:

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

But I would prefer to put it in individual templates because I only want to use it on a few pages.

Is there a "template friendly" version for similar code?
Or do I have to find a hook to place this sort of thing in?
__________________
Custom HTTP Error Pages
Reply With Quote
  #2  
Old 06 Jan 2017, 15:59
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
So you're looking to do the redirect in the template? I wouldn't recommend doing that since you have to rely on the meta redirect tag or a JavaScript redirect which is worse than a normal redirection through a header.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 06 Jan 2017, 16:12
JamesAB JamesAB is offline
 
Join Date: Jan 2004
Thanks for the advice?

What would be the best hook location to try to do something similar via PHP?

I need to compare variables to determine if the user is a guest and also what script/page they are viewing before determining to redirect to https or not.
__________________
Custom HTTP Error Pages
Reply With Quote
  #4  
Old 06 Jan 2017, 16:33
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Try the hook "init_startup", that should be the first hook in vBulletin to be executed.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:18.

Layout Options | Width: Wide Color: