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
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 ;)
0
This discussion has been closed.
Comments
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?
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.
I fixed it in the docs, thanks
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/