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

have you gone through the post about 3 above (Post 217) ?
Reply With Quote
  #223  
Old 09-28-2011, 04:35 AM
infnity8x3 infnity8x3 is offline
 
Join Date: Apr 2009
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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
  #225  
Old 10-28-2011, 05:51 PM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #226  
Old 02-09-2012, 10:02 AM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #227  
Old 03-09-2012, 09:42 AM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi to all,

Vote here in JIRA:

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

https://www.vbulletin.com/forum/show...in-sub-domain-
(example-http-m-vbulletin-com)

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

Best Regards
Reply With Quote
  #228  
Old 06-28-2012, 01:47 PM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #229  
Old 08-22-2012, 01:19 AM
Relientk Relientk is offline
 
Join Date: Jan 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #230  
Old 03-26-2014, 05:22 AM
vn88com vn88com is offline
 
Join Date: Dec 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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 https://vborg.vbsupport.ru/showthread.php?t=270978 might work if your version of VB has notices
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 05:51 PM.


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.05082 seconds
  • Memory Usage 2,313KB
  • Queries Executed 27 (?)
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
  • (2)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
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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