Mecha CMS

Mecha CMS blog and documentation.

Version 1.1.0

Updated: Sunday, 07 August 2016

Bumped to 1.1.0.

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 use Guardian::token() or simply use the $token shortcut variable.
  • Asset::script() is also deprecated. Please use Asset::javascript().

Shield

  • The Name field of the shield’s about file is now changed into Title 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 the Name field into Title field, or simply delete the about.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 and footer.php file(s). Each part will be injected automatically into the SHIPMENT_REGION_TOP, shell_after and sword_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 into SHIPMENT_REGION_TOP and after function hook changed into SHIPMENT_REGION_BOTTOM.
    • before_launch function hook changed into shield_before and after_launch function hook changed into shield_after.
    • before_sanitized filter hook changed into sanitize:input and after_sanitized filter hook changed into sanitize: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 the cargo folder.

Miscellaneous

  • Fixed query string URL in $config->url_current that was not removed properly.
  • Behaviour changes in Get::comments(). Now Get::comments() will only return the file path. To get more detailed data of the comment files without reading the content, use Get::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.

Download Mecha v1.1.0

Donation and Email Subscription