The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Different Domain, Different Style Details »» | |||||||||||||||||||||||||
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
|
Comments |
#202
|
|||
|
|||
Quote:
hint - read all the posts on the previous page! Quote:
|
#203
|
|||
|
|||
Code:
if( VBSEO_BASEDEPTH && defined('VBSEO_PREPROCESSED') && ($_SERVER['HTTP_HOST'] != 'm.mydomain.com') ) |
#204
|
|||
|
|||
OK, I dont use this plugin to use a mobile version of the template.
i use this plugin to have something like 2 diferent microforums, in same database / installation. The main problem with this plugin, is that override the forum preference that allow you to have diferent style for diferent categories. For example: "Style A" is on subdomain "a.clublgmobile.com" with categories/forums "1,2,3,4,5" "Style B" is on subdomain "b.clublgmobile.com" with categories/forums "6,7,8,9,10" if i enther in main forum home, "a.clublgmobile.com", all its working ok. But what happen if a user put a address like_: "http://a.clublgmobile.com/categoryforum/6" The forum will open with "b" category in a style. This plugin disable/override the option in forum preference, that allow me to have diferent style in diferent categories / forums. I know that the main proposal of this plugin is use mobile version style, and not what im doing. but posible someone can helpme. Thans and regards |
#205
|
|||
|
|||
What you suggest is the main problem of this plugin is in fact exactly what this plugin is designed to do, override a style based on [sub]domain name used to visit the page.
I might be able to offer a change to this script to do what you want (ie. do what it currently does UNLESS a custom style is defined for a forum) - *might* Leave it with me ... |
#206
|
|||
|
|||
I just had a quick look, if you edit the "Force URL to Style" plugin and replace
Code:
if ($vbulletin->options['ddds_36_enabled'] == 1) Code:
if (($vbulletin->options['ddds_36_enabled'] == 1) && (!$foruminfo['styleid'])) |
#207
|
|||
|
|||
Before nothing thanks for your help.
Then. When modify the lines provided by you, it give me those errors. and the plugin stop working Code:
Parse error: syntax error, unexpected T_BOOLEAN_AND in /usr/home/clublgmobile/www/foros/includes/class_bootstrap.php(890) : eval()'d code on line 8 Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_bootstrap.php(890) : eval()'d code:8) in [path]/includes/functions.php on line 4939 |
#208
|
|||
|
|||
Did you change the correct line? It should have been only the first line of teh plugin that got changed. I have this change working on my own live site as we speak.
Which version are you using, 5 domain version or single? |
#209
|
|||
|
|||
Im using single one domain.
And yes i modified only first line. Exactly ive change this line: Code:
if ($vbulletin->options['ddds_37_enabled'] == 1) Code:
if (($vbulletin->options['ddds_37_enabled'] == 1) && (!$foruminfo['styleid'])) |
#210
|
|||
|
|||
Tried with multiple domain version and same problem.
|
#211
|
|||
|
|||
Quote:
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 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|