Installation & configuration
Please note: This page is under construction and has not been finished yet.
Introduction
TODO:
overview of install & config files (theme.xml & theme_config.php)
highlight some options
refer to example themes (bootstrap3)
theme.xml
This file contains information about the theme. and is used during installation and also during configuration of the theme.
👍 TIP: To create a new theme.xml
file or derive one from an existing v1.x theme.php
file use the conversion tool in the Admin Area > Theme Manager > Tools
(/e107_admin/theme.php?mode=convert
)
Please note: Unlike plugin.xml, the theme.xml file is not intended to replace the theme.php file. Instead, theme.xml works alongside theme.php to provide (meta)data about the theme itself.
Example#1: Full theme.xml
The below example uses the theme.xml from the Bootstrap3 theme included in e107 by default. Each section of the XML file is elaborated upon below.
Example #2: Minimal theme.xml
TODO: Provide minimal required theme.xml example
e107Theme
This is the namespace the configuration lives in. All theme.xml files must begin and end with this tag.
The following attributes of the theme are defined here:
Attribute | Description | Example | Mandatory? |
---|---|---|---|
name | The name of your theme. This can be text or a constant defined from your themes's language file. | Bootstrap3 | Yes |
version | The version of the theme (semantic versioning) | 3.0 | Yes |
date | The date when the theme was released (latest version). (yyyy-mm-dd) | 2020-30-12 | Yes |
compatibility | The minimum version of e107 required to use the theme. (semantic versioning) | 2.1.0 | Yes |
price | In case of a commercial theme: the sales price of the theme. (xx.xx format) | 25 | No |
currency | In case of a commercial theme: the abbreviation of the currency in which the theme is sold for (see price). | EUR | No |
url | In case of a commercial theme: the direct URL to the specific theme. When the user clicks to download your theme, the URL you have provided will be loaded. | No |
👍 Tip: If you are developing a commercial theme, you'll want to add a few extra attributes so that it displays correctly in the admin area under "Find Themes". Just package the theme's zip file with only the theme.xml and any images (including screenshots), excluding .php, .css files etc. before sharing it in the 👉 developers area on e107.org. When the user clicks to download the theme, it will display the URL you have provided.
In previous versions of e107, the attribute releaseUrl
was used. This attribute is deprecated and should be removed.
Author
Identifies the theme author and highlights some information.
👍 Note the /
to close the tag at the end.
The following attributes of the author are defined here:
Attribute | Description | Example | Mandatory? |
---|---|---|---|
name | The author's name, e107 user name or nickname. | e107 Inc. | Yes |
E-mail address. Useful to get feedback and bug reports on the theme. A mailto link to it is displayed on the Admin Area > Theme Manager page. | e107inc@something.com | Yes | |
url | A link to the author's website. A link to it is displayed on the Admin Area > Theme Manager page. | https://www.e107.org | Yes |
description | A brief description of your theme. Displayed on the Admin Area > Theme Manager page. | Example description of your choice. | No |
Summary
A text that shortly summarises the theme.
TODO: Check if using LAN is possible
Description
A text that provides a more elaborate description of the theme.
TODO: Check if using LAN is possible.
Category
The category that a theme belongs to. Possible values are:
Generic
Adult
Blog
Corporate
Gaming
News
Plugins
In this section, theme designers can include plugins that they intend to be used with the theme. In the 👉 "Theme Manager" > Site Theme > "Suggested Plugin" section with buttons for those plugins that the user can click on to install them.
plugin
Attribute | Description | Example | Mandatory? |
---|---|---|---|
name | Refers to the plugin folder name of the recommended plugin. | featurebox | Yes |
url | For plugins that are included in e107 by default, use "core". For third-party plugins .... | core | Yes |
TODO: check format for third-party plugins.
Keywords
The keywords associated with the theme. They are used when searching for plugins either through the Admin Area or on 👉 https://www.e107.org/themes.
word
Screenshots
Each theme can contain one or more screenshots. These screenshots are displayed in the Admin Area and on 👉 https://www.e107.org/themes.
image
Refers to the location of the image file, relative to the root of the theme folder
Libraries
TODO: provide explanation
library
Attribute | Description | Example | Mandatory? |
name | Name of the library | bootstrap.editable | Yes |
version | Version of the library. (semantic versioning) | 3 | No |
scope | The area in which the library is included. Possible values:
Can be multiple if separated by comma | admin | Yes |
Stylesheets
css
Attribute | Description | Example | Mandatory? |
file | css/modern-light.css | Yes | |
name | Modern Light | Yes | |
description | A high-contrast light skin | No | |
thumbnail | images/admin_modern-light.webp | No | |
scope | admin | Yes | |
exclude | bootstrap | No |
TODO: asterix (*) usage?
Layouts
Each theme can contain various layouts. Additionally, each layout can be used for specific custom pages and each layout can have specific menu presets.
Layout
Attribute | Description | Example | Mandatory? |
---|---|---|---|
name | Shortname of the layout (use underscores) | jumbotron_home | Yes |
title | Descriptive title of the layout | Home page carousel with fixed custom-menus | Yes |
default | Indicates whether a layout is the default layout to be used. There can only be one default layout. Boolean - defaults to 'false' | true | No |
preview | A preview image (thumbnail) of the layout. (recommended dimensions?) | preview.png | No |
previewFull | A preview image of the layout (full size) (recommended dimensions?) | preview_full.png | No |
Custom Pages
Each layout can assign specific pages which then, by default, make use of this specific layout. The user can modify the pages used by each layout in the 👉 "Theme Manager" > Site Theme > > Layouts section
👍 You can use the constant FRONTPAGE
to refer to the currently set 👉 frontpage setting.
Using the e_ROUTE constant
Adding $CUSTOMPAGES
to theme.php in e107 v2.x is deprecated and should be avoided!
Menu Presets
Theme authors can create buttons for menus that can be activated by the user from "Menu Manager" or "Theme Manager". These are placed between and and should be enclosed in the and tags with the opening area tag naming the menu area it corresponds to; the example below would be for a layout with two (2) menu areas ({MENU=1} = and {MENU=2} = ). The tag "menu name" must contain the name of a valid and installed menu.
ThemePrefs
Set default theme preferences?
TODO: also refer to theme_config.php
pref
name, (value)
theme_config.php
This file can be used to add information and user-selectable options to the theme's configuration page.
👍 If you want users to b e able to set specific theme preferences, use the theme_config.php file.
Example
Favicon
Automatically, e107 is looking for the favicon.ico file in the following locatons in this specific order:
inside the root of the theme folder (
e107_themes/yourtheme
)inside the root of the e107 installation (
/
)
This way, theme authors can override the default favicon, and users can upload their own favicon to the theme folder.
👍 TIP: To insert more favicons, you can use the 👉 Meta Tags
Last updated