Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: stuartf - helmikuu 23, 2006, 01:51:34 IP

Otsikko: Passing username or id from smf to another page
Kirjoitti: stuartf - helmikuu 23, 2006, 01:51:34 IP
Hi
I'm trying to link SMF to a guestmap and want to pass the user id or username from SMF to the page without having to append it to the end of a URL.

I can extract the $context variable and post what I want but I'd rather a find a better method.

Can't find anything in SSI to do it - I've also tried using session variables but doesn't seem to work.

Any simple pointers please?
Otsikko: Re: Passing username or id from smf to another page
Kirjoitti: sm2k - helmikuu 23, 2006, 09:57:52 IP
What's wrong with the method you mentioned?
Otsikko: Re: Passing username or id from smf to another page
Kirjoitti: Dannii - helmikuu 23, 2006, 10:10:09 IP
The $user_info and $context arrays that you get with SSI.php are the best way. What do you not like about them?
Otsikko: Re: Passing username or id from smf to another page
Kirjoitti: stuartf - helmikuu 24, 2006, 04:18:55 AP
Thanks

I've managed to do it by including SSI.php now and reading the variable from there .

I really like SMF an am very appreciative of the work that goes into it what I'm not so keen on is loading 50K+ to reload one variable  ;D

If I've got this wrong I'm sure you'll tell me!
Otsikko: Re: Passing username or id from smf to another page
Kirjoitti: sm2k - helmikuu 24, 2006, 12:01:03 IP
If your web host uses a php script cache then the overhead should be minimal.