Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Different Domain, Different Style Details »
Different Domain, Different Style
Mod Version: 1.0.1, by dartho (Coder/Designer) dartho is offline
Developer Last Online: Mar 2022 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.0 Rating: (13 votes - 4.77 average) Installs: 188
Released: 28 Mar 2008 Last Update: 19 May 2008 Downloads: 1169
Not Supported Uses Plugins Re-usable Code Translations  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Forum Display Enhancements DDDS - Different Domain Different Style dartho vBulletin 3.6 Add-ons 116 25 Nov 2009 08:20

  #211  
Old 16 May 2011, 14:22
sung sung is offline
 
Join Date: Feb 2002
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.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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
  #212  
Old 16 May 2011, 23:07
dartho dartho is offline
 
Join Date: Sep 2005
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
  #213  
Old 17 May 2011, 03:10
sung sung is offline
 
Join Date: Feb 2002
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
  #214  
Old 13 Sep 2011, 00:23
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
i am not allow to add park domain . can it work with subdomain addition ?
Reply With Quote
  #215  
Old 13 Sep 2011, 02:07
dartho dartho is offline
 
Join Date: Sep 2005
yes it can.
Reply With Quote
  #216  
Old 13 Sep 2011, 07:32
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
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
  #217  
Old 13 Sep 2011, 09:56
dartho dartho is offline
 
Join Date: Sep 2005
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
  #218  
Old 13 Sep 2011, 21:50
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
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
  #219  
Old 13 Sep 2011, 23:15
dartho dartho is offline
 
Join Date: Sep 2005
you do what I said in previous post!
Reply With Quote
  #220  
Old 28 Sep 2011, 04:15
infnity8x3 infnity8x3 is offline
 
Join Date: Apr 2009
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.

Last edited by infnity8x3; 28 Sep 2011 at 05:05.
Reply With Quote
  #221  
Old 28 Sep 2011, 05:20
dartho dartho is offline
 
Join Date: Sep 2005
have you gone through the post about 3 above (Post 217) ?
Reply With Quote
  #222  
Old 28 Sep 2011, 05:35
infnity8x3 infnity8x3 is offline
 
Join Date: Apr 2009
Yes.

I have "mobile.example.com" and "example.com"

In vbulletin options, my forum url is "http://example.com"

If i change it to "http://mobile.example.com" then it works. And i login fine.

But that is not my true forum's Url so i can't keep it set to the mobile site.



Update just so you know. I have vbadvanced installed and set up so. http://example.com is my home page / portal and http://example.com/forum are the actual forums. I have my sub domain set up so it points directly to the /forum directory that was the mobile subdomain bypasses the vbadvanced page altogether

I may be 100% screwed
https://www.vbulletin.com/forum/show...ty-patch/page3

Last edited by infnity8x3; 28 Sep 2011 at 06:57.
Reply With Quote
  #223  
Old 28 Sep 2011, 06:33
dartho dartho is offline
 
Join Date: Sep 2005
I think that's your problem. Your webroot for any subdomain has to be same as for primary domain. Ideally you'd have a CNAME DNS record which points mobile.example.com at example.com In cPanel parking a domain on teh same root as your primary domain is how to do it.
Reply With Quote
  #224  
Old 28 Oct 2011, 18:51
autoescala autoescala is offline
 
Join Date: Oct 2011
Originally Posted by for5up View Post
hi sung

i used your modification, and it runs perfectly in my forum.

all link has changed into m.myforum.com (thread,forum,post, etc)

thanks for the change


*i use 4.1.3
Please, can you post your full code, I dont understand where I have to add exactly.... I try 3 combinations and no runs on 4.1.7.

Please post here your plugin php code
Reply With Quote
  #225  
Old 09 Feb 2012, 10:02
autoescala autoescala is offline
 
Join Date: Oct 2011
Originally Posted by autoescala View Post
Please, can you post your full code, I dont understand where I have to add exactly.... I try 3 combinations and no runs on 4.1.7.

Please post here your plugin php code

Hi to all,

After many work I modify the addon with the sung options and It works for me on 4.1.7 very well..

m.example.net -> mobile style
mobile.example.net -> mobile style
example.net -> normal style

But the problem is when the forum emails some alert to the users from a thread they always use mobile.example.net/forum/etc instead of example.net/forum/etc !

how can I solve this ? any ideas ?
Best regards
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 07:32.

Layout Options | Width: Wide Color: