PDA

View Full Version : Cookies problems


Diablo81
10-11-2007, 07:31 PM
The situation: we have a site and a vbulletin forum. Both use cookies and obviously they have different cookies. We would that if someone logins the site, he has also cookies for vbulletin and viceversa, in order to make only one login for both the site and the forum (if I login the site, I obtain cookies for site and forum and viceversa). I modified my site in order to create cookies for the site and for vbulletin (bbuserid,bbpassword) and it seems to work well. The problem now, it's how to modify vbulletin code to create also a cookie for the site, during the login.
I saw the code of vbulletin and I found in functions_login.php the function "process_new_login", and in that function I can see the creation of a new object called "vB_Session". The problem is I cannot find where vbulletin creates cookies, so I cannot add the creation of the cookies I need. Could you tell me where (in wich file and function or object) vbulletin creates cookies during the login process?
Thank you very much and sorry for my english, I hope it was clear.

Opserty
10-11-2007, 08:43 PM
Add a new Plugin with the Hook Location login_verify_success and then just enter in the PHP code to create the cookie for your site as well. No need to go round messing with the PHP files :)

Diablo81
10-12-2007, 10:42 AM
Add a new Plugin with the Hook Location login_verify_success and then just enter in the PHP code to create the cookie for your site as well. No need to go round messing with the PHP files :)

Thank you very much. I will try and I will post result.

--------------- Added at 11:44 ---------------

Im' trying to find the plugin in the section vb 3.6 mod without result. Am I searching in the right place? Sorry but I'm a newbie of vb.org :D

Opserty
10-12-2007, 11:48 AM
You need to write the PHP Code for the plugin yourself.

Diablo81
10-12-2007, 12:46 PM
You need to write the PHP Code for the plugin yourself.

ok! thank you