We have just released CMSimple_XH 1.7.0rc1. As this is a beta release you are strongly encouraged to test it and provide feedback (bugs, feature requests, criticism, questions and whatever you have to say about it), but don't use it in a production environment (i.e. don't use it for your website)!
Thanks to everybody who contributed to this new version with ideas, comments, suggestions and code. Special thanks to frase, lck and richukunst who provided new templates for the distribution. Also special thank to frase and wbs for creating and translating, respectively, the new distro content. Very special thanks to Holger who had the idea and did all the basic work for the new page splitting, and to manu who did the TinyMCE 4 editor integration. Last but not least, many thanks to frase, lck and knollsen for doing a lot of testing of early development drafts and providing plenty of valuable suggestions for improvements.
The full changelog is available on our Github project page. See also the changelog of 1.7.0beta1.
The most notable changes for Users
- We finally dropped support for very old PHP versions. The minimum requirement is now PHP 5.3.0. It is recommended to use at least PHP 5.6, though.
- The classic CMSimple page splitting has been reworked. Formerly, pages have been split at certain HTML heading elements (<h1>-<h3> by default). Now the pages are split at certain HTML comments instead. That allows to insert arbitrary heading elements on every page, what allows to have a clean heading structure. Also you can now use up to 9 menu levels (at least in theory; the page URLs are likely to become too large with so many menu levels). Furthermore, in normal mode it is not possible to change the names of the pages anymore from the editor; a pagemanager has to be used instead. Advanced users may enable the advanced mode, in which case the HTML split comment is editable in the editor's source code view. Note that the page name is now basically unrelated to the first heading of the page, what makes the alternative heading ("page" tab) unnecessary, so it has been removed.
- TinyMCE 3 has been replaced as default editor by TinyMCE 4.
- Changing the password has been moved from the general configuration form to an own change password form (Settings → Password) because of issues with non-standard autocompletion of some browsers.
- The visibility and publishing status of pages set in the page data tab is now inherited to all subpages.
- Several already deprecated functions have been moved to cmsimple/compat.php. If you're sure that you don't need these functions, you can set $cf[site][compat] in cmsimple/config.php to an empty string.
- Special support for the Menumanager plugin has been removed, so even if you're using a modified version of this plugin, it won't work anymore.
- The automatically generated Legal Notices page has been removed.
- There is now an automatically created page Site/CMS Info which shows information about the system, the templates and the plugins including backlinks. You can add additional information to this page via a newsbox. For details see the delivered demo content.
- The page URLs have been slightly simplified by collapsing multiple consecutive word separator characters. For instance, a page named "this - that" formerly had the URL this---that but now this-that.
- The language codes of Svedish and Greek have been fixed; these are now sv and el, respectively.
- The flag icons have been enlarged.
- The password hashing has been improved to use BCrypt instead of the less secure former algorithm.
- The accessibility of the adminmenu functionality on touchscreen devices has been improved.
- A check regarding the password strength has been added. It currently uses a very simple algorithm, where strengths above 100 are supposed to mark very strong passwords.
- The system check has been reworked to more clearly convey the meaning of the checks.
- The folder core/ has been renamed to assets/.
- Several date/time representation are now internationalized if the PHP intl extension is available.
- The markup of some elements has been improved (searchbox, lastupdate).
- The publication period in the "page" tab has now date/time pickers if supported by the browser.
- The login form is now detached from the template.
- The Fa_XH plugin has been added to the standard distribution. It allows to use Font Awesome icons in the contents.
- The page_params functionality of hiding and unpublishing pages has been moved into the core.
- The relevant functionality of the Utf8 plugin has been moved into the core, and the plugin has been removed.
- core.css and plugins.css are now combined into xhstyles.css.
- Config and language files are now loaded on demand, what might improve the server side performance a bit.
- Special support for XHTML has been removed or deprecated. You are strongly advised to use the HTML5 doctype for new templates.
- Due to the new page splitting (see above) there is no need anymore to style <h1>-<h3> identically. Instead all pages are supposed to start with <h1> (or maybe <h2> if the template already uses an <h1> heading for all pages). It might be best to document whether a template is supposed to be optimized for the new page splitting and the details.
- It is recommended that templates include a file templateinfo.htm directly in the template folder, which may contain information about the template and a backlink to the designer. The format is simplified HTML (only <a> and <br> elements are allowed) encoded in UTF-8; the maximum supported length are 400 UTF-8 glyphs. The information in this file is injected into the new Site/CMS info page (see above). Consider to remove (or allow users to remove) backlinks to the template designer in the footer of the template, and instead use the new poweredByLink() function.
- A template can now ship an own set of language flag icons; simply put respective PNG images into the flags/ subfolder of the template. Missing icons are taken from the default location (userfiles/images/flags/).
- The function submenu() accepts an optional parameter now, which allows for custom markup of the submenu title.
- The function legallink() which has been deprecated as of CMSimple_XH 1.5.8 has been removed.
- The function editmenu() has been deprecated. It did nothing as of XH 1.5 anyway, so it's time to start its removal from templates.
- The function tag() has been deprecated. It is recommended to simply emit valid HTML5 instead.
- The function top() accepts an optional parameter which can be used to link to another id than #TOP.
- .plugintext, .pluginedit and .plugineditcaption have been removed from the core and the standard plugins. While these old pluginloader classes may still be used by some plugins, you can probably ignore them for new templates.
- The template stylesheet is now linked as last stylesheet, so that its easier to overwrite plugin defined rules.
- The Fa_XH plugin has been added to the standard distribution. It is the recommended way to use Font Awesome in the template.
- While in earlier versions flags in the query string (i.e. a parameter name without equals sign and value) have been automatically registered as global variables with the value 'true', this is no longer the case for security and maintainability reasons. This "feature" has typically been used to check whether the administration of a certain plugin is requested (if ($pagemanager) …), what will not work anymore. Use XH_wantsPluginAdministration() instead.
- CMSimple_XH now uses named sessions by default, so that multiple installations on the same domain have their own set of sessions. If a plugin wants to start a session, it shouldn't call session_start() anymore, but XH_startSession() instead. That will not work, if the plugin requests PHP files directly, i.e. without going through CMSimple_XH's index.php. It is recommended to avoid that anyway. If you can't avoid that, you can read the session name from cmsimple/.sessionname, and call session_name() with this name before calling session_start().
- The configuration type "password" has been removed.
- Advanced config options have been introduced. These are marked with a leading + sign in metaconfig.php and are hidden behind a "more" button in the config forms.
- $cf[xhtml][endtags] has been removed and tag() has been deprecated. It is recommended to simply emit valid HTML5 instead.
- initvar() has been deprecated. Note that it is not necessary to call initvar('action') or initvar('admin'), because that is done by the core already. For all other uses of initvar() consider to avoid global variables.
- The JSON class, which provided a fallback for old PHP versions without JSON support, has been removed. XH_decodeJson() and XH_encodeJson() are still available, but are now only thin wrappers over json_decode() and json_encode(). Consider to use the json_*() functions directly.
- The PasswordHash class has been removed. Use the password hashing functions and random_bytes(), respectively, instead. For older PHP versions there are fallbacks available in cmsimple/password.php.
- The functions h() and l() which are thin wrappers over $h and $l, respectively, have been deprecated. Consider to use XH\Pages instead.
- plugin_admin_common() doesn't expect any parameters anymore, because these have never been used formerly, anyway. You still can stick to passing $action, $admin and $plugin, as PHP silently ignores excess arguments, and probably this won't change in the near future (if ever).
- The global variable $rq has been removed.
- The editorhooks of the default filebrowser have been moved to the respective editor plugins, so you don't have to overwrite files in the filebrowser plugin. For backward compatibility, if no editor hook is found in the editor plugin, the hook in the old location is used as fallback.
- CMSimple_XH has gotten a general class autoloader. To use it put your properly namespaced classes into the classes/ folder of the plugin. Nested namespaces are also supported. It is recommend to rely on class autoloading instead of manual require'ing of PHP files for simplicity and efficiency.
- XH_afterFinalCleanUp() has been added, which allows plugins to register a function that will be triggered near the end of the request so the full HTML can be manipulated.
- $pd_router->addTab() accepts an optional third parameter which allows to specify a CSS class which is set on the page data tab, so you can easily style individual tab labels.
- The class XH\Mail has been extracted from the mailform code, so plugins can reuse its functionality.
- XH_formatDate() is now internationalized if ext/intl is available. Consider to use it for human readable date/time formatting.
- $pd_router->model is now private; use the methods of $pd_router instead to forward to the model.
- Headings emitted by plugins should be adapted to the new page splitting. For instance, additional content on a page shouldn't use <h4> anymore, but rather <h2> instead. Consider to make the actual heading level configurable.
- Plugins which directly deal with the contents of pages may have to cater to the new page splitting (see above).
- The Fa_XH plugin has been added to the standard distribution. It is the recommended way to use Font Awesome icons in plugins. Consider to use Font Awesome instead of classic icon images for consistency and better look on Retina devices.
- GET requests with `selected` are now redirected to the desired page.
- The PEAR coding standards have been superseded by the PSR-2 coding standards. Use `phing sniff` to check for violations.
- PHP MessDetector has been added to the development tools, and is availble via `phing mess`.
- This version introduces some backward compatibility breaks. For a list of known incompatibilites see the respective Wiki page.
- Recent versions of jQueryUI might not be fully compatible with jQuery 3, see https://github.com/TN03/jQuery_XH/issues/1. It might be best to not use jQueryUI for new developments.
If you want to test CMSimple_XH 1.7 with your contents, template(s) and plugins, do the following:
- install CMSimple_XH 1.7.0rc1 in a test environment (on your local machine or in a subfolder of your webspace; in the latter case it is recommended to prohibit public access to this installation for security reasons)
- use Exchange_XH to convert the content.htm files to the new format (detailed instructions are available in the user manual of Exchange_XH)
- copy the content/ folder to the test environment
- copy the second language folders to the test environment
- copy the folder templates/ (or just single template folders) to the test environment
- copy additional plugins to the test environment
- copy all images, downloads and media to the new environment
- manually reconfigure Settings->Configuration and Settings->Language