vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Two URLs, Two Skins, One Board (https://vborg.vbsupport.ru/showthread.php?t=93818)

Markro 08-07-2005 09:17 PM

Two URLs, Two Skins, One Board
 
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
PHP Code:

$styleid intval($styleid); 

above it add
PHP Code:

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...

PHP Code:

 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:

PHP Code:

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

Quote:

Originally Posted by MarcoH64
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.


All times are GMT. The time now is 09:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01141 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete