|
All About DCForum Templates
By David S. Choi
DCScripts.com
Introduction
DCForum is specifically designed to accomodate the customization
needs of developers and webmasters. While the script allows the
administrator to define basic color and font schemes through the
administration utility, customization of the template file can achive
far more drastic layout alterations with only a nominal amount of
effort. Editing the template file requires only a basic knowledge
of HTML. In this article we offer an overview of the mechanism by
which the output is generated and how the template can be edited
to fully integrate the layout of DCForum into your Web site.
How DCForum Generates Outputs
In essence, the template file is an html file with one distinct
characteristic. It contains entities called markers or tags. The
following is a complete list of markers in dcforum.htmlt:
$TITLE
$HTTPHEADER
$HTMLOUTPUT
The actual output is generated by the modules in the program's
library whenever an action is called. Various segments of the output
are returned as string variables. DCForum then reads in the template
file and replaces the markers with the appropriate segments to be
displayed by the browser as a complete page. In other words, the
output is embedded wherever the corresponding marker is found. This
mechanism is executed each time the output is to be displayed to
the browser. Hence, by editing the template file, you can uniformly
change the look of every page the forum generates.
Editing Dcforum.htmlt
Dcforum.htmlt is located in your $cgidir. When customizing the
template, it is imperative that the markers are preserved in their
proper order. We recommend that you back up the original file. When
inserting images or texts to the template, be sure to place them
within the <body></body> tags. Any cascading style sheet
elements or links can be inserted between the <head></head>
tags. Please keep in mind that the use of certain tags and attributes
may override those generated by the script as with any other html
file. Use the update thread function in the admin menu for the changes
to take effect on the pre-existing threads.
Multiple Template Files
DCForum provides you the option of customizing a separate template
file for each forum. This allows each individual forum to have a
distinct look. Edit a copy of the template file and place it in
the chosen DCForumIDxx subdirectory below the root/dcforum directory.
The script will automatically detect the template file in each DCForumIDxx
subdirectory and use it instead of the default template file in
the $cgidir. Once again, the threads must be updated in order for
the changes to take effect on the pre-existing threads.
Conclusion
The use of template file in DCForum program is a powerful feature.
It allows easy customization to the overall layout: the only requirement
is that you know HTML! Try customizing your template file today.
|