Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2005, 09:17 PM
Markro Markro is offline
 
Join Date: Jun 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 08-07-2005, 09:32 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 08-07-2005, 11:46 PM
Markro Markro is offline
 
Join Date: Jun 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I'll test it out.
Reply With Quote
  #4  
Old 08-08-2005, 12:28 AM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me subscribes to this thread for future reference..... might have a use for this.
Reply With Quote
  #5  
Old 08-09-2005, 03:35 AM
Markro Markro is offline
 
Join Date: Jun 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-09-2005, 09:04 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-09-2005, 11:19 PM
Markro Markro is offline
 
Join Date: Jun 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Duely noted.
Reply With Quote
  #8  
Old 08-09-2005, 11:26 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 08-09-2005, 11:33 PM
Markro Markro is offline
 
Join Date: Jun 2004
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, same content, one database, two styles.
Reply With Quote
  #10  
Old 08-10-2005, 03:26 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:32 AM.


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.04470 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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