Store
Community Documentation

v3 Knowledgebase

Site Tip for Set Up - Templates

One thing you will probably change on your site is your template. Whether it's just adding google code or changing the design, if you are going to work with the default site templates then we have these tips for you.

We recommend that you do not edit default template files. If you edit default template files, and if your site has issues, one thing you should check is whether things work with default templates but if you've changed them, you now have no way to check if things are working on default.

We also recommend not to edit via AdminCP editor as those changes are saved in the database and so when you go to upgrade your site and your template, the changes won't be seen because of the edits done in AdminCP. A better way to edit your templates is to work in the files on the server and to always keep a backup copy. If you do want to use the AdminCP editor, save all changes in an editing program such as Notepad++ or Netbeans. Then before upgrading click each thing you edited in AdminCP and click to revert and then clear all cache. This will ensure that your upgraded templates show the upgrades on the site. You can then put your changes back.

We have tutorials for you to make your own template/style.

First, check this for tips when designing so you will see your changes right away:

http://www.phpfox.com/kb/article/313/designing-with-phpfox-v3/

and once done designing, remove the dev.sett.php file mentioned before taking the site live.

Here are some tutorials for creating your templates and styles:

http://www.phpfox.com/kb/article/268/create-a-new-theme/
http://www.phpfox.com/kb/article/390/how-to-use-firebug-to-find-which-file-to-edit-your-css/


Be sure to export your theme and style and to load these files to your server so you can work on them and have actual files to use from then on to edit.

Be sure to create your custom.css file for this template (if one was not created) as that is the easiest way to make the css changes.

One thing I do when making a style, if I want it to have some different icons, is to copy first the default icon folders over to my new style so I have them as a reference.

Don't forget to make your thumb image for the site designer so when members want to use your template they don't see a "not found" in there. The size is 166 x 100 and called sample.png for the default styles and is found in theme/frontend/yourtemplate/style/yourstyle/ folder.

Once you have your template/style made, you can even make module template folders as mentioned in the tutorial linked, so that if you want to change a default block you can do that in your own template and not edit source files. This is handy for making block custom changes that are not overwritten on upgrades. An example is this add on, http://www.templatemechanic.com/marketplace/view/phpfox-v3-shoutbox-emoticons/ . It can be put in module/shoutbox/template/yourtemplate/ and it won't overwrite original files. Smile