Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
'Clean Sessionhash' (1.3 released, all bug's fixed) Details »»
'Clean Sessionhash' (1.3 released, all bug's fixed)
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-17-2003 Last Update: Never Installs: 7
 
No support by the author.

Hack: Clean sessionhash 1.3

With this hack installed bits in the url (s=) used for the sessionhash in all vBulletin powered links will be striped when the sessionhash is not in use.

For example, when the sessionhash is off a link on your forum will look like:

Quote:
index.php?s=
Or if a action is used:

Quote:
index.php?s=&action=somthing
With this hack installed the s= and un-needed & will be striped out. And will look like this:

Quote:
index.php?
and:

Quote:
index.php?action=somthing
How to install:

1: Apply the change to sessions.php listed in the attachment.

2: Edit all templates containing the $session[sessionhash] variable, I am not including a steap by steap template instructions because they vary so much between differnt styles. You will have to do this yourself.

You have to look for two things, links in this format "?s=$session[sessionhash]" should be changed to just "?$session[sessionhashnoamp]". Also links in this format "?s=$session[sessionhash]&" need to be changed to "?$session[sessionhashamp]"

The old $session[sessionhash] var still works as it normally would, so your board will not break if you miss some templates.

Warning!!: Do not edit links that use $session[dbsessionhash]!

This hack is not for the faint of heart to install, it will take some time.

1.3 Released ([high]Stable[/high]):

Fixed error in one line of code, hack will work without problems and has been deemed stable, tested with 2.3.0, and 2.2.8.

1.2 Released:

Missed line in block of code, untested. [high]If running upgrade to 1.3[/b]

Show Your Support

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

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

You can try to use vBulletin's built in template search/replace system but it has always failed to get all the templates updated for me. Also doing it with replacements would be useless because you would still have to update all the templates with links in them for it to work.
Reply With Quote
  #13  
Old 07-20-2003, 08:05 PM
Xelation's Avatar
Xelation Xelation is offline
 
Join Date: Jan 2002
Location: Buffalo, New York
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

worked thanks
Reply With Quote
  #14  
Old 07-20-2003, 08:06 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah i ment the search replace thingy lol

also your step 2 m8

do i change all $session[sessionhash] that i find ???

or just the ones in links ??? just under your step 2

ie

?s=$session[sessionhash]

and

?s=$session[sessionhash]&

ok i have this in one of my templates .. if you tell me what to do with that then i am sure i can work it out

<input type="hidden" name="s" value="$session[sessionhash]">

i dunno what to do with that ???

sorry i can be a right donut sometimes
Reply With Quote
  #15  
Old 07-20-2003, 08:07 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IMO the best way to do it would be with a preg_replace in the dovars() function that would remove all instatnces of:
  • ?s=
  • &s=
  • amp;s=

when the condition used in the hack is true, not fool proof, but easier then editing all the templates.
Reply With Quote
  #16  
Old 07-21-2003, 02:41 AM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AL:

I have noticed on my board that the sessionhash numbers are removed anyway without having to remove anything from the templates.

Great hack.

Parker
Reply With Quote
  #17  
Old 07-21-2003, 05:52 AM
Limitter Limitter is offline
 
Join Date: Aug 2002
Location: Germany
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

worked great thanks

L.
Reply With Quote
  #18  
Old 07-21-2003, 12:43 PM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parker...

When I use this wihtout mods to the templates and I have my profile set to use cookies (Thus no session #'s), it STILL uses session numbers. Without the hack installed it does not use session numbers. Does the same on your site.

So, not sure why, but it does not seem right in this case.

David
Reply With Quote
  #19  
Old 07-21-2003, 07:45 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't have the problem with the session numbers showing up when I used the automatically log in turned on but had the browse this board with cookies turned off. So with that option turned on the sessionhash number aren't getting removed.

Parker
Reply With Quote
  #20  
Old 07-22-2003, 11:00 AM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

definetly doesn't work for me.

with this hack, it gives a hash and the s=, w/o it, just the s=.

D
Reply With Quote
  #21  
Old 07-22-2003, 11:33 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

7th:

Did you do the required modification to your templates has noted in post #1 of this thread?
Reply With Quote
Reply

Thread Tools

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 03:43 PM.


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.08361 seconds
  • Memory Usage 2,292KB
  • Queries Executed 25 (?)
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
  • (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
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete