Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Name conflicts in theming?

LincolnLincoln Community Instigator Vanilla Staff
edited January 2010 in Questions
The theming README says:
if you wanted to edit the html for the discussion list, you could
copy the views from /applications/vanilla/views/discussions to
/themes/yourtheme/views/discussions and edit them there.

Doesn't that create a huge potential for naming conflicts? For instance, both Garden and Vanilla have a /views/settings folder, so what happens if I create /themes/yourtheme/views/settings/index.php? Does it overwrite both of them? Am I misunderstanding this, or does every views subfolder have to be uniquely named between every potential app for theming purposes?

Sr Developer at Vanilla Forums [GitHub, Twitter]

Comments

  • as far as I can tell, if you have an index.php within your theme, it will be used instead of the default one,
    eg, /applications/vanilla/views/settings/index.php would be the default if there isnt a version in /yourtheme/
    if there is a /themes/yourtheme/views/settings/index.php it will be used instead,
    seems to be the same as the way wordpress or zencart or whatever, works,
    it should always look for the relevant index.php within /yourtheme/
    doubling up on index.php files should be fine aslong as they are within a designated /yourtheme/ folder, and shouldnt cause any issues

    I think I'v understood your question, if not, nevermind what I'v just said lol
  • lucluc ✭✭
    edited January 2010
    What Lincoln says is that there is not just 1 application for a garden/vanilla2 setup, most of the time, 3 are installed and enabled (garden/vanilla2 and conversation). So if you've got an view/settings/index in your theme, it might replaces all 3, but it will have been coded for just one of those.

    That's, indeed, something to look into. It might be already taken care of, I don't know.
  • lucluc ✭✭
    Well, apparently, it's taken care of (Readme.txt from applications/skeleton):

    If you want a view to be used across applications (ie. one master view for
    vanilla, scffolding, etc), you could place it in:

    /themes/theme_name/views/default.master
    /themes/theme_name/design/*.png,*.css

    If you wanted a view to be specific to one application (ie. an altered master
    view for scaffolding only), you could place it in:

    /themes/theme_name/app_name/views/default.master
    /themes/theme_name/app_name/design/*.png,*.css


    Maybe it needs to rephrased in the themes documentation (I haven't been around to go and read it again).
  • LincolnLincoln Community Instigator Vanilla Staff
    Oh, cool. Yeah, it definitely doesn't say that in the theming Readme or the theming documentation here. Thanks @bean

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • MarkMark Vanilla Staff
    Whoops - That reminds me - does anyone want access to editing the documentation here on the documentation wiki? @Lincoln? @Bean?
  • LincolnLincoln Community Instigator Vanilla Staff
    In! Any guidance before letting me loose? ;)

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • lucluc ✭✭
    I'm not a native english speaker, I don't want to write stuff that will mislead readers :).

    And I'm learning php at the same time that I learn garden, so I'm not sure to be able to write definitive stuff, especially documentation.

    Thanks for the offer though.
  • LincolnLincoln Community Instigator Vanilla Staff
    @bean, if it's any consolation, you're more fluent than many native speakers. ;)

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • lucluc ✭✭
    Yep, I know that, thanks.

    Reading book in english since 18 y.o, and 2 years in London when I was 30ish would do that to you.
Sign In or Register to comment.