View Full Version : Miscellaneous Hacks - CES Cookie Cutter - Share Cookies Between Domains
thincom2000
02-12-2007, 10:00 PM
CES Cookie Cutter
vBulletin 3.6.x, 3.7.x, & 3.8.x supported
Version: 1.2.3
*** NEWS ***
4/12/2009 - v1.2.3 released
4/11/2009 - v1.2.2 released
8/8/2008 - v1.2.0 released
2/18/2008 - v1.1.5 released
2/11/2008 - v1.1.0 released
2/13/2007 - v1.0.0 released
Known Issues:
- none
What It Does:
Shares cookies among domains for seamless vBulletin login/logout functionality across multiple domains.
Basically if you have more than one domain name, or you have private forums scattered among domains, and all vBulletin instances use the same vBulletin database, this hack allows for integrated, synchronized login/logout on all domains at once.
Products to Install: 1
Plugins Included: 3
Files to Upload: 1
Templates to Edit: 0
Files to Edit: 0
Mod Features:
- Adds a field in vBulletin Options to enter multiple forum URLs
- Integrates login/logout functionality at all forum locations
- safety cookie settings available for users who left their cookie domain blank in vBulletin cookie options
Changelog:
Version 1.2.3:
- bug fix: only logouts integrate
Version 1.2.2:
- bug fix: XSS flaw
- bug fix: remember me
Version 1.2.0:
- updated: no more template edits
- updated: rearranged the whole mod
- bug fix: IE P3P failure
Version 1.1.5:
- new feature: cookie debug mode
- bug fix: global cookies only apply to www
Version 1.1.0:
- extended: now supports domains sharing the same file location
- bug fix: integrated login is not bidirectional
- bug fix: integrated login fails if forum is turned off
- bug fix: redundant cookies are generated
* This mod is offered for free here. Please donate if you like this mod *
BobbyBig
02-13-2007, 12:17 PM
Very handy, nice work.
Btw you forgot to reserve first post :)
Eagle Creek
02-16-2007, 01:19 AM
I LOOOOOOOOOOOOVE this hack!
T H A N K Y O U S O M U C H F O R T H I S!
thincom2000
03-17-2007, 04:23 PM
I'm glad no one is having problems so far. You wouldn't believe how hard it was to make this work correctly all the time. Unfortunately, I have yet to try sharing between 3+ domains. Anyone have success there?
Realturktiger
03-17-2007, 04:42 PM
i've tried the hack...
i've two domains on same forum but i can't login from the addon one....
my forum is on www.universte.com/vb
i can't login from www.turktigers.com/vb/
what's my problem ?
thincom2000
03-17-2007, 04:50 PM
Did you upload ces_cookies.php into the includes/ directory on BOTH domains?
Did you make the template edit (sometimes this can be overlooked)?
* Did you add both domains to the setting CES Cookie Sharing Domains? You may have to include the /vb since I noticed your forum is not at the domain root.
mdcdeve
10-02-2007, 12:05 AM
Hola, thanks for this, great work. Just wondering, can you set more than one cookiedomain in ces_cookies.php?
thincom2000
10-02-2007, 11:30 PM
You need one ces_cookies.php for each domain in the appropriate folder. Then you can add the additional domains in the options.
wsdeluxe
10-05-2007, 12:19 PM
I've got a problem...its settings the cookies for all domains, except the "master" forum domain.
I've got
www.domain1.com/forums/
www.domain2.com
www.domain3.com
www.domain4.com
2,3 and 4 have the correct cookies, but the domain 1 is not setting the cookies.
My forums are all on the same server, I modified the ces_cookies.php to connect to the correct directory:
chdir("/home/webmaste/public_html/forums/");
require_once('./global.php');
require_once('./includes/functions_login.php');
require_once('./includes/adminfunctions.php');
Thats on all the sites in the includes folder.
Any ideas at whats gone wrong here? The only way I can currently log into the actual forum is by logging in at /admincp/
Thanks
thincom2000
10-05-2007, 02:23 PM
I think the /forums on the first domain may be messing it up. Cookies are generated at the root level.
Another issue you may be having is that browser standards usually only generate a maximum of 18 (I think) cookies at a time. I believe that each domain generates between 2 and 4 cookies, so 4 domains may be the most that will work without making many file edits.
wsdeluxe
10-06-2007, 08:54 AM
Ahh, damn :(
Would some kind of iframe hack work, or not?
scoutz
11-05-2007, 02:18 PM
I've been looking for something like this for a while... Anyone got this to work? Doesn't seem to work in IE 6 and IE7. Firefox works perfectly though :(
scoutz
11-05-2007, 07:31 PM
nevermind fixed something myself, working now! :)
Mighty.Karen
11-07-2007, 06:13 PM
Would this work with a vBulletin forum and just a generic non-forum type web-app??
thincom2000
11-08-2007, 06:20 AM
If the logins are integrated it should work in theory. However, all logins would have to be handled by vBulletin to function as expected -- since the appropriate hooks would need to be called, and the STANDARD_REDIRECT template used.
Tom1234
11-23-2007, 08:30 PM
Does this hack assume there are two separate instances of vBulletin or does it work for one vBulletin instance that is accessible at two different domain names - e.g. two domain names that have the same IP address?
Would this be a good way to change your domain name without requiring all your members to log in with a password at the new domain?
thincom2000
11-24-2007, 12:33 AM
Does this hack assume there are two separate instances of vBulletin or does it work for one vBulletin instance that is accessible at two different domain names - e.g. two domain names that have the same IP address?
Would this be a good way to change your domain name without requiring all your members to log in with a password at the new domain?
I'm not sure how to answer your first question since I haven't done extensive testing. I had two domain names that pointed to different subdirectories on the same server. While structurally it appeared to be two instances of vBulletin, the subdirectories were actually mirrors.
For this mod to work, I believe the only thing you need is one of two copies of ces_cookies.php in each respective subdirectory, and you may or may not need to redefine $vboptions['bburl'] in those files. You just have to try it and see if it works for your particular setup.
Alfa1
01-10-2008, 04:00 PM
Will this work if I have the following setup:
-domain1.co.uk
-domain2.com
-domain3.com
-domain1.co.uk/testvb/
Domain 1-3 are the same installation of vbulletin, but one can browse the same site under all 3 urls.
The cookie domain currently set at domain1.co.uk, so that going from domain1.co.uk to domain1.co.uk/testvb/ will not cause cookie/login problems.
But it seems this setup will not work to accomplish cookie sharing. Please advise how to handle this.
Eagle Creek
02-06-2008, 11:10 PM
Does this hack work with the most recent vBulletin?!
If it doesn't: what should I use?
thincom2000
02-07-2008, 12:36 AM
I will be releasing the 3.7 version shortly, which I don't believe has any real changes other than a restructuring of the code (because I discovered the sharing was not accomplished while a board is disabled. This can be a hassle for admins who are trying to work with that situation.
Domain 1-3 are the same installation of vbulletin, but one can browse the same site under all 3 urls.
The cookie domain currently set at domain1.co.uk, so that going from domain1.co.uk to domain1.co.uk/testvb/ will not cause cookie/login problems.
But it seems this setup will not work to accomplish cookie sharing. Please advise how to handle this.
I hope that what you describe is possible... As long as the cookie is saved at each domain root, it should be available from all subfolders (or do you want to avoid that?).
NeverBored
02-11-2008, 05:18 AM
I will be releasing the 3.7 version shortly
subscribing for a 3.7 release :up:
I have also one /var/www/public_html/forums catalogue, which is from DNS shared amont two domains. E.g. I can't put two instances of ces_cookies.php file, as there might be only one file in the same catalogue...
If 3.7 version solves this problem I would love to have it installed.
thincom2000
02-11-2008, 02:40 PM
I have also one /var/www/public_html/forums catalogue, ... I can't put two instances of ces_cookies.php file, as there might be only one file in the same catalogue...
I have the same setup on my site as of about 2 months ago. Since, this issue has been solved for the 3.7 version.
valdet
02-11-2008, 05:31 PM
I have two forums working on the same VPS but on different databases.
First forum is www.mysite1.com/forum and
Second forum is www.mysite2.com.
Before I try this (and eventually mess up with my cookies) I would like to know if it is possible to have users from both forums be able to login to both forums using this hack?
I have separate databases for these forums, but I could give access to each-other database users
I look forward to your reply.
Alfa1
02-11-2008, 05:47 PM
Has ces_cookies.php changed since the 3.6.x version?
thincom2000
02-11-2008, 06:40 PM
I have two forums working on the same VPS but on different databases... I would like to know if it is possible to have users from both forums be able to login to both forums using this hack?
The scope of this mod doesn't cover integrating logins between vBulletin installations. This only generates cookies for additional domains if say your vBulletin is accessible from .com and .net. The cookies, however, should only be effective on that database unless the two databases are identical and users have the same password / cookie salts on both.
If you really want to integrate both, I would recommend merging the databases, and modify forumhome to display particular forums on each domain. Then you can use the Cookie Cutter to log in to both.
Alfa1
02-11-2008, 07:29 PM
When you have the same site, with multiple urls, then the cookie cutter works well, except for that members still have to log in one time for each domain. I have one site with 3 domains/urls:
mymaindomain.com
myblogdomain.com
mywikidomain.com
There is no difference between the above other than the url being different. However when I want to browse these 3 domains, then I have to log in at every domain. After I do that and tick 'remember me', I keep being logged in.
It would be optimal if I would only have to log in one time for all tree domains.
thincom2000
02-12-2008, 02:19 AM
It would be optimal if I would only have to log in one time for all tree domains.
This was the intended functionality all along, but I think it stopped working around 3.6.8. Since the 3.7 changes, the beta seems to work correctly again.
NeverBored
02-12-2008, 02:46 AM
So this works for 3.7 as is?
thincom2000
02-12-2008, 03:02 AM
So this works for 3.7 as is?
Just uploaded the new one. So now it does.
NeverBored
02-12-2008, 05:26 AM
Just tried it out...
It doesn't seem to be working for me on 3.7.
To be sure I'm understanding correctly, I should be able to install this, log in to my forum on the .com domain, then go to my .net domain and still be logged into the forum browsing the forum on .net, right? When I go to .net I'm not logged in.
thincom2000
02-12-2008, 08:19 AM
You did make the template edit and upload the file to both includes directories and add both domains to the new vB setting?
NeverBored
02-12-2008, 05:54 PM
Yeah I did all that, though I guess one part I don't understand is "upload the file to both includes directories". Both domains access the same site. All the same files and database, just can be accessed with multiple domains.
thincom2000
02-12-2008, 06:16 PM
Okay - what value have you entered into the setting?
NeverBored
02-12-2008, 06:52 PM
First I used
neverboredonline.com
neverboredonline.net
When that didn't do anything I put in
neverboredonline.com/forum
neverboredonline.net/forum
That didn't do anything either. Each time I would clear the cookies, and do a fresh log in via .com. Then I would go to the site via .net and I'm not logged in.
thincom2000
02-12-2008, 06:54 PM
Okay I think the issue is that your forum is located at /forum.
So you would have to use the /forum version.
Also make sure to start each entry with a .
I think you might be getting 404 errors without it.
NeverBored
02-12-2008, 07:09 PM
Awesome man, thanks. It's working now. I wasn't even seeing the instructions to add the . at the start of the entries even though I read through it multiple times, lol. Thanks
NeverBored
02-12-2008, 08:16 PM
Actually, I'm having some problems still.
First problem, it's not working in IE 7. (It's working in Firefox)
Second problem, when a user logs out it completely clears the who's online list.
thincom2000
02-13-2008, 05:36 AM
Thanks for the report. I'll look into this.
thincom2000
02-18-2008, 05:11 PM
Okay, I figured out why the Who's online list was getting cleared, but the fact that this isn't working in Internet Explorer has me stumped. It's as if Internet Explorer is reporting the originating domain to the script rather than the domain the script is actually running from... If anyone has any ideas please let me know, because I hate IE.
thincom2000
02-18-2008, 07:03 PM
Okay I got this working in IE for those of you who were having problems. The issue is created when the ces_cookies.php script generates an error. Firefox is still able to handle the cookies, but IE refuses to continue once the error occurs. These errors are likely caused by a plugin from another product which becomes broken due to the various constants used by the cookies script.
I have updated the product file with some minor bug fixes, and included an option to display the output of the cookies script as text and halt the redirect, for debugging purposes.
When installing the new product, make sure to update your Cookie Sharing Domains, because entries should no longer start with '.'
crocodile
02-24-2008, 07:26 AM
this is the most helpful for intergrated my website's function
thanks very much
thincom2000
02-25-2008, 01:10 PM
Thank you for your support!
Poltergiest
03-05-2008, 10:14 PM
THANK YOU!!! This has fixed a problem that been a PITA for me.
BTW my board is 3.68 but it's good to know that this will continue to work when I move to 3.70
Alfa1
03-14-2008, 07:16 PM
I can't log out from my site now.
Guests see this error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /index.php(539) : eval()'d code on line 264
I am not sure the error is due to this hack.
dfc005
03-26-2008, 09:53 PM
Just found this mod. If this works I'm gonna be super excited, exactly what I was after!
dfc005
03-26-2008, 09:57 PM
Does this mod work with 3.7.0 RC1?
EDIT: It certainly does, fantastic!
dfc005
03-27-2008, 04:12 AM
OK, first, sorry for the triple post. But I've been playing around with this and need some help.
First, I'm using this with 4+ domains. To start, when I logged in with one domain, it only seemed to get round to logging in to 1 or 2 of the other domains, never all 4 or more. I realised this was probably due to the redirect page (where the ces_cookies.php is embedded via an image) moving to fast and not allowing time for the each of the "images" to load. So, I slowed it down a bit and bam, it worked perfectly.
But I still can get it to work on IE. Just won't log onto any of the other domains apart from the one I'm logging in through. BUT, if I view the source on the redirect page and paste the "image" src into a new IE window and load it up, next time I visit that domain, I'm logged in. So the theory seems to work....
Anyone else got any ideas on the whole process?
thincom2000
03-27-2008, 05:51 AM
The mod's debug mode was actually created to help solve an IE situation that sounded exactly like this. Please turn it on briefly (it will temporarily catch and stop all extra logins/logouts) and post your results.
dfc005
03-27-2008, 06:07 AM
OK, my Cookie Sharing Domains are....
redesign.site1.com
redesign.site2.com
redesign.site3.com
redesign.site4.com
We're currently making the redesigns for each site in a subdomain. When they are complete, we'll drop the subdomain. All sites have the same files and acess one centralised database.
I login through the redesign.site1.com and all three of the debug boxes display "Cookie Cutter generation complete!".
Is that right?
thincom2000
03-27-2008, 12:08 PM
If the forum also doesn't physically exist until a subfolder, you should include it in the settings. Say: subdomain.site1.com/forum
Otherwise, everything looks like it's correct and functioning properly.
dfc005
03-27-2008, 08:21 PM
Nope, the forum doesn't sit in any subdirectory. Just in the root of those subdomains.
Dammit, was hope I was missing something really simple and easy and it would fix all my problems.
dfc005
03-27-2008, 10:10 PM
OK, I tried popping up the src for the fake "image" into a new window, to prove to myself those files were working and setting cookies and sessions. If I do this, it works perfectly in IE and Firefox. Not exactly a perfect solution but proves that the idea does work.
I then also moved the fake "images" to the top of the STANDARD_REDIRECT template so they got loaded first rather than last. Seemed to help my Firefox problem with only a couple of the domains picking up the cookie/session.
So still, my only problem is in IE. It just doesn't seem to work at all. I'm using IE7 and just stumped.
thincom2000
03-28-2008, 12:06 AM
I should be able to update the mod with some javascript that will wait until all fake images are loaded before executing the redirect, which could also help with your IE problem considering everything else seems to be correct.
dfc005
03-28-2008, 12:12 AM
That would be fantastic if you could.
Is it possible the IE problem is actually cross domain policies and the like?
thincom2000
03-28-2008, 02:50 AM
It works in IE7 on my test site, so I doubt that.
dfc005
03-30-2008, 09:44 PM
OK, here's my latest findings.... It was cross domain privacy policies for me. What do you have your privacy set to in IE?
I set the following at the beginning of the ces_cookies.php and that has fixed my problem for IE. Works like a charm now.
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
Found another problem though. And not sure if it's your script that's doing it or not! It seems when I try and login without checking "Remeber me?", it logs into all sites except the one I'm actually logging into? Any ideas on that one?
thincom2000
03-31-2008, 04:00 PM
Interesting. I would like to read a little more about the header you have posted. Can you provide a documentation link for your findings?
It's possible that this mod is causing the cookies not to be set, so I guess I'll have to remove the efficiency check I added, which prevented the mod from adding an image for the current domain (since the originating script should have taken care of those cookies).
dfc005
03-31-2008, 07:03 PM
Sure mate, here's a few links. They all refer to cookies not being set in iframes but I assume that the fake "image" would have the same problem.
http://aspnetresources.com/blog/frames_webforms_and_rejected_cookies.aspx
http://gathadams.com/2007/06/25/how-to-set-third-party-cookies-with-iframe-facebook-applications/
http://james.jamesandkristin.net/2005/11/18/php-session-cookie-in-frames-using-internet-explorer/
dfc005
04-02-2008, 10:46 AM
Any more thoughts mate? What was your privacy set to in IE?
thincom2000
04-02-2008, 02:08 PM
Medium.
tobias.mueller
06-26-2008, 12:04 AM
Hi!
I tried using this Add-on with vBulletin 3.7.2 and I experienced the following problem: the images used to set the cookies appear not to be included in the redirect-page which comes up right after one logged in. The HTML does not show any reference nor is the ces_cookies.php loaded. So the user is only logged in on the current domain. But as soon as I press the logout-button, the images are included in the redirect-page.
Now I wonder if anybody has got the same problem or even knows a solution for this.
I've currently installed vbulletin with vbcms and cookie cutter. Disabling vbcms does not help.
Bye,
Tobias
thincom2000
06-26-2008, 12:17 AM
The 3.7.2 login redirect may require an update. Thanks for bringing this to my attention.
tobias.mueller
06-26-2008, 12:36 AM
Hi!
Thank's a lot for your quick reply.
It seems to be a Problem with the output of "$stylevar['ces_cookies']". I added an "echo $stylevar['ces_cookies']" to the code for the hook "login_redirect" and everything worked fine again (but of course this is not a clean solution).
Anyway, thank's a lot for this very helpful add-on!
Bye,
Tobias
thincom2000
06-26-2008, 02:49 AM
Had you reverted the STANDARD REDIRECT template since you upgraded to 3.7.2? Does the template still reflect the edits mentioned in the readme?
tobias.mueller
06-26-2008, 08:07 AM
I directly installed the version3.7.2 and did not upgrade from an older one. For me it didn't work both ways, with and without the edits mentioned in the readme.
thincom2000
06-26-2008, 02:59 PM
Could you post the page source from the redirect page when you log in?
tobias.mueller
06-27-2008, 11:47 AM
After I reinstalled everything now, it works. It seems like it depends on the order, the add-ons are installed in but I am totally sure.
Anyway, sorry to bother you with this problem and thank's a lot!
Bye,
Tobias
thincom2000
06-27-2008, 06:09 PM
No problem, I actually ended up reorganizing the mod completely as a result of this report. :) I'll release an update in a week or two.
corehosting.de
07-12-2008, 06:36 PM
Very nice work!!! :)
corehosting.de
07-14-2008, 08:24 PM
Info:
- Firefox 3.0: no problems
- Internet Explorer 6.0.2900: same problem like tobias.mueller
ps2wiz
08-03-2008, 02:11 AM
Does this fully work with 3.7.2?
thincom2000
08-03-2008, 12:16 PM
On my install it does. But then again I still need to release the current version. I'll finally do that later on today when I have some time.
Artaxerxes
08-17-2008, 02:15 AM
Does anyone have this working on vb version 3.7.2 Patch Level 1? It's showing up as an installed product but can't find where to change the settings under Vbulletin options. I created a new installation on a new database to test with and installed this by itself but still can't find it under the vb options. Am I missing something?
thincom2000
08-17-2008, 05:50 AM
vBulletin Options -> CES Cookie Cutter
Artaxerxes
08-17-2008, 03:09 PM
I scrolled thru the vbulletin options but don't see CES Cookie Cutter listed.
benstillman
08-18-2008, 02:52 PM
Same problem, 3.7.2 PL1, installed fine but not showing up under vB Options.
thincom2000
08-18-2008, 03:13 PM
Download the ZIP again and just reinstall the product file allowing overwrite.
Artaxerxes
08-18-2008, 04:39 PM
Now I can see it, Thank You thincom2000!!!
JimmiOO
08-19-2008, 04:23 PM
I tried to install this, i have 2 sites on the same server, one is in the root and the other is in a sub directory. I have different URLs pointing to each one. I put the ces_cookies file into the includes folder in both sites, i then installed the product on both sites from the Admincp in each site, i then put the domains into the settings like this mydomain.com & mydomain.co.uk. Am i doing this right?
When i done this and tried to logon it just hung and i had 3 boxex saying CES Cookie Cutter
I am using 7.2 on both sites, i did see someone saying edit the template but cant find what template to edit or what to edit it with.
thincom2000
08-22-2008, 03:01 PM
It sounds like you enabled the mod's debug mode. This should not be on during normal use.
dfc005
08-25-2008, 03:49 AM
Hi, what exactly has changed between this version and the previous? The old version works well for me so not sure whether I should bother upgrading.
Also, you should add an upgrade process as well. Not sure if I should remove the old mod or just overwrite it etc....
thincom2000
08-26-2008, 04:35 AM
Sure. Basically, not much has changed. Rewrote some things for memory efficiency. And the updated version doesn't need template edits for normal use.
To upgrade, you would just overwrite.
Rideharder
09-06-2008, 06:38 AM
Thanks so much!!
Nominated
www.kaplanforums.com, kaplanstudentforums.com & kaplanuniversityforums.com thanks again!
Powered by vBulletin? Version 3.7.2 works!
Alfa1
09-08-2008, 09:24 AM
How important is p3p?
thincom2000
09-08-2008, 10:31 AM
IE requires it.
Alfa1
09-08-2008, 03:43 PM
Yes, but isn't it only relevant if the user has got his security level ridiculously high?
I would think that 99% of websites do not use p3p. Am I wrong?
Status: P3P Work suspended
http://www.w3.org/P3P/
thincom2000
09-09-2008, 12:49 AM
Unfortunately this is the only way that I have seen to fix some IE issues. The mod uses a generic P3P header if the web site does not use P3P.
kaplanassist
09-10-2008, 10:41 PM
I have the following websites:
www.kaplanuniversitystudentforums.com
www.kaplanforums.com
www.kaplanuniversityforums.com
www.kaplanstudentforums.com
What is turn on debugg mode for cookies?
I am still having problems when I login, I keep getting automatically logged out of the forums.
thincom2000
09-11-2008, 04:23 AM
I don't think debug mode is functional anymore. It was there as a dev tool.
If you are getting automatically logged out, it is possible the URLs were entered incorrectly. If your forum is at /forum, this needs to be included in the URL.
kaplanassist
09-12-2008, 12:28 AM
I never set the debug mode. I will turn it on and see if it works.
The url was incorrect that I put in there if you are stating that it needs a / for it to work.
This is my url: kaplanstudentforums.com/studentforums.php
thincom2000
09-12-2008, 03:26 AM
This is my settings (working fine):
crackedeggstudios.net
crackedeggstudios.com
kaplanassist
09-13-2008, 03:44 PM
Now I can browse with each account and the cookie issue is fixed. It shows the name of each domain name in the top browser. ie: www.kaplanforums.com does not redirect. By simply using the one mod listed above with a couple of tweek settings in vbulletin. My problem was this setting which I enabled and everything is now working correctly.
Add Standard HTTP Headers
This option does not work with some combinations of web server, so it is off by default. However, some IIS setups may need it turned on.
It will send the 200 OK HTTP headers if turned on.
I also on the setting left blank
This option sets the domain on which the cookie is active. The most common reason to change this setting is that you have two different urls to your forum, i.e. example.com and forums.example.com. To allow users to stay logged into the forum if they visit via either url, you would set this to .example.com (note the domain begins with a dot.
also the domains that I entered into it needed to end with a /
NemoTech
10-08-2008, 05:35 PM
Oh this works absolutely pefectly for me. Thanks so much.
kermit2
01-16-2009, 10:20 PM
I'm having some strange problems with this in IE 8. IE 8 accepts the cookies for the 'extra' domains, but not for the domain from which the user is logging in - so after the 'thank you for logging in, please wait while you are redirected' message, the user is returned to the forum home page not logged in.
Anyone else experienced this (seems to be only IE 8) or know a fix? If not I'll do a follow up post if and when I solve it.
Great plugin by the way, very useful
kermit2
01-16-2009, 11:26 PM
Problem solved (sort of):
// we want all subdomains, take everything after the first .
if (substr_count($_SERVER['HTTP_HOST'], '.') > 1)
{
$vbulletin->options['cookiedomain'] = substr($_SERVER['HTTP_HOST'], intval(strpos($_SERVER['HTTP_HOST'], '.')));
}
else
{
$vbulletin->options['cookiedomain'] = $_SERVER['HTTP_HOST'];
}
(the init_startup hook). This assumes your domain name only has one period in it, but if you have something like example.co.uk, the cookie ends up getting set for .co.uk (which obviously isn't a good idea, since anyone else on a .co.uk would be able to read it).
The second problem I didn't fully figure out, but it seems that if you check the 'remember me' box, IE 8 happily keeps you logged in to the main domain, so for the moment I've just edited my templates so that this is checked by default
thincom2000
01-20-2009, 11:18 AM
This is indeed a problem. I have noticed that Firefox also shares your "Remember me" issue.
GlitterKill
01-25-2009, 11:47 PM
Does this work with VB 3.8?
Pipo123
01-27-2009, 02:58 PM
nevermind fixed something myself, working now! :)
What did you fix?
Pipo123
01-27-2009, 03:24 PM
The cookie cutter fails to load the init.php properly but loads the other two requires:
require_once('./includes/functions_login.php');
require_once('./includes/adminfunctions.php');
It does load init.php but exits/crashes.
thincom2000
01-29-2009, 03:21 AM
That could be any number of things. How many products use your init_startup hook?
Pipo123
01-30-2009, 01:04 PM
These do:
vBSEO
vBadvanced CMPS
Set automatic forumlanguage to browserlanguage
vBulletin Project Tools
gXboxLive
Chunky Monkey
02-03-2009, 02:43 PM
I have been trying to get 2 domains to use the same config.php so that users can access the same forums from multiple domains. I have added the "non primary" domains to the vbulletin options POST referrer white list and can login and send pms from any non primary domain, but when i try to create a thread or post I get a white screen. Any ideas?
lostincable
03-25-2009, 10:44 AM
I installed this on 3.8.1
It works except I need to tick remember me now for logins to work
Does anyone know how to fix that?
lostincable
04-10-2009, 07:37 PM
Anyone help with this?
thincom2000
04-11-2009, 04:09 AM
Try the build I just uploaded.
lostincable
04-11-2009, 10:56 AM
Thanks for the update!
Tried it out and its as if the product is not running, I enabled debug mode and I do not get the messages down the bottom and it logs in and out as normal.
Logins are not shared as well.
I remember from the original version you had to manually update the template, can you verify which one it is so I can see if the install updated the template?
lostincable
04-11-2009, 11:04 AM
Just an update, tried logging in to both sites and then logging out of one.
Logging out of one logs you out of both.
Still no login across the board but logout works, not sure if that helps?
thincom2000
04-12-2009, 06:59 AM
Tried it out and its as if the product is not running, I enabled debug mode and I do not get the messages down the bottom and it logs in and out as normal.
Is this with "Remember Me?" checked or unchecked?
EDIT: Nevermind. There are no more template edits. I did some further work on this and think I got it all working, remember me and all. Will do another quick release in the morning.
lostincable
04-12-2009, 10:45 AM
It seems the 1.22 version is not setting the cookie on login regardless of wether remember me is checked or not.
I enabled debug and I only get the cookie has been generated message on logout not login.
Hope that helps! :)
thincom2000
04-12-2009, 03:47 PM
Uploading patch now.
For your cookie cutter options. When listing the domains, please remember NOT to begin a line with a dot (.)
If you are using the "example.com" format to handle cookies for all of "*.example.com", but you forward "example.com" to "www.example.com", then the cookie will not be generated because a redirect occurs. Instead, use "www.example.com" and manually add any additional subdomains that you may need.
lostincable
04-12-2009, 07:24 PM
Excellent!
Tested and all is working perfectly on 3.8.2.
Thanks for your commitment to this MOD!
motoxer311
04-14-2009, 12:27 AM
How do I uninstall this POS, I can't login to the admincp.............
thincom2000
04-14-2009, 01:06 AM
You will need to disable your hooks by adding the line
define('DISABLE_HOOKS', true);
to your includes/config.php file.
It would make sense that you can't login if the settings are incorrect. If you are having problems, please post your settings here so others know what doesn't work.
Sam D.
04-15-2011, 04:20 PM
Seems to works fine on Vbb 4.1.3 too...
Nice !
prandah
10-17-2011, 05:23 PM
not work by me :(
if user login if succesfully
but, showthread and forumdisplay still primary domain :(
any advice
Rebecca217
04-05-2013, 12:20 PM
Does anyone have this working on 4.2.x? I'm willing to pay to have this updated.
Gizmo99
08-05-2015, 05:50 AM
very cool :)
domain.com
doamin.co.uk
to same board :)
VB3.8.6
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.