Upgrading legacy plugins
Last updated
Was this helpful?
Last updated
Was this helpful?
Back in September 2015, . Currently, any older version of e107 (such as version 1.0.4) is considered to be Legacy, and is also referred to as e107 v1.x.
Plugins and themes developed for e107 v1.x will continue to work on v2.x. However, to get the most out of v2.x, it is strongly recommended for developers to make changes to their code and bring the code up to the new v2.x standards.
This way, developers can:
Ensure continued functionality of their plugins and themes in future versions of e107
Benefit from major performance and security enhancements.
Benefit from all new features and functionalities that are being developed in v2.x.
Even though a lot of effort has been put in retaining backwards compatibility with older versions of e107, developers are strongly encouraged to update their code to new standards.
The functionality of plugins also depends on the PHP and MySQL versions that are being used.
Plugins that are not regularly updated may make use of deprecated and/or removed PHP/MySQL functionality. In this case, plugins can cause a website to malfunction, or plugins appear to be broken.
TIP: When updating plugins, take into consideration the latest PHP/MySQL developments to ensure continued functionality.
In e107 v2.x, numerous classes and methods were introduced in order to standardize functionality across installations, ensure continued functionality and to minimize performance issues and security risks.
<input class='button'
should become <input class='btn button'
<table class='fborder'
should become <table class='table fborder'
<table>
which use the class 'fcaption'
on <td>
should change the <td>
to <th>
.
Using the forumheader3
class in the Admin Area is obsolete and can be removed.
e107 v2.x uses a new template loading system.
..and then you can parse it the same way:
eg. If your file is called myplugin_template.php , within this file you might see something like this:
In v2.x there are two methods to add wrappers around your shortcodes. The way to declare them differs slightly from v1 in that we use a kind of 'shortcode-wildcard' {---}
.
A global shortcode wrapper. ie for shortcodes which are available site-wide. (for example those registered globally for use in menus or found in e107_core/shortcodes/single/)
Example:
v2.x introduces a template-specific shortcode wrapper. ie. as used on a single page of your site. Example:
To easily migrate from one to the other, one can use the method called migrateData()
.
Include a file
Include a file
Use e107's class for all form elements.
Use in your templates and/or HTML markup
Upgrade to v2.x standards
Upgrade to new standards
Developers are strongly encouraged to make use of e107's standard
e107 v2.x follows the for . Some examples:
TIP: Read more about
Plugin templates should be stored in /yourplugin/templates/ by default. The template file should contain a variable with the same name as your template file. Instead of including the template, below is the difference:
TIP: Read more about the
TIP: Read more about
In e107 v2.x, the Admin Area uses a special admin "handler", the .
In the Plugin Manager you will find something called "". It allows you to select your e107 file from your plugin folder and will generate most of the new code for the Admin Area of your plugin. It will also generate the new meta-file, which is used during of your plugin.
It is strongly recommended for plugin developers to upgrade their Admin Area using the .
In e107 v.2x, it is strongly recommended for plugins to save their preferences in their own table row. Older plugins may still store plugin preferences in the preference table.