Next: Guide

BMC/UUP-SITE - Editor

By enable edit mode the uup-site installation can acts as an CMS (content management system) where users can edit pages and files online. This requires that the edit plugin is installed and enabled.

Enable editor support

Support for online editing can be installed using uup-site.sh. This will install the editor support files under public/edit. You should also enable authentication as a logon session is required.

uup-site.sh --edit

Configure

To enable online editing, uncomment the edit related settings in defaults.site:

PHP
       ...
/**
* The page/site edit options. Enables session and suggests config->tools->auth.
*/
'edit' => array(
        'view' => '/uup-site2/edit/view',     // The editor frontend
        'ajax' => '/uup-site2/edit/ajax',     // The editor backend
        'user' => array('webmaster'),         // Allowed editors
        'host' => 'localhost'                 // The edit host
),
        ...
/**
* The toolbox plugins to expose. Themes can choose whether to show them or not.
*/
'tools' => array(
        'home'      => false,    // Enable home navigation icon.
        'auth'      => true,     // Enable authentication box.
        'search'    => false,    // Enable Google search box.
        'translate' => false,    // Enable Google translate box.
        'edit'      => true      // Enable online page/site editor.
),
        ...

Install plugins

Both ckeditor and codemirror needs to be installed. Running uup-site.sh to enable edit will display a notice about that. Theres a script supposed to take care of installing these javascript libraries.

( cd public/edit/view/editor/plugins && ./setup.sh )

If you have problem getting the install using setup.sh to work, try download these pre-package javascript libraries:

cd public/edit/view/editor/plugins

wget https://it.bmc.uu.se/andlov/php/uup-site/files/uup-site-ckeditor.tar.gz
tar xfvzp uup-site-ckeditor.tar.gz

wget https://it.bmc.uu.se/andlov/php/uup-site/files/uup-site-codemirror.tar.gz
tar xfvzp uup-site-codemirror.tar.gz
CKEditor package CodeMirror package