Extedit_XH – a CMSimple_XH Plugin

Bust with highlighter

Extedit_XH facilitates to have an arbitrary amount of so called "extedits", i.e. content areas, which can be edited by users logged in via Memberpages_XH or Register_XH. The plugin offers basically the same functionality as One Page for simpleMultiUser, but uses the editor of CMSimple_XH. For security reasons the file browser is replaced with a minimal image picker.

Please do read this documentation, before you encounter any problems!

Important Notice

Extedit_XH couldn't be tested so far in various environments. It is a so called beta version. Use with caution!

Requirements

Extedit_XH is a plugin for CMSimple_XH. It requires CMSimple_XH ≥ 1.6 and PHP ≥ 5.0.0.

Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory extedit/ to your server into CMSimple_XH's plugins directory.
  4. Set write permissions for the subdirectories config/, css/ and languages/.
  5. Switch to "Extedit" in the back-end to check if all requirements are fulfilled.

Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select Plugin → Extedit.

You can change the default settings of Extedit_XH under "Config". Hints for the options will be displayed when hovering over the help icon with your mouse.

Localization is done under "Language". You can translate the character strings to your own language if there is no appropriate language file available, or customize them according to your needs.

The look of Extedit_XH can be customized under "Stylesheet".

Usage

To embed an "extedit" on a page, insert the following:

{{{extedit('USERNAME', 'TEXTNAME');}}}

The parameters have the following meaning:

USERNAME
The name of the Register_XH or Memberpages_XH user, who may edit the content.
TEXTNAME
The unique name of the "extedit". Omit this parameter to use the heading of the containing page.

When the respective user is logged in, he's presented an "Edit" link, where he can edit the contents of the "extedit". He can insert images via the editor, but he has no access to the file browser—only a simple image picker is available. So the images have to be uploaded by other means. In preview mode the admin of the website is also able to edit the "extedit", and has access to the file browser as usual. Visitors will only see the content of the "extedit".

It's possible to have an arbitrary amount of "extedits" on a single page, all of them assigned to a certain user, each of them assigned to a different user, or a mixture thereof.

The contents of all "extedits" are stored in the subfolder extedit/ of the current content/ folder, each in a single file. The filename is made from the TEXTNAME by stripping all invalid characters (only alphanumeric characters and hyphens are allowed). Therefore all respectively stripped TEXTNAMEs have to be unique for each language of the CMSimple_XH installation.

Caveat: If you omit the TEXTNAME parameter, the heading of the page will be used instead. If you later change the page heading, the "extedit" file has to be manually renamed. Furthermore it's perfectly valid to have the same page heading more than once in CMSimple_XH in different subtrees of the TOC, but that doesn't work for Extedit_XH. So it's probably better to always explicitly specify the TEXTNAME parameter.

It's possible to use plugin calls in the "extedits" (what has to be enabled in the configuration), but this is of limited use, as the users will not be able to actually manage the plugins. However, some plugins don't need such management, so they can be used ad hoc, and others could be prepared by the admin.

Image Picker

As the filebrowser (neither the default filebrowser nor external filebrowsers such as hi_kcfinder) is only available for the administrator of the web site for security reasons, Extedit_XH offers a very simplistic image picker for users who are logged in via Memberpages_XH or Register_XH.

By default the user has only access to his own subfolder of the image folder (which is normally userfiles/images/). This subfolder has to have the same name as the user and must be created by the administrator. The user can neither upload images to this folder, nor is he able to access subfolders of his own image folder.

Limitations

License

Extedit_XH is licensed under GPLv3.

© 2013-2014 Christoph M. Becker

Danish translation © 2013 Jens Maegaard

Credits

The plugin logo is designed by Alessandro Rei. Many thanks for publishing this icon under GPL.

This plugin uses free applications icons from Aha-Soft. Many thanks for making these icons freely available.

Many thanks to the community at the CMSimple_XH forum for tips, suggestions and testing.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and to all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.