PDA

View Full Version : correct formation of the session data for a plugin


stardotstar
05-11-2009, 08:43 AM
I am hacking together a plugin to get the portal page to display properly as a location - rather than location unknown in the who is online page and I can't form the URL properly since I suspect it has changed since the original hack was written.

I have this

$userinfo['where'] = '<a href="/forum/welcome.php?' . $vbulletin->session->vars['sessionurl'].'">Portal</a>';

and it returns a malformed url - I suspect that I need the vbulletin 3.8.2 formation of

$vbulletin->session->vars['sessionurl']

is that right? and can anyone assist me please?

Thanks in (vb)advance guys!

Dismounted
05-11-2009, 10:58 AM
What is the displayed URL?

Lynne
05-11-2009, 02:57 PM
I use the same session var on my 3.8.0 site.

stardotstar
05-12-2009, 06:20 AM
The URL it returns is:

http://www.archeli.com.au/forum/welcome.php?

do I need to declare the variable for it to be usable or something when making a custom plugin??

Dismounted
05-12-2009, 07:38 AM
$userinfo['where'] = '<a href="/forum/welcome.php' . $vbulletin->session->vars['sessionurl_q'] . '">Portal</a>';

stardotstar
05-13-2009, 08:58 AM
Thank you ! That has fixed it!