PDA

View Full Version : Two URLs, Two Skins, One Board


Markro
08-07-2005, 09:17 PM
I want to setup my forums so that when a user access it from the main url ( http://www.mainurl.com ) it'll display mainurl bulletin style. But, when they access it from secondary url ( http://www.secondaryurl.com ) it'll change the style to secondaryurl bulletin style. Is this possible? If so, can someone help me.

Adrian Schneider
08-07-2005, 09:32 PM
For vb 3.0.x
global.php

find
$styleid = intval($styleid);
above it add
if ($_SERVER['SERVER_NAME'] == 'domaina')
{
$styleid = X;
}
elseif ($_SERVER['SERVER_NAME'] == 'domainb')
{
$styleid = Y;
}

Untested, but I think that'll work

Markro
08-07-2005, 11:46 PM
Thanks, I'll test it out.

KW802
08-08-2005, 12:28 AM
/me subscribes to this thread for future reference..... might have a use for this.

Markro
08-09-2005, 03:35 AM
Oddly enough, the script doesn't work, because when I visit the domain from:

http://www.domain.com
-or-
http://domain.com

it'll only work on one, the one I configured in...


if ($_SERVER['SERVER_NAME'] == 'domaina')
{
$styleid = X;
}
elseif ($_SERVER['SERVER_NAME'] == 'domainb')
{
$styleid = Y;
}


so, if I put, www.domain.com it'll only work for http://www.domain.com, but if I put domain.com it'll only work for http://domain.com .... have a solution?

EDIT: Solution found.

Solution:


if ($_SERVER['SERVER_NAME'] == 'domaina.com' || $_SERVER['SERVER_NAME'] == 'www.domaina.com')
{
$styleid = 2;
$vboptions['styleid'] = 2;
$bbuserinfo['styleid'] = 2;
$codestyleid = 2;
}
elseif ($_SERVER['SERVER_NAME'] == 'domainb.com' || $_SERVER['SERVER_NAME'] == 'www.domainb.com')
{
$styleid = 3;
$vboptions['styleid'] = 3;
$bbuserinfo['styleid'] = 3;
$codestyleid = 3;
}


Another question for you fellas, If I want to hide certian boards when domaina is visited or when I visited domainb different boards are hidden.

Marco van Herwaarden
08-09-2005, 09:04 AM
Making 1 physical vB installation accessible from multiple domains, and make them act as seperate boards (style/content) based on the domain, would require you to have 2 vBulletin licenses.

What you are doing now would be against your license agreement if you only have 1 license. I suggest you first ask at bulletin.com if your plans are within the license agreement.

Markro
08-09-2005, 11:19 PM
Duely noted.

yinyang
08-09-2005, 11:26 PM
Making 1 physical vB installation accessible from multiple domains, and make them act as seperate boards (style/content) based on the domain, would require you to have 2 vBulletin licenses.

What you are doing now would be against your license agreement if you only have 1 license. I suggest you first ask at bulletin.com if your plans are within the license agreement.

i think he's using the same content, i.e. one database, for both boards. only the styles are different.

Markro
08-09-2005, 11:33 PM
Yes, same content, one database, two styles.

Logikos
08-10-2005, 03:26 AM
He isn't breaking the EULA. He is just having one url be redirected to the site. I have www.vbhackers.com, and www.vbhacks.us. both point to the same content, same database, same style.

He just wants to different styles to be forced when choosing one or the other domain.

Marco van Herwaarden
08-10-2005, 04:07 AM
If I want to hide certian boards when domaina is visited or when I visited domainb different boards are hidden.
He is not only changing the style, but also the content with this last remark.

Logikos
08-10-2005, 04:14 AM
Domain1.com has style #1 and shows forum# 1 & 2
Domain2.com is being redirected to domain1.com with style #2 and shows only forum # 1.

Does that break the EULA? I'm actually asking seriously since I'm not sure. :)

yinyang
08-10-2005, 04:51 AM
If I want to hide certian boards when domaina is visited or when I visited domainb different boards are hidden.

He is not only changing the style, but also the content with this last remark.

When Markro refers to hiding certain boards, i think he means certain forums. So, for example, Domain A sees forums 1-5 and 11-15 and Domain B sees forums 6-10 and 11-15. I don't think this would break any rules, but I could be wrong.

Markro, I think you can easily achieve this forum "hiding" by having those registered from one domain become one usergroup and the other domain another usergroup. then just hide the forums from each corresponding usergroup.

nix
08-10-2005, 05:38 AM
I'm thinking of doing something like this also. Have www.site1.com and www.site2.com both use the same database but retain the url. So this would require two license to achieve this correct? Cause I assume you would need to installs of VB.

Marco van Herwaarden
08-10-2005, 06:10 AM
When Markro refers to hiding certain boards, i think he means certain forums. So, for example, Domain A sees forums 1-5 and 11-15 and Domain B sees forums 6-10 and 11-15. I don't think this would break any rules, but I could be wrong.
I think it has been stated by Jelsoft in previous situation that this would be against the license.

But it is no use discussing this here. Best would be to post this as a question at vb.com and ask for an official answer by Jelsoft (or do a search first).

Logikos
08-10-2005, 01:36 PM
Separating content and forum styles by using subforums and forumdisplay links within a single domain is allowed because that functionality is built-in to vBulletin.

http://www.vbulletin.com/forum/showthread.php?t=103150

yinyang
08-10-2005, 05:10 PM
3. Your forum is accessable from multiple domains and your forums are configured to show/hide certain forums based on the domain. This is not OK and requires an active vBulletin license for each domain. In this situation the forums appear to have separate content thereby making them separate forums in the eyes of the license agreement. Your forum content needs to be the same for each domain in order to qualify as a single forum.

the above quote is taken from Live Wire's link above. Well, i guess it somes it up. You cannot hide those forums or you need two licenses.

However, if you lock them, according to usergroup (as suggested before), then i think you're okay. Basically, regardless of style, all the content from both domains needs to look the same. They don't need to be accessible the same, I believe, but they need to look the same.

Markro
08-11-2005, 11:08 PM
I never figured out how to hide / show certian boards, and considering I don't wish to purchase another license, I think I'll just display all boards and just use the different style / domain idea.

Thanks guys for the indepth researchon the legal issues.

yinyang
08-12-2005, 12:23 AM
I never figured out how to hide / show certian boards, and considering I don't wish to purchase another license, I think I'll just display all boards and just use the different style / domain idea.

Thanks guys for the indepth researchon the legal issues.

there's two things you must do.

1) in your forum controls, click where it says somethine like "hide locked forums"
2) the you have to go to forum permissions and set the appropriate permissions for each usergroup. those that you lock out will then not be able to see the locked forums.

GrendelKhan{TSU
08-12-2005, 01:54 AM
ooOooo me keeps an eye on this thread for later..... will def be needing it :)

Brinnie
08-13-2005, 07:38 PM
By the way, Google will hate you for this.

rebootln
08-13-2005, 08:44 PM
i would like to do this also

same content just different logo to be displayed....not even different style

Chris 96 WS6
12-31-2006, 05:45 PM
Yeah, I want to do this too...same content on both "sites", just branded with a different domain/skin.

Somebody should release a hack for this.

Where would we put this in 3.6? Create a plugin under global_start?

Oddly enough, the script doesn't work, because when I visit the domain from:

http://www.domain.com
-or-
http://domain.com

it'll only work on one, the one I configured in...


if ($_SERVER['SERVER_NAME'] == 'domaina')
{
$styleid = X;
}
elseif ($_SERVER['SERVER_NAME'] == 'domainb')
{
$styleid = Y;
}


so, if I put, www.domain.com it'll only work for http://www.domain.com, but if I put domain.com it'll only work for http://domain.com .... have a solution?

EDIT: Solution found.

Solution:


if ($_SERVER['SERVER_NAME'] == 'domaina.com' || $_SERVER['SERVER_NAME'] == 'www.domaina.com')
{
$styleid = 2;
$vboptions['styleid'] = 2;
$bbuserinfo['styleid'] = 2;
$codestyleid = 2;
}
elseif ($_SERVER['SERVER_NAME'] == 'domainb.com' || $_SERVER['SERVER_NAME'] == 'www.domainb.com')
{
$styleid = 3;
$vboptions['styleid'] = 3;
$bbuserinfo['styleid'] = 3;
$codestyleid = 3;
}


Another question for you fellas, If I want to hide certian boards when domaina is visited or when I visited domainb different boards are hidden.

Adrian Schneider
12-31-2006, 06:07 PM
in 3.5/3.6 put it in the style_fetch plugin, and also you need to set $userselect to true

Chris 96 WS6
12-31-2006, 07:56 PM
How should I set the alternate domain up? Masked park on top of the forum home?

Chris 96 WS6
01-02-2007, 06:09 PM
I implemented the code as suggested but it doesn't work. The plugin is active, $userselect is on.

I don't have to turn on register_globals to get $_SERVER to work do I?

GruntHalo
03-15-2007, 09:30 PM
wow lol this forum has everything :O