Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Applying Multiple Themes / set theme in config?

Is it possible to apply a different theme based on the URL?

For example, to display a mobile theme at mobile.mysite.com while keeping a full scale theme at mysite.com? Perhaps something in a config?

I'm using the latest Vanilla.
Tagged:

Comments

  • I second mostmodernist question, anyone have an answer?
  • lucluc ✭✭
    It's currently possible to have a standard theme and a mobile using the same URL.
    You could use a different one if you'd like.
  • @luc how? the reason i'm interested is because I'm going to embed my forum on a facebook page and the embed theme is perfect, but i'm not sure how to have my normal theme on the actual domain while the embed theme on fb? thanks
  • lucluc ✭✭
    Nothing to do.
    Just try it here with a mobile, depending on the user agent, it will show a mobile theme.

    There's another mobile theme if you don't like blue (http://vanillaforums.org/addon/green_mobile-theme)
  • edited March 2011
    @luc what i'm trying to ask is is there any way to have your normal theme when people visit your domain BUT the embed friendly theme when viewing via an embed? (i image by employing the same mechanism by which vanilla knows it's being visited by a mobile browser then uses the mobile them it could know it's being visited via an embed and use the embed theme, i'm hoping for it to be that simple!) thanks again
  • I haven't been able to find anything about switching a theme if being loaded from within an iframe (embedded) so I think I'm just going to use some javascript to modify the custom.css of the theme if it's being loaded within an iframe (here's the javascript that can detect if the page is loading within an ifram: http://goo.gl/J7RBm). Basically I'm going to only show the "content" div when embedded by hiding all other divs and expanding "content" div to 100% width. Hope it'll work, thanks for your help @luc.
  • lucluc ✭✭
    I guess that's your only chance, because the user-agent trick can't really be used for this.
  • @luc i was wondering if you could check out my code for detecting embed and modifying css, I posted it as a question but haven't got an answer yet. Here's the question: http://vanillaforums.org/discussion/15431/trying-to-hide-certain-divs-when-embedded-having-trouble-can-anyone-helps/p1

    Thanks
  • lucluc ✭✭
    I'm no professional (or amateur) coder. And while I have some knowledge of vanilla 2, it's far from knowing everything :).

    In php/js, I am able to use existing working code to tweak to my need, but not to write from scratch or check other peoples code. Sorry.
  • ok, thanks for the reply!
Sign In or Register to comment.