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

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

Category: Forum Display Enhancements - Version: 3.7.0 Rating:
Released: 03-27-2008 Last Update: 05-18-2008 Installs: 189
Uses Plugins
Re-useable Code Translations  
No support by the author.

This is a simple add-on which will force users to a specific style based on the url the user visited.

I wrote this with the idea of being able to create a subdomain of mobile.domainname.com and have visitirs to that URL forced to a mobile style whilst visitors to my normal site (domainname.com or www.domainname.com) would be rpesented with my regular style.

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

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 Information
1.0.0 - Initial release ported from 3.6 version
1.0.1 - Fixed missing Setting Group Name


product-ddds37.xml supports a single additional domain
product-ddds37_5-domain-version.xml supports one to five additional domains


To upgrade, simply import and allow overwrite.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
CrashPush, Relientk

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

Good job - and thanks for posting back here...
Reply With Quote
  #163  
Old 10-17-2009, 09:34 PM
jahshaka jahshaka is offline
 
Join Date: Jan 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

love the hack its awesome!

i use the zoints seo plugin however and it breaks the use of the new domain in the fourm links.

is there anyway to support zoints seo? if you could point me in the right direction i could help out... ie how/where do you rewrite the links to follow the new domain?

i would think that to support zoints wold be easy, since its just the web root that needs to be addressed...

thanks!
Reply With Quote
  #164  
Old 10-17-2009, 10:44 PM
jahshaka jahshaka is offline
 
Join Date: Jan 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, dont have a real fix but managed to get this working with zoints seo... basically you can easily disable zoints for the redirected domains by editing:

The Different Domain, Different Style -> Force URL to Style plugin as follows:

PHP Code:
if ($vbulletin->options['ddds37_enable'] == 1)
{
  
$styleurl=$vbulletin->options['ddds37_domain'];
  if(
preg_match('/'.$styleurl.'/i'$_SERVER['HTTP_HOST'], $match))
    {
      
$vbulletin->options['zointsseo_on'] = 0;
      
$styleid=$vbulletin->options['ddds37_style'];
    }

basically just added the following

PHP Code:
   $vbulletin->options['zointsseo_on'] = 0
this disables zoints when using the new template...

patch not a fix
Reply With Quote
  #165  
Old 10-20-2009, 02:11 AM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to have multiple domains use one style and one specific domain use another?
Reply With Quote
  #166  
Old 10-20-2009, 08:23 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

configure vb to use the one style which you want the 'multiple domains' to use, then install this to change the style of the other 'specific domain' to use. You can configure vb to not allow users to change styles - but you still have to have the styles checked as user selectable to that this add-on can use it.
Reply With Quote
  #167  
Old 10-22-2009, 06:59 PM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i moved my forum, everything BUT this plugin is working... DDDS seems to ignore the domain name, is there something i might have overlooked ? something i can do to test ?

tks....
Reply With Quote
  #168  
Old 10-23-2009, 01:19 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when you say moved your forum, you mean from one host to another? Did you configure your domains/subdomains in the same manner (ie. pointing to teh same webspace as your primary domain)?
Reply With Quote
  #169  
Old 10-23-2009, 02:28 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i moved the forums from one domain to another, remaining on the same host..
Reply With Quote
  #170  
Old 10-23-2009, 05:44 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and the secoind part of teh question - I need to know how you are using iut to know how to help.

If you have a new domain name, you'll need to recopnfigure DDDS. Are you using subdomains to trigger different styles? If so, have you created and parked those subdoains correctly (on teh same web space/root as your primary domain)?
Reply With Quote
  #171  
Old 10-23-2009, 11:29 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
and the secoind part of teh question - I need to know how you are using iut to know how to help.

If you have a new domain name, you'll need to recopnfigure DDDS. Are you using subdomains to trigger different styles? If so, have you created and parked those subdoains correctly (on teh same web space/root as your primary domain)?
yes, i did reconfigure DDDS, all i changed was mobi.olddomain.net to mobi.newdomain.net..

i do not use sub-domains for the mobile site. all i had/want DDDS to do is when it detects mobi.mydomain.net use style id 5..

tks.
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 05:55 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.06789 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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