PDA

View Full Version : Forum Display Enhancements - Different Domain, Different Style


dartho
28 Mar 2008, 03:23
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.

Jase2
28 Mar 2008, 03:31
Hi Dartho,

So, I can choose any domain for the mobile style? If this is the case, is the force style hack needed?

Regards Jason :)

dartho
28 Mar 2008, 03:43
You can use either add-on or both side by side.

One example of using side by side would be if you wanted to not auto-detect and force iPhones to a mobile style, but still wanted to give them the option of browsing. You could add iPhones to the exclusion list in the auto-detect mobile device hack and configure this addon so that iPhone users could still browse via mobile.domainname.com if they found the default style too slow or bandwidth hungry.

Jase2
28 Mar 2008, 03:49
Ah, I see.

Dartho, I've just installed this product, but in the vBulletin options there is no title. Not a big problem, as I can still set the settings.

Regards Jason :)

dartho
28 Mar 2008, 05:42
Could you do a screen dump and show me - the code looks like it should be OK....

Ed: A 5 domain version has just been added

ChurchMedia
28 Mar 2008, 06:26
Cool! This is perfect for some things I'd like to do with my forum. Thanks!

dartho
28 Mar 2008, 07:13
I also have an add-on that will assign a different vBAdvanced page based on the domain which I'll post up ... "Different Domain, Different vBAdvanced Page" should do for a name :)

Jase2
28 Mar 2008, 16:19
Hi Dartho,

I want to use: www.tst2go.org... it doesn't seem to be owned by anyone -- would I have to purchase this -- or could I use it as an add-on domain?

Regards Jason :)

dartho
28 Mar 2008, 22:19
You would need to purchase the domain name, then depending on your hosting, you would need to park it on the same same webspace as your main domain

Jase2
29 Mar 2008, 01:35
I see -- thanks!

Regards Jason :)

MaxiMal
29 Mar 2008, 16:53
empty hack name in forum option

Jase2
29 Mar 2008, 18:30
I had that problem MaxiMal -- hmm I'll take a look at the code.

Regards Jason :)

lighti
01 Apr 2008, 01:32
Just a slight question - Does this do anything different from just adding on a domain and using it as a redirect domain pointing to the styleid?

dartho
01 Apr 2008, 01:49
This doesn't add domains - you'll need to register any additional domains or set up sub-domains and configure them to point to the same webspace as your primary domain. Redirects will not work with this add-on as they simply redirect one url to your primary domain.

Once you have your domain names setup and visiting these domain names takes you to the same content as your primary domain you can then install and configure this add-on.

What it then does is checks the URL that was used to get to your site, and if this matches one configured with this add-on it will override the default style with the configured style.

For example, if your sites primary domain is "domain.com" and you use the default vBulletin style, all visitors to your domain will be presented with this default style.

If you then register say "pinkdomain.com" and configure it to use the same webspace as your primary domain, all visitors to "pinkdomain.com" will also be presented with the same default style. If you were to install a new style - lets say with a pink colour scheme called "Pink" and installed this addon, you could configure it such that all visitors to "pinkdomain.com" will be presented with the "Pink" style whilst visitors to "domain.com" will continue to be presented with the default style. The same could be done if you configured a subdomain of "pink.domain.com"

The user/visitor can not override the style with this addon, even if you allow them to change styles, this will force the visitor to what ever style you configure.

Hope this helps..

Sparky_s
27 Apr 2008, 00:31
*installed*

Hey I think this may interfere with vBseo in some way.

mobile.htireland.com goes to the mobile theme no problem, but all the links from then all go back to www.htireland.com.

Is there any other reports of this?

dartho
30 Apr 2008, 08:37
VBSEO sets the HTML BASE and essentially messes up this addon as all relative URLs will point to the BASE set by VBSEO as opposed to a relative URL.

I don;t use VBSEO, but you could probably find teh plugin that sets the HTML BASE and add a conditional so that it does not get changed on you mobile.

Alternatively, A simple plugin could be written taht re-sets the BASE if the mobile style is in use. ANyone out there use VBSEO who may also be able to work out a good place to do this?

Jase2
30 Apr 2008, 16:02
I use vBSEO and haven't encountered any problems, yet.

Mr:Ishi
01 May 2008, 06:33
i added this..bt not working...help me pls

joopster
12 May 2008, 14:57
I have my domain howieforums.com and I set up a mobile domain mobile.howieforums.com

When I go to mobile.howieforums.com it doesn't change the style. Any ideas?

dartho
12 May 2008, 23:11
Just checked you site - looks like you sorted it out...

Magnumutz
13 May 2008, 18:59
Can this be modified to allow you to have different styles on different subforums?

joopster
15 May 2008, 04:07
Just checked you site - looks like you sorted it out...

Yes I did, thank you.

dartho
15 May 2008, 04:34
Can this be modified to allow you to have different styles on different subforums?

You can already assign a style to a [sub]forum with vanilla vBulletin ...

swissbob
15 May 2008, 12:52
*installed*

Hey I think this may interfere with vBseo in some way.

mobile.htireland.com goes to the mobile theme no problem, but all the links from then all go back to www.htireland.com.

Is there any other reports of this?
I had the same problem, and solved it here:
http://www.vbseo.com/f2/base-href-23196

Amiga Harrison
16 May 2008, 17:02
Ah, I see.

Dartho, I've just installed this product, but in the vBulletin options there is no title. Not a big problem, as I can still set the settings.

Regards Jason :)

I've installed this mod and it is working perfectly, allowing me to go to a mobile skin via a sub domain.

However I also have the same issue as mentioned by Jase2. From the admin panel, when I go to vBulletin Options and scroll through the Setting Group list, an entry for DDDS is not shown. However there is a completely blank entry in the list and when i select this it goes to the DDDS settings page. Therefore it looks like it is adding the entry correctly into the Setting Group list but not adding a title.

dartho
19 May 2008, 08:01
I finally found and fixed the name not showing up in vBulletin options - simply reinstall and overwrite existing...

Amiga Harrison
20 May 2008, 10:32
Great. Thanks. That fixed it.

msu2k
21 May 2008, 20:18
Nevermind....found my answer about vBSEO above.

spankaveli
22 May 2008, 12:34
I must be the only one this isn't working for :(

I setup http://m.bayoushooter.com/ to forward to http://www.bayoushooter.com/forums and the redirect works so I installed the hack, turned it on, put "m.bayoushooter.com" in the domain name field and chose my mobile skin but when you go to m.bayoushooter.com it redirects but uses the default skin.

dartho
22 May 2008, 12:51
You shouldn't be using redirects as it does as the name implies, redirects you to the destination domain and as such this add-on won;t kick in.

You need to point or park your m.bayoushooter.com subdomain on the same webspace as your standard domain.

Slacker
23 May 2008, 05:52
Worked great for me, dartho. Awesome work!

http://mobile.slackercentral.com

wpeloquin
26 May 2008, 04:18
Just a slight question - Does this do anything different from just adding on a domain and using it as a redirect domain pointing to the styleid?

This doesn't add domains - you'll need to register any additional domains or set up sub-domains and configure them to point to the same webspace as your primary domain. Redirects will not work with this add-on as they simply redirect one url to your primary domain.

Once you have your domain names setup and visiting these domain names takes you to the same content as your primary domain you can then install and configure this add-on.

What it then does is checks the URL that was used to get to your site, and if this matches one configured with this add-on it will override the default style with the configured style.

For example, if your sites primary domain is "domain.com" and you use the default vBulletin style, all visitors to your domain will be presented with this default style.

If you then register say "pinkdomain.com" and configure it to use the same webspace as your primary domain, all visitors to "pinkdomain.com" will also be presented with the same default style. If you were to install a new style - lets say with a pink colour scheme called "Pink" and installed this addon, you could configure it such that all visitors to "pinkdomain.com" will be presented with the "Pink" style whilst visitors to "domain.com" will continue to be presented with the default style. The same could be done if you configured a subdomain of "pink.domain.com"

The user/visitor can not override the style with this addon, even if you allow them to change styles, this will force the visitor to what ever style you configure.

Hope this helps..

dartho, i think what he meant was this:

what this addon does it makes "pinkdomain.com" use the pink style, as opposed to the default style.

what would be the difference between this addon, and setting up "pinkdomain.com" to redirect to "domain.com?styleid=2"

dartho
26 May 2008, 04:50
@wpeloquin - The two scenarios are similar in many ways however a redirect is a redirect - it will send your visitor to a different page with a different URL. This add-on will leave your visitor at the page they landed on and with the same URL and all page activity will be relative to the landing URL. This Add-On allows you to Force a style on a user and not allow the user to change the style.

tekguru
30 May 2008, 18:26
Well I give up completely....

1) I've set up my sub-domain correctly so that:

mobile.4winmobile.com goes to www.4winmobile.com

2) The Mod is set to use the Mobile Style 0.06

3) I've modified functions_vbseo.php as per:

if(
VBSEO_BASEDEPTH &&
defined('VBSEO_PREPROCESSED')
&& ($_SERVER['HTTP_HOST'] != 'mobile.4winmobile.com')
)

Yet still no redirection.

Any ideas guys as this is driving me nuts!

Slacker
30 May 2008, 19:08
Well I give up completely....

1) I've set up my sub-domain correctly so that:

mobile.4winmobile.com goes to www.4winmobile.com

Any ideas guys as this is driving me nuts!
Actually you don't have that part right yet. You need to park that other domain, not redirect it. Like this:

http://mobile.slackercentral.com/

Notice that the URL doesn't change to my standard URL. The mod needs that to stay in the address bar to work. Delete the redirection and see if you can figure out how to park it.

tekguru
30 May 2008, 20:52
Looks like I'm stuck then as this is using WHM / cPanel to add a standard subdomain.

The problem with it failing are caused by me having:

1) .htaccess

redirect 301 /index.html http://www.4winmobile.com/forums/portal.php

in my .htaccess file.

2) index.html reading as per:

<html>
<head>
<title>Redirecting to the main site...........</title>
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://www.4winmobile.com/forums/portal.php">
</head>
<body>
</body>
</html>

Bu if I don't have these in there then there is no way to redirect folks from www.4winmobile.com to the portal at: http://www.4winmobile.com/forums/portal.php - Unless of course you can say otherwise?

Help!!

Slacker
30 May 2008, 21:30
Don't do it as a subdomain in cPanel. If you have access to WHM you can park the domain there. Can you find that option? It should be under DNS Options -> Park a domain. Tell it to park your mobile URL on top of your forums URL and you should be all set.

dartho
30 May 2008, 22:32
@tekguru - making your htaccess entry something like this would do the same thing assuming you have modrewrite on your server:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ ./forums/portal.php [R=301,L]

tekguru
30 May 2008, 23:23
Okay this is starting to get there......

Firstly thanks to Dartho if I use the code he kindly provided in .htaccess then one of my alternative true domains (www.tekguru.co.uk) does indeed remap correctly on top of the main site and retains the original URL.

1) First of all I do not own the mobile.4winmobile.com domain, no need to acording to ServInt as this is a valid subdomain of www.4winmobile.com. According to them the correct way of setting it up is as a subdomain.

Are they wrong here?

If I delete mobile.4winmobile.com as a sub domain I can ......

Try to park mobile.4winmobile.com on www.4winmobile.com. I fI try this I get an error.....

Argh I don't believe it - 5 times it blinking errors, I try it now and it parks! Argh!!!!

And the Mod has kicked in as well and is working.

God knows what the problem was!

Cheers for the advise guys :) Very happy now!

dartho
30 May 2008, 23:35
Parking is just a way of saying make the [sub]domain point the the same document root as your primary domain.

Glad it is working for you!

tekguru
30 May 2008, 23:35
The only problem is now that if one tries to log into mobile.4winmobile.com you get the logging in message then returned to the portal (or forum index) but not shown as logged in - a cookie issue I presume....

Any solution to that issue guys?

dartho
31 May 2008, 00:03
it looks like you may have other rewrite rules in your htaccess file or the base is being set to www.4winmobile.com as all links seem to be relative to this ...

tekguru
31 May 2008, 08:04
Okay thinking that rewrite rules may be the issue, my .htaccess was as per:

But the problem is still there.

I've checked through vbSEO to see if any rewrites are set in there, and none have been set.

Plus with vbSEO as per the earlier post I've modified the functions_vbseo.php file as per here (http://www.vbseo.com/f2/base-href-23196/), to read:

instread of:

I did try changing the line:



as mentioned in the thread but that made the entire forum vanish!

So unless there is something I else I need to take out of the .htaccess file it looks like I can't find the cause of the rewrite issue.

dartho
31 May 2008, 10:49
Nothing in the htaccess looks - bad - I suggest editing and removing that stuff now.

At a guess there must be a plugin changing your local links to be absolute...

tekguru
31 May 2008, 10:57
Yep edited :)

Well again looked through and there is nothing I can see in any of the plugins. I still think it is vbSEO somehow, but it looks like a dead project for me unfortunately.

Or I'm wondering if a cookie reset will help using the tools as I have this sort of issue each time I recreate my test site?

Would a list of the plugins / products help at all?

tekguru
31 May 2008, 12:54
Okay problem 99% solved. The fix was in two parts:

1) in vbSEO config turn off 'Include Domain Name in URLs?' as an option.

2) In the vB config set the cookie domain to .4winmobile.com (it was blank previously)

Now the only remaining issue which I'm not sure is fixable is that vBa CMPS saves within it the path to the forums so if one is at the portal and clicks on home you are sent to the default which is the www. domain instead of the mobile. domain.

Any ideas on fixing that one guys?

tekguru
31 May 2008, 13:20
And just fond the 'Different Domain, Different vBAdvanced Page' (http://www.vbulletin.org/forum/showthread.php?t=180651&highlight=Different+Domain%2C+vBAdvanced+Page)Mod so on the way :)

OsideRida06
05 Jul 2008, 04:03
I love this mod. But does it not allow people to change skins after this is installed? It seems people cannot change to a different skin. So they must use the skin set for the domain they came in through. Is this the case?

Is there anyway to make it where they come in through that domain and get the set skin? But then they can change it?

dartho
05 Jul 2008, 07:17
It seems people cannot change to a different skin. So they must use the skin set for the domain they came in through. Is this the case?

That is the case for this mod. Would need to re-write or extend it and use cookies to make it an initial setting which can be changed.... I've wanted to do this with another mod, so if/when I work that out it should be easy to apply to this one.

Karri
07 Jul 2008, 19:10
That is the case for this mod. Would need to re-write or extend it and use cookies to make it an initial setting which can be changed.... I've wanted to do this with another mod, so if/when I work that out it should be easy to apply to this one.
I look forward to it when you do. My users would love to be able to set different skins for different urls. Also I would like to request if possible that a setting be to only allow certain skins to be chosen per url.

Zacarias
17 Jul 2008, 23:50
Can I suggest putting this:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

In headerinclude for a different domain that links to the same content. It will tell spiders not to index it. You won't get a penalty for duplicate content.

dartho
18 Jul 2008, 03:33
Good idea - you'd need to put that in the headinclude of your"different style", I don't think it is something I'd get this add-on to do, so it will be up to individuals to make these edits..

samiro
21 Jul 2008, 07:40
it works only with subdomain? or with domain?

dartho
21 Jul 2008, 08:10
either

Amenadiel
24 Jul 2008, 04:59
wouldn't I need to have a different VB license for each domain I run the hack with, and same for VBSEO?

dartho
24 Jul 2008, 05:20
No - have a read here: http://www.vbulletin.org/forum/showthread.php?p=1286197#post1286197

and here: http://www.vbulletin.org/forum/showthread.php?p=1414222#post1414222

for the official word from vBulletin.com and pertinent parts of the license agreement.


Not sure about VBSEO though...

Amenadiel
24 Jul 2008, 22:31
I understand, but I was thinking in hiding some subforums in different skins so that

domain1 sees skin1 and subforums 1,2 and 3
domain2 sees skin2 and subforums 4, 5 and 6

That would be pretty much like pretending to be different sites, which is what the license stands for.

dartho
24 Jul 2008, 23:51
Yes, I believe you may require additional licenses if you were to do that with different domain names. However, from reading the license agreement if you were to only have different sub-domains you may be within the bounds of the license agreement, although possibly outside the intent or spirit of it.

Assim
29 Jul 2008, 10:27
I don't know how I can thank you for this Dartho, you made my days brighter. :)

Merjawy
13 Aug 2008, 22:19
This is beautifull.. I like it and I have a need for it too with 4 domains pointing at the same location...

Thanks

islandcommuter
19 Aug 2008, 22:31
This is a really valuable mod. Thanks for posting it!

In my tests, it only seems to work for users who are logged in. Could it be modified to work for users NOT logged in? Thanks!

Phil

dartho
19 Aug 2008, 22:54
This sounds like the styles are not user selectable, or that you don't allow users to change styles. As an admin, you can use any installed style whether userselectable or not, but normal users can't.

islandcommuter
20 Aug 2008, 06:27
Ah, thank you! I had the skins I needed excluded from user selection in the style settings! :0

Tulsa
29 Oct 2008, 10:06
I have downloaded and installed this Modification

Great Idea By the way..

I have parked the domain

mobile.mydomain.com to mydomain.com via WHM

but there is one thing i cant seem to figure out.

My forum is located at

mydomain.com/forums

with the parked mobile domain it goes to the mydomain.com

how do i get the mobile.mydomain.com to forward properly to the mydomain.com/forums/

thanks

dartho
29 Oct 2008, 13:13
not trying to be clever, but the same way you get mydomain.com to forward to mydomain.com/forums I guess?

Tulsa
29 Oct 2008, 13:35
ok mydomain.com has a page associated to it. created by vbadvanced cmps
and they are unable to get to the mobile skin forums from there.

Im sure that im doing something wrong the only thing is finding out what :D

dartho
29 Oct 2008, 23:17
check here: http://www.vbulletin.org/forum/showthread.php?p=1535871#post1535871 and http://www.vbulletin.org/forum/showthread.php?p=1655608#post1655608 here for a couple ways to work with vbadvanced and mobile styles

shridevimoogi
31 Oct 2008, 11:04
hi dartho


Could you please tell me how to configure different styles for different domains using this add on


your guidance will be of great help to me

Thanks
Shridevi

dartho
31 Oct 2008, 13:21
Point your additional domains to the same websapce as your primary one, install multiple styles, install this add-on and configure which domain uses which style

shridevimoogi
03 Nov 2008, 04:07
Hi,

Could any one please tell me how to use this mod,
I have installed it in my vb instance
where and how to configure it to have different styles for diff domain

I am a newbie,your detailed steps would of great help

Thanks

dartho
03 Nov 2008, 09:48
You configure the options for this addon in your AdminCP. Then expand "vBulletin Options" on teh left, the click the "vBulletin Options" sub-menu on teh left, then on teh right pane double click on "Different Domain, Different Style" and set the options accordingly

shridevimoogi
04 Nov 2008, 05:32
I apologize to bother you
I am not exactly setting how to configure
I am attaching a screen shot
after entering vbulletin options I am not finding different domain different styles

dartho
04 Nov 2008, 06:34
It will likely be right at the end of the list....

fredang85
06 Nov 2008, 05:13
How do you get different styles to show different forums?

e.g. Site 1.com has Category A and B
Site 2.com has Category C and D

Thanks in advanced.

dartho
06 Nov 2008, 10:02
I'm not the license police, but to do that you would require multiple licenses of vbulletin.

This addon can not do that, but it could probably be done with template conditionals

fredang85
06 Nov 2008, 12:13
will it be under showforum?

fredang85
07 Nov 2008, 16:59
in my sandbox.motorolafans.com, it shows everything propey, even in forum main, but if u go to any forum or thread, it can't detect css, or rather, it can, but doesn't show.

what makes?

dartho
07 Nov 2008, 22:33
Looking at the source to your site, the CSS path is relative. With the url re-writes the css fiule does not exist at the relative path when in any forum other than the forumhome

An immediate test/work around would be to edit your vbulletin options and select "No" to "Store CSS Stylesheets as Files?"

fredang85
08 Nov 2008, 03:54
Great! That fixed it! Thanks alot!

fredang85
19 Nov 2008, 17:21
are there anyone with login problems?

I let 2 domains point to the same place, but one's logged in while the other's not. is there a way out here?

dartho
19 Nov 2008, 22:16
There shouldn't be an issue. You'll need to add your sub domain to the Post Referrer Whitelist in vBulletin Options

sectomy
25 Nov 2008, 20:08
hi,

just a dumb question, ive installed this mod and activated it on one domain, the vbA page looks good, the links in the vbA and the navigation also point to the nord.xxx.com
but if i click on it, it shows me the style of my original forum.

what did i do wrong ? :(
vba with 3.7.3 vb

DieselMinded
29 Nov 2008, 01:27
With this modification your other Style will get Indexed in Search engine and compete with your real style and kill off each other with duplicate content .

I brought this up before if you dont want search engine results then it dont matter

grecostimpy
02 Dec 2008, 00:47
With this modification your other Style will get Indexed in Search engine and compete with your real style and kill off each other with duplicate content .

I brought this up before if you dont want search engine results then it dont matter

See post #51 for a solution to this:

http://www.vbulletin.org/forum/showpost.php?p=1578034&postcount=51

DieselMinded
02 Dec 2008, 09:26
Why not just redirect your Domains to your Style ids Server Side

www.dieselbombers.com
www.dieselbombers.mobi

dartho
02 Dec 2008, 09:58
htaccess redirects work well for doing what this plugin does - however it doesn;t seem to be working for your site? the .mobi just redirects to the .com?styleid=6 which doesn't look like a particularly firendly mobile style

DieselMinded
04 Dec 2008, 11:27
Days of The Slow , Choppy Cell Phone Internet are GONE !

Black berrys and Iphone are where its at , Look at my Mobile Site on one of them its Perfection ! , Even coding the mobile site to recognize Iphones and offer our Icon for there Desk Tops

nymyth
15 Dec 2008, 00:04
i cant get this to work at all...no matter what I do, the links on m.loungeboard.com always point to my main site.....i have vbseo i added the line of code that was mentioned earlier but still no luck....

ls7
16 Dec 2008, 15:13
Dartho, thanks for this mod - it is exactly what I am looking for. I believe I am very close to having it function, however still hitting a snag. My usage case is very similar to tekguru: I have vbseo installed on my forum and I manage my domain through cPanel. I'm somewhat of a newbie at site administration.

I installed the skin and mod at www.ontrackdriver.com. You can see that the Mobile skin is user selectable.

I have installed the "Different Domain, Different Style" product and configured it to use the Mobile skin.

I did the other alterations to account for vbseo: edited functions_vbseo.php, changed the absolute vs. relative settings, plus enabled the cookie for .ontrackdriver.com, as per tekguru's suggestions.

The problem is, when I add m.ontrackdriver.com as a sub-domain in cPanel, a visit to that URL simply re-directs to the default skin.

I believe the issue may be my method for creating the sub-domain m.ontrackdriver.com. In cPanel, I have:

-Subdomains
-Addon Domains
-Parked Domains
-Redirects

Is it necessary to use the Parked Domains method? The Subdomains method does not work when I add m.ontrackdriver.com and use the forum root as the root path. It simply redirects (even with redirection 'disabled') to the default skin.

Thanks for your help!

EDIT: Oh yeah, when I try to add m.ontrackdriver.com using the Parked Domains method, I get the following error:

Error from park wrapper: Sorry, you are not allowed to add any more than (0) parked domains!

So if I need to use the Parked Domains method, perhaps I need a different hosting package from Glowhost (my provider)?

dartho
17 Dec 2008, 02:35
I don;t have a cpanel account, but if memory serves you can use subdomains, you just need to not have redirectes, and set it's root folder to be the same as your primary domain.

Check your .htaccess file to make sure you don;t have any redirects in there - I noticed that ontractdriver.com redirects to www.ontrackdriver.com

ls7
17 Dec 2008, 03:49
Check your .htaccess file to make sure you don;t have any redirects in there - I noticed that ontractdriver.com redirects to www.ontrackdriver.com

Here is my .htaccess file. Would you mind having a look and letting me know if there are redirects in there? (sorry, I am not sure how to decipher)

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.ontrackdriver\.com
RewriteRule (.*) http://www.ontrackdriver.com/$1 [L,R=301]

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

dartho
17 Dec 2008, 05:38
I'm no expert in this area, but I'm guessing that:

RewriteCond %{HTTP_HOST} !^www\.ontrackdriver\.com
RewriteRule (.*) http://www.ontrackdriver.com/$1 [L,R=301]

is the issue. If it is what it looks like, it is redirecting all URL's which are NOT www.ontrackdriver.com to www.ontrackdriver.com

This would indeed redirect m.ontrackdriver.com to www.ontrackdriver.com

VBSEO would do this as it is good SEO to only have content listed on a single domain name, in this case it's www.ontrackdriver.com. I'd suggest changing this to:


RewriteCond %{HTTP_HOST} !^ontrackdriver\.com
RewriteRule (.*) http://www.ontrackdriver.com/$1 [L,R=301]


This will then redirect URL's which don't have the www, but leave all others alone. The only other there will be is m.ontrackdriver.com and we don;t want this redirected anyway.

As I said, I'm no expert in this, so rather than delete the lines, copy then and then comment out the originals with a leading '#' character to make reversal easy if need be. You could even do a quick initial test by just commenting out that section altogther before editing.

hope this helps

ls7
17 Dec 2008, 17:50
Thanks, dartho. Commenting out the code worked. But changing it to the code you suggested doesn't work (returns 500 level server error).

At least it appears to be working right now, will continue to test. Is having the code commented out a viable long term solution? Or will that leave vbseo or anything else affected?

dartho
17 Dec 2008, 22:29
Yeah - I got that previous code quite wrong - try removing the '!' or try the following


RewriteCond %{HTTP_HOST} ^ontrackdriver.com$
RewriteRule ^/(.*) http://www.ontrackdriver.com/$1 [R=301,L]


by not havng the code there, SEO 'experts' suggest you are possibly diluting your Google ranking by having 2 domains publishing the same content (the two domains being www.yourdomain.com and yourdomain.com). My uneducated view is that in the case of a www prefix, google et al wouldn't be that dumb - but it's easy to do (when you know how) so it can;t really hurt.

ls7
18 Dec 2008, 14:41
Yeah - I got that previous code quite wrong - try removing the '!' or try the following


RewriteCond %{HTTP_HOST} ^ontrackdriver.com$
RewriteRule ^/(.*) http://www.ontrackdriver.com/$1 [R=301,L]


by not havng the code there, SEO 'experts' suggest you are possibly diluting your Google ranking by having 2 domains publishing the same content (the two domains being www.yourdomain.com and yourdomain.com). My uneducated view is that in the case of a www prefix, google et al wouldn't be that dumb - but it's easy to do (when you know how) so it can;t really hurt.

Hmmm. That code doesn't work, either. Possibly another typo somewhere?

dartho
20 Dec 2008, 06:15
As mentioned - I'm no expert in this rewrites .... how about:

RewriteCond %{HTTP_HOST} !^www\.ontrackdriver\.com [AND]
RewriteCond %{HTTP_HOST} !^m\.ontrackdriver\.com
RewriteRule (.*) http://www.ontrackdriver.com/$1 [L,R=301]

?

trainer
30 Dec 2008, 16:58
currently have this setup

http://www.site1.com/forums/

shares the forums with

http://www.site2.com/forums/

issue is i am not logged in when i goto the new site forums. everything else seems to be working fine

thanks

giorgiotave
05 Jan 2009, 05:55
Hi :)

I have some error:

Warning: preg_match() [function.preg-match]: Unknown modifier 'f' in [path]/global.php(243) : eval()'d code on line 158

This product can be used with php4?

shahryar_neo
20 Jan 2009, 18:45
Hi :)

I have some error:


This product can be used with php4?

i've a same problem !

yaku
20 Jan 2009, 21:04
Hi :)

I have some error:

This product can be used with php4?

I had the same problem and saw this in the previous version:

All fixed. The errors you were getting were caused by including "http://" with the domain name.

There is also no need to include "www"

For example, "myforum.com" will match "myforum.com" "www.myforum.com" and "wap.myforum.org" - the leading http:// is just a protocol declaration and not a part pf the domain name.

Go to 1) vBulletin Options
2) Different domain, different style
3) Domain Style?

Take out the www and the "http"

That fixed the problem for me.


Love this add-on...great stuff!

shahryar_neo
21 Jan 2009, 11:23
I had the same problem and saw this in the previous version:



Go to 1) vBulletin Options
2) Different domain, different style
3) Domain Style?

Take out the www and the "http"

That fixed the problem for me.


Love this add-on...great stuff!

thanks m8 but my problem didn't solve !

when i use forum.shahrsakhtafzar.com it work's great but when i use shahrsakhtafzar.com/forum it gets me that error ! i've this problem for Tabbed Forum ! i really don't know what's problem for this address . do you know why ?

dartho
21 Jan 2009, 12:09
thanks m8 but my problem didn't solve !

when i use forum.shahrsakhtafzar.com it work's great but when i use shahrsakhtafzar.com/forum it gets me that error ! i've this problem for Tabbed Forum ! i really don't know what's problem for this address . do you know why ?

shahrsakhtafzar.com/forum is not a domain - it has a path on it + slash which would be messing with it. DOmain names only have numbers, letters and dots...

shahryar_neo
21 Jan 2009, 13:35
shahrsakhtafzar.com/forum is not a domain - it has a path on it + slash which would be messing with it. DOmain names only have numbers, letters and dots...

so there is no way to use this hack on this domain ? :o

BBF
21 Jan 2009, 14:08
it works with 3.8.0?

dartho
23 Jan 2009, 02:52
is working on my site, so I assume so

dartho
23 Jan 2009, 02:54
so there is no way to use this hack on this domain ? :o

shahrsakhtafzar.com will get your default style without this addon, you can then assign a different style to forum.shahrsakhtafzar.com using this addon. If you wished to assign a 3rd style, you'd need a 3rd unique hostname

yaku
23 Jan 2009, 22:47
Is there a way to re-order the forums depending on the domain?

Krazeguy
03 Feb 2009, 21:22
I have come across a very annoying but presumably easy to fix issue;

Here (http://mobile.adultforum.co.nz/forumdisplay.php?f=2) on the forum index, the thread page selection works fine eg Page (1 2 3 ... ) points to mobile.adultforum.co.nz

But here (http://mobile.adultforum.co.nz/showthread.php?p=37340#post37340) within the thread, the page number links point to www.adultforum.co.nz

So we are loosing the mobile template upon page selection within threads ... can anyone point me to a fix please?

EDIT: More link issues, heres a quote from one of my members;

Oops, when you reply to a thread by clicking the reply link it goes back to the www.adultforum.co.nz version of the site.

Also, you are looking at a list of topics (e.g. from the "new posts" link) the "lastest messages" type button is missing so you can't go to the post just after the one you last read.

fly
14 Feb 2009, 20:32
Is there a way to make it so that the mobile style can ONLY be accessed by the mobile domain? I don't want users being able to select it, unless they are coming from the mobile domain.

dartho
14 Feb 2009, 22:07
You'd have to not allow the user to change styles in vBulletin Options - but still have mobile style selected as user selectable. Then use this addon. That's it.

If you do have multiple styles which you allow your users to select from, you could 'hide' your mobile style form teh Style Chooser using this addon (http://www.vbulletin.org/forum/showthread.php?t=183185) which does just that. However, if teh style ID was known/guessed, users could still use it

wynode
15 Feb 2009, 05:54
How exactly is this installed?

fattony69
02 Mar 2009, 07:49
I have a content encoding error using this on 3.8.1.

yaku
06 Mar 2009, 20:13
I'm having problems. I had this installed and working, but never used it. Now I want to use it but no luck. I parked red.mydomain.com; when I go there I get the Index page though. Any ideas to fix it?



Index of /

Icon Name Last modified Size Description
[TXT] 404.shtml 01-Mar-2009 22:50 620
[ ] index.phpbak 01-Mar-2009 16:33 196
[DIR] mydomain.com/ 01-Mar-2009 14:27 -

Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_python/3.3.1 Python/2.4.3 Server at red.mydomain.com Port 80

dartho
09 Mar 2009, 07:02
not sure I entirely understand. Does the red.mydomain.com subdomain point to teh same webspace as your primary domain?

sung
10 Mar 2009, 01:17
Found a slight issue with the plugin as is. Originally I only used m.example.com as the domain and everything worked as expected. Today I added forum.example.com to DNS which was also directed to the mobile style (not what I wanted).

This was fixed by changing if(preg_match('/'.$styleurl.'/i', $_SERVER['HTTP_HOST'], $match))
to
if(preg_match('/\b'.$styleurl.'\b/i', $_SERVER['HTTP_HOST'], $match))

TheLab
13 Mar 2009, 11:54
My normal index page for my site is /index.php which is an vBadvanced page. The page doesn't work well with the mobile theme so is it possible to use this them and point the users to /forums.php page instead of the index?

Thanks in advance :)

dartho
13 Mar 2009, 13:05
check here: http://www.vbulletin.org/forum/showthread.php?p=1535871#post1535871

TheLab
13 Mar 2009, 15:39
check here: http://www.vbulletin.org/forum/showthread.php?p=1535871#post1535871

Thats perfect thanks! :up:

Mellow
06 May 2009, 13:58
My vb cookies are set at .myforum.com

If I'm using www.myforum.com and my mobile domain is www.myforum.mobi do I need to change my cookie to .myforum. ???

Thanks!

gezuvor
11 May 2009, 05:47
Great mod!!

I don't think has been asked, so I'll toss it out. My Forum Name value is set to 'VWnavi.com', which is my main URL. I have a second domain that is 'VWnavi.mobi' and want to modify the Forum Name to use the .mobi TLD instead of .com...

dartho
11 May 2009, 09:56
there shouldn;t be any issue with this - make sure you add the .mobi domain to the post whitelist in vbulletin options...

BlueChipEarth
27 May 2009, 17:22
This doesn't add domains - you'll need to register any additional domains or set up sub-domains and configure them to point to the same webspace as your primary domain. Redirects will not work with this add-on as they simply redirect one url to your primary domain.

Once you have your domain names setup and visiting these domain names takes you to the same content as your primary domain you can then install and configure this add-on.

What it then does is checks the URL that was used to get to your site, and if this matches one configured with this add-on it will override the default style with the configured style.

For example, if your sites primary domain is "domain.com" and you use the default vBulletin style, all visitors to your domain will be presented with this default style.

If you then register say "pinkdomain.com" and configure it to use the same webspace as your primary domain, all visitors to "pinkdomain.com" will also be presented with the same default style. If you were to install a new style - lets say with a pink colour scheme called "Pink" and installed this addon, you could configure it such that all visitors to "pinkdomain.com" will be presented with the "Pink" style whilst visitors to "domain.com" will continue to be presented with the default style. The same could be done if you configured a subdomain of "pink.domain.com"

The user/visitor can not override the style with this addon, even if you allow them to change styles, this will force the visitor to what ever style you configure.

Hope this helps..
Does that mean that if I have the mobile device detection mod installed, AND THEN I go to "mod.lawnsite.com" for example (for my moderator client), it will still override the detection and show the PC layout?

I just need moderators to see the original style (and hopefully switch back and forth between them) from their mobile phones.

rrudeboy
27 May 2009, 21:49
so, if i want m.domain.com i have to get (buy) another domain ? is that the scope ?

dartho
28 May 2009, 02:29
@BCE - Not necessarily, the mobile detectiom add-on may still overide by default, however, you could change the plugin execution order of the this add-on to execute after the mobile detect plugin and thus override it.

@rudeboy - No, you would use your existing domain (domain.com), and create a sub-domain of m.domain.com

rrudeboy
28 May 2009, 13:21
@rudeboy - No, you would use your existing domain (domain.com), and create a sub-domain of m.domain.com

that's what i thought.. however, sadly my host does not seem to allow a sub-domain name of 1 letter :]

rrudeboy
28 May 2009, 18:18
still not working.... so i can go to the mobile site on my laptop (by using mobi.domain.net...) but when i try it on my phone/BlackBerry, it does not work. :mad:

rrudeboy
28 May 2009, 22:00
nobody ?!

is this a good format to put the url: mobi.everythingberry.net
and the style is 5, so i just put a 5...
obviously both Enable DDDS? Enabled? to YES. :confused:

dartho
29 May 2009, 00:44
mobi.everythingberry.net takes me to a 404 page

rrudeboy
29 May 2009, 03:11
mobi.everythingberry.net takes me to a 404 page

it takes me (try again plz) to my regular full blown site.. been messing with it all day :]

dartho
29 May 2009, 03:27
http://mobi.everythingberry.net now just redirects to http://everythingberry.net/forum/ - this mod is not be able to do such things - you need to check your server settings

rrudeboy
29 May 2009, 03:34
http://mobi.everythingberry.net now just redirects to http://everythingberry.net/forum/ - this mod is not be able to do such things - you need to check your server settings

i'm not following... it's suppose to redirect to my full blown site and then set the style id in your plugin/mod no ?

and with server, you mean my provider ? (i can give you access and you can check it ?)

dartho
29 May 2009, 03:41
no, it's not meant to redirect anywhere. You would need to have both domains pointing to teh same webspace - if you redirect to your primary domain name, then you are no longer using a different domain name and as such a different style is not applied.

You should probably also change the link to your forums in your landing page (http://everythingberry.net/index.html) be a relative one.

rrudeboy
29 May 2009, 03:59
no, it's not meant to redirect anywhere. You would need to have both domains pointing to teh same webspace - if you redirect to your primary domain name, then you are no longer using a different domain name and as such a different style is not applied.

your saying not re-direct, i get that... but i looked all over & even spoke with tech support and i am so far unable to find how to point both to the same space :]


You should probably also change the link to your forums in your landing page (http://everythingberry.net/index.html) be a relative one.

uhm... not understanding. :confused:

rrudeboy
29 May 2009, 13:22
again was on the phone with support (my hosting provider) and he had me make a A record which points to my full sites web space, when going to mobi.everythingberry.net it still goes to the full blown site..

/me is getting hopeless :erm:

45wheelgun
12 Jun 2009, 12:50
Have this all setup and working...sort of.

I have a second domain m.domainname.com that points to the same web space along with the original domainname.com.

When I go to m.domainname.com I see the defaut style. I must log in first, and then I see the mobile style.

How do I fix it so that I only see the mobile style when going to m.domainname.com?

rrudeboy
12 Jun 2009, 13:05
i use a mod for that: http://www.vbulletin.org/forum/showthread.php?t=174381 (Different Domain, Different Style)

45wheelgun
12 Jun 2009, 13:55
That is the mod I was referring to. I think we are in that thread now...:)

dartho
12 Jun 2009, 14:00
I am guessing that the account you log on with is an admin account? If so, it sounds like you don;t have the mobile style set as user selectable - an admin is able to view styles which users can not.

45wheelgun
12 Jun 2009, 14:28
I am guessing that the account you log on with is an admin account? If so, it sounds like you don;t have the mobile style set as user selectable - an admin is able to view styles which users can not.

Bingo! All better now. Thanks for the assistance!:up:

Phrost
25 Jul 2009, 01:09
Is there any way to use this to deliver a separate set of subforums only to the secondary domain?

dartho
25 Jul 2009, 03:18
Possibly in conjunction with conditional statements in your styles templates

merk_aus
26 Jul 2009, 12:06
Ok I don't know if this can be done with this mod however I thought I would ask...

I run two websites lets call it website1.com and website2.com they are on the same dedicated server however are not really "linked" but I want them to share the same forums... I was wondering whether it would be possible to make it where my forums are on website1.com but when people click on forums on website2.com it takes them to a design specifically designed to website2.com

Sorry if this is confusing - but mainly they are two websites pointing to the same forums I am hoping to organize a theme/style specifically for website2.

Please if you could let me know if this can be done so I can download and install it.

MissKalunji
27 Jul 2009, 20:13
does this still work with 3.8?

dartho
27 Jul 2009, 23:38
Sure does.

MissKalunji
28 Jul 2009, 05:00
thank you :)

wheezyb
29 Jul 2009, 17:22
do i install this as a style?

sorry for the noob question I just didn't see any install instructions anywhere

rrudeboy
29 Jul 2009, 17:42
do i install this as a style?

sorry for the noob question I just didn't see any install instructions anywhere

no, install it in Plugins & Products..

gr8whtd0pe
09 Aug 2009, 15:12
This may have been asked already, so don't kill me if I missed it lol. I'm looking to use this script and your "Mobile Phone / iPhone / PDA Detection and Style Assignment" together. Basically I only want the second script to kick in if the request comes from http://mobile.wvmotorsports.com/forums/ and not if the user on their phone goes to just http://www.wvmotorsports.com/fourms/

Any ideas?

Oh and if that first link doesn't work it means the host finally pointed it to the right place and just remove the /fourms/

Thanks!

robhole
19 Aug 2009, 02:10
is there a way to make it so that only a mobile device can access the subdomain/not have a regular browser access it? I set up a subdomain so that mobile users can access but I don't want regular pc/mac accessing, mobile only.

dartho
19 Aug 2009, 02:55
No sure fire simple way I can think of. You could possibly account for the majority of PC users by adding some javascript to the header template of the mobile style which detects IE or Firefox and sends t hem to a different page?
<script type="text/javascript">
if (navigator.userAgent.indexOf("Firefox")!=-1)
window.location = "http://mywebsite.tld/forum/index.php?styleid=XX/"
if (navigator.userAgent.indexOf("MSIE")!=-1)
window.location = "http://mywebsite.tld/forum/index.php?styleid=XX/"
</script>

This is untested

floridaideal
18 Sep 2009, 16:54
Hi Guys

Need a little clarification and assistance here please as I am still learning, but I have setup a sub domain on my original forum domain, so its mobile.domain.com and I have installed the DDDS mod here and set that up correctly pointing at the new domain/skin.

But for the life of me I just don't know how when a user would go to mobile.domain.com it would take them to the forum.

Is there some other mod I need to install or other files in the subdomain? Sorry if I am being thick, right now the subdomain folder is empty and it goes nowhere!

Please help

Thanks

Stuart

fly
18 Sep 2009, 18:19
Well, technically I think its a DNS CNAME that you want, not a subdomain.

floridaideal
18 Sep 2009, 19:05
Thank you so much for the message but I am still having troubles, I checked DNS zones and by adding a subdomain it created the C NAME but I still can't work out how to get it to direct itself back to my forum, using htacess redirects don't seem to work!

Any ideas please?

Thanks again

Stuart

dartho
18 Sep 2009, 23:23
Do you use cPanel or Plesk to add subdomains?

forexforum
27 Sep 2009, 19:47
Hi dartho,

This mod from what I understand only support different styles on different domains. I have some questions and I hope you can help:


Does this mod supports specific forums for different domains under single vb installation?
Can provide the conditional codes to separate certain forum IDs to different domains? Eg. I want forum ID 1 and 2 to be shown on www.123.com but not on www.890.com; vice versa, on www.890.com, only forum ID 3 and 4 will be shown.


Hopefully can help?

Cheers.

forexforum
27 Sep 2009, 20:12
1. Your forum is accessable from multiple domains but the content is the same for each link. This is OK and does not require multiple licenses. My site is an example of a multi-domain setup that is allowed:

http://www.mscclan.com/forum/
http://www.macsubculture.com/forum/
http://www.mac-gamer.com/forum/

Notice how each domain points to exactly the same content.
2. Your forum is accessable from multiple domains but each domain shows a different forum style. This is OK and does not require multiple licenses.
3. Your forum is accessable from multiple domains and your forums are configured to show/hide certain forums based on the domain. This is not OK and requires an active vBulletin license for each domain. In this situation the forums appear to have separate content thereby making them separate forums in the eyes of the license agreement. Your forum content needs to be the same for each domain in order to qualify as a single forum.

Hi dartho,

I brought this quote message of yours back because I want to ask if you could do a separate forums different domains? I understand that this would require additional licenses and fine with that. Just looking for a mod/script that is able to do this so that we could have all forums and users under a single database.

dartho
28 Sep 2009, 11:22
you could do this by additional conditionals in your forumhome/forumdisplay templates (could be a LOT depending on the number of forums you have - if a lot it May even be worth doing file/db edits)

If it's something you want anytime soon, you'd be best off paying someone to do the work. It's not something I'm personally looking for at the moment, although in the future I may have a need

Amenadiel
02 Oct 2009, 22:08
do you think it would be possible to apply this mod only to unregistered users?

I'd like my members to move seamlessly across domains, but guest to have their style changed.

It seems that your plugin hook (style fetch) happens before there is a variable to discriminate between members and guests.

dartho
03 Oct 2009, 14:04
I guess it would be possible - but it's not something I'd spend a lot of time on, if I'm digging throughthis code again, I'll have a quick look

Amenadiel
05 Oct 2009, 12:50
I figured it out... while is true that the object/variable $this->registry->userinfo is empty or nonexistant at the style_fetch hook, $vbulletin->userinfo is not. So if you condition the plugin to:

if ($vbulletin->userinfo['userid']==0) {

it'll only apply to visitors.

dartho
05 Oct 2009, 13:51
Good job - and thanks for posting back here...

jahshaka
17 Oct 2009, 23:34
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!

jahshaka
18 Oct 2009, 00:44
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:

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

$vbulletin->options['zointsseo_on'] = 0;

this disables zoints when using the new template...

patch not a fix :)

Trana
20 Oct 2009, 04:11
Is there a way to have multiple domains use one style and one specific domain use another?

dartho
20 Oct 2009, 10:23
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.

rrudeboy
22 Oct 2009, 20:59
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....

dartho
23 Oct 2009, 03:19
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)?

rrudeboy
23 Oct 2009, 04:28
i moved the forums from one domain to another, remaining on the same host..

dartho
23 Oct 2009, 07:44
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)?

rrudeboy
23 Oct 2009, 13:29
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.

dartho
23 Oct 2009, 13:39
it works for me :)

http://www.totalsmartphone.net/forum/ gives me a PC skin and http://mobi.totalsmartphone.net/forum/ gives me the mobile skin

rrudeboy
23 Oct 2009, 14:10
it works for me :)

http://www.totalsmartphone.net/forum/ gives me a PC skin and http://mobi.totalsmartphone.net/forum/ gives me the mobile skin

you trying on a pc ? because that works for me as well.... it's my mobile users that have the issue.

Byggahus
26 Oct 2009, 11:27
dartho,

I would like visitors that enters http://mobil.byggahus.se to get forced to (redirected to)
http://www.byggahus.se/forum?styleid=17 (the forum with the Mobile style)
BUT visitors that enters http://byggahus.se, http://byggahus.se/forum, http://www.byggahus.se or http://www.byggahus.se/forum to get the default style.

What do I need to do in order to achieve this? I have asked the web hotel to create the sub domain mobil.byggahus.se and are using vBSEO and redirects in .htaccess.

Byggahus
26 Oct 2009, 12:13
Can I suggest putting this:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

In headerinclude for a different domain that links to the same content. It will tell spiders not to index it. You won't get a penalty for duplicate content.
I have now added the suggested below the "link rel" row. I hope I did the correct thing!? headerinclude for the Mobile style now looks like this:
<link rel="stylesheet" href="wireless.css" type="text/css" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

dartho
26 Oct 2009, 22:56
Register the mobil subdomain and have it point to or be parked on the same webspace as your main domain, do not use redirects. There is no need to modify .htaccess withthis add-on.
Install the single domain version of this product (product-ddds37.xml (http://www.vbulletin.org/forum/attachment.php?attachmentid=80937&d=1211180391))
Head to AdminCP->vBulletin Options->vBulletin Options->Different Domain, Different Style
Enable DDDS : Yes
Domain Name: mobil
Style for this domain: <your mobile style>
Save

mallick
07 Nov 2009, 05:15
issue resolved..
thanks

biggeorge
28 Dec 2009, 18:01
I'm having a problem with this and hopefully someone can guide me...

I've setup mobile.extremebusa.com in cpanel
I've enable DDDS in VB Options, included the sub domain mobile.extremebusa.com, and included the style http://www.vbulletin.org/forum/showthread.php?t=229241

When I go to mobile.extremebusa.com I get a directory listing!

Any help will be appreciated.

dartho
28 Dec 2009, 22:38
Is your document root pointing to teh same document root as your primary website - probably public_html/ ?

fredang85
29 Dec 2009, 05:33
i get this error, no matter wad template i use!
see wap.motorolafans.com

Warning: array_intersect() [function.array-intersect]: Argument #2 is not an array in [path]/global.php(238) : eval()'d code on line 33

sNator
25 Jan 2010, 15:19
How can I get this to work with VB 4?

I think this is the prefered way of directing users to a mobile style instead of device detection.

Works excellent om my 3.8 site!

fly
27 Jan 2010, 11:29
If anyone is interested, this hack does NOT work with vB4.

dartho
27 Jan 2010, 12:19
no? I was actually under the impression that it did. I'll look into it ;)

fly
27 Jan 2010, 12:33
Hmmm. It installed correctly, but I couldn't get the redirect to work. But it did work for me on vB3... Could it have something to do with the redirect from index.php to forum.php?

Zaiaku
28 Jan 2010, 00:58
The mod similar to this doesn't work work me on vb4 I was hoping that this on would :(

fly
01 Feb 2010, 13:24
no? I was actually under the impression that it did. I'll look into it ;)

Any chance you've had a moment or two to look at this?

dartho
02 Feb 2010, 22:35
edit the headinclude template and change the line

<base href="{vb:raw vboptions.bburl}/" />

to

<vb:comment>
<!-- Removed to allow DDDS Mod to work -->
<base href="{vb:raw vboptions.bburl}/" />
</vb:comment>

Also make sure you add any extra domains to your post whitelist

fly
02 Feb 2010, 22:43
You rock. I assume this needs to be edited in the mobile skin?

TESTIN!!!

edit: I edited it just in the mobile skin, then in all skins. That didn't seem to work. Still redirects to main domain name.

reedit: And Ive added the domain to the whitelist...

fly
02 Feb 2010, 23:04
Oh, and I only have the forum piece enabled, in case that redirect from index.php to forum.php is somehow interfering with it.

dartho
02 Feb 2010, 23:10
it's working a treat on my test site - that template edit was to make URL's relative so that it didn;t flick back to the main domain.

Edit: Is the style user selectable - mine was, I unchecked it and then this addon did not kick in - vBulletin may have changed some internals so that overriding non selectable styles may not be possible now

fly
03 Feb 2010, 12:42
Yes, it is a selectable style.

fly
03 Feb 2010, 12:56
AHHHHHH. I have to use the full path to forum.php, then it works. SWEEET!

sNator
03 Feb 2010, 13:17
Works if I go direct to /forum but when I click on a thread I get a wierd url
/forum//forumdisplay.php/showthread.php. I can solve this by turning the SEO settings to standard.
If I go to root / I get back to the default style.

I use the CMS system.

dartho
04 Feb 2010, 04:53
try adding the <base href="{vb:raw vboptions.bburl}/" /> line back in, but manually edit it to be hard coded to refelect what the [sub]domain actually is. If this makes thikngs start working, I may be able to modify teh plugin to do this.

fly
04 Feb 2010, 17:13
Me, or snator? Mine works when I direct them to forum.php, rather than index.php

dartho
05 Feb 2010, 00:27
was for sNator, if it's working for you, no need to change!

Zaiaku
06 Feb 2010, 01:09
Before I start editing stuff. wha exactly doesn't make this work on vb4 for some of you?
I just installed it on vb4 and everything working just fine on it.

dartho
06 Feb 2010, 04:23
I think it depends if you have your forums in root or not and also if you have CMS installed. The issue I had was with the base tag messing up my links...

Zaiaku
08 Feb 2010, 01:15
I only tried it on one of my sites and the forum is in the root. I made my own CMS and not using the vb4 default one since I don't like it. All the links work just fine. I so far have no seen any bugs or problems yet.

This has been a life saver for me.

sung
08 Apr 2010, 07:15
try adding the <base href="{vb:raw vboptions.bburl}/" /> line back in, but manually edit it to be hard coded to refelect what the [sub]domain actually is. If this makes thikngs start working, I may be able to modify teh plugin to do this.

I modified the plugin a little more to get this to (mostly) work in vB4. Added the following inside the if block when the domain matches.

$vbulletin->options['bburl'] = "http://" . $vbulletin->options['ddds37_domain'];


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 :mad:

woodysfj40
09 Apr 2010, 14:09
My installation seems to be partially working....vbSEO installed.

http://mforum.ih8mud.com displays correctly.
http://mforum.ih8mud.com/40-55-series-tech/ displays correctly.
BUT any time I click a thread, it reverts back to forum.ih8mud.com

thoughts?

Thanks for continuing to support this great mod!

dartho
10 Apr 2010, 12:55
My installation seems to be partially working....vbSEO installed.

http://mforum.ih8mud.com displays correctly.
http://mforum.ih8mud.com/40-55-series-tech/ displays correctly.
BUT any time I click a thread, it reverts back to forum.ih8mud.com

thoughts?


I think vbseo sets a 'base' meta tag which needs to be unset, or a plugin written which sets it as required.

hint - read all the posts on the previous page!

Thanks for continuing to support this great mod!

It's not supported :)

woodysfj40
10 Apr 2010, 14:16
if(
VBSEO_BASEDEPTH &&
defined('VBSEO_PREPROCESSED')
&& ($_SERVER['HTTP_HOST'] != 'm.mydomain.com')
)

got it... thanks :)

nestortoledo
18 Sep 2010, 09:54
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

dartho
18 Sep 2010, 10:24
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 ...

dartho
18 Sep 2010, 11:00
I just had a quick look, if you edit the "Force URL to Style" plugin and replace

if ($vbulletin->options['ddds_36_enabled'] == 1)
with
if (($vbulletin->options['ddds_36_enabled'] == 1) && (!$foruminfo['styleid']))

it should not override a style explicitly defined in forum properties. This was tested so minimally that I may as well have not tested at all, so no promises. Let us know if it work.s

nestortoledo
18 Sep 2010, 12:45
Before nothing thanks for your help.

Then.
When modify the lines provided by you, it give me those errors. and the plugin stop working

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

dartho
18 Sep 2010, 13:24
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?

nestortoledo
18 Sep 2010, 13:37
Im using single one domain.

And yes i modified only first line.

Exactly ive change this line:
if ($vbulletin->options['ddds_37_enabled'] == 1)

To this line:
if (($vbulletin->options['ddds_37_enabled'] == 1) && (!$foruminfo['styleid']))

Forgot to mention that im using it in Vbulletin 4. Suite with CMS Disabled.

nestortoledo
20 Sep 2010, 10:55
Tried with multiple domain version and same problem.

for5up
15 May 2011, 08:19
I modified the plugin a little more to get this to (mostly) work in vB4. Added the following inside the if block when the domain matches.

$vbulletin->options['bburl'] = "http://" . $vbulletin->options['ddds37_domain'];


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 :mad:

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

sung
16 May 2011, 15:22
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 :mad:

I've managed to fix this issue (for me at least) by creating a new plugin to the header_redirect hook.

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.

dartho
17 May 2011, 00:07
I think you can removbe the <BASE> tag from the header which is causing the default URL to be used in relative links

sung
17 May 2011, 04:10
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 :(

PAKIDIL
13 Sep 2011, 01:23
i am not allow to add park domain . can it work with subdomain addition ?

dartho
13 Sep 2011, 03:07
yes it can.

PAKIDIL
13 Sep 2011, 08:32
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

dartho
13 Sep 2011, 10:56
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.

PAKIDIL
13 Sep 2011, 22:50
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

dartho
14 Sep 2011, 00:15
you do what I said in previous post!

infnity8x3
28 Sep 2011, 05:15
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.

dartho
28 Sep 2011, 06:20
have you gone through the post about 3 above (Post 217) ?

infnity8x3
28 Sep 2011, 06:35
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/showthread.php/383967-Invalid-redirect-url-appearing-since-security-patch/page3

dartho
28 Sep 2011, 07:33
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.

autoescala
28 Oct 2011, 19:51
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

autoescala
09 Feb 2012, 11:02
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

autoescala
09 Mar 2012, 10:42
Hi to all,

Vote here in JIRA:

http://tracker.vbulletin.com/browse/VBIV-14142

https://www.vbulletin.com/forum/showthread.php/394757-Mobile-style-in-sub-domain-
(example-http-m-vbulletin-com)

For an official ability to set the mobile style in sub-domain.

Best Regards

autoescala
28 Jun 2012, 15:47
bump

Relientk
22 Aug 2012, 03:19
omgoodness! I have been working on this for weeks trying to find an answer as to how I could achieve this!!! I'm sooooo happy! Thank you for offering this! I'm going to work on installing it now. If all goes well I will be donating!!! Thank you so much this is awesome!

vn88com
26 Mar 2014, 06:22
I have setup style for pc: domain.com, and style for mobi: m.domain.com

When I use phone device go to domain.com, it not redirect to m.domain.com, but it show style mobi.

How to redirect m.domain.com when go by phone? and user can choose link domain.com to use pc style?

Im using mod Detect Mobile Device and Different Domain, Different Style

Thanks

dartho
27 Mar 2014, 00:59
mobile detect sets style based on device used to visit page

different domain assigns style based on URL visited (domain name)

sorry - they do not know about each other or work together

My suggestion would be disable detection and inform users of mobile site address. What version of VB do you use? This http://www.vbulletin.org/forum/showthread.php?t=270978 might work if your version of VB has notices