Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
'Clean' sessionhash, a 'backport' from vB 3 Details »»
'Clean' sessionhash, a 'backport' from vB 3
Version: 1.00, by Brad Brad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 07-16-2003 Last Update: Never Installs: 1
Is in Beta Stage  
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-17-2003, 03:24 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I ment to post this in the beta hacks forum, when a mod see's this thread please move it there. Thanks
Reply With Quote
  #3  
Old 07-17-2003, 03:35 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-02-2004, 11:42 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice and nifty!! I will try as soon as i uploaded the RC1
Reply With Quote
  #5  
Old 01-02-2004, 11:43 PM
<jay> <jay> is offline
 
Join Date: Apr 2003
Location: Germany
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

-]
Quote:
Originally Posted by MindTrix
Nice and nifty!! I will try as soon as i uploaded the RC1
same with me.
=)
Reply With Quote
  #6  
Old 01-02-2004, 11:47 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, this isn't a vb3 hack, seems someone has moved it into thw wrong cat accidently..
Reply With Quote
  #7  
Old 01-02-2004, 11:47 PM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will install Thanks a lot Brad!
Reply With Quote
  #8  
Old 01-03-2004, 12:58 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is great - but vb3 still uses the ulgy long sessions ...
Reply With Quote
  #9  
Old 03-31-2004, 06:57 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:10 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.05793 seconds
  • Memory Usage 2,283KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete