FosWiki Stuff¶
work in progress.. YMMV..
NativeSearch¶
Status: working-for-us, for Fowiki 1.x (not required for Foswiki 2.x)
For some, including me, Foswiki’s native search plugin (http://foswiki.org/Extensions/NativeSearchContrib) does not work (http://foswiki.org/Tasks/Item9090). I’ve hacked a version that works for me. It would need testing on all possible platforms so that it could go into Foswiki’s codebase. Unfortunately I am unable to do that anytime soon (if at all). So here’s my version (that works in Linux) in case anyone finds it useful.
CodeMirror Plugin¶
Status: proof-of-concept, abandoned
An attempt at replacing the standard textarea editor with a CodeMirror editor (http://codemirror.net). It works mostly fine for me at the moment. It would needs some cleanup, documentation, and probably more, before it could be contributed. Again, not something I will be able to do anytime soon.
The plugin adds a %CODEMIRROR% macro that will result in JavaScript and HTML code to transform a given textarea into a codemirror object (with additional features, such as a toolbar to control line wrapping and fullscreen mode, a jquery ui resize handle and more). Optionally you can enable the «codemirror» skin (e.g. by setting SKIN = codemirror,pattern
in the System/SitePreferences topic) that adds the necessary %CODEMIRROR% command to the «edit» template. A very simple and incomplete TML syntax highlighting plugin for CodeMirror is included, too.
Anyway, here’s a version in case you want to play with it:
Note: this download contains a copy of the original CodeMirror 3.02 source (license etc. included).
Bugs I’ve seen so far (I use it only as a raw edit replacement):
- would sometimes not commit (POST) the changed data, also going back in the browser does not bring back the edited text (unlike a native textarea). Possibly needs a save button that disables the codemirror and updates the textarea before POSTing the data (though, codemirror is supposed to keep the textarea contents up-to-date automatically).
- the toolbar shifts the editor lines so that the last line will be underneath the horizontal scroll bar. Fixable in CSS?
Planned stuff:
- remember cursor and scroll position when reopening the same codemirror thingy later (cookies? session?)
- enhance syntax highlighting
- …
TIFU Prevention “Plugin”¶
Status: working-for-us
This “plugin” (actually it’s just a skin and some Java Script) will prevent an accidental close of of the browser window or tab while editing a topic. It will be active only if the NatEditPlugin is enabled. It will also work with the WYSIWYG editor (I think).
It uses the browser window
‘s onbeforeunload
event. This may or may not work in all browsers. It works fine in Mozzarella Firlefanz. YMMV.
- [`tifupreventionplugin-flipflip-20151231.tar.gz`](/hacking/foswiki/tifupreventionplugin-flipflip-20151231.tar.gz)
PhotoGalleryPlugin¶
Status: released
This plugin renders galleries from photos attached to topics. Galleries render as a grid of square thumbnails. Thumbnails are created using the Epeg library (“insanely fast JPEG thumbnail scaling”) via the Image::Epeg Perl module. Clicking on a thumbnail zooms the image to the original attached photo. Currently PhotoSwipe by Dmitry Semenov is used to display the photos. It allows zooming and browsing the image gallery with the keyboard, the mouse and finger swipes on touch devices. This plugin adds a slideshow functionality not currently present in the original PhotoSwipe gallery. The thumbnails expose a tools menu by hovering over their top right corner. Available tools include losslessly rotating the photo using exiftran, editing the attachment comment, correcting the attachment timestamp to the photo exposure date, moving the attachment to another topic, and deleting the attachment. This plugin works only with JPEG images and it works best with photos from digital cameras that have EXIF data embedded. It needs a fairly recent browser to support various Javascript and image scaling and transition magic
See https://foswiki.org/Extensions/PhotoGalleryPlugin for details.