attachments1Add my vote for this tag images3Add my vote for this tag navigation1Add my vote for this tag create new tag
, view all tags


PhotoarchivePlugin is a nice plugin to show your photo archive or album in different views. You can add a description to each picture and define the picture size for individual views.

  • Future releases will get something like templates to have full control over the layout.
  • Now a multiplatform offline Photoarchive application is in work. It will become the user interface for simple storing, describing and uploading to your TWiki Photoarchive. But it needs time.
  • I thought it is clear that only trusted users should be allowed to edit the Plugin settings. Warwick Allison sent me a mail that he thinks using the netpbm-tools variables is a security problem. So be sure that untrusted users can not change the variable values. You can change the code in lib/TWiki/Plugins/PhotoarchivePlugin.pm at lines 81 to 84. Remove the TWiki::Func::getPluginPreferencesValue( "ANYTOPNM" ) function calls and set constants.

Syntax Rules

These are the rules to add a Photoarchive to your twiki web.

  • Add %PHOTOARCHIVEPLUGIN% to a twiki topic or
  • ... add %PHOTOARCHIVEPLUGINRANDOM% for single random image including.
  • Create a new topic with name <TOPICNAME>Photoarchive
  • Attach your pictures to <TOPICNAME>Photoarchive
  • Add your picture definitions in the following form to this topic:

... etc.

  • Each tag must start at the beginning of the line (no spaces) and end with a newline!
  • You can overwrite the preferences for images and layout in the topic where you add the %PHOTOARCHIVEPLUGIN% or %PHOTOARCHIVEPLUGINRANDOM% placeholder. To use overwriting from topics you have to add PhotoarchivePlugin_ in front of each settingname. E.g. instead RANDOMWIDTH you have to use PhotoarchivePlugin_RANDOMWIDTH


  • This is a sample entry for <TOPICNAME>Photoarchive

My first image in Photoarchive
This is my first image which is shown by PhotoarchivePlugin.
It has no special purpose but you can see how it works.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG =

  • The default view is the view which is shown without any parameters:
    There is a thumbs, detailed and descripted view.
    • Set DEFAULTVIEW = thumbs

  • A few programs of netpbm software package are required to resize images.
    The default entries are /usr/bin/{anytopnm, pnmscale, pnmtopng, pnmtojpeg}.
    • Set ANYTOPNM = /usr/bin/anytopnm
    • Set PNMSCALE = /usr/bin/pnmscale
    • Set PNMTOPNG = /usr/bin/pnmtopng
    • Set PNMTOJPEG = /usr/bin/pnmtojpeg

  • The number of images in row and column for thumbs view
    • Set THUMBSROW = 4
    • Set THUMBSCOL = 3

  • The thumbnail image width and height. If you set both values the images will change their width-height-ratio.
    • Set THUMBSHEIGHT = 120

  • The pixel space around thumbnail images.
    • Set THUMBSSPACE = 5

  • The descripted images width and height. If you set both values the image will change its width-height-ratio.

  • The pixel space around the header and images descripted view.

  • The number of images per page in descripted view.

  • The detailed image width and height. If you set both values the image will change its width-height-ratio.
    • Set DETAILEDWIDTH = 600

  • The pixel space around the header, image and description in detailed view.

  • The default width and height for random images. If you specify both values the image has a new side ratio.
    • Set RANDOMHEIGHT = 120

  • For randomly choosed images you can specify the web and topic where the image archive can be found. The topic with the attached images must end with Photoarchive. You must remove "Photoarchive" at the RANDOMTOPIC setting.
    • Set RANDOMWEB =

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip PhotoarchivePlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/PhotoarchivePlugin.txt Plugin topic
    data/TWiki/PhotoarchivePlugin.txt,v Plugin topic repository
    data/TWiki/PhotoarchivePluginPhotoarchive.txt Plugin test photoarchive topic
    data/TWiki/PhotoarchivePluginPhotoarchive.txt,v Plugin test photoarchive topic repository
    data/TWiki/PhotoarchivePluginPhotoarchive/testimage.jpg Attached test image
    data/TWiki/PhotoarchivePluginPhotoarchive/testimage.jpg,v Attached test image repository
    pub/TWiki/PhotoarchivePlugin Directory for future plugin internal data (empty)
    lib/TWiki/Plugins/PhotoarchivePlugin.pm Plugin Perl module
  • (Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • Test if the installation was successful:
    • You see here a sample image included with %PHOTOARCHIVEPLUGINRANDOM%


Plugin Info

Plugin Author: TWiki:Main/MarkusKolb
Plugin Version: 31 Oct 2006 (V1.004)
Plugin Id: $Id: PhotoarchivePlugin.txt,v 1.17 2012/12/03 04:33:44 PeterThoeny Exp $
Change History:  
31 Oct 2006: V1.004 updated this plugin info for new version
31 Oct 2006: V1.003 fix quote image filename bug (Thanks to Michael Okincha for bug report)
30 Sep 2004: V1.002 overwriting of plugin preferences in topic now possible
29 Sep 2004: V1.001 patch against Internet Explorer <img>-tag incompatibility
29 Sep 2004: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: netpbm
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 98%, FormattedSearch 96%, PhotoarchivePlugin 96%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PhotoarchivePlugin
Feedback: mailto:twiki-photoarchive@tower-netREMOVE_BEFORE_SENDPLEASENOSPAM.de

Related Topics: TWikiPreferences, TWikiPlugins

-- MarkusKolb - 31 Oct 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 PhotoarchivePlugin.md5 r3 r2 r1 manage 0.2 K 2008-12-12 - 11:51 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz PhotoarchivePlugin.tgz r3 r2 r1 manage 144.2 K 2008-12-12 - 11:51 SopanShewale See PhotoarchivePlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip PhotoarchivePlugin.zip r7 r6 r5 r4 r3 manage 146.1 K 2008-12-12 - 11:51 SopanShewale See PhotoarchivePlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatEXT PhotoarchivePlugin_installer r3 r2 r1 manage 3.5 K 2008-12-12 - 11:51 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2012-12-03 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.