Permalink
Browse files

Item14475: remove redundant ImageGallery

  • Loading branch information...
1 parent 91fee26 commit d45ccfb3d54d7bab252f83b69447eca7a71ac82b MichaelDaum committed Sep 13, 2017
Showing with 0 additions and 1,610 deletions.
  1. +0 −214 DEL_ImageGalleryPlugin/data/System/ImageGalleryPlugin.txt
  2. +0 −9 DEL_ImageGalleryPlugin/data/System/VarIMAGEGALLERY.txt
  3. +0 −11 DEL_ImageGalleryPlugin/data/System/VarNRIMAGES.txt
  4. +0 −105 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin.pm
  5. +0 −24 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin/Config.spec
  6. +0 −1,084 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin/Core.pm
  7. +0 −3 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin/DEPENDENCIES
  8. +0 −22 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin/MANIFEST
  9. +0 −18 DEL_ImageGalleryPlugin/lib/Foswiki/Plugins/ImageGalleryPlugin/build.pl
  10. +0 −5 DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/Makefile
  11. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/cascade.jpg
  12. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-end-gray.png
  13. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-end.png
  14. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-left-gray.png
  15. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-left.png
  16. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-right-gray.png
  17. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-right.png
  18. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-start-gray.png
  19. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/control-start.png
  20. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/cross.png
  21. +0 −115 DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/style.uncompressed.css
  22. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/wave.jpg
  23. BIN DEL_ImageGalleryPlugin/pub/System/ImageGalleryPlugin/wintermountains.jpg
@@ -1,214 +0,0 @@
-%META:TOPICINFO{author="ProjectContributor" date="1252914561" format="1.1" version="1.3"}%
----+!! <nop>ImageGalleryPlugin
-%TOC%
-
----++ Description
-This plugin helps you in viewing pictures that are attached to a topic in a nice thumbnail
-gallery. Clicking on a thumbnail zooms the image. You might navigate within your images using
-a navigation toolbar to visit the next, previous, first or last image in your gallery.
-Images and thumbnails are resized according to the given settings and are cached thereafter.
-The order of images can be customized by putting a sequence number into the attachment comment.
-An image attachment can be managed by clicking on the red dot in its title.
-The plugin will generate the document relations "parent", "first", "last", "next", "previous"
-for each image to improve navigation (only a few browsers support this, e.g. mozilla).
-The image gallery is highly customizable using cascading stylesheets and html formats (see
-below).
-
----++ Example
-%IMAGEGALLERY{size="large" exclude="logo"}%
-<span class="foswikiAlert">%NRIMAGES{exclude="logo"}%</span> images found.
-
-
----++ Syntax
----+++ Arguments
-This plugin introduces two tags:
- * %<nop>IMAGEGALLERY{...}%: render an image gallery
- * %<nop>NRIMAGES%: returns the number of images attachted to a (list of) topics
-that both take the following arguments:
-
-| *Argument* | *Description* |
-| topic | comma separated list of topics whose attachments should be displayed %BR% \
- (default: the current topic) |
-| limit | maximum number of images to display (default: 0, meaning no limit). |
-| include | regular expression an image must match to be part of the gallery |
-| exclude | regular expression an image must _not_ match to be part of the gallery |
-| frontend | select gallery interface, possible values are =lightbox= and =default=; \
- (defaults to =lightbox= if Foswiki:Extensions/JQueryPlugin is installed and =default= otherwise) |
-| field | specify which property of the image has to match using =include= or =exclude=; \
- possible values: name, comment (default: name) |
-| size | the thumbnail size, the actual geometries of a size can be configured below; \
- possible values: tiny, small, medium, large, huge \
- (default: medium) |
-| columns | number of thumbnails to be displayed in one row of the gallery %BR% \
- (default: 4) |
-| docrels | flag to disable/enable document relations between images; \
- possible values are on, off, 0, 1 (default: on) |
-| maxwidth | maximal display width of an image; images are scaled not to exceed this limit \
- while preserving aspect ratio %BR% \
- (default: 640) |
-| maxheight | maximal display height of an image %BR% (default: 480) |
-| minwidth | minimal display width of an image; images are scaled not to fall below this \
- limit while preserving aspect ratio %BR% (default: 0) |
-| minheight | minimal display height of an image %BR% (default: 0) |
-| header | header part of the gallery; only used if there is a =format= |
-| format | html format of an image %BR% \
- (default: &lt;a href="$origurl"&gt;&lt;img src="$imageurl" title="$comment" width="$width" height="$height"/&gt;&lt;/a&gt;) |
-| footer | footer part of the gallery; only used if there is a =format= |
-| titles | toggles image and thumnail titles on and off %BR% \
- (default: off) |
-| title | html format of an image title; "off" will hide the image's title %BR% \
- (default: $comment ($imgnr/$nrimgs)) |
-| thumbtitle | html format of a thumbnail title; "off" will hide the thumbnail's title %BR% \
- (default: $comment) |
-| sort | set the initial order of the images, can be name, date, size or comment (default:date) |
-| reverse | invert the initial order of the images, can be on or off (default:off) |
-
-Note, that only =topic= is meaningful to %<nop>NRIMAGES%.
-
----+++ Variables
-The parameters "format", "title" and "thumbtitle" can use the following variables to
-refer to image properties:
-
-| *Variable* | *Description* |
-| $web | the web the image is located |
-| $topic | the topic the image is located |
-| $nrimages | the total number of images in the gallery |
-| $n | a linefeed |
-| $width | the display width of the image |
-| $height | the display height of the image |
-| $thumbwidth | the thumbnail width of the image |
-| $thumbheight | the thumbnail height of the image |
-| $origwidth | the original width of the image |
-| $origheight | the original height of the image |
-| $size | the size of the image |
-| $sizeK | the size of the image in kilobytes |
-| $comment | the comment of the image (with its sequence number stripped off) |
-| $imgnr | the sequence number of the image |
-| $date | the date when the image has been uploaded |
-| $version | the version of the image attachment |
-| $name | the filename of the image |
-| $wikiusername | the wikiusername who uploaded the image |
-| $username | the username who uploaded the image |
-| $imageurl | the url path of the display image |
-| $thumburl | the url path of the thumbnail image |
-| $origurl | the url path pointing to the original image attachment |
-
----+++ Query Parameters
-The IGP will check for certain query parameters in the url. These are:
- * id=&lt;n;&gt;: distinguish multiple IMAGEGALLERYs in the same topic
- * filename=&lt;name&gt;: display the given file of the image set
- * refresh=on: recompute all images and thumbnails in the IGP cache
-Each IMAGEGALLERY has an anchor, namely a &lt;a name="igp&lt;n&gt;"/&gt;, that
-is used to scroll the display appropriately.
-
----++ Customization
-First of all this plugin should come with reasonable default values, so that
-you will get a nice image gallery (with regards to my taste) right on.
-There are several things that are customizable:
- * customize a gallery using a compination of the arguments described above
- * add custom cascading styles in a topic to format the gallery
- * alter the default cascading styles in the [[%ATTACHURL%/style.css][style.css]]
- file attached to this topic
- * customize the plugin settings below
-
----+++ Cascading Stylesheets
-The plugin emits the following css classes (see the comments in the [[%ATTACHURL%/style.css][style.css]] file):
-
-<noautolink>
-| *Class* | *Description* |
-| igp | division for the complete output of the image gallery |
-| igpThumbNails | division of all thumbnails |
-| igpThumbNailsTable | table of thumbnail images |
-| igpThumbNail | table cell of one thumbnail image |
-| igpThumbNailTitle | table cell of the thumbnail title |
-| igpPictureTable | table of the display image and the navigation bar |
-| igpPicture | table cell of the display image |
-| igpPictureTitle | division of the title of the display image |
-| igpNavigation | table cell of the navigation bar |
-| igpRedDot | span surrounding the red dot |
-| igpAlert | span surrounding error messages |
-</noautolink>
-
----+++ Adjusting the image sequence
-By default the image gallery will display images in the order that they where uploaded.
-This determines their _natural_ order. When you want to change this order you can
-prefix the comment of the attachment with a sequence number. For example: given a
-picture whose comment is "My old bike" that should be put at position 12
-in your image gallery then change the comment to "12 <nop>- My old bike". This
-will put the image at the desired position. Sequence numbers don't necessarily need
-to be unique, that is if there's another picture with a comment like
-"12 <nop>- My new bike" then the natural order of the both is relevant. In general,
-a picture will be put at position =&lt;nr&gt;= if its attachment comment has the format
-<verbatim>
- <nr><space>-<space><comment>
-</verbatim>
-Note, that the $comment variable will only display =&lt;comment&gt;= , that is with
-=&lt;nr&gt;&lt;space&gt;-&lt;space&gt;= stripped off.
-
----++ Plugin Installation Instructions
-%$INSTALL_INSTRUCTIONS%
-
----++ Plugin Info
-<!--
- * Set SHORTDESCRIPTION = Displays image gallery with auto-generated thumbnails from attachments.
--->
-| Plugin Author: | Michael Daum, Will Norris |
-| Copyright &copy;: | 2002-2009, Will Norris; 2005-2012, Michael Daum http://michaeldaumconsulting.com |
-| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
-| Release: | %$RELEASE% |
-| Version: | %$VERSION% |
-| Change History: | <!-- versions below in reverse order -->&nbsp; |
-| 29 Nov 2012 | removed useless call to =expandCommonVariables=; removed non-functional <nop>UserListByPhotograph |
-| 06 Jun 2011 | added support for Foswiki:Extensions/LazyLoadPlugin and Foswiki:Extensions/JQPrettyPhotoContrib; \
- deferring expansion of IMAGEGALLERY until other plugins have updated the page |
-| 12 Feb 2010 | new =frontend= parameter defaulting to "lightbox" when Foswiki:Extensions/JQueryPlugin is installed |
-| 03 Jul 2009 | shipping minified and compressed css files now |
-| 24 Apr 2009 | converted to foswiki plugin |
-| 12 Feb 2009 | interface improvements; creating more accurate thumbnails |
-| 31 Jan 2009 | added VarIMAGEGALLERY and VarNRIMAGES documentation topics |
-| 29 Dec 2008 | temporary fix to work under Foswiki |
-| 14 Nov 2008 | made format string for galleries more flexible |
-| 16 Jul 2008 | don't crash on images that start with a digits pattern |
-| 07 Jul 2008 | fixing use of string as hash |
-| 03 Jul 2008 | applying patch by Aurélio A. Heckert (see Bugs:Item5753); \
- using =Resize= instead of =Scale= for higher quality thumbnails; \
- hiding reddot when the user has no edit access to the target topic |
-| 03 Mar 2008 | make implementation of image mage configurable, \
- defaulting to Graphics::Magick as Image::Magick has got issues \
- using perl accellerators like mod_perl, speedy-cgi |
-| 17 Jan 2008 | default to sorting by name instead of by date |
-| 13 Nov 2007 | replaced plugin topic settings with =configure= settings |
-| 19 Sep 2007 | store auto-computed images in an images subdir of its own |
-| 19 Feb 2007 | make proper use T*-4 API; \
- don't use inline css, put them into the html header instead |
-| 24 Jul 2006 | working around Image::Magick crashes reading svg image files |
-| 20 Mar 2006 | added =sort= and =reverse= arguments; \
- fixed updating thumbnails when a new image version is created |
-| 20 Feb 2006 | added =include=, =exclude= and =field= arguments |
-| 16 Feb 2006 | renamed thumbnail so that it does not interfer with auto-attachment |
-| 14 Sep 2005 | don't strictly depend on normalizeFilename() |
-| 15 June 2005 | new release |
-| 10 May 2005 | fixed igp id clash error found by Martin Cleaver; \
- capture <nop>ImageMagick error messages; \
- don't trust attachment info, check for attachment existence as well;\
- added refresh query parameter to recompute images |
-| 09 May 2005 | fixed errors reported by Marcel Trap; \
- added support for multiple topics (proposed by Martin Cleaver; \
- added %<nop>NRIMAGES% tag |
-| &nbsp; | fix error when called from within rename view |
-| 03 May 2005 | fixed thumbnail resizing; reintroduced =titles= parameter; \
- support for multiple galleries per topic |
-| 27 Apr 2005 | complete rewrite |
-| 01 Aug 2003 | Updates from feedback from a Windows installation |
-| 25 Jul 2003 | Initial version |
-| 15 Mar 2002 | Initial (internal) version |
-| CPAN Dependencies: | %$DEPENDENCIES% |
-| Other Dependencies: | |
-| Perl Version: | 5.8 |
-| Plugin Home: | Foswiki:Extensions/%TOPIC% |
-| Support: | Foswiki:Support/%TOPIC% |
-
-
-%META:FILEATTACHMENT{name="wintermountains.jpg" attachment="wintermountains.jpg" attr="" date="1234443485" size="33553" stream="IO::File=GLOB(0x9825730)" tmpFilename="/var/tmp/CGItemp48379" user="ProjectContributor" version="1"}%
-%META:FILEATTACHMENT{name="wave.jpg" attachment="wave.jpg" attr="" date="1234443495" size="17585" stream="IO::File=GLOB(0x981a770)" tmpFilename="/var/tmp/CGItemp54049" user="ProjectContributor" version="1"}%
-%META:FILEATTACHMENT{name="cascade.jpg" attachment="cascade.jpg" attr="" date="1234443503" size="31390" stream="IO::File=GLOB(0x9819a0c)" tmpFilename="/var/tmp/CGItemp56780" user="ProjectContributor" version="1"}%
@@ -1,9 +0,0 @@
-%META:TOPICINFO{author="ProjectContributor" date="1180825069" format="1.0" version="1.1"}%
-%META:TOPICPARENT{name="Macros"}%
-#VarIMAGEGALLERY
----+++ IMAGEGALLERY{"topic" <i>options...</i>} -- render an image gallery
- * The =%<nop>IMAGEGALLERY{"topic"}%= macro is handled by the ImageGalleryPlugin.
- * Syntax: =%<nop>IMAGEGALLERY{"topic" <i>options...</i>}%=
- * Examples:
- * =%<nop>IMAGEGALLERY{"%SYSTEMWEB%.DocumentGraphics" columns="3" limit="12" exclude="arrow" sort="name"}%
- * Related: [[#VarNRIMAGES][NRIMAGES]], ImageGalleryPlugin
@@ -1,11 +0,0 @@
-%META:TOPICINFO{author="ProjectContributor" date="1180825069" format="1.0" version="1.1"}%
-%META:TOPICPARENT{name="Macros"}%
-#VarNRIMAGES
----+++ NRIMAGES{"topic"} -- returns the number of images attachted to a (list of) topics
- * The =%<nop>NRIMAGES{"topic"}%= macro is handled by the ImageGalleryPlugin.
- * Syntax: =%<nop>NRIMAGES{"topic"}%=
- * Examples:
- * There are %NRIMAGES% images on this page.
- * There are %NRIMAGES{"%SYSTEMWEB%.DocumentGraphics"}% images at %SYSTEMWEB%.DocumentGraphics.
- * Related: [[#VarIMAGEGALLERY][IMAGEGALLERY]], ImageGalleryPlugin
-
@@ -1,105 +0,0 @@
-# Copyright (C) 2002-2009 Will Norris. All Rights Reserved. (wbniv@saneasylumstudios.com)
-# Copyright (C) 2005-2011 Michael Daum http://michaeldaumconsulting.com
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details, published at
-# http://www.gnu.org/copyleft/gpl.html
-#
-# =========================
-package Foswiki::Plugins::ImageGalleryPlugin;
-use strict;
-
-# =========================
-our $VERSION = '6.11';
-our $RELEASE = '6.11';
-our $NO_PREFS_IN_TOPIC = 1;
-our $SHORTDESCRIPTION = 'Displays image gallery with auto-generated thumbnails from attachments';
-our $isInitialized;
-our $igpId;
-our $TranslationToken = "\2\3\2"; # SMELL arbitrary but may clash with other plugin's transtoks
-our %knownGalleries;
-
-# =========================
-sub initPlugin {
- #my ($topic, $web, $user, $installWeb) = @_;
-
- if ($Foswiki::Plugins::VERSION < 1) {
- &Foswiki::Func::writeWarning("Version mismatch between ImageGalleryPlugin and Plugins.pm");
- return 0;
- }
- $igpId = 0;
- $isInitialized = 0;
- %knownGalleries = ();
-
- Foswiki::Func::registerTagHandler('IMAGEGALLERY', \&renderImageGalleryPlaceholder);
- Foswiki::Func::registerTagHandler('NRIMAGES', \&renderNrImages);
-
- return 1;
-}
-
-# =========================
-sub doInit {
- return if $isInitialized;
- $isInitialized = 1;
-
- Foswiki::Func::addToHEAD("IMAGEGALLERYPLUGIN", <<'HERE');
-<link rel="stylesheet" href="%PUBURLPATH%/%SYSTEMWEB%/ImageGalleryPlugin/style.css" type="text/css" media="all" />
-HERE
-
- require Foswiki::Plugins::ImageGalleryPlugin::Core;
-}
-
-# =========================
-sub renderImageGalleryPlaceholder {
- my ($session, $params, $theTopic, $theWeb) = @_;
-
- doInit();
-
- $igpId++;
- $knownGalleries{$igpId} = {
- core => Foswiki::Plugins::ImageGalleryPlugin::Core->new($igpId, $theTopic, $theWeb),
- params => $params
- };
- return $TranslationToken.'IMAGEGALLERY{'.$igpId.'}'.$TranslationToken;
-}
-
-# =========================
-sub postRenderingHandler {
- # my $text = shift;
-
- $_[0] =~ s/${TranslationToken}IMAGEGALLERY{(.*?)}$TranslationToken/renderImageGallery($1)/ge;
-}
-
-# =========================
-sub renderImageGallery {
- my $igpId = shift;
-
- my $igp = $knownGalleries{$igpId};
- return '' unless $igp;
-
- return $igp->{core}->render($igp->{params});
-}
-
-
-# =========================
-sub renderNrImages {
- my ($session, $params, $theTopic, $theWeb) = @_;
-
- doInit();
-
- my $igp = Foswiki::Plugins::ImageGalleryPlugin::Core->new(undef, $theTopic, $theWeb);
- if ($igp->init($params)) {
- return scalar @{$igp->getImages()};
- } else {
- return Foswiki::Plugins::ImageGalleryPlugin::Core::renderError("can't initialize");
- }
-}
-
-1;
@@ -1,24 +0,0 @@
-# ---+ Extensions
-# ---++ ImageGalleryPlugin
-# This is the configuration used by the <b>ImageGalleryPlugin</b>.
-
-# **PERL**
-# Defintion of thumbnailsizes
-$Foswiki::cfg{ImageGalleryPlugin}{ThumbSizes} = {
- thin => '25x25',
- small => '50x50',
- medium=> '95x95',
- large => '150x150',
- huge => '250x250',
-};
-
-# **STRING**
-# A pattern of filetype suffixes to be excluded from imagegalleries even though they are
-# valid images
-$Foswiki::cfg{ImageGalleryPlugin}{ExcludeSuffix} = 'psd';
-
-# **SELECT Image::Magick,Graphics::Magick**
-# Select the image processing backend. Image::Magick and Graphics::Magick are mostly compatible
-# as far as they are used here.
-$Foswiki::cfg{ImageGalleryPlugin}{Impl} = 'Image::Magick';
-
Oops, something went wrong.

0 comments on commit d45ccfb

Please sign in to comment.