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.
Add custom .css and .js files to a default.master.php
Hi all,
I have created a forum design and have it in custom HTML format.
I want to use Vanilla as the brains behind the design. I have currently:
- Setup a copy of the 'default' folder, renamed it and have it selected as my current theme.
- Copied 'default.master.php' to my themes 'views' folder.
I now have a few questions to get me going if somebody could help:
- What is the best way to add 'reset.css' file, 'custom.css' and 'ie.css' files to the master header.
- I also want to add some custom .js files to my header. Is adding them to the root 'js' folder a bad idea (incase they are overwritten in future updates)?
- Can I use SMARTY code within Vanilla? I was under the impression I could but the default.master.php is a .php file not a SMARTY .tpl?
If anybody can help me out I would appreciate it, any other tips before I start would be great too.
thanks.
I have created a forum design and have it in custom HTML format.
I want to use Vanilla as the brains behind the design. I have currently:
- Setup a copy of the 'default' folder, renamed it and have it selected as my current theme.
- Copied 'default.master.php' to my themes 'views' folder.
I now have a few questions to get me going if somebody could help:
- What is the best way to add 'reset.css' file, 'custom.css' and 'ie.css' files to the master header.
- I also want to add some custom .js files to my header. Is adding them to the root 'js' folder a bad idea (incase they are overwritten in future updates)?
- Can I use SMARTY code within Vanilla? I was under the impression I could but the default.master.php is a .php file not a SMARTY .tpl?
If anybody can help me out I would appreciate it, any other tips before I start would be great too.
thanks.
Tagged:
0
Answers
I am now using SMARTY too as i copied the BrandFriendly theme.
Basically I created a file in my theme folder called 'class.*********themehooks.php' - Replace ********** with your theme name.
Here is the contents of the file:
http://pastebin.com/eLNJt6Pi
Replace MyThemeName with your theme name.
Hope that helps.
Ex. Here it is started with Hi all, and ended with thanks. I want to enter the adsense after thanks, or before thanks. I tried the method you said, I used
class DefaultThemeHooks extends Gdn_Plugin {
But script tag is stripped.