Summary: Talk page for EasyGallery.
Maintainer: Klonk Martin Fick
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


Is there also a way to automatically generate the names within the table ? (something like: for $numb=1 to 67 ... attach:Pic$numb.jpg) ??? Yes there might be using the Clipboard and the (:index:) markup.

  • Just for information
    Here is how I did my gallery:
  • Create a new group: Gallery
  • Use Gallery.Gallery to hold links and descriptions to all sub-galleries
  • In each sub-gallery, create a page to hold the thumbnails, see the markup used below
(:table border=1 width=100% align=center bgcolor=#f2f2f2 cellspacing=0 cellpadding=2 :)
(:cellnr colspan=2 align=center:)
(:cellnr align=center:)
(:cell align=center:)
(:cellnr align=center:)
Filename: crystal-tux-lt.png\\
Desciption: Tux, facing left\\
Demensions: w 250 x h 304\\
File size: 52.1KB
(:cell align=center:)
Filename: crystal-tux-rt.png\\
Desciption: Tux, facing right\\
Demensions: w 250 x h 304\\
File size: 52.2KB


Filename: crystal-tux-lt.png
Desciption: Tux, facing left
Demensions: w 250 x h 304
File size: 52.1KB
Filename: crystal-tux-rt.png
Desciption: Tux, facing right
Demensions: w 250 x h 304
File size: 52.2KB

That was pretty much all I did. The most time-consuming part was writing the individual text for each pic instead of having PmWiki fill it in for me. I wonder how hard it would be to implement, into PmWiki, a way to resize photos and auto-include file info and descriptions for each pic. Ian MacGregor

You may add the following lines to your config.php (there's probably an easier way... but is works):

"Keep( GetSize( \"$1\" ) )"
function GetSize ( $file ) {
global $pagename, $UploadDir;
list( $group, $page ) = explode('.', $pagename);
$size = filesize( "$UploadDir/$group/$file" );
$kb = sprintf( "%01.2f", $size / 1024 );
return $kb . " kB";

Now, you can add a markup instead of the file size:

(:filesize crystal-tux-rt.png:)

You should get the size of the file in kByte. Bianka?

To add on to this, you can use the ImageMagick utility identify to give you the info:
                     $ identify -format '%b|%h|%w' pic1.jpg
which you can execute from your GetSize function above and easily unpack the 3 data items.
- tamouse June 03, 2011, at 07:29 PM

Talk page for the EasyGallery recipe (users?).