Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
Use same vB on different Domains (cookies) Details »»
Use same vB on different Domains (cookies)
Version: 1.00, by Paris Holley Paris Holley is offline
Developer Last Online: Oct 2007 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 10-02-2004 Last Update: Never Installs: 4
Is in Beta Stage  
No support by the author.

I haven't tested it in all circumstances but in only the way i needed. This may not be the best method but I think its the only one that works as of right now.

Tested Domain Situations:
-------------------------------
1site.com
2site.com ( which the real url is 1site.com/2site/ )
-------------------------------

Open Functions.php and find
PHP Code:
// try unsetting without the / at the end 
before each setcookie function ( should be 3 within about 25 lines or so ) add

PHP Code:
setcookie($name$value$expire"your-path""your-domain"$secure); 
this should write the cookies for each domain you set it for and allow people to view each one and not have to log in. Please give me feed back on this for i would love to see my first vb hack work

Show Your Support

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

Comments
  #12  
Old 10-03-2004, 08:37 AM
Mephisteus's Avatar
Mephisteus Mephisteus is offline
 
Join Date: Dec 2001
Location: The Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't this a default feature through the Settings part of admincp? Just wondering...
Reply With Quote
  #13  
Old 10-03-2004, 09:53 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Often a site is accessible through various aliases. So for instance you could access the same site with

namea.com
namea.net
nameb.com
nameb.net

That would be 4 different domain names, but only one copy of vB on one server - so perfectly legal. If the hack works as advertised, it is a nice addition.
Reply With Quote
  #14  
Old 10-03-2004, 01:03 PM
Paris Holley Paris Holley is offline
 
Join Date: Jun 2003
Location: Iowa
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes it works just like that, I just have to make it so that it logs out too....
Reply With Quote
  #15  
Old 10-15-2004, 02:07 AM
noox noox is offline
 
Join Date: Sep 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm pretty sure that this will only work in your situation with subdomains or paths.

You cannot set (or read) a cookie for a foreign domain. This would be a big security problem.

So you only may set a cooky for the same domain and same path. Additionally for parent directories or the "root" domain. So it is possible to set a cookie from www.domain.com for domain.com which can be read from domain.com.

The IE has a small glitch if you do not set the cookie domain: If you then set a cookie to domain.com you cannot override it from www.domain.com. Let's assume a simple auto-login script. Somebody logs in using domain.com. Later he comes back using www.domain.com. He is automatically logged in but cannot logout as long as he tries it on the domain www.domain.com! So setting the cookie domain is generally a good practice.

If you realy want to set a cookie for another domain there are some possibilities. You could insert an image or an iframe within your page where you transfer the information via query string. This image or page in the iframe is located on the other domain and sets the cookie.

Because of security issues the newer browsers standard security settings prohibit setting cookies this way on domains not equal to the main site or the main frameset. This is for instance a problem for the banner ad agencies.

So my only idea is to forward to the a script on the second domain which sets the cookie. This script forwards back to the initial script. I havn't tried that yet, but it should work.
Reply With Quote
  #16  
Old 10-16-2004, 06:12 PM
noox noox is offline
 
Join Date: Sep 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've found another solution which should work in some situations:
Use the IP as cookie domain. This will only work if all domains you want to have access are using the same IP. This is the case if you have additional domains pointing to the same webhosting account.

Attention: Do not use this if foreign websites also use the same IP. (As on most shared hosts.) This would introduce a big security hole!
Reply With Quote
  #17  
Old 10-25-2004, 05:00 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noox
I've found another solution which should work in some situations:
Use the IP as cookie domain. This will only work if all domains you want to have access are using the same IP. This is the case if you have additional domains pointing to the same webhosting account.

Attention: Do not use this if foreign websites also use the same IP. (As on most shared hosts.) This would introduce a big security hole!
More info?
Reply With Quote
  #18  
Old 10-27-2004, 08:14 PM
Zach's Avatar
Zach Zach is offline
 
Join Date: Nov 2001
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
From vBulletin.com:



I'm uncertain, but your suggested use of this hack may violate that rule (in bold).
I have hundreds of domain names, I park them on my forums.

Just because you can get to it by two or three hundred different domain names doesnt mean that its a different forum.

Otherwise I would be one broke mofo


(I also 301 - doesnt stop search engines from listing them more than once, or get them to pull listings anytime soon after I make a change and forget to 301 right away - I only 301 certain forum pages, since I use things like global.html (.php) in hundreds of different places on many different domain names that I do not want 301ed to the wrong place)
Reply With Quote
  #19  
Old 10-27-2004, 08:16 PM
Zach's Avatar
Zach Zach is offline
 
Join Date: Nov 2001
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noox
I've found another solution which should work in some situations:
Use the IP as cookie domain. This will only work if all domains you want to have access are using the same IP. This is the case if you have additional domains pointing to the same webhosting account.

Attention: Do not use this if foreign websites also use the same IP. (As on most shared hosts.) This would introduce a big security hole!
I think I love you.
Reply With Quote
  #20  
Old 10-27-2004, 11:21 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm gonna watch this as I have trouble with cookies on my forums since I went to dual domain names.
Reply With Quote
  #21  
Old 11-10-2004, 09:55 PM
geezzaa geezzaa is offline
 
Join Date: Dec 2002
Location: uk
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me get this right, im dislexic so its got me a bit confused
I have 1 site that i want to have just a normal https for my visitors and i want to add a https connection
Does this mean i can http://www.ukcultivator.biz and https//:www.ukcultivator.net and run them to the same site
Will this still mean i can have both http and https connections on the same forum

Thanks in advance
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:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06283 seconds
  • Memory Usage 2,303KB
  • 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
  • (2)bbcode_php
  • (3)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
  • (2)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