Converting A Theme
Zip file per Theme
- Copy theme folder.
- Add everything except home.php, header.php, footer.php to the zip file.
- move zip file to amadeus/themes/downloads & upload it to server using ftp sync.
- copy install-theme.bat (from cv-modern-blog) and change file name.
- delete extrected contents (from zip file) and test batch file.
Converting Legacy Theme
- replace cs_var with am_var
- use new run_site_code('menu') which returns false to be used to call menu() or render the default footer content.
1. Finding a Theme
Start with a HTML Template from the internet. Some good places to start:
2. Save to themes folder
- Download the zip file to the "amadeus/themes/" folder / move it there
- Extract the folder to themes so that the subfolder contains "index.html"
- Rename the folder to add hyphens before new words and remove capitals.
- For eg: BizLand should become biz-land (we prefer lowercase for urls so all folder/file names should follow that rule.
- Save the index.html as header.php
- Use a code editor like PSPad to edit the php, html, css, js files
a. Title and Meta
and replace the line with:
<title><?php title(); ?></title>
<meta content="" name="description">
<meta content="" name="keywords">
and replace with (a single)
<?php seo_tags(); ?>
b. Icon (for browser tab)
and add this line just after that
<link href="<?php echo am_var('url'); ?><?php echo am_var('safeName'); ?>-icon.png" rel="icon" />
and replace with
"<?php echo $theme; ?>assets
- some themes use directly css/ and js/ folders and this may need to be treated separately
d. site assets
Search for all the css/js files in the file. This is either in the head or just before