Version 1.1.0
Updated: Sunday, 07 August 2016
Bumped to
1.1.0
.
Table of Content
Update: There will be some error messages appear inside the <textarea>
element when you want to create a new shield. My mistake. Sorry. To solve this problem, please replace the content of the manager\workers\route.shield.php
file with this commit.
We jumped a lot and now we are at version 1.1.0
. There are a lot of changes. Before you decide to upgrade, please consider to read this article carefully. For regular users, you may notice the difference between this version from the previous version through the new features were added to the CMS: the comment moderation feature and the ability to make a draft post.
Deprecated Methods
Guardian::makeToken()
is now deprecated. Please useGuardian::token()
or simply use the$token
shortcut variable.Asset::script()
is also deprecated. Please useAsset::javascript()
.
Shield
The
Name
field of the shield’s about file is now changed intoTitle
field, following the plugin’s about file pattern. This change will broke the shield manager page, so if you already using a custom shield, please replace theName
field intoTitle
field, or simply delete theabout.txt
file:Title: Your Custom Shield Name Author: Your Name URL: http://example.com Version: 1.0.0 ==== Description about your custom shield.
Shortcut Variables
Every piece of the site data will have their own specific variable name. Open your
index.php
file of your active shield and then replace this line:<?php foreach($pages as $article): ?>
with this:
<?php foreach($articles as $article): ?>
Hook Changes
Please take a look the hook changes we have made in the Function Hooks and Shield article.
You will no longer need to repeatedly write the HTML metadata and custom CSS and JavaScript conditional in the
header.php
andfooter.php
file(s). Each part will be injected automatically into theSHIPMENT_REGION_TOP
,shell_after
andsword_after
hooks.This is considered as a valid
header.php
file content:<!DOCTYPE html> <html> <head> <?php Weapon::fire('SHIPMENT_REGION_TOP'); ?> <?php Weapon::fire('shell_before'); ?> <?php echo Asset::stylesheet('foo/bar/baz.css'); ?> <?php Weapon::fire('shell_after'); ?> </head> <body>
For more information about the shield changes, please refer to the Shield article.
There are also some changes in the function and filter hook names.
before
function hook changed intoSHIPMENT_REGION_TOP
andafter
function hook changed intoSHIPMENT_REGION_BOTTOM
.before_launch
function hook changed intoshield_before
andafter_launch
function hook changed intoshield_after
.before_sanitized
filter hook changed intosanitize:input
andafter_sanitized
filter hook changed intosanitize:output
.
Your Old Plugins
- Your old plugins will not work properly in this version. Mostly because this new version of Mecha will automatically merge the plugin language parts into
Config::speak()
. If the plugin language parts merged twice, then the merged language parts will mess up the plugin language array. To fix this, simply remove your old plugins, and then replace it with the new released plugins. Some of them may not yet available, but it will be available soon. If your plugin has some important data stored, for example, the URL redirection plugin, you may want to download the plugin data first before deleting the whole plugin through the cPanel. For URL redirection plugin, the most important data to be downloaded is thecargo
folder.
Miscellaneous
- Fixed query string URL in
$config->url_current
that was not removed properly. - Behaviour changes in
Get::comments()
. NowGet::comments()
will only return the file path. To get more detailed data of the comment files without reading the content, useGet::commentsExtract()
. - Fixed broken blog sitemap.
- Fixed broken backup/restore feature.
- Fixed broken
Filter
class which cannot create filter stacks with the same priority. - Users now can block commenters by their IP address.
- Etc.