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
  #202  
Old 04-10-2010, 10:55 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by woodysfj40 View Post
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!
Quote:
Thanks for continuing to support this great mod!
It's not supported
Reply With Quote
  #203  
Old 04-10-2010, 12:16 PM
woodysfj40 woodysfj40 is offline
 
Join Date: Jun 2004
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
if(
VBSEO_BASEDEPTH &&
defined('VBSEO_PREPROCESSED')
&& ($_SERVER['HTTP_HOST'] != 'm.mydomain.com')
)
got it... thanks
Reply With Quote
  #204  
Old 09-18-2010, 07:54 AM
nestortoledo nestortoledo is offline
 
Join Date: Mar 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #205  
Old 09-18-2010, 08:24 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #206  
Old 09-18-2010, 09:00 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
with
Code:
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
Reply With Quote
  #207  
Old 09-18-2010, 10:45 AM
nestortoledo nestortoledo is offline
 
Join Date: Mar 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #208  
Old 09-18-2010, 11:24 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #209  
Old 09-18-2010, 11:37 AM
nestortoledo nestortoledo is offline
 
Join Date: Mar 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
To this line:
Code:
if (($vbulletin->options['ddds_37_enabled'] == 1) && (!$foruminfo['styleid']))
Forgot to mention that im using it in Vbulletin 4. Suite with CMS Disabled.
Reply With Quote
  #210  
Old 09-20-2010, 08:55 AM
nestortoledo nestortoledo is offline
 
Join Date: Mar 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried with multiple domain version and same problem.
Reply With Quote
  #211  
Old 05-15-2011, 06:19 AM
for5up for5up is offline
 
Join Date: May 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sung View Post
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.

PHP Code:
$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
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
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:50 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.05645 seconds
  • Memory Usage 2,322KB
  • 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
  • (6)bbcode_code
  • (1)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete