Helpful Information
 
 
Category: vBulletin 2.x Beta Releases
'Clean' sessionhash, a 'backport' from vB 3

Hack: Clean sessionhash

By: Anime-loo


With this hack installed you no longer have the ugly 's=&' in forum url's when the sessionhash is needed. This is made to clone the way vb 3 handles the sessionhash.

Basicly, by default when a user is not using cookies on your forum they see something like this:

/forum/showthread.php?s=5u302156091280j&threadid=1

But when they do turn on cookies, parts of the sessionhash are still lingering around:

/forum/showthread.php?s=&threadid=1

This hack solves this problem, when a user is using cookies to stay logged in, the links are transformed to:

/forum/showthread.php?threadid=1

Much shorter, and alot cleaner imo. :)

vB 3 dose this stock, that is why backport is in the thread title ;)

How to install:

-Step 1:

Log into your admin cp, and go to the search area for templates.

In the 'Search string' put this:

s=$session[sessionhash]&

In the 'Replace string' put this:

$session[sessionhash]

Click the Find/Replace button, this will update your templates for the hack.

- Step 2:

Apply the changes to sessions.php, included in the attachment below.

I ment to post this in the beta hacks forum, when a mod see's this thread please move it there. Thanks :)

Okay, moving to Beta Hacks as requested. :)

Btw, this will not fix all the hardcoded links in PHP files. :) But it's a good idea - one reason why vB3 is great.

Nice and nifty!! I will try as soon as i uploaded the RC1 :)

Nice and nifty!! I will try as soon as i uploaded the RC1 :)
same with me.
=)

hmm, this isn't a vb3 hack, seems someone has moved it into thw wrong cat accidently..

Will install :) Thanks a lot Brad!

this is great - but vb3 still uses the ulgy long sessions ...

This is a good first step, but your code example is incorrect. It should read:

FIND:

if ($bbuserinfo['nosessionhash']==1) {
$session['sessionhash'] = '';
}

REPLACE WITH:

if ($bbuserinfo['nosessionhash']!=1)
{
$session['sessionhash'] = 's=' . $session['sessionhash'] . '&';
} else {
$session['sessionhash'] = '';
}

// vbulletin default
// if ($bbuserinfo['nosessionhash']==1) {
// $session['sessionhash'] = '';
// }

Otherwise, the Sessionhash will always be displayed. Erwin is right, though. This does not take into account $sessionhash[sessionid] - which is fairly prominent. Do you know where this variable is being defined?










privacy (GDPR)