CMSimple_XH 1.6 BETA

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 BETA

Post by cmb » Sat Sep 21, 2013 6:24 pm

Hello Community,

we have just released CMSimple_XH 1.6beta1. 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.

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 as appropriate. As a consequence, the variable $txc doesn't exist anymore, so you have to replace $txc['template']['text1'] with $tx['template']['text1'] in templates that use this feature, for example.
  • 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
  • viewing resp. downloading of files in the filebrowser has been added
  • 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
  • the config option Plugins->Disabled has been added, what may serve as a quick alternative to uninstalling a plugin (note, that this may not have the same effect in some cases)
  • customization of the plugin names in the admin menu is possible by adding $plugin_tx[$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 (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
  • 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 PHP)
  • 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 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
  • page scheduling has been added (thanks to Jerry), so it is possible to specify a publishing interval for each page 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
  • 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 it 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
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 by typed (see 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
  • 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 (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
  • identical plugin calls on same page are possible
  • the following functions have been deprecated: chkdl()
  • 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 folder containing the requested index.php
  • the page data tabs 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
  • 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'
  • the editor configuration (init_*.js) has switched to JSON for easier manipulation from plugins (for now that's implemented only for tinymce4)
  • 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)
  • preliminary 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)
  • Usage of the @ operator has been deprecated
If you want to test CMSimple_XH 1.6 with your contents, template(s) and plugins, do the following:
  1. install CMSimple_XH 1.6beta1 in a test environment (on your local machine or in a subfolder of your webspace)
  2. copy the content/ folder to the test environment
  3. 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)
  4. copy the folder templates/ (or just single template folders) to the test environment
  5. copy additional plugins to the test environment (note, that some plugins may be incompatible, such as Pagemanager_XH (except the one in the distribution) and Menumanager)
  6. copy all images, downloads and media 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
  7. manually reconfigure Settings->CMS and Settings->Language
Unfortunately, there's plenty of documentation on the new features and changes missing yet. So if you have questions regarding particular items, feel free to ask, so we can set priority on writing the most lacking documentation first.

Download: CMSimple_XH 1.6beta1

Enjoy!
Last edited by cmb on Thu Jun 19, 2014 11:46 am, edited 8 times in total.
Reason: updated; removed links to preliminary developer documentation
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: CMSimple_XH 1.6 BETA

Post by bca » Tue Sep 24, 2013 10:39 am

Loaded my working site into XH1.6 in a subfolder and all seems to be working ok after changing all the image paths (pain in the ***) :D

The only problem I had was with the Video_XH plugin where the old default media folder is no longer the default! Took a while to work out the problem but worked ok when i changed the config to point to correct folder. Maybe a good idea to change Video_XH to reflect the new default. ALthough it may be just easier to update VideoJS to the latest version at the same time :lol:

b

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

Re: CMSimple_XH 1.6 BETA

Post by cmb » Tue Sep 24, 2013 9:43 pm

bca wrote:after changing all the image paths (pain in the ***)
Didn't the redirect described in the "upgrade" notes, item 6, work for you? Anyway, we may consider offering an upgrade script that will adjust all the links in the content (even though it may be not too easy to get that script right) for users who can't set up the required redirects.
bca wrote:Maybe a good idea to change Video_XH to reflect the new default.
It should work if Folder->Video is left blank, but than the videos would have to be placed directly in the media/ folder. It might be reasonable to change the meaning of this setting to specify a subfolder of the configured media folder.
bca wrote:ALthough it may be just easier to update VideoJS to the latest version at the same time
Yes. I'll have to get this ready, finally. :)
Christoph M. Becker – Plugins for CMSimple_XH

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: CMSimple_XH 1.6 BETA

Post by bca » Wed Sep 25, 2013 9:16 am

Didn't the redirect described in the "upgrade" notes, item 6, work for you?
:roll: :oops:
It should work if Folder->Video is left blank,
Yesterday the video wasnt picked up when left blank. I had to put userfiles/media in. However this morning when I checked what you said it works OK with it left blank. Perhaps the server wasnt ready or something yesterday.
So it is OK.

b

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

Re: CMSimple_XH 1.6 BETA

Post by simpleSolutions.dk » Fri Oct 11, 2013 3:23 pm

I'm testing it and will be back with a bug report in few days.
Right now I have truble with a livesearch plugin where the keywords list is missing background (type "develop" in cms16.simplesolutions.dk and compare to simplesolutions.dk). Probably a conflict with some new build in jquery functionality in version 1.6
A minor tihing (and probably my fault) is a help text to publication period in Page tab.
If the release date is set, the site will only be published when the publication date has passed.
The site must be replaced with "page"

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

Re: CMSimple_XH 1.6 BETA

Post by cmb » Fri Oct 11, 2013 3:34 pm

simpleSolutions.dk wrote:I'm testing it and will be back with a bug report in few days.
Thanks. :)
simpleSolutions.dk wrote:Right now I have truble with a livesearch plugin where the keywords list is missing background (type "develop" in cms16.simplesolutions.dk and compare to simplesolutions.dk).
That's caused by the combined stylesheet. Have a look at http://cms16.simplesolutions.dk/css/plugins.css "/************************************ ./plugins/livesearch/css/stylesheet.css */". There are some strange characters there--that's a UTF-8 BOM encoded as ISO-8859-1. I'll add an appropriate fix to remove eventual BOMs in the combined stylesheet.
simpleSolutions.dk wrote:The site must be replaced with "page"
Thanks for noting--I'll fix it.

PS: Both issues are fixed in the repository now. You can download the latest snapshot from http://sourceforge.net/p/cmsimplexh/cod ... anches/1.6.
Last edited by cmb on Fri Oct 11, 2013 8:43 pm, edited 1 time in total.
Reason: added PS
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: CMSimple_XH 1.6 BETA

Post by simpleSolutions.dk » Fri Oct 11, 2013 10:26 pm

Hi Christoph

Thx. The new build fixed livesearch background.

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

Re: CMSimple_XH 1.6 BETA

Post by simpleSolutions.dk » Sat Oct 12, 2013 10:07 am

Some more deviations (intented or not)
The plugin hi_pdscripting has some strange indexing problems. The plugin call from
http://cms16.simplesolutions.dk/?Advanc ... ch_demo%29 containing the page_data
'hi_pd_scripting_active2'=>'1',
'hi_pd_scripting_code2'=>'showrss(\'0\');',
'hi_pd_scripting_placeholder2'=>'__TEST',
is is shown on the next page: http://cms16.simplesolutions.dk/?Advanc ... ch_demo%29
On this page (http://cms16.simplesolutions.dk/?Advanc ... ch_demo%29) the call #CMSimple ....# is supressed and not shown. If I use notation {{{PLUGIN: ...}}} then both plugins are shown.

Corresponding site simplesolutions.dk (http://simplesolutions.dk/?Advanced_Sea ... ch_demo%29) uses calendar plugin. This plugin does not work any more but it is a very old plugin and an alternate calender is available.

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

Re: CMSimple_XH 1.6 BETA

Post by simpleSolutions.dk » Sat Oct 12, 2013 11:49 am

Can't get 2lang to work

My ver 1.6 structure is as described

/content/da/.2lang
/content/da/content.htm
/content/da/index.php
/content/da/.htacess

An empty 2.lang file is created and all other files are copied from the original 2lang folder named "da" on the cmsimple 1.5.8 site. No danish flag is visible on test site. Did I misunderstood something?

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

Re: CMSimple_XH 1.6 BETA

Post by cmb » Sat Oct 12, 2013 11:55 am

simpleSolutions.dk wrote:The plugin hi_pdscripting has some strange indexing problems.
I was not able to reproduce that, but there might be problems with the modified handling of #cmsimple remove# (that was changed to really remove the page as done by classic CMSimple)--do you use #cmsimple remove#? I get some strange error notices from meta_tags and page_params, when I have a #cmsimple remove# on a page--however, not when viewing or editing a page, but only for general administration functionality (config etc.)

Another reason might be a clash with another plugin due to the potentially changed loading order of plugins (now they're loaded in alphabetic order always).

Have you tried it with debug mode enabled?
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply