Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Oct 2005, 19:28
RedFive RedFive is offline
 
Join Date: Nov 2004
Passing additional variables to page using vB authorisation

Hi all,

I have successfully set up a members' area on my site which uses vB as the authorisation and member list. It all works rather well, except for when I want to pass additional variables to a page using this system.

I am using the code from http://www.vbulletin.org/forum/showthread.php?t=61112 to log in to the members' area. I'm running vB 3.5.

The problem comes when I have a page that requires additional variables to be passed, eg: http://example.com/members/index.php?my_id=1. vB seems to nullify all variables being sent that are not vB variables. I am aware of the reasons for doing so, but don't know of a sensible way of retaining the values of my variables. for use later in the php script.

Specifically, the code I am using at the top of each member's page is as follows:


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

Can you assist please?

Many thanks in advance.
Reply With Quote
  #2  
Old 09 Oct 2005, 22:52
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004

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

__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #3  
Old 10 Oct 2005, 09:30
RedFive RedFive is offline
 
Join Date: Nov 2004
Originally Posted by MarcoH64
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thank you very much for your response. Might I just ask whether the code you supplied should be placed before or after the auth. section? I'd imagine it goes before global.php is called... is that correct?

Thanks again.

Last edited by RedFive; 10 Oct 2005 at 09:58. Reason: Typo
Reply With Quote
  #4  
Old 10 Oct 2005, 10:18
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Wrong

global.php will clear all var's. All coding (accept the 4 special arrays and some defines) should be done after global.php.

PS I just noticed that your var is called 'my_ip' and will probably not be numeric, so you better use TYPE_STR instead of TYPE_INT.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #5  
Old 10 Oct 2005, 11:28
RedFive RedFive is offline
 
Join Date: Nov 2004
Hmmm, okay, let's try this with a real-world example. Currently, I have my members' area coded as follows (which worked prior to vB 3.5).

The authorisation code is contained in checkauth.php located in the members' directory:


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

A centralised include file called global.php located in the members' directory is called at the top of every members' area page:


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

So, would I simply be able to do the following?


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

Originally Posted by RedFive
Hmmm, okay, let's try this with a real-world example. Currently, I have my members' area coded as follows (which worked prior to vB 3.5).

The authorisation code is contained in checkauth.php located in the members' directory:


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

A centralised include file called global.php located in the members' directory is called at the top of every members' area page:


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

So, would I simply be able to do the following?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
In fact, I'll answer my own question.

It works like a dream. Thanks MarcoH64 for your assistance!

Regards,

Red.

Last edited by RedFive; 10 Oct 2005 at 18:33. Reason: Automerged Doublepost
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 16:08.

Layout Options | Width: Wide Color: