infopop’s ubb.classic™ software

Creating a New Template Set for UBB.Classic™

 

 

ã 2003, Infopop Corporation. All rights reserved.

 

112 Fifth Avenue North • Seattle WA 98109

Phone 206.283.5999 • Fax 206.283.6166

 

 

Document Last Revised: 3/12/03 (UBB.classic™ version 6.3.0)

 

 

 

Infopop, UBB.classic, Ultimate Bulletin Board, UBBCode, UBBFriend,

Wordlet, and other Infopop products/features referenced in this

document are trademarks of Infopop Corporation.


Introduction

 

UBB.classic™ 6.3.0 introduced a new feature - individual forums may now use a different set of HTML templates than the rest of the board.  Previously, only style templates could be applied to different forums.

This level of customization is considered a more advanced operation.  Therefore, this document assumes that you are already familiar with customizing the UBB.classic™ HTML templates.

 

Creating a New Set

 

To create a new HTML template set:

 

1) FTP into your NonCGI directory.

 

2) Enter the Templates subdirectory.

 

3) Create a new subdirectory inside the Templates directory.  Use only letters and numbers in the name.  This subdirectory name will be the name of the new template set.  (No file permissions need to be set on this directory.)

 

4) Create a copy of Templates/public_common.pl (found inside the UBB.classic 6.3 zip).  Place this copy inside your new HTML template subdirectory.  If you do not copy public_common.pl, the new HTML template directory will not be recognized.

 

You may now place copies of any additional public_ templates inside the new HTML template directory.  Only public_ templates may be loaded from alternative template directories.

 

If an expected template is missing from an alternative template directory, the UBB.classic™ will try to load the template from the regular Templates directory.  This means that you need only create copies of the templates you wish to modify.

 

To accommodate the new graphics and included CSS files with our included alternate template set, we have also added a number of changes to the Style Template control panel.  To alter a style template to take advantage of these additions, you must manually edit the styles file.  This procedure is somewhat complex.  Please read through these instructions before starting, to ensure you understand the process completely.

 

You do not need to follow this procedure if you do not need to add any new custom graphics or an external CSS file.

 

1) Create a new style template within your UBB.classic™ control panel.  Once the style template has been created, use the Export Style Template utility to export the template.  Take note of the name used during the export.

 

2) FTP into your NonCGI directory.  Enter the styles directory.  Enter the importexport subdirectory within the styles directory.

 

3) Download your exported styles file in ASCII mode.  Open the file in your plain-text editor of choice, such as Notepad.  Do not use WYSIWYG / word processing editors such as Word, FrontPage, or WordPad.

 

4) Each styles file is a Perl associative array ("hash").  Each entry in the hash looks like this:

 

            q~name~ => q~value~,

 

The text to the left of " => " is the key, or name, that is used to access the value, stored on the right.  "q~" and "~" are quotation characters.  A comma ends the line.

 

5) To turn on the extended style features, add the following key/value into the hash:

            q~special~ => q~1~,

 

You should add this line immediately after the first line in the file, which should read:

            %vars_style_import = (

 

It will end up looking like:

 

            %vars_style_import = (

     q~special~ => q~1~,

 

6) If you would like to define a CSS file for this template, add a new key called "cssname".  Give it a value of the name of the CSS file within your NonCGI directory.  For example, if the file is named "myubb.css", you would add this line:

 

            q~cssname~ => q~myubb.css~,

 

If you have placed the CSS file within a subdirectory of your NonCGI directory, you must prefix the name of the directory to the file.  For example, if the file is named "anotherubb.css", and it is within a directory named "mystyle" in your NonCGI directory, you would add this line:

 

            q~cssname~ => q~mystyle/anotherubb.css~,

 

7) You may also create new image names, if you wish to add images that would not already be included with the style template.  To do this, create a new key, with a unique name starting with "customgraphic_".  For example:

 

            q~customgraphic_mygraphic~ => q~this.jpg~,

 

As with the CSS name, you may place graphics within a subdirectory within your NonCGI directory.  If you do so, you must prefix the directory name to the directory to the file.  For example:

 

            q~customgraphic_another~ => q~mystyle/that.gif~,

 

8) Once you have added the entries, check over each.  Make sure that each entry you have added ends in a comma.  Make sure the key and value start with "q~" and end with "~,".  A typo may cause the UBB.classic™ to be unable to load the styles file.

 

9) Upload the changed styles file to your NonCGI/styles/importexport directory.  Be sure to overwrite the existing file with your new copy, and to use ASCII mode in your FTP client.  If you have added a CSS file, be sure to upload it to the proper directory, then set proper permissions on it - 777 on Unix servers.  If you have added new graphics, be sure to upload them to the proper directory.  Be sure to use Binary mode in your FTP client.  If you created a new directory to hold your CSS file or images, set file permissions on it - 777 on Unix servers.

 

Users on Windows servers: The permissions on your NonCGI directory will transfer to the directories you have created.

 

10) Enter your UBB.classic™ control panel.  Use the Import Style Template utility to import the changed style template.  Once the import is complete, you should be able to edit your modified style template, the CSS file you uploaded, and/or the URLs to the images you uploaded via the Edit Style Template control panel.

 

If you clone a style template with a CSS file, a new CSS file will be automatically created in the same directory as the original copy.