MiniEdit
Description and usage
An easy to use visual editor for Mini galleries.
Entering MiniEdit mode
Place your mouse over the upper border of the first thumbnail, and a hidden link will appear. Click on it to enter MiniEdit mode.
Reordering the Mini set
The user interface shows the currently edited Mini set, and below, all other attached pictures that could be added to the set.
- grab a thumbnail with your mouse and drop it to its new position
- click on the buttons "<" and ">" to move the thumbnail left or right
- click on the "X" button to remove the picture from the gallery set; it moves to the section "Existing pictures" below
- click on a thumbnail in the "Existing pictures" section to add it to the currently edited Mini set above
Setting an individual image caption
Click on the "?" button and you can enter the new caption in a dialog box. (With Internet Explorer, you may have to "allow" the prompt box by clicking on a yellowish bar at the top of the browser window.)
Saving the gallery
Don't forget to press the "Save" button in order to save your changes to the wiki page.
Demo.
Installation
This recipe is a plugin for Mini, you need a working Mini installation.
Get miniedit.zipΔ (alt. download: miniedit.zip)
- place miniedit.php into your pmwiki/cookbook directory
- place the files unverse.js, miniedit.js and miniedit.css into your pmwiki/pub/ultralightbox directory (if you already have the unverse.js file, you don't need to replace it)
- add to pmwiki/local/config.php such a line:
include_once("
$FarmD
/cookbook/miniedit.php");
Configuration
In international wikis, the following strings can be translated:
'Edit gallery'=>'Edit gallery', 'Edit image caption'=>'Edit image caption', 'Remove image from gallery'=>'Remove image from gallery', 'Existing pictures'=>'Existing pictures', 'Click on a picture to add it to the gallery.'=> 'Click on a picture to add it to the gallery.',
The "Edit gallery" link appears for all visitors. If you want that link to appear only for people who can edit the current page, set to config.php such a line:
$MiniEdit['HideLinkIfNotAuth'] = 1;
Notes
- The recipe requires a recent browser with JavaScript enabled. Firefox, Chromium, Midori, Rekonq, Nokia and Opera work fine; dragging in Internet Explorer (IE) and in Konqueror is somewhat imprecise -- use the arrows instead; IE users need to "allow" the prompt box to change the image caption.
- Any wildcard list like Mini:*.jpg modified via MiniEdit will transform into the format "Detailed tooltip titles for individual (ordered) files" as documented at Mini#usage, with all individual file names and titles written in the page in the chosen order. The new list is ordered as you like, pictures individually tagged as you care, but it is no longer a wildcard list, so adding or removing pictures will not be automatically added to or removed from that list.
- MiniEdit may not work well if some markup causes changes to the Mini sets in the page, notably conditionals and including Mini sets from other pages.
Change log / Release notes
- 20170820 update for PHP 7.2.
- 20161217 add $MiniEdit['HideLinkIfNotAuth'], change from a $PostConfig initiation to a markup rule in order to safely check for permissions.
- 20140210 update for PHP 5.5, process all markup rules.
- 20130124 fix bug when the (:comment Mini:*:) markup was used before other Mini markups.
- 20110829 the file miniedit.php was missing from the zip archive; the recipe will now work with NotSavedWarning.
- 20110828 first public release, ready to be tested.
See also
- Mini Simple, lightweight, un-bloated gallery with thumbnail generator
Contributors
- Petko (5ko [snail] 5ko [period] fr) is author and maintainer of the recipe. The package includes the Unverse.js library from John Goodman.
- If this recipe helps you or saves you time, you can help support its continued development by ♥ .
Comments
See discussion at MiniEdit-Talk
User notes +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.