Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
DDDS - Different Domain Different Style Details »»
DDDS - Different Domain Different Style
Version: 1.0.5, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.8 Rating:
Released: 07-05-2007 Last Update: 08-24-2007 Installs: 86
Supported Uses Plugins
 

This is a simple add-on which will force a specific styleid based on the host url the user visited.

If you have 2 domain names which point to the same forum, you can have a customized style based on the domain name visited. You can do what you want, but it may be as simple as only having a different banner reflecting the host name visited, or if you have merged 2 forums - users could still get the same skin they always have had if they continue to visit the same URL.

Other uses may be having wap.domainname.com point to a different style than www.domainname.com.

With the HOST matching be aware that if the URL specified in the add-on matches anywhere in the url visited, the add-on will be triggered.

e.g. if URL specified in add-on = domainname.com, any subdomains of domainname.com will match this.

Version History
1.0.0: product_ddds_36.xml - Initial release, Supports a single additional domain
1.0.1: product-5_ddds_36.xml - Supports up to 5 additional domains
1.0.2: product-5_ddds_36.xml - fixed typo in code - update required!
1.0.4: product-5_ddds_36.xml - fixed bug, added comment code [B]update required!
1.0.5: product-5_ddds_36.xml - removed comment code - caused issues on some systems

Show Your Support

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

Comments
  #92  
Old 05-21-2008, 12:27 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure is, there is however a 3.7 version over here which has some minor changes although identical functionality...
Reply With Quote
  #93  
Old 02-26-2009, 03:50 AM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone types in mobile.mydomain.com this works fine. If they type in mobile.mydomain.com/forum/index.php it uses the default skin instead of the mobile skin. Shouldn't this keep the mobile skin throughout the whole site?
Reply With Quote
  #94  
Old 02-26-2009, 07:34 AM
vanistrians vanistrians is offline
 
Join Date: May 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay... I'm an actionscript guru... not php/vbulletin gumshoe. I tried monkying around with this add on and got no results... here is what I did...

First I went to the plug in manager from the plug ins and products in vbulletin and then went to the link Force URL to Style and messed around with some of the code from the panel. Please tell me the proper method to place for the variables so I can see this actually work. here is the code...

if ($vbulletin->options['ddds_36_enabled'] == 1)
{
if ($vbulletin->options['ddds_36_en1'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url1'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style1'];
}
}

if ($vbulletin->options['ddds_36_en2'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url2'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style2'];
}
}

if ($vbulletin->options['ddds_36_en3'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url3'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style3'];
}
}

if ($vbulletin->options['ddds_36_en4'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url4'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style4'];
}
}

if ($vbulletin->options['ddds_36_en5'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url5'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style5'];
}
}
}



I tried the following method...

if ($vbulletin->options['ddds_36_en2'] == 1)
{
$styleurl=$vbulletin->options['http://www.domainname.com/'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['template_style_name'];
}
}

badda bing... badda broken ! nothen appears to take any effect. Crack all the greenhorn jokes you want... time constraints get the best of any jedi !
Reply With Quote
  #95  
Old 02-26-2009, 12:40 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting the following error

Warning: preg_match() [function.preg-match]: Unknown modifier 'h' in /global.php(233) : eval()'d code on line 9

and when I try to log in I get

vBulletin Message
Unable to add cookies, header already sent.
File: /usr/local/www/htdocs/htf/includes/class_core.php
Line: 3052

I couldn't log in to turn off the product so I deleted it from the database. I am still getting the error message. The only way I can get my forum to work is to comment out

($hook = vBulletinHook::fetch_hook('style_fetch')) ? eval($hook) : false;

Then everything works except now I cannot access my portal page that uses vBAdvanced as it uses the fetch_hook to load.

Any ideas how to fix this?

Thanks,
Parker
Reply With Quote
  #96  
Old 02-26-2009, 12:53 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind. I got it fixed.

Parker
Reply With Quote
  #97  
Old 02-26-2009, 08:05 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Parker - glad to hear, how about the query in post #92?
@vanistrians - what are you trying to do?
Reply With Quote
  #98  
Old 02-28-2009, 12:11 AM
vanistrians vanistrians is offline
 
Join Date: May 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dartho- I am trying to figure out the proper way to use DDDS of coarse. I have the product installed but just need to know the Standard Order of Procedure of how to use it... the basics 101.



I went to vbulletin options and selected Different Domain Different Style. I'm now @ the DDDS control panel.
Here is a link to the image of the control panel...




I also have a question if I should change anything in the following php code...





if ($vbulletin->options['ddds_36_enabled'] == 1)
{
if ($vbulletin->options['ddds_36_en1'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_en1'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style1'];
}
}

if ($vbulletin->options['ddds_36_en2'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url2'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style2'];
}
}

if ($vbulletin->options['ddds_36_en3'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url3'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style3'];
}
}

if ($vbulletin->options['ddds_36_en4'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url4'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style4'];
}
}

if ($vbulletin->options['ddds_36_en5'] == 1)
{
$styleurl=$vbulletin->options['ddds_36_url5'];
if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
{
$styleid=$vbulletin->options['ddds_36_style5'];
}
}
}



In other words... what is the simplest way for me to assign a different style to a different domain with this? I do not see anything else in the Different Domain Different Style control panel that show where to input the style... it just shows Style ID and I have a choice of entering 0 to 5. True I can enter the url but how do I assign the different style to the newly selected url input ?
Reply With Quote
  #99  
Old 02-28-2009, 12:19 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DDDS is not the answer , all you do is set your additional domain names home page to the style id in your server admin cp .

www.dieselbombers.com
www.dieselbombers.mobi

this will also prevent search engines from indexing your additional domains as different sites and removing links from its listing as duplicate content
Reply With Quote
  #100  
Old 02-28-2009, 12:27 AM
vanistrians vanistrians is offline
 
Join Date: May 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

diesel.. how do I do this? And what do you mean DDDS is not the answer? I have a total of 4 urls hosted that shares the same data that I want to have similar but different stylesheets. Basically Im trying to develop a vbulletin based social network where the main url defaults to the vbadvanced dynamics article generator. The second url would share the same database but would just default to the vbulletin based blog module. I would like to assign similar but slightly different style sheets (the article url would have different page navagation and the blogger would have its own custom page navagation). As it stands... both the article url and blog url currently share the SAME template navigation. I really hope DDDS is a way to fix this.
Reply With Quote
  #101  
Old 02-28-2009, 12:29 AM
vanistrians vanistrians is offline
 
Join Date: May 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From the looks of things the hype of DDDS was as big of a hype as obama's economic bailout plan. If DDDS is not qualified as a solution... then what is?


lol DDDS = bailout plan for vbulletin site developers wanting to create a multi-url socnet !
Reply With Quote
Reply


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 12:04 AM.


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.04444 seconds
  • Memory Usage 2,310KB
  • Queries Executed 27 (?)
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)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
  • (4)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_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