Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Clarification with templates for custom themes

edited November 2007 in Vanilla 1.0 Help
Hi everybody, I've started customizing my own theme for Vanilla. It involves not only changing css, but the complete layout itself, that is, html and even php. I've read the documentation and I've followed almost every step its stated there. I went into "themes" folder, made a copy of "vanilla" and renamed it to my own theme name (lets name it "mytheme") and started touching. If I go deeper into the folder, let's say to styles/default, I can see the css styles files and images for that theme. Now let's go to changing the html/php. The documentation says we should copy the "templates" to the theme folder and modify them. Moreover, that we should only copy the ones we need to modify. First of all, I'd like to note that the documentation isn't too clear in with this. After researching, I pressumed (and found later to be true) that the "template files" are the .php files inside the "themes" folder (I haven't seen this stated clearly anywhere). Then, I copied the "templates" inside "themes/mytheme" folder, inside "themes/mytheme/styles" and inside "themes/mytheme/styles/default" and modified them to suit my needs. None of the modifications applied while surfing Vanilla. The only way to make modifications that work is to modifying directly the "template" files under the themes folder. But that's not what is stated in the documentation, since it says those files will be overwritten when updating the forum. I wish to know if I've missed anything or if this is a bug. To clarificate things I want to note that the forum is configurated to use the theme I'm working on and it is the default theme for everyone. About this one I want to note that the button "Apply this style to all users" doesn't work, despite I'm checking it everytime. I had to manually configure my theme as the default theme by adding the line $Configuration['DEFAULT_STYLE'] = '/myvanilla/themes/mytheme/styles/default/' inside conf/settings.php. Are theses known problems, bugs? I'm missing something? May be due to misconfiguration of my server? All the other problems I'm working in run flawless, without any problem. While I could still do my modifications in the template files directly, I would like to follow the process in the correct way, to avoid overwritting my modified files on updates and maybe to share one day my theme with the rest of the world. Thanks in advance ;)


  • Options
    I have no answer for you, I just wanted to tell you that if you think you can make the docs better, you're very welcome.
    If you could give us some more information (platform, php&mysql versions, browser(s)), that would help :)
    Do you have this problem on a fresh install?
  • Options
    What I have done is:

    1. copy the Vanilla theme folder and call it CustomVanilla
    2. it should have all the style folders if you intend on using them with your customvanilla
    3. then any php file that I need to modify that is in the themes folder, I copy to my customvanilla folder and modify it there
    4. then if I want to make a mod to one of the styles I use, I modify it in the style folder in the customvanilla folder

    By doing this, you avoid any mods to the standard files.
  • Options
    I use Windows XP and I made recently a fresh install of Apache 2.2.6, PHP 5.2.5 and MySQL 5.0.45. All the other PROJECTS (not "problems" :P) I'm working in run flawless... but maybe I've made some mistake in my server's configuration. I will check it again, but if I copy the template files inside my "customvanilla" and edit them, no changes will apply.
  • Options
    One of the thinks I want to do is to include a visible list of al categories on the right side of every page on the forum. I was looking the framework and thought this maybe can be accomplished best doing an EXTENSION than a simple theme. Then, looking at the documentation for creating extension, I found this flaw: In section "What do you want to do?": "You can create completely custom controls and add them to the Page control (check out library/Framework/Framework.Control.Page.php to see the Page control and all of it’s methods)." library/Framework/Framework.Control.Page.php doesn't exist. Inside "framework" folder I see Framework.Control.ExtensionForm.php, Framework.Control.Filler.php, Framework.Control.Head.php, Framework.Control.LanguageForm.php, Framework.Control.NoticeCollector.php, Framework.Control.PageEnd.php, Framework.Control.Panel.php and Framework.Control.UpdateCheck.php, but not any "Framework.Control.Page.php".
  • Options
    I dunno about all that stuff, but this might help with that. (haven't used it myself)
  • Options
    it's /library/Framework/Framework.Class.Page.php
    I fixed it in the docs, thanks
  • Options
    I have, and others too, successfully followed the steps you outlined to create and activate custom theme. One extension I released needs a couple of modified theme files also. So, IMO, your problem is probably of the "small and not obvious" mistake in the process: misnaming/misplacing folder, files or something like that.
    Ensure that your tree is like this:
    <vanilla root>/themes/
    • a bunch of originals themes templates (php files)
    • styles/ (default theme styles)
    • your_theme/ (this is where your theme files must be)
      • copies of php files you must modify
      • styles/ (for your theme)
  • Options
    Ok, thanks a lot. I will try it again in the final server, not the testing one, and will give feedback here.
  • Options
    Ok, I've completed my own custom theme and I can confirm it is working the correct way on the real server, that is, with the template files inside the theme directories, so probably it was a problem with my local server... Sorry for the inconvenience.
This discussion has been closed.