Getting Started Omeka Classic plugin

Configuration

Where to find the settings

Go to Appearance > Theme Files and click the Settings tab (/admin/theme-file-editor/settings), change what you need, and click Save Changes. The settings are global.

Editable themes

A list of every theme in the themes folder, with whether the editor may change its files:

  • Your copies, made with Copy Theme, are always editable (the box is ticked and cannot be changed).
  • Installed themes are read-only unless you tick them. Installing a new version of a theme, from the hosting dashboard or by replacing its folder, replaces its files and with them any edits made in the editor. Tick a theme only if you manage its files yourself and will not update it, or will put your changes back after an update: the revision history keeps them.
  • Themes the editor cannot change cannot be ticked: a theme whose folder is a link to a folder outside the themes folder (which other sites may share), or one the web server cannot write to. The reason is shown under the theme.
Setting Default What it does
Check PHP before saving On A template with a PHP error breaks the pages that use it, and an error in custom.php breaks the whole public site. When this is on, a template that does not parse is not saved, unless the user ticks Save anyway, despite the error. PHP's own parser checks the code (the PHP version that runs the site), then php -l where exec() is allowed; the page says which applies on your server.
Keep a backup file Off Sets whether Keep a backup file next to Save starts ticked. When it is ticked at the moment you save, a copy of the old file is written next to it as <file>.<YYYYMMDDHHMMSS>.bak (for example items/show.php.20261027143000.bak). Copy to Theme also writes one when it replaces a theme file and this setting is on.
Largest file (KB) 200 Files larger than this cannot be opened or saved in the editor. 1 to 10240.
Revisions per file 50 When a file is saved, its oldest revisions beyond this number are deleted. Pruning runs per file, when that file is saved. 1 to 1000.
Saves a minute 10 The most saves one user can make in a rolling minute, against runaway changes. Saves over the limit are refused with a message to wait. 1 to 100.

The settings are Omeka options: theme_file_editor_syntax_check, theme_file_editor_backup_on_save, theme_file_editor_max_file_size_kb, theme_file_editor_revisions_to_keep, theme_file_editor_rate_limit_per_minute, theme_file_editor_editable_themes (a JSON list of folder names) and theme_file_editor_copies (the themes made with Copy Theme, as JSON). theme_file_editor_rate_limit holds the save counts of the current minute.

Who can use it

Role Open the editor, browse, search, compare Save, roll back, Copy to Theme, Copy Theme, delete a copy Settings
Researcher no no no
Contributor no no no
Admin no no no
Super User yes yes yes

Anyone who can save a template can run any PHP code on the server, so Theme File Editor is for Super Users only; Admins, who otherwise have most of a Super User's rights in Classic, are refused explicitly. Users without access do not see Theme Files under Appearance, and its pages answer with Omeka's Forbidden page. See Security Model.

Log in for Support