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
  #212  
Old 05-16-2011, 01:22 PM
sung sung is offline
 
Join Date: Feb 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sung View Post
So far the only issue I have run into is with forums that are links, they still seem to be using the "default" forum URL instead of the mobile one, i.e. they try to go to www.example.com instead of m.example.com despite being relative links
I've managed to fix this issue (for me at least) by creating a new plugin to the header_redirect hook.

Code:
if ($vbulletin->options['ddds37_enable'] == 1)
$ddds37_default = "www.example.com/forum";
{
  if(strstr($_SERVER['HTTP_HOST'], $vbulletin->options['ddds37_domain']) && strstr($url, $ddds37_default))
    {
      $url = str_replace($ddds37_default, $vbulletin->options['ddds37_domain'], $url);
    }
}

NOTE: This assumes you're trying to redirect your "normal" forums at URI www.example.com/forum to whatever you have set in the DDDS options. Change the $ddds37_default variable accordingly.
Reply With Quote
  #213  
Old 05-16-2011, 10:07 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you can removbe the <BASE> tag from the header which is causing the default URL to be used in relative links
Reply With Quote
  #214  
Old 05-17-2011, 02:10 AM
sung sung is offline
 
Join Date: Feb 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
I think you can removbe the <BASE> tag from the header which is causing the default URL to be used in relative links
The <base> tag is set correctly with my mobile domain and redirects (from links or searches) don't work.

Even with the <base> tag removed, you'd still need the above plugin for redirects to work
Reply With Quote
  #215  
Old 09-12-2011, 11:23 PM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am not allow to add park domain . can it work with subdomain addition ?
Reply With Quote
  #216  
Old 09-13-2011, 01:07 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes it can.
Reply With Quote
  #217  
Old 09-13-2011, 06:32 AM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you please guide me how can i do it .

- I upload the file

- Change the file name to wirless.css

- Upload the style

- add the sub domain

Confusing part : when adding it its come with public_html/mobile as i am trying to mobile.mysite.com

or should i go with public_html only

THANKS waiting for reply
Reply With Quote
  #218  
Old 09-13-2011, 08:56 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has nothing to do with any styles.

Before you can use this, you must have a domain name or subdomain configured pointing at the same web space as your primary domain. Usually a CNAME record for teh secondary [sub]domain pointing at your primary domain will do the trick - check with your provider if you don;t know how to do this.

Additionally you will need a secondary style installed.

Instructions:
  • Save XML file in first post to your computer
  • Log into AdminCP on your site
  • AdminCP -> In Plugins & Products -> Manage Products click the [Add/Import Product] link at the bottom of the page
  • Click the Browse button and locate the XML file you saved to your computer.
  • Click the "Yes" radio button to allow overwrite
  • Click the Import button to import the product.
  • Now go to AdminCP->vBulletin Options->vBulletin Options
  • Locate the "Different Domain, Different Style" section.
  • Select 'Yes' to enable DDDS
  • Enter in the [sub]domainname you wish to specify a style for. eg. mobile.vbulletin.com
  • Select the style you wish to use for this domain name.
  • Click the "Save"button.
  • Now go to AdminCP->vBulletin Options-> General Settings and add your [sub]domain name to the Post Referrer Whitelist
Assuming all is configured correctly (style, [sub]domain and this add-on, you should be able to browse to your [sub]domain and get teh configured style.
Reply With Quote
  #219  
Old 09-13-2011, 08:50 PM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
This has nothing to do with any styles.

Before you can use this, you must have a domain name or subdomain configured pointing at the same web space as your primary domain. Usually a CNAME record for teh secondary [sub]domain pointing at your primary domain will do the trick - check with your provider if you don;t know how to do this.
Sorry about my this question . i have a domain name www.myforum.com and i want this for the mobile style : mobile.myforum.com

so in this case what will i do, Kindly please help in this thanks
Reply With Quote
  #220  
Old 09-13-2011, 10:15 PM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you do what I said in previous post!
Reply With Quote
  #221  
Old 09-28-2011, 03:15 AM
infnity8x3 infnity8x3 is offline
 
Join Date: Apr 2009
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I log in with the new subdomain I get this error msg

Invalid Redirect URL

But it in fact does log me in. Any reason why i would get this?

Ok i got it boiled down to my forum url setting in the admincp. If i change that to the new mobile subdomain it logs in fine. Only problem is that is not where my forum is located and changing that breaks alot of codes especially the bburl tag.
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 06:20 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.05325 seconds
  • Memory Usage 2,315KB
  • 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
  • (1)bbcode_code
  • (3)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
  • (3)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