X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0fc6e3ca56426977a2199f1f718588c27bc0fd0d..358c1633766d7ed12fac60f060c234e8a8bc658a:/doc/plugins/contrib/album/discussion.mdwn diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index cdb8353e5..58c0e640f 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -1,3 +1,5 @@ +## installation queries from brush + thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface. > That's my goal eventually, too. Perhaps you can help to @@ -58,6 +60,8 @@ i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush ---- +## design feedback from joeyh on an earlier version + You had wanted my feedback on the design of this. I have not looked at the code or tried it yet, but here goes. --[[Joey]] @@ -259,6 +263,8 @@ code or tried it yet, but here goes. --[[Joey]] ---- +## alternative "special extension" design (conclusion: "don't") + '''I think the "special extension" design is a dead-end, but here's what happened when I tried to work out how it would work. --[[smcv]]''' @@ -405,8 +411,215 @@ Things that would be nice, and are probably possible: ---- +## bug: unable to vary thumbnail size + Hi smcv, great plugin. I am an ikiwiki newbie but so far I've had success using your plugin. I've integrated the jquery masonry plugin into the albumitem template and it works great. But is there a way to create thumnails of different sizes? I've passed thumnailsize option and value to album directive and while it does create the new thumbnail sizes it doesn't use them, The 96x96 thumbnails still appear on the page no matter what I do. - jaime + +> [[KathrynAndersen]] fixed this, see below. --[[smcv]] + +---- + +## failed installation + +Hi, the plugin looks great, but I am probably too dumb to use it ;( here is what I did: +created page gal.mdwn with just \[\[!album\]\] directive (no arguments) and subdirectory gal/ with images in form img_1234.jpg + +when I run ikiwiki, I get something completely wrong though: + +generated gal/index.html page contains following code repeated for every image: + +
+*** /home/kat/files/repos/ikiwiki_smcv/IkiWiki/Plugin/album.pm 2013-12-18 14:50:06.861623226 +1100 +--- album.pm 2013-12-18 15:51:09.393582879 +1100 +*************** +*** 484,489 **** +--- 484,490 ---- + my $viewer = $params{page}; + my $album = $pagestate{$viewer}{album}{album}; + my $image = $pagestate{$viewer}{album}{image}; ++ my $thumbnailsize = $pagestate{$album}{album}{thumbnailsize}; + + return unless defined $album; + return unless defined $image; +*************** +*** 495,501 **** + + if ($template->query(name => 'thumbnail')) { + $template->param(thumbnail => +! thumbnail($viewer, $params{destpage})); + } + if (IkiWiki::isinlinableimage($image) + && ($template->query(name => 'imagewidth') || +--- 496,502 ---- + + if ($template->query(name => 'thumbnail')) { + $template->param(thumbnail => +! thumbnail($viewer, $params{destpage}, $thumbnailsize)); + } + if (IkiWiki::isinlinableimage($image) + && ($template->query(name => 'imagewidth') || ++ +-- [[KathrynAndersen]] + +> I haven't tried this change, but it seems sane. I'll apply it +> when I next work on this plugin. +> +> (OOI: why not a unified diff? The VCS world seems to have +> settled on those as universal, and I find them easier to +> read.) +> +> --[[smcv]] + +---- + +## bug: inability to show more than 10 items + +I've found another bug. The album plugin doesn't allow one to have more than 10 items in an album section. This is because it uses "inline" to display album sections, and the default for inline is to show only 10 items. So it only shows 10 items. + +What would be good is if the album directive could have a "show" parameter which is passed on to preprocess_inline, so that users could decide how many items to show (including ALL of them, if they give show=0). + +-- [[KathrynAndersen]] + +> My intention was that all items would always be shown, so I would always pass +> `show => 0` to `preprocess_inline` (as kjs suggested above), but that must have +> got lost somewhere. I'll apply it next time I work on this plugin. +> +> An optional `show` parameter would be a possible enhancement beyond that, +> although I don't know how useful it would be; if it isn't passed, the +> default should be 0 (unlimited). --[[smcv]] + +## cbaines' branch + +Regarding the CSS changes: I'll try to have a look soon, work out +what actually changed (since you re-ordered the CSS, so it isn't +immediately obvious from the diff), and integrate some or all of your +changes. Since Joey shows no signs of wanting to merge it, and "out of tree" +installation is currently a pain, I might split out the CSS changes into a +separate `ikiwiki/album.css` so that the only thing that needs to be merged +into style.css (or into local.css) is an appropriate +`@import` rule. + +It shouldn't be necessary to add the album stuff to each individual +theme's style.css unless you actually want an actiontabs album and +a blueview album to be styled differently, because the IkiWiki Makefile +concatenates them: for instance, `/usr/share/ikiwiki/themes/actiontabs/style.css` +is the output of `cat doc/style.css themes/actiontabs/style.css`. So adding it +to `doc/style.css` should be enough? + +Regarding commit `Change the default thumbnail size`: as far as I +understand it, `size => 96x96` is meant to set the image size to +be as large as possible given these constraints: width ⤠96px, +height ⤠96px, and the original aspect ratio is preserved. So I +would hope that 96x96 doesn't distort the thumbnails. What distortion +are you seeing, and which versions of Imagemagick and Perlmagick +are you using? + +--[[smcv]]