Rev 1372 | Blame | Compare with Previous | Last modification | View Log | RSS feed
Creating your own Phorum template
=================================
This documents describes how to create your own template for
Phorum. The document is not conclusive, but there should be
enough information in here to get you started.
Here are the steps that you have to take to create your own template:
1) Take the default template directory from {phorum dir}/templates/default
and copy it over to another directory, for example
{phorum dir}/templates/mytemplate.
2) Edit {phorum dir}/templates/mytemplate/info.php. In this file you
have to edit at least the $name variable, e.g. to
$name = "My very own template";
You can hide the template from the user's template selection box
by setting $template_hide = 1. If you do this, you can only
select this template through the admin interface (this makes
most sense if you set the display-settings to fixed through
the admin interface).
3) Open Phorum's admin page {phorum url}/admin.php and go to
"General Settings". There you'll find the option "Default Template".
Set that option to your own template. You can also set a specific
template for each single forum in the forum's settings.
That's it. You are now using your own template. From here on you can start
tweaking the template files in your {phorum dir}/templates/mytemplate
directory. For most installations, the following template files will be
most interesting:
- header.tpl The header which will be added before each page;
- footer.tpl The footer which will be added after each page;
- settings.tpl Here you can change colors and fonts;
- css.tpl This file holds all CSS definitions for Phorum.
For more extended information on changing template files, please
visit our Wiki documentation site:
http://phorum.org/cgi-bin/trac.cgi/wiki/TemplatesDocs
TODO this should probably go to the wiki, becuase it's quite specific
for a getting started HOWTO...
Additional variables in settings.tpl:
{define bodies_in_list 1}
set this to 1 to have the message-bodies loaded in the list if your
template needs them.
{define all_bodies_in_threaded_read 0}
set this to 1 to have all the message-bodies also loaded in
threaded-read-view if your template needs them