Tutorial: converting a template
Automatic conversion
In order to convert a template from Limbo/Mambo you have to:
- download
http://drakecms.svn.sourceforge.net/viewvc/*checkout*/drakecms/tools/templateconv.php and run it locally with your template's index.php file
- copy or create the drake.css in the css template subfolder
- remove redundant CSS definitions in template_css.css
- fix CSS declarations in index.php
Manual conversion
The following list enumerates general changes that apply in the conversion.
NOTE: the below listed changes are automatically applied by templateconv.php
- $limbocore is now $d
- $mosConfig_website and $lm_website should be replaced by $d_subpath
- $mosConfig_absolute_path and $lm_absolute_path is simply $d_root
- you do not need to specify the encoding (formerly $iso=explode('=', _ISO) )
- replace mos with $d-> since functions prefixed by mos are now methods of the main Drake class (for example, LoadModules)
- use $d_subpath in place of $d_website (formerly $lm_website) to create urls
- absolute urls are deprecated
- DO NOT use http-equiv meta tags for content-type and content-encoding, since they are sent as headers and/or generated by Drake CMS itself
- use $_SERVER['SCRIPT_NAME'] to refer to the current page (other approaches are deprecated); also try not to refer to the current page since it is implicit in html addresses
- the topmost line should check for _VALID to be defined (formerly _VALID_LM)
- the template name (same as the template folder name) is defined as a global variable $d_template