vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   'Clean' sessionhash, a 'backport' from vB 3 (https://vborg.vbsupport.ru/showthread.php?t=55347)

Brad 07-16-2003 10:00 PM

'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:

Quote:

/forum/showthread.php?s=5u302156091280j&threadid=1
But when they do turn on cookies, parts of the sessionhash are still lingering around:

Quote:

/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:

Quote:

/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.

Brad 07-17-2003 03:24 AM

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

Erwin 07-17-2003 03:35 AM

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.

MindTrix 01-02-2004 11:42 PM

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

<jay> 01-02-2004 11:43 PM

-]
Quote:

Originally Posted by MindTrix
Nice and nifty!! I will try as soon as i uploaded the RC1 :)

same with me.
=)

Xenon 01-02-2004 11:47 PM

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

Koutaru 01-02-2004 11:47 PM

Will install :) Thanks a lot Brad!

gmarik 01-03-2004 12:58 PM

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

Kaelon 03-31-2004 06:57 PM

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

FIND:

Code:

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

REPLACE WITH:

Code:

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?


All times are GMT. The time now is 12:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01188 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete