Development of CMSimple_XH 1.6

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Development of CMSimple_XH 1.6

Post by cmb » Mon Nov 12, 2012 4:37 pm

Hello Community,

IMO it's time to actually begin with the development of CMSimple_XH 1.6. In the last few weeks I've refactored and restructured the code in an own branch on SourceForge. I've added no new features and tried to stay fully compatible with CMSimple_XH 1.5.5. Now I want to present a snapshot of the current state, so interested developers and users can have a look at it, and test, if it works with existing plugins. If so, and if you agree with the changes, we can use this as base for CMSimple_XH 1.6.

The most important changes:
  • I merged the pluginloader (including page_data, the stylesheets and the help icons) to the core. IMO it doesn't make sense to keep it separated, as it isn't meant to be exchangable with alternative pluginloaders. The benefits: 2 CSS files less, and the possibility to restructure the code (e.g. saving of the content now happens together, after the plugins were loaded; formerly pagedata.php was saved, then the plugins were loaded, and only then content.htm was saved); the few pluginloader language strings are now editable under Settings->Language.
  • I restructured the PHP code files, so that the only file that contains global code is cms.php (+ search.php and mailform.php). All functions were moved to functions.php, tplfuncs.php and adminfuncs.php (the latter file is only included in admin mode). All classes are now in cmsimple/classes/.
  • I refactored the handling of config and text forms for the core and the plugins. The display and saving is now handled by a class hierarchy in cmsimple/classes/FileEdit.php. This greatly reduced the required code, which basically was duplicated in adm.php and pluginloader/index.php; in addition this file is only included, if it is actually required. Additional benefits: both the core and the plugin config etc. now have identical look and feel; it should be easy to introduce any "typed" config (some basics are already in place); it's easy to extend the class hierarchy for special needs of plugins.
  • I refactored the link check to the class LinkCheck. This way the code has to be loaded only, when actually necessary, and can be improved and maintained more easily.
  • I refactored out several parts of the code to new functions, most notably XH_plugins(), which scans the plugins/ folder and caches the results (formerly the plugins/ folder was scanned up to 6 times for a single request!). XH_writeFile() might be interesting for plugin developers, as it's basically a file_put_contents(), which is not available in PHP 4.
  • I started to document the code in cms.php according to the PEAR coding standards. You can use PHPDocumentor to produce the documentation (there's still much work required, though, to have a complete documentation).
  • I added a folder javascript in the root folder, which for now only contains a single file with a single function, but of course this might change.
  • I removed $cf[folder][plugins] and $cf[file][functions]
  • I removed quite some global variables, which are most likely not needed by any plugin, and did only clutter the global namespace.
This snapshot is only meant for TESTING purposes. Do NOT use in a production environment (= your webspace).
Build of r376.

I'm looking forward to any kind of feedback.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Development of CMSimple_XH 1.6

Post by twc » Mon Nov 12, 2012 8:28 pm

not sure if it ask before :roll:

possible remove ? @ links

http://www.cmsimple-xh.com/?The_Origins

http://www.cmsimple-xh.com/The_Origins

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

Re: Development of CMSimple_XH 1.6

Post by cmb » Mon Nov 12, 2012 8:59 pm

Hi twc,

there was a discussion about this topic: http://www.cmsimpleforum.com/viewtopic.php?f=12&t=4931. Unfortunately I had not time yet to solve the remaining problems.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Development of CMSimple_XH 1.6

Post by svasti » Mon Nov 12, 2012 9:19 pm

Hi Christoph,

your changes sound really great. Will take some tike to appreciate that.

svasti

snafu
Posts: 352
Joined: Sun Dec 26, 2010 5:18 pm

Re: Development of CMSimple_XH 1.6

Post by snafu » Mon Nov 12, 2012 10:17 pm

hello Christoph
cmb wrote:I'm looking forward to any kind of feedback.
drop in data from my site (like a normal update), on the first look, all working, no problems
lg.
winni

Durch einen Sucher betrachtet wird alles zu einem Motiv.
meine Galerie; mein Blog, mein CMSimple Template Tutorial

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

Re: Development of CMSimple_XH 1.6

Post by cmb » Mon Nov 12, 2012 11:33 pm

Hi Winni,

thank you very much for testing and reporting back. :)

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Development of CMSimple_XH 1.6

Post by bca » Tue Nov 13, 2012 3:05 pm

Hi Christoph

Loaded 1.6 into Portable_XH and installed my live site (www.videopoint.co.uk) with plugins Coco, VideoJS, Corners, Handheld, Hi_PD_scripting, ckeditor and templateswitch and everything seems to work ok.

b

maeg
Posts: 525
Joined: Fri Feb 20, 2009 2:27 pm
Location: Agerbæk, Denmark
Contact:

Re: Development of CMSimple_XH 1.6

Post by maeg » Tue Nov 13, 2012 3:12 pm

Hi

Works perfect :D

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Development of CMSimple_XH 1.6

Post by Tata » Tue Nov 13, 2012 3:48 pm

No warnings etc. with other recent plugins on my localhost either.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

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

Re: Development of CMSimple_XH 1.6

Post by cmb » Tue Nov 13, 2012 9:22 pm

Hi b, maeg, Tata,

thanks for testing. I'm glad to hear, that it seems to work so far. :)

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply