[ Index ]
 

Code source de Phorum 5.1.25

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/docs/ -> creating_templates.txt (source)

   1  Creating your own Phorum template
   2  =================================
   3  
   4  This documents describes how to create your own template for
   5  Phorum. The document is not conclusive, but there should be
   6  enough information in here to get you started.
   7  
   8  
   9  Here are the steps that you have to take to create your own template:
  10  
  11  1) Take the default template directory from {phorum dir}/templates/default
  12     and copy it over to another directory, for example
  13     {phorum dir}/templates/mytemplate.
  14  
  15  2) Edit {phorum dir}/templates/mytemplate/info.php. In this file you
  16     have to edit at least the $name variable, e.g. to
  17     $name = "My very own template";
  18  
  19     You can hide the template from the user's template selection box
  20     by setting $template_hide = 1. If you do this, you can only
  21     select this template through the admin interface (this makes
  22     most sense if you set the display-settings to fixed through
  23     the admin interface).
  24  
  25  3) Open Phorum's admin page {phorum url}/admin.php and go to
  26     "General Settings". There you'll find the option "Default Template".
  27     Set that option to your own template. You can also set a specific
  28     template for each single forum in the forum's settings.
  29  
  30  
  31  That's it. You are now using your own template. From here on you can start
  32  tweaking the template files in your {phorum dir}/templates/mytemplate
  33  directory. For most installations, the following template files will be
  34  most interesting:
  35  
  36  - header.tpl     The header which will be added before each page;
  37  - footer.tpl     The footer which will be added after each page;
  38  - settings.tpl   Here you can change colors and fonts;
  39  - css.tpl        This file holds all CSS definitions for Phorum.
  40  
  41  For more extended information on changing template files, please
  42  visit our Wiki documentation site:
  43  
  44  http://phorum.org/cgi-bin/trac.cgi/wiki/TemplatesDocs
  45  
  46  
  47  
  48  TODO this should probably go to the wiki, becuase it's quite specific
  49  for a getting started HOWTO...
  50  
  51  Additional variables in settings.tpl:
  52  {define bodies_in_list 1}
  53  set this to 1 to have the message-bodies loaded in the list if your 
  54  template needs them.
  55  
  56  {define all_bodies_in_threaded_read 0}
  57  set this to 1 to have all the message-bodies also loaded in 
  58  threaded-read-view if your template needs them


Généré le : Thu Nov 29 12:22:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics