vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Turn off session hash (https://vborg.vbsupport.ru/showthread.php?t=234586)

NeverBored 01-31-2010 03:02 AM

Turn off session hash
 
Is it possible to turn off the session hash in urls? Ideally of course in a plugin...

Marco van Herwaarden 01-31-2010 08:56 AM

Why would you want to do this? Session hash is only added if cookies can not be used.

NeverBored 01-31-2010 05:25 PM

Yes I know what it does and the ramifications. I'm mainly interested in doing this for guests only and even only a vb integrated section of my site (that I want to keep integrated and sessioned for members). I was hoping there was some way to simply kill the hash in a plugin, and I could tweak it from there to meet my needs.

NeverBored 02-03-2010 05:13 AM

Bump

Marco van Herwaarden 02-03-2010 07:56 AM

I still don't understand what your goal is by removing the hashes. It will break functionality if you would do that.

NeverBored 02-03-2010 04:05 PM

What's not to understand? I don't want the session hash in the url, that is my goal. Like I said, I know the functionality it will "break", it is of no concern. I don't think I can explain what I want to do any clearer. I didn't ask what it will do to remove the hash, I even said I know exactly what it would do, I just want to know how to remove it.

ChopSuey 02-04-2010 04:33 AM

You mean session ID in the URL ? I had a post about killing session ID's in the URL on my webmaster forum but its currently down right now. Try using Google.

When i tried to kill session ID's i always got an internal server error.

NeverBored 02-12-2010 05:02 PM

Quote:

Originally Posted by ChopSuey (Post 1974428)
You mean session ID in the URL ?

Yup, that's what I want to do.

Speysider 02-12-2010 08:18 PM

You seem to be ignoring the fact that you will not be able to use your forum if you do this

ChopSuey 02-13-2010 08:07 AM

Quote:

Originally Posted by NeverBored (Post 1980917)
Yup, that's what I want to do.

On one of my forums, there is a post about killing session ID's .....i'll find it and post it later.

NeverBored 02-15-2010 08:38 PM

That would be great... I've searched around and can find various places talking about doing it but nothing that really paves the way.

ChopSuey 02-16-2010 06:50 AM

It doesn't do "nothing" its gets stored in the MD5 doesn't it?
Here it is...
Code:

php_value session.use_only_cookies 1
php_value session.use_trans_sid 0

Add in you htaccess

NeverBored 02-16-2010 08:05 PM

Thanks. I tried it and it gave me a 500 error.

What I originally was thinking, it seems like if you knew where $session[sessionurl] is given a value you could just cancel it out. It makes sense to me but I can't find where it's handled.

ChopSuey 02-17-2010 12:08 AM

Its in the templates :) Navbar everywhere. Umm just search for that in templates you'll find it. Recommended its safe to have them on, when users cookies are off the sessions show up in the URL.

NeverBored 02-17-2010 12:36 AM

I mean find where the session variable is actually given the session id, somewhere in the php files or wherever (I've looked but cant find where). Removing the session variable in the templates is an option, but I wanted to keep the functionality for members and/or only in my forum, plus that would be a PITA to remove them all from the templates.

ChopSuey 02-17-2010 04:08 AM

Quote:

Remove Session IDs.
I can give advice for PHP users, ASP and CF users should do their own research on exactly how to remove these. With PHP, if the user does not support cookies, the Session ID is automatically inserted into the URL, as a way of maintaining state between pages. Most search engines don't support cookies, which means they get a different PHPSESSID in the URL every time they visit - this leads to very ugly indexing.
There is no ideal solution to this, so I have to compromise. When sessions are a requirement for the website, I would rather lose a small number of visitors who don't have cookies, than put up with PHPSESSID in my search engine listings (and potentially lose a lot more visitors).
Quote:

This will mean visitors with cookies turned off won't be able to use any features of your site that use sessions, eg logging in, or remembering form data etc.
I guess Session URL is helpful, you dont need to "remove" it.

NeverBored 02-17-2010 04:40 AM

Thanks for trying to help.

I actually just came up with exactly the solution I was looking for.

A simple plugin using global_start

Code:

$vbulletin->session->vars['sessionurl']  = '';
$vbulletin->session->vars['sessionurl_q']  = '';

It works!

ChopSuey 02-17-2010 10:48 PM

That turns it off?

NeverBored 02-18-2010 12:01 AM

Yup, it removes the session id from all links. I also added a conditional so that it only happens for guests. This way when a member logs in and isn't allowing cookies, everything works completely like normal.

ChopSuey 02-18-2010 07:31 AM

Im sure you read my post explaining what it does right? You shouldn't remove it. Oh well your choice, good luck!

Speysider 02-18-2010 08:28 AM

Well, if NeverBored comes back saying that her forum is broken, we know why. ;)


All times are GMT. The time now is 08:11 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.01530 seconds
  • Memory Usage 1,754KB
  • 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
  • (21)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