Helpful Information
 
 
Category: vBulletin 2.x Full Releases
Multiple domain concept

I don't know if this concept has been mentioned before, maybe it has ??? but here's what I have.


$domain = $HTTP_HOST;
$domain = strtolower($domain);
$domain =str_replace ("www." , "", "$domain");
if ($domain == "domain1.com") {
$styleid=1;
}
if ($domain == "domain2.com") {
$styleid=2;
}


I tried it and it works, I put it in global.php after the require('./admin/functions.php'); commented out the existing style setting routines and now I can have multiple domains pointing to the same scripts same database but different style and templates. In the bburl and homeurl fields you would put http://www.$domain/forums. etc. for your Replacement variables. Of course you lose the ability to switch styles unless you do other more creative things.
Could be used in multiple ways with a little creativety.

This is just a concept not a full blown hack, so take it for what it is. You will have to do a little more hacking to get it fully functional.

Interesting.

Not exactly what I'm thinking of for using for myself, but this might actually come in handy at one point or another, nonetheless.

Currently, my plan is to make a network of all my sites. Two of those sites will be run on a different domain (probably stacked on the same server on the account of my first domain, though) with their own databases, but since my forum (the first site, or at least, part of it) is a support-forum for both of them, I want to design user registration for the two other sites in such a way that, with a single checkbox, they can choose to immediately sign up for the forum At The Same Time, with that very one signup session. So they'd be added as a new user to TWO databases - for this, I will have to do something similar to what you showed up there, yet in case I end up with my three domains on three different servers, then I will probably use the above for some extra connectivity. :)

I have actually been able to expand this concept so that I can have different style and template sets for various browsers (NS goes to one IE to the other) therefore making it an option to have different sites that work in the various browsers

That's quite a good idea there. Sounds like too much work for me, though.

Plus, I don't care all that much about Netscape users. As long as a page _shows_ in NS, I ain't gonna bother any more making it compatible for them (with stuff like this). God, Netscape developed some excellent technologies for the internet over the years, but they should've stayed Way Clear from browsers! :eek:

Actually, NS follows more W3c Standards than IE :)

Originally posted by wajones
I don't know if this concept has been mentioned before, maybe it has ??? but here's what I have.



You mean like my site
http://www.motorsportforums.com/forums/ vs
http://www.indyracingforum.com/forums/ vs
http://www.rallyforum.com/forums/ etc

I take it that you have alll of those domains on the same server and just point the domains to the same route dir ?

Also can you be more specific on what was edited out of the global.php ?

Any help apreciated as this sounds like a kewl little hack.

HM

Originally posted by Mark Hewitt


You mean like my site
http://www.motorsportforums.com/forums/ vs
http://www.indyracingforum.com/forums/ vs
http://www.rallyforum.com/forums/ etc


May i ask how you handled the login storage?

Or does one have to login 3 times?

If used with Biras Cookie Hack then I would think that the problem of having to log in all the time would be sorted or am I barking up the wrong tree :).

Anyhow this would be a kewl hack for server admin so I think its worthy of a ^^^BUMP^^^

HM

Im working on a extensive cross domain hack, however i dont believe the work will be released at this stage.

It really depends on how much longer its going to take me and how much code i have to write.










privacy (GDPR)