* needs updating (see NEW_7.txt for some new stuff)
Overview
Installation
Template Overview
AutoTheme Design
Additional Functionality
Administration
Bugs and Feedback
AutoTheme is an HTML Theme System for the eNvolution, MD-Pro, PHP-Nuke and PostNuke Content Management Systems (CMS). The current theme system usually requires you to be somewhat familiar with PHP and the CMS architecture. If you are not very familiar with PHP and/or CMS, AutoTheme removes this complexity.
AutoTheme's primary benefit is providing users the ability to create CMS themes in HTML using their favorite editor, with no use of PHP. In addition, AutoTheme provides easy customization of every part of your CMS site; including block display, custom templates for the Home Page, User Pages and Admin Pages and individual modules. The addition of AutoBlocks provides 9 additional locations for your blocks. All AutoTheme settings are easily configured from a graphical administration interface that is integrated into the CMS.
Regardless of how themes are built, a base understanding of CMS is needed. Standard CMS installations make use of four main elements in the layout. Left Blocks, Center Blocks, Right Blocks and Modules. You can create and modify the blocks via CMS's administration menus, but the theme controls when, where and how these four elements are displayed. Two additional elements are used for the news, the Summary Article (displayed on the Main Page) and the Full Article (displayed when the user reads the Full Article usually by clicking Read more...). See an example:
[ Example Site ]
In addition, AutoTheme provides AutoBlocks. Unlimited block positions in addition to Left, Center and Right. You also have full control over when to display Left, Center, Right and AutoBlocks. See an example:
[ Example Site (with AutoBlocks) ]
Unzip AutoTheme into your CMS directory. This will create a modules/AutoTheme/ directory and several theme directories under the themes/ directory. Depending upon your platform, other files may be installed.
After installing the required and any optional files, go to CMS Administration, Modules, and follow the activation procedures for your CMS. AutoTheme is now available from the main CMS Administration area.
Even though some CMSs may put a link to AutoTheme in a side block, this link will only display a message. AutoTheme is accessible from the Administration menu.
*** any theme.cfg in your theme directories must be writeable by the web server!
The easiest way in Unix/Linux is CHMOD 777 autotheme.cfg and CHMOD 777 theme.cfg
Windows should not be an issue unless you have set custom file or directory permissions.
AutoTheme is a Theme System, not a theme. The included HTML templates and images may be used as is or modified to fit your needs, but they are only examples. You should use your own creativity to build a custom theme using the AutoTheme functionality. The template files in your AutoTheme can be named anything you wish and can be organized in any directory structure under your theme directory. Your site may require fewer files or more files.
The only required files for an AutoTheme are listed below. With these created and defined in AutoTheme administration, you will have a basic CMS theme.
Each block position may also have its own template (Left, Center, Right and the AutoBlocks).
Each module or page of your site may have its own template, so that each page that is displayed is fully customizable. Every module has a unique name that is configured in CMS Administration, Modules. You can define custom templates, style sheets, images and colors and head content that are used only for that specific module. In addition, you can control what blocks are displayed on a per module or page basis. In addition to the modules that you have installed on your site, AutoTheme provides the ability to define separate templates for: Home Page (regardless of what module is there), Administration Pages, User Pages (My Account, etc.).
It's very easy to design AutoTheme templates. Just use your favorite HTML editor and design a Main Page template (theme.html), Left Block template (leftblock.html), Center Block template (centerblock.html) and Right Block template (rightblock.html). In addition, the CMS news module uses the theme for the two types of article displays, Summary Article (summary.html) and Full Article (article.html). Main theme templates should be complete HTML files containing <html>, <head>, <body> and their closing tags. Block and Article files should not contain <html>, <head>, <body> or their closing tags. Only the tags necessary to construct your Block or Article.
As you design your Main Page template, keep in mind the basic layout elements of a CMS site. The locations where these are to be placed are specified in your HTML templates using comment commands, standard HTML comments that have an embedded AutoTheme command. AutoTheme commands are enclosed in brackets [ ] and take the following form:
Example: <!-- [command] -->
<td><!-- [left-blocks] --></td>
Commands that are used inside of HTML tags themselves are not placed in a comment and are enclosed in braces { }.
Example: {command}
<font color="{color7}">
Actually, any of the commands can be inside of <!-- [ ] --> or { } but try and follow these guidelines as they may change in future releases.
Here is a list and explanation of the included commands:
[ Commands ]
Two theme tables and several colors are used by many core and third-party CMS modules. These internal CMS colors and the border and background color of the tables can be configured in AutoTheme administration. In addition, you can configure templates for the Table 1 and Table 2. These will override the table colors that you specify.
The base location of your CMS page is where your CMS index.php resides. Therefore, images and other files such as scripts that are in a sub-directory of your theme directory will need to use a path relative to where the CMS index.php resides. So if you have your images in the images directory an <image> tag and <script> tag would look like this:
Example: <img src="themes/AutoTheme/images/image.gif">
Example: <script src="themes/AutoTheme/javascript/script.js">
Two commands are available for referencing paths in your templates. The first is for your theme directory and the second is for your theme images directory:
Command: {theme-path}
Example: <script src="{theme-path}javascript/script.js">
Command: {image-path}
Example: <img src="{image-path}image.gif">
When you build your templates you may use cascading style sheets to define the appearance of certain tags or elements. This style sheet needs to be saved under the style/ directory of your theme directory as style.css (main style sheet) and styleNN.css (used for Netscape navigator). These may contain style differences but most likely will work if they are the same. You may include your style sheet in the header of your theme template while editing, but the <link> reference will be stripped out by AutoTheme and CMS will dynamically include one or the other depending on the viewer's browser. You may also define an additional style sheet to be included after these CMS default ones.
Of course if there isn't a command for what you want to do or if you don't like the way a command functions, you can still use PHP code in your HTML templates.
Example: <td><?php echo $username." AutoTheme is cool!"; ?></td>
Language support is included with AutoTheme and is available by creating an appropriate language file in your platform directory. English is included and can be used as an example for other languages.
Right-To-Left type is also supported and is automatically activated when the user's language is a RTL language. Arabic and Hebrew are currently enabled.
Multi-Sites are automatically supported in AutoTheme. AutoTheme themes may be included in the main themes/ directory of your CMS site or in a themes/ directory of a multi-site directory with no modifications to the theme or AutoTheme code. When using an AutoTheme theme in a multi-site directory, only that site has the ability to use the theme. When in the main themes/ directory, all sites are able to use the theme. As stated in the CMS multi-site documentation, do not include a theme with the same name in your main themes directory and a multi-site themes directory.
AutoTheme configuration is done through the CMS administration system. The following areas are available to configure your AutoThemes:
*** Do not administer or configure an AutoTheme while the theme is set as your current CMS theme! You have been warned!
Older AutoThemes are automatically detected and if you click on an AutoTheme from a previous version, it will automatically be imported.
*** After importing a theme you must replace theme.php with the new one and change the [color], [theme-path] and [image-path] commands in your templates to the new format for commands within tags, {command}!
Once you have verified that your imported AutoTheme is working correctly, you may safely delete the following from your theme directory:
Here is where you configure default templates, block display, colors and content for your AutoTheme. For any templates that you wish to define, just provide the template file name and path relative to your theme directory. You can choose which block positions to display by default and what colors are used by the CMS system. These are the defaults that are used unless a Custom Module is defined.
Here is where you add modules to customize. You may also preview the modules that you have configured.
To add a Custom Module, enter the module name in the Add a Custom Module box. This may or may not be the directory name of the module. The module name can be found in CMS, Administration, Modules.
Example: Web_Links
In addition to your installed modules, you can customize three other areas of your CMS site. These are "pseudo-modules" and are provided by AutoTheme to represent a certain page or collection of pages:
You can then configure templates, block display, colors and content for your specific modules. For any templates that you wish to define, just provide the template file name and path relative to your theme directory. You can choose which block positions to display by for the module and what colors are used by the CMS system.
Here is where you define templates for specific blocks by name. For any blocks that you want to customize, just add the block name and the associated template.
To add a Custom Block, enter the block name in the Add a Custom Block box. This is the Block name or title that can be found in CMS, Administration, Blocks.
Example: Main Menu
Send bug reports, support requests and feedback to autotheme@mckenzies.net or visit the Spidean Forums.
Copyright (c) 2002-2003 Shawn McKenzie
http://spidean.mckenzies.net