CMSimple_XH 1.6 RC

A place for general not CMSimple related discussions
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

CMSimple_XH 1.6 RC

Post by cmb » Sat Nov 16, 2013 5:53 pm

Hello Community,

we have just released CMSimple_XH 1.6rc1. As this is a release candidate you are strongly encouraged to test it and provide feedback (bugs, feature requests, criticism, questions and whatever you have to say about it), but be very careful, if you want to use it in a production environment (i.e.your website)!.

Thanks to everybody who contributed to this new version with ideas, comments, suggestions and code.

The most notable changes for Users
  • the folder layout has been changed; the images/, downloads/ and media/ folders have to be subfolders of userfiles/ now (actually you can configure all these folders); the content/ folder of second languages has been moved to the toplevel content folder (e.g. fr/content/ -> content/fr/)
  • the menu item Settings->Website has been removed, as the cmsimple/languages/LANGconfig.php files have been removed; the respective settings have been moved to the configuration resp. the language files as appropriate. The variables $txc['template']['textX'], which may be used in templates, do still exist, but they are deprecated; use $tx['template']['textX'] instead.
  • the subsites feature has been removed, as the implementation in CMSimple_XH 1.5 was too much of a hack (see the documentation about Subsites and alternative solutions)
  • content.htm and pagedata.php have been joined to a single content.htm, so it's finally possible to edit the content as in classic CMSimple (offline or online)
  • all plugin stylesheets are dynamically joined to a single sytelesheet (css/plugins.css) to reduce the number of requests for a page.
  • the default template (mini1) was extended to contain some useful CSS classes, which can be selected in the editors; their use is shown in the default content
  • viewing resp. downloading of files in the filebrowser has been added. Furthermore it is possible to replace already linked images with newly uploaded files.
  • the plugin UpdateCheck has been added to the distribution
  • tinymce4 has been added as editor plugin. As the current version of TinyMCE 4 is not yet as mature as version 3, the latter is still the default editor, but you are encouraged to have a look at tinymce4
  • jQuery4CMSimple has been updated to contain the most recent jQuery(UI)
  • the Pagemanager has be updated to version 2.0 (same functionality as benefore, but optimized, especially for "large" sites)
  • the config option Plugins->Disabled has been added, what may serve as a quick alternative to uninstalling a plugin (note, that this might not have the same effect in some cases).
  • customization of the plugin names in the admin menu is possible by adding $plugin_tx['NAME_OF_THE_PLUGIN']['menu_plugin']="desired name"; to config.php of the respective plugin
  • the delimiter of the config options Urichar->Old and ->New has been changed to the pipe character (|) to allow to replace commas (it is actually defined in cmsimple/cms.php as XH_URICHAR_SEPARATOR)
  • the plugin call notation has been simplified; it is not necessary anymore to write "PLUGIN:", so you can write {{{plugin_function(...);}}}; actually "PLUGIN" can be replaced with an arbitrary comment (which must not contain colons)
  • integration of the built-in mailform on a page is possible: {{{XH_mailform();}}}, what allows for additional text above or below the mailform
  • Security->Type "javascript" has been removed
  • several improvements regarding the security of CMSimple_XH have been made
  • a Password forgotten feature has been added to the login form; this requires the config option Security->Email (not Mailform->Email) to be set appropriately; so it is not necessary anymore to reset the password directly in config.php
  • a button to delete the content has been added, which might be useful to get rid of the default content with a single click (the current content will be stored as a backup)
  • the built-in mailform accepts IDN (if supported by your PHP version)
  • an (empty) file .2lang (note the leading dot) is required to mark a folder as second language folder; thus it is possible to have folder names consisting of 2 characters that are not second language folders
  • the configuration forms allow for different types of config options (checkboxes, text inputs, textareas etc.); plugins can also use this feature
  • config options can be hidden by using the typed config; this may be useful to hide options that should not be changed by the end-user of a site
  • the page data tabs can be saved without saving modifications of the page content first
  • to cater for servers where the timezone is not correctly configured, the config option site_timezone has been added; consult the system check, whether you need to set it, and see the resp. help tooltip regarding the details.
  • to unify the handling of locales, the language setting Locale->All has been introduced; this is not used by the core, but rather offers an opportunity for plugins to avoid individual setting of locales; unfortunately, it is not possible to preset this setting, as it differs for various operating systems (and usually not all locales are available on a particular server); consult the system check, if the configured locale is working
  • content backups (stored on the server in the content folder) can be restored in the back-end. Furthermore you can make additional backups.
  • under Settings -> Page Data you can clean up the page data
  • page scheduling has been added (thanks to Jerry), so it is possible to specify a publishing interval for individual pages in the "Page" tab
  • individual page templates are inherited to all sub pages unless explicitely overridden
  • the Meta->Description is shown in the search results
  • the log file is displayed within the template, and more importantly, it may contain more information than just about log ins (such as failed contact form mails), so have a look at it from time to time
  • the link checker (Settings -> Validate) has been slightly improved
  • links in print views are converted on the fly to point to the resp. print view
  • internationalization of the config keys has been added (still experimental)
The most notable changes for Template Designers
  • there's a new function (aka. "template tag") for more flexibility regarding the print links: XH_printUrl()
  • function legallink() was deprecated; this function is a leftover from CMSimple's AGL license, and it's not necessary anymore for GPL; you may consider to remove it from your template(s), as the function definition might be removed in a future version
  • the current page is wrapped in <span> in menus (TOC, sitemap, submenu) to allow for a more "symmetrical" styling
  • as the LANGconfig.php files have been removed, you might have to replace $txc with $tx ($txc['template'] does still work, but it has been deprecated)
The most notable changes for Plugin Developers
  • as content.htm and pagedata.php have been joined to a single file, plugins can't read pagedata.php directly anymore and directly reading content.htm might give unexpected results; therefore XH_readContents() was introduced
  • config options can now be typed (see e.g. plugins/pagemanager/config/metaconfig.php on how to use this for your plugins)
  • there are no more subsites, so strlen($sl) === 2 is guaranteed again, and usually $sl should contain a valid ISO-639-1 language code
  • plugins can use GET forms on a page by adding <input name="selected" value="$su">
  • for easier handling of the content the class XH_Pages has been introduced (somewhat experimental API)
  • to register a function that will be called after all plugins have been loaded, XH_afterPluginLoading() has been introduced
  • the configuration and localization of all plugins are loaded in advance (so there's no need to include them explicitely for special cases)
  • to display messages XH_message() has been introduced
  • to log messages in CMSimple_XH's log.txt, XH_logMessage() has been introduced
  • to unregister page data fields, PageDataRouter::removeInterest() has been introduced
  • to ease internationalization of number dependent language strings (e.g. "1 entry has been deleted" vs. "3 entries have been deleted"), XH_numberSuffix() has been introduced (see a related discussion)
  • identical plugin calls on same page are possible and will be evaluated independently
  • the following functions have been deprecated: chkdl(), rf()
  • the query parameter logout=no_backup has been introduced; this might be used by a plugin to offer the ability to log out without creating a content backup
  • the IDs of pagedata tabs have been changed to guarantee valid HTML
  • $cf['editmenu']['external'] has been introduced; this allows a plugin/addon to offer a modified admin menu
  • $plugin_tx[$plugin]['menu_plugin'] has been introduced to allow to localize/customize the name of the plugin in the built-in admin menu; you may consider to add this to your language files
  • CMSIMPLE_URL has been introduced; this constant holds the fully qualified absolute URL to the requested index.php
  • the page data tab views will be submitted via AJAX; this does not make sense for some plugins (e.g. EditorSwitch), so it's possible to revert to a normal submit by adding onsubmit="return true" to the page data form
  • you can rely now on an appropritate configured timezone, so you don't need any workarounds wrt. this issue anymore
  • to unify the handling of locale specific settings, $tx['locale']['all'] has been introduced; it's probably best to avoid any locale specific functionality at all, but if you need it, rely on $tx['locale']['all'] which will call setlocale(...) instead of calling it yourself
  • CSRF-Protection has been added, which you can and should use for your plugins
  • some of the config options and language settings that have been removed are now hardcoded in cms.php, so you still can use them: $cf['security']['type']="page", $cf['scripting']['regexp']='#CMSimple (.*?)#', $tx['meta']['codepage']='UTF-8' (however, their use is deprecated)
  • the quick workaround to disable the OPcache extension was removed; you have to cater for this extension yourself, if you're allowing editing of included PHP files in the back-end
  • several new API functions have been introduced; it's not clear yet, which one should be regarded as public (i.e. usable from plugins); your feedback on this issue is appreciated
  • to avoid session fixation attacks the session ID is regenerated on each change of the priviledge level (i.e. admin login/logout), so you can't rely on an unchanging session ID anymore (some plugins currently do this)
  • developer documentation is available
The most notable changes for Translators
  • internationalization of the config keys has been added (still experimental); see cmsimple/languages/metade.php for how it works; feedback is appreciated on how to finally handle this
The most notable changes for Supporters
  • all installed plugins are listed in the HTML source code in a comment
  • the loading of plugins happens in alphabetical order, so it is easier to reproduce issues that might be related to the loading order
The most notable changes for Core Developers
  • the code files have been restructured; the pluginloader has been merged with the core, all global code is now solely in cms.php, and all classes are now in cmsimple/classes/
  • coding standards for PHP and JavaScript have been adopted
  • PHPDoc and JSDoc have been adopted
  • PHPUnit tests have been added (see tests/ in the sources)
  • Phing has been adopted as build tool (see build.xml in the sources)
  • PHP_CompatInfo has been adopted to ensure conformance to the CMSimple_XH requirements
  • Usage of the @ operator has been deprecated
Upgrading from an earlier UTF-8 encoded CMSimple_XH version
  1. make a full backup of the current installation
  2. install CMSimple_XH 1.6rc1 in a test environment (on your local machine or in a subfolder of your webspace)
  3. copy the content/ folder to the test environment
  4. copy the second language folders to the test environment, and move their subfolder content/ inside the toplevel content/ folder and rename it to the language code (e.g. fr/content/ -> content/fr/); add an empty file .2lang to all language folders (e.g. fr/.2lang)
  5. copy the folder templates/ (or just individual template folders) to the test environment
  6. copy additional plugins to the test environment (note, that some plugins may be incompatible, such as Pagemanager_XH 1.x and Menumanager)
  7. copy all images, downloads and media files to the new environment; note that the images, downloads and media folders have to be subfolders of the userfiles folder, so usually you have to copy images/ to userfiles/images/. Obviously this will break existing links to these files; you can work around this by establishing redirects from the old folders to the new one. E.g. for Apache servers you can put the following .htaccess to the domain root (change "xh16" to the folder name of your test installation):

    Code: Select all

    Redirect /xh16/images /xh16/userfiles/images
    Redirect /xh16/downloads /xh16/userfiles/downloads
    Redirect /xh16/media /xh16/userfiles/media
  8. manually reconfigure Settings->CMS and Settings->Language
  9. after throrough testing replace the old installation with the new one (don't forget to adjust the redirects for the user files)
Unfortunately, there's still plenty of documentation on the new features and changes missing yet. So if you have questions regarding certain items, feel free to ask, so we can set priority on writing the most missing documentation first.

Download: CMSimple_XH 1.6rc1

Enjoy!
Last edited by cmb on Thu Jun 19, 2014 11:48 am, edited 1 time in total.
Reason: removed link to preliminary developer documentation
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: CMSimple_XH 1.6 RC

Post by manu » Sun Nov 17, 2013 12:18 pm

Plugin tinymce4: missing fonts inhibit proper display of the toolbar. Fixed in DEV1.6 v1112.
regards
manu

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: CMSimple_XH 1.6 RC

Post by svasti » Sun Nov 17, 2013 12:51 pm

XH 1.6 is going to be a huge improvement.

The big steps:

2003 -- CMSimple 1 becoming available
2010 -- CMSimple 3.3 becoming opensource
2009 -- CMSimple_XH 1 getting pagedata.php
2010 -- CMSimple_XH 1.2 using UTF-8
2012 -- CMSimple_XH 1.5 getting vastly improved admin toolbar
2013 -- XH 1.6 clean & integrated code, pagedata integrated into content.htm, user friendly admin options

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: CMSimple_XH 1.6 RC

Post by cmb » Sun Nov 17, 2013 2:24 pm

manu wrote:Plugin tinymce4: missing fonts inhibit proper display of the toolbar. Fixed in DEV1.6 v1112.
I have uploaded 1.6rc1 again with the missing font files added. You can distinguish both versions by the release date (2013-11-16 vs. 2013-11-17; see Settings -> Info). To add the missing font files to the first 1.6rc1, just download the second one, and upload plugins/tinymce4/tinymce/skins/.
Christoph M. Becker – Plugins for CMSimple_XH

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: CMSimple_XH 1.6 RC

Post by simpleSolutions.dk » Mon Dec 02, 2013 2:59 pm

There is a bug in alternative heading of Page Parameters. An alternative heading starting with numbers is missing styles and a part of the number, ie heading
18. XXX
(eighteen period) is translated as
8. XXXX
without styling. The HTML code is

Code: Select all

8. XXXX</h3>
ie

Code: Select all

the <h3> tag and number 1 is missing.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: CMSimple_XH 1.6 RC

Post by cmb » Mon Dec 02, 2013 3:58 pm

That was already reported by tanavots a while ago, but it got forgotten. :oops: Thanks for the reminder -- I have fixed it now (r1119 resp. r1120).
Christoph M. Becker – Plugins for CMSimple_XH

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: CMSimple_XH 1.6 RC

Post by simpleSolutions.dk » Wed Dec 04, 2013 12:38 pm

Thx Christoph

Where can i download r1120?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: CMSimple_XH 1.6 RC

Post by cmb » Wed Dec 04, 2013 12:54 pm

You can always download the current snapshot of the 1.6 branch directly from SourceForge: http://sourceforge.net/p/cmsimplexh/cod ... anches/1.6. Note, that this branch will be merged to the trunk, after XH 1.6 will be released, so after this release you'll find the snapshot under http://sourceforge.net/p/cmsimplexh/cod ... ath=/trunk (currently it contains the latest 1.5.x).

However, in this case you can simple make the modification yourself. Change line 183 in plugins/page_params/index.php to:

Code: Select all

                $temp, '${1}' . $pd_current['heading'] . '$2', $c[$pd_s] 
Christoph M. Becker – Plugins for CMSimple_XH

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: CMSimple_XH 1.6 RC

Post by simpleSolutions.dk » Tue Dec 10, 2013 3:50 pm

In admin mode at the end of each page is added the following code

Code: Select all

<script type="text/javascript" src="./javascript/admin.js"> </ script>
<script type="text/javascript"> / * <[CDATA [* / XH.i18n = {"action": {"cancel": "Cancel", "ok": "OK"}, "password": {"fields_missing": ". fill in all fields", "mismatch": "New password and confirmation do not match.", "wrong". "Old password is incorrect"}, "error": {"server": "server error :% s "}," options ": {" backupsuffix ":" Enter a file name (only az, 0-9, minus and underscore, a maximum of 20 characters): "}} / *]]> * / </ script>
just before the </ body> </ html> tags
The problem is that I get attached to the same code to textareas including the html code in plugins in admin mode.
I can not see how it happens. Any sugestions?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: CMSimple_XH 1.6 RC

Post by cmb » Tue Dec 10, 2013 5:12 pm

That is caused by the the global variable $bjs, which is appended just before any </body> in the document, what happens in XH_finalCleanUp() in functions.php. You can solve the issue by writing entity escaped HTML to the textareas, for example:

Code: Select all

$o .= '<textearea>' . htmlspecialchars($html, ENT_COMPAT, 'UTF-8') . '</textarea>';
or even simpler and more resilient since XH 1.6beta1:

Code: Select all

$o .= '<textarea>' . XH_hsc($html) . '</textarea>';
BTW: the behavior of XH_finalCleanUp() has not changed with regard to $bjs since XH 1.5.7; only now the core makes use of $bjs; plugins might have done so already in XH 1.5.x.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply