Getting Started Omeka Classic plugin

Installation

Requirements

  • Omeka Classic 3.1 or later. Theme File Editor is built and tested on 3.2.2.
  • PHP 8.1 or later.
  • The web server user needs write access to the themes folder (themes/) to copy a theme, and to the files of the themes you edit. The plugin never changes file permissions.
  • Optional: exec() enabled and a PHP command-line program, for php -l on top of PHP's own parser check. The plugin uses the program Omeka runs background jobs with (background.php.path in application/config/config.ini, or the php it finds). Without it, the parser's check still catches every syntax error.

The plugin has no Composer dependencies, and the CodeMirror editor ships inside it: no request goes to a CDN.

Installing

  1. Unzip ThemeFileEditor-1.0.0.zip and copy the ThemeFileEditor folder into your Omeka Classic plugins/ folder.
  2. Log in to the admin as a Super User and go to Settings > Plugins.
  3. Click Install next to Theme File Editor.

Installing creates one table, theme_file_editor_revisions, which holds the revision history, and stores the settings with their defaults (see Configuration).

You then find:

  • Appearance > Theme Files (/admin/theme-file-editor), with the Files, Search and Settings tabs. The editor opens on the public theme.
  • On Appearance > Themes, an Edit Theme Files button under the current theme and an Edit theme files link under each other theme.

Only Super Users see these. See Security Model.

First steps

Installed themes open read-only (see Copying a Theme for why). To start editing:

  1. Open Appearance > Theme Files. The public theme is selected, with a notice that it is read-only.
  2. Click Copy This Theme…, keep or change the folder name and title, and click Copy.
  3. The editor opens on the copy. Choose a file in the tree, edit it and click Save.
  4. When you are ready, choose the copy under Appearance > Themes to use it on the site.

Upgrading

Deactivate the plugin, replace the plugins/ThemeFileEditor folder with the new version, then click Upgrade (or Activate) on the Plugins page. Version 1.0.0 has no database changes.

Uninstalling

Click Uninstall on the Plugins page, then delete the folder. Uninstalling:

  • drops the theme_file_editor_revisions table, which deletes the revision history for good;
  • deletes the plugin's settings, including the list of themes you copied with it and the themes you ticked as editable.

It does not touch the themes folder: theme files keep their current content, backup files stay next to the originals, and the themes you copied stay in themes/ with their configuration. If you install the plugin again, those copies are treated as installed themes until you tick them under Settings > Editable themes.

Log in for Support