Developer News: Some theme structural changes coming in RC3

Posted by: onokazuOn 2003/3/1 19:04:35 15735 reads
There has been a change in handling of theme files in RC3 (which is about to be released in the next few days), as well as several modifications to the naming conventions.

The skin files will no longer be included in a themeset, but managed separately as theme files under the themes directory as we did in XOOPS 1.x. Only the module template files are included in a themeset, thus we will rename theme sets as template sets from RC3.

Why this change?

The development of theme files has become too complicated, or requires overly much work with template and skin files combined. In addition, storing them into DB made hard for the files to be modified on a frequent basis. We also have noticed that skin files are touched more often by the site administrators than are the template files. By completely separating them apart to template and theme sets, we hope that it would not only facilitate the development of theme files for XOOP2, but also make the site administration and management much easier.

Please continue reading for details..

Structural changes
[u]XOOPS2 RC1-RC2[/u]                               [u]XOOPS2 RC3[/u]

skin.html (requiredin DB)               -> theme.html (requiredstored under themes/)
skin_blockcenter_c.html (optionalin DB) -> theme_blockcenter_c.html (optionalunder themes/)
skin_blockcenter_l.html (optionalin DB) -> theme_blockcenter_l.html (optionalunder themes/)
skin_blockcenter_r.html (optionalin DB) -> theme_blockcenter_r.html (optionalunder themes/)
skin_blockleft.html (optionalin DB)     -> theme_blockleft.html (optionalunder themes/)
skin_blockright.html (optionalin DB)    -> theme_blockright.html (optionalunder themes/)

image files (optionalin DB)             -> image files (optionalunder themes/)

module template files (optionalin DB)   -> module template files (optionalin DB)
How to convert your XOOPS2 themes to work in RC3 1. Before uploading anything to your server, go to Themeset Manager and download a themeset tarball for your theme. It is VERY important that you do this before anything else, since skin(theme) files are no longer managed through Themeset Manager in RC3 and thus you won't be able to download them after the upgrade. 2. Extract the tarball, rename the skin files as listed above. 3. Open skin.html with your text editor, and modify the following parts (if any):
<{include file="db:skin_blockleft.html"}>
<{include 
file="db:skin_blockright.html"}>
<{include 
file="db:skin_blockcenter_c.html"}>
<{include 
file="db:skin_blockcenter_l.html"}>
<{include 
file="db:skin_blockcenter_r.html"}>
to
<{include file="your_theme_name/theme_blockleft.html"}>
<{include 
file="your_theme_name/theme_blockright.html"}>
<{include 
file="your_theme_name/theme_blockcenter_c.html"}>
<{include 
file="your_theme_name/theme_blockcenter_l.html"}>
<{include 
file="your_theme_name/theme_blockcenter_r.html"}>
Of course, don't forget to replace your_theme_name with the actual theme name. 4. Upload the skin(theme) files (not template files) to the themes directory on your server. All .html/.css/image files should be placed directly under /themes/your_theme_name/. That's all, and you should have an option to select your theme in the preferences after upgrading to RC3. Smarty tag name changes Some of the Smarty template tags will be renamed as well to conform with the XOOPS naming conventions.
<{$meta_xxx}>   ->  <{$xoops_meta_xxx}>
<{
$footer}>     ->  <{$xoops_footer}>