e107 Developer Guide
  • Welcome
  • Getting Started
    • Hello world example
    • Folder structure
    • Database structure
    • Debugging & problem solving
  • Classes and methods
    • Introduction
    • Alerts
    • Cache
    • CSS
    • Database
    • Date
    • Events
    • Forms
    • Javascript
    • Language
    • Logging
    • Meta
    • Parser
    • Plugins
    • Preferences
    • Redirection
    • Render
    • Route
    • URLs
    • User Data
  • Plugin development
    • Introduction
    • Plugin Builder
    • Admin-UI (User Interface)
    • Installation & configuration
    • Plugin shortcodes
    • Internationalisation (LAN)
    • Extending core functionality (addons)
    • Upgrading legacy plugins
  • Theme development
    • Introduction
    • Installation & configuration
    • Layout & templates
    • Theme Shortcodes
    • Styling (CSS)
    • Upgrading legacy themes
  • Templates, shortcodes & constants
    • Introduction
    • Templates
    • Shortcodes
    • Core Shortcodes
    • Constants
  • How-to's / FAQs
    • How to...
Powered by GitBook
On this page
  • Introduction
  • theme.php
  • Theme shortcodes

Was this helpful?

Export as PDF
  1. Theme development

Upgrading legacy themes

PreviousStyling (CSS)NextIntroduction

Last updated 4 years ago

Was this helpful?

Please note: This page is under construction and has not been finished yet.

Introduction

Themes developed for v1.x of e107 will continue to work using v2.x. However, to get the most out of v2.x, it is recommended to make the following changes to bring your theme up to date with the new v2.x standards.

theme.php

  • Replace $HEADER and $FOOTER with $HEADER['default'] and $FOOTER['default']

  • Replace any occurrences of $CUSTOMHEADER and $CUSTOMFOOTER with $HEADER['custom'] and $FOOTER['custom']

  • If your theme contains links to external social media pages such as Facebook, Twitter or YouTube, use the core definitions for them. ie. XURL_FACEBOOK, XURL_TWITTER, XURL_YOUTUBE.

  • Remove any reference to $CUSTOMPAGES and place them inside in the section.

<layout name='custom' title='Custom Pages'>
	<custompages>FRONTPAGE</custompages>
	<custompages>/forum/</custompages>
</layout>
  • 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 or 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 file. ($register[] and everywhere else in )

Theme shortcodes

Read more on theme shortcodes here:

TIP: As of e107 v2.x, you no longer need separate xxxxxx.sc files inside your theme's folder. You can now include all your theme-specific shortcodes in a single file called.

Theme Shortcodes
e107::css()
e107::js()
theme.php
theme.php
theme.xml
layouts
theme_shortcodes.php