Upgrading v1.x Themes

Themes developed for v1.x of e107 will continue to work using v2.x. However, to get the most out of v2.x, we suggest the following changes be made to bring your theme up to the new v2.x standards.

Replace $HEADER and $FOOTER with $LAYOUT['default'] combining both of them into a single template. Place a {---} between them so e107 knows where to split it into HEADER and FOOTER.

Replace any occurrences of $CUSTOMHEADER and $CUSTOMFOOTER with $LAYOUT['custom'] (see above)

If you have recurring code in your $LAYOUT. eg. Navigation html which should be included as the header and footer of every layout, then use the special layouts: $LAYOUT['_header_'] and $LAYOUT['__footer_'].

If your theme contains links to external social pages such as facebook, twitter, youtube or google+, use the core definitions for them. ie. XURL_FACEBOOK, XURL_TWITTER, XURL_YOUTUBE, XURL_GOOGLE.

Remove any reference to $CUSTOMPAGES and place them inside theme.xml in the layouts section.

<layout name='custom' title='Custom Pages'>

If you have used index.php in your $CUSTOMPAGES list, use FRONTPAGE instead (see above)

The function theme_head() has been deprecated. Instead, use either e107::css() or e107::js() to include what you require in the header. (see bootstrap or other new core theme for examples)

Shortcodes need to be set to UPPERCASE in all occurrences in your theme.php file.

Remove all references to $register_sc['xxxxx'] from theme.php for shortcodes used in the $LAYOUT. Place the contents of all xxxxxx.sc files used by $LAYOUT ($HEADER and $FOOTER) inside theme_shortcodes.php and then remove these xxxxxx.sc files from your theme's folder.

Thursday 13 June 2013 - 17:00:00 admin,