Templates
Templates create the basic skeleton of your board, they define the structure of the content and contain all the HTML markup. Templates are then style using the theme and any buttons and images are taken from the imageset. Often you will be asked to edit a template when installing a MOD. Each style has its own template (an exception is when it inherits the template from another style) and you will need to make the change for each style individually. The template files can usually be found in the styles/[your_style]/template/
directory.
Note
After you change a style through the filesystem, remember to Purge the cache. To do this, press the appropriate button on the ACP index page.
Warning
If you make changed to the template files through the ACP and then refresh the template, the changes made through the ACP will be overwritten with the contents of the files on the server.
On the
page, there are several links to pages where you can manage and work with templates. Let's take a closer look at them and see what you can do on each of them.Features on the
pageEdit: On this page, you can edit the individual template files through the ACP. Click the link and you will see a list of all the template files. You can select one and a editor for editing it will show up. If the file you are editing is not server-writable, the whole template will be stored in the database. This can cause some problems in the future, for example you won't be able to edit the templates through the filesystem. All the template files have to be writable, including the
template/
directory in order for the script to write directly into the files.Cache: phpBB caches all of the template files to increase the performance of your board. It compiles them and makes them ready to use, then, once every while, it refreshes the template set to reflect changes you made to it manually. On this page, you will see a list of all the template files cached for the template set. If you made changes to a template file and you want to apply them, select the template file and clicked Delete marked at the bottom of the page. phpBB will then regnerate the file for you. Do not worry about deleting files here, they are only temporary files and you cannot break anything.
Details: When you click this item, you will see three things: the name of the template, shown in the lists; the template copyright and last, but not least the place where the template is stored. If the template is stored in the filesystem, you can edit the files through a text editor after you download them from your server. After you re-upload them, you must purge the cache. If the templates are stored in the database, you must edit them through the ACP editor. No cache purge is needed afterwards. Storing the template in the database however takes more resources than having it in the filesystem.
Refresh: Very similar to the cache menu item, clicking Refresh will clear all the cached files for the template set. This is useful after editing the files on the filesystem, when you want to apply changes. It will overwrite any stored data in the database with the contents of the files on the server.
Export: If you need to download the files of the template to your PC and transfer them elsewhere, choose this option. You will be asked wheter to download the file to your PC or to save it in the board's store folder. You can also choose the archive format depending on your server setup.
Delete: Clicking this option will remove all references to the template from the database. It will, however, leave the files of the template set on the server. When deleting the template you will be asked for another template that will replace the deleted one.
Licensed under the CC Attribution-NonCommercial-ShareAlike 3.0 license