From: gerv%gerv.net <> Date: Sat, 13 Jul 2002 14:53:58 +0000 (+0000) Subject: Regenerated files from another set of 2.16 doc fixes. X-Git-Tag: bugzilla-2.16~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=021c59c9a39b52464930ccb2b867b86125f108a8;p=thirdparty%2Fbugzilla.git Regenerated files from another set of 2.16 doc fixes. --- diff --git a/docs/html/administration.html b/docs/html/administration.html index df31d4ee4e..06b0592414 100644 --- a/docs/html/administration.html +++ b/docs/html/administration.html @@ -154,18 +154,18 @@ HREF="cust-templates.html" >
5.7.1. What to Edit
5.7.2. Particular TemplatesTemplate Formats
5.7.3. Template FormatsParticular Templates

5.7.1. What to Edit

5.7.1. What to Edit

There are several ways to take advantage of Bugzilla's templates, and which you use depends on what you want to do. The Bugzilla @@ -118,7 +118,11 @@ CLASS="filename" custom. The (you may have to create + custom yourself.) The default @@ -148,7 +152,26 @@ CLASS="filename" the contents of this directory will not be touched during an upgrade, and you can then decide whether to continue using your own templates, or make the effort to merge your changes into the new versions by - hand. + hand. This is also the correct method to use if you upgrade Bugzilla + by untarring tarballs over the top, rather than using CVS. It's perfectly + acceptable to mix and match these two methods. +

Editing templates is a good way of doing a "poor man's custom fields". + For example, if you don't use the Status Whiteboard, but want to have + a free-form text entry box for "Build Identifier", then you can just + edit the templates to change the field labels. It's still be called + status_whiteboard internally, but your users don't need to know that. +

If you are making changes to contribute back to Bugzilla (and we'd + love to have them), then please read the + Developers + Guide first.

The syntax of the Template Toolkit language is beyond the scope of @@ -159,7 +182,9 @@ HREF="http://www.template-toolkit.org" TARGET="_top" >Template Toolkit home page. +>. However, you should particularly remember (for security + reasons) to always HTML filter things which come from the database or + user input, to prevent cross-site scripting attacks.

5.7.2. Particular Templates

5.7.2. Template Formats

Some CGIs have the ability to use more than one template. For + example, buglist.cgi can output bug lists as RDF or two + different forms of HTML (complex and simple). (Try this out + by appending &format=simple to a buglist.cgi + URL on your Bugzilla installation.) This + mechanism, called template 'formats', is extensible. +

To see if a CGI supports multiple output formats, grep the + CGI for "ValidateOutputFormat". If it's not present, adding + multiple format support isn't too hard - see how it's done in + other CGIs. +

To make a new format template for a CGI which supports this, + open a current template for + that CGI and take note of the INTERFACE comment (if present.) This + comment defines what variables are passed into this template. If + there isn't one, I'm afraid you'll have to read the template and + the code to find out what information you get. +

Write your template in whatever markup or text style is appropriate. +

You now need to decide what content type you want your template + served as. Open up the localconfig file and find the + $contenttypes + variable. If your content type is not there, add it. Remember + the three- or four-letter tag assigned to you content type. + This tag will be part of the template filename. +

Save the template as <stubname>-<formatname>.<contenttypetag>.tmpl. + Try out the template by calling the CGI as + <cginame>.cgi?format=<formatname> . +

5.7.3. Particular Templates

There are a few templates you may be particularly interested in customising for your installation. @@ -207,6 +292,13 @@ NAME="AEN1542">5.7.2. Particular Templates

index.html.tmpl: + This is the Bugzilla front page. +

global/header.html.tmpl and guided + bug submission form.

To make this work, create a custom template for @@ -246,8 +345,8 @@ CLASS="filename" and either call it create.html.tmpl or - or use a format and + call it create-<formatname>.html.tmpl. @@ -263,7 +362,8 @@ CLASS="filename" custom/bug/create/comment.txt.tmpl, which +>, also named + after your format if you are using one, which references the form fields you have created. When a bug report is submitted, the initial comment attached to the bug report will be formatted according to the layout of this template. @@ -280,8 +380,7 @@ WIDTH="100%" COLOR="#000000" >


        <input type="text" name="buildid" size="30">
-        
<input type="text" name="buildid" size="30">

        BuildID: [% form.buildid %]
-        
BuildID: [% form.buildid %]

        BuildID: 20020303
-        
BuildID: 20020303

5.7.3. Template Formats

Some CGIs have the ability to use more than one template. For - example, buglist.cgi can output bug lists as RDF or two - different forms of HTML (complex and simple). (Try this out - by appending &format=simple to a buglist.cgi - URL on your Bugzilla installation.) This - mechanism, called template 'formats', is extensible. -

To see if a CGI supports multiple output formats, grep the - CGI for "ValidateOutputFormat". If it's not present, adding - multiple format support isn't too hard - see how it's done in - other CGIs. -

To make a new format template for a CGI which supports this, - open a current template for - that CGI and take note of the INTERFACE comment (if present.) This - comment defines what variables are passed into this template. If - there isn't one, I'm afraid you'll have to read the template and - the code to find out what information you get. -

Write your template in whatever markup or text style is appropriate. -

You now need to decide what content type you want your template - served as. Open up the localconfig file and find the $contenttypes - variable. If your content type is not there, add it. Remember - the three- or four-letter tag assigned to you content type. - This tag will be part of the template filename. -

Save the template as <stubname>-<formatname>.<contenttypetag>.tmpl. - Try out the template by calling the CGI as - <cginame>.cgi?format=<formatname> . -