]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/album/discussion.mdwn
respond to cbaines
[ikiwiki.git] / doc / plugins / contrib / album / discussion.mdwn
1 ## installation queries from brush
2
3 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.
4
5 > That's my goal eventually, too. Perhaps you can help to
6 > design/write this plugin? At the moment I'm mostly
7 > waiting for a design "sanity check" from [[Joey]],
8 > but any feedback you can provide on the design would
9 > also be helpful. --[[smcv]]
10
11 i have two challenges: firstly, for installation, i'm not sure what all the files are that need to be downloaded (because of my setup i can't easily pull the repo).  so far i have Ikiwiki/Plugins/album.pm; ikiwiki-album; and 4 files in templates/  any others?
12
13 > Those are all the added files; ikiwiki-album isn't strictly
14 > needed (IkiWiki itself doesn't use that code, but you can
15 > use it to turn a directory full of images into correct
16 > input for the album plugin).
17 >
18 > You probably also want the album plugin's expanded version of
19 > style.css (or put its extra rules in your local.css).
20 > Without that, your albums will be quite ugly.
21 >
22 > There aren't currently any other files modified by my branch.
23 > --[[smcv]]
24
25 secondly: barring the CGI interface for editing the album, which would be great, is there at least a way to use attachment plugin or any other to manually add images and then create viewers for them?
26
27 > Images are just attachments, and viewers are pages (any supported
28 > format, but .html will be fastest to render). Attach each image,
29 > then write a page for each image containing the
30 > \[[!albumimage]] directive (usually it will *only* contain that
31 > directive).
32 >
33 > The script ikiwiki-album can help you to do this in a git/svn/etc.
34 > tree; doing it over the web will be a lot of work (until I get
35 > the CGI interface written), but it should already be possible!
36 >
37 > The structure is something like this:
38
39 > * album.mdwn (contains the \[[!album]] directive, and perhaps also
40 >   some \[[!albumsection]] directives)
41 > * album/a.jpg
42 > * album/a.html (contains the \[[!albumimage]] directive for a.jpg)
43 > * album/b.jpg
44 > * album/b.html (contains the \[[!albumimage]] directive for b.jpg)
45 >
46 > Have a look at ikiwiki-album to see how the directives are meant to
47 > work in practice.
48 >
49 > --[[smcv]]
50
51 >> In the current version of the branch, the viewer pages are
52 >> generated automatically if you didn't generate them yourself,
53 >> so `ikiwiki-album` is no longer needed. --[[smcv]]
54
55 i'm new to ikiwiki, apologies if this is dealt with elsewhere.  -brush
56
57 > This plugin is pretty ambitious, and is unfinished, so I'd recommend
58 > playing with  a normal IkiWiki installation for a bit, then trying
59 > out this plugin when you've mastered the basics of IkiWiki. --[[smcv]]
60
61 ----
62
63 ## design feedback from joeyh on an earlier version
64
65 You had wanted my feedback on the design of this. I have not looked at the
66 code or tried it yet, but here goes. --[[Joey]] 
67
68 * Needing to create the albumimage "viewer" pages for each photo
69   seems like it will become a pain. Everyone will need to come up
70   with their own automation for it, and then there's the question
71   of how to automate it when uploading attachments. -J
72
73 > There's already a script (ikiwiki-album) to populate a git
74 > checkout with skeleton "viewer" pages; I was planning to make a
75 > specialized CGI interface for albums after getting feedback from
76 > you (since the requirements for that CGI interface change depending
77 > on the implementation). I agree that this is ugly, though. -s
78
79 >> Would you accept a version where the albumimage "viewer" pages
80 >> could be 0 bytes long, at least until metadata gets added?
81 >>
82 >> The more I think about the "binaries as first-class pages" approach,
83 >> the more subtle interactions I notice with other plugins. I
84 >> think I'm up to needing changes to editpage, comments, attachment
85 >> and recentchanges, plus adjustments to img and Render (to reduce
86 >> duplication when thumbnailing an image with a strange extension
87 >> while simultaneously changing the extension, and to hardlink/copy
88 >> an image with a strange extension to a differing target filename
89 >> with the normal extension, respectively). -s
90
91 >>> Now that we have `add_autofile` I can just create viewer pages
92 >>> whenever there's an image to view. The current version of the
93 >>> branch does that. -s
94
95 * With each viewer page having next/prev links, I can see how you
96   were having the scalability issues with ikiwiki's data structures
97   earlier! -J
98
99 > Yeah, I think they're a basic requirement from a UI point of view
100 > though (although they don't necessarily have to be full wikilinks).
101 > -s
102
103 >> I think that with the new dependency types system, the dependencies for
104 >> these can be presence dependencies, which will probably help with
105 >> avoiding rebuilds of a page if the next/prev page is changed.
106 >> (Unless you use img to make the thumbnails for those links, then it
107 >> would rebuild the thumbnails anyway. Have not looked at the code.) --[[Joey]]
108
109 >>> I do use img. -s
110
111 * And doesn't each viewer page really depend on every other page in the
112   same albumsection? If a new page is added, the next/prev links
113   may need to be updated, for example. If so, there will be much
114   unnecessary rebuilding. -J
115
116 > albumsections are just a way to insert headings into the flow of
117 > photos, so they don't actually affect dependencies.
118 >
119 > One non-obvious constraint of ikiwiki's current design is that
120 > everything "off-page" necessary to build any page has to happen
121 > at scan time, which has caused a few strange design decisions,
122 > like the fact that each viewer controls what album it's in.
123 >
124 > It's difficult for the contents of the album to just be a
125 > pagespec, like for inline, because pagespecs can depend on
126 > metadata, which is gathered in arbitrary order at scan time;
127 > so the earliest you can safely apply a pagespec to the wiki
128 > contents to get a concrete list of pages is at rebuild time.
129 >
130 > (This stalled my attempt at a trail plugin, too.) -s
131
132 >> Not sure I understand why these need to look at pagespecs at scan time?
133 >> Also, note that it is fairly doable to detect if a pagespec uses such
134 >> metadata. Er, I mean, I have a cheezy hack in `add_depends` now that does
135 >> it to deal with a similar case. --[[Joey]] 
136
137 >>> I think I was misunderstanding how early you have to call `add_depends`?
138 >>> The critical thing I missed was that if you're scanning a page, you're
139 >>> going to rebuild it in a moment anyway, so it doesn't matter if you
140 >>> have no idea what it depends on until the rebuild phase. -s
141
142 * One thing I do like about having individual pages per image is
143   that they can each have their own comments, etc. -J
144
145 > Yes; also, they can be wikilinked. I consider those to be
146 > UI requirements. -s
147
148 * Seems possibly backwards that the albumimage controls what album
149   an image appears in. Two use cases -- 1: I may want to make a locked
150   album, but then anyone who can write to any other page on the wiki can
151   add an image to it. 2: I may want an image to appear in more than one
152   album. Think tags. So it seems it would be better to have the album
153   directive control what pages it includes (a la inline). -J
154
155 > I'm inclined to fix this by constraining images to be subpages of exactly
156 > one album: if they're subpages of 2+ nested albums then they're only
157 > considered to be in the deepest-nested one (i.e. longest URL), and if
158 > they're not in any album then that's a usage error. This would
159 > also make prev/next links sane. -s
160
161 >> The current version constrains images to be in at most one album,
162 >> choosing one arbitrarily (dependent on scan order) if albums are
163 >> nested. -s
164
165 > If you want to reference images from elsewhere in the wiki and display
166 > them as if in an album, then you can use an ordinary inline with
167 > the same template that the album would use, and I'll make sure the
168 > templates are set up so this works. -s
169
170 >> Still needs documenting, I've put it on the TODO list on the main
171 >> page. -s
172
173 > (Implementation detail: this means that an image X/Y/Z/W/V, where X and
174 > Y are albums, Z does not exist and W exists but is not an album,
175 > would have a content dependency on Y, a presence dependency on Z
176 > and a content dependency on W.)
177 >
178 > Perhaps I should just restrict to having the album images be direct
179 > subpages of the album, although that would mean breaking some URLs
180 > on the existing website I'm doing all this work for... -s
181
182 >> The current version of the branch doesn't have this restriction;
183 >> perhaps it's a worthwhile simplification, or perhaps it's too
184 >> restrictive? I fairly often use directory hierarchies like
185 >> `a_festival/saturday/foo.jpg` within an album, which makes
186 >> it very easy to write `albumsection` filters. -s
187
188 * Putting a few of the above thoughts together, my ideal album system
189   seems to be one where I can just drop the images into a directory and
190   have them appear in the album index, as well as each generate their own wiki
191   page. Plus some way I can, later, edit metadata for captions,
192   etc. (Real pity we can't just put arbitrary metadata into the images
193   themselves.) This is almost pointing toward making the images first-class
194   wiki page sources. Hey, it worked for po! :) But the metadata and editing
195   problems probably don't really allow that. -J
196
197 > Putting a JPEG in the web form is not an option from my point of
198 > view :-) but perhaps there could just be a "web-editable" flag supplied
199 > by plugins, and things could be changed to respect it.
200
201 >> Replying to myself: would you accept patches to support
202 >> `hook(type => 'htmlize', editable => 0, ...)` in editpage? This would
203 >> essentially mean "this is an opaque binary: you can delete it
204 >> or rename it, and it might have its own special editing UI, but you
205 >> can never get it in a web form".
206 >>
207 >> On the other hand, that essentially means we need to reimplement
208 >> editpage in order to edit the sidecar files that contain the metadata.
209 >> Having already done one partial reimplementation of editpage (for
210 >> comments) I'm in no hurry to do another.
211 >>
212 >> I suppose another possibility would be to register hook
213 >> functions to be called by editpage when it loads and saves the
214 >> file. In this case, the loading hook would be to discard
215 >> the binary and use filter() instead, and the saving conversion
216 >> would be to write the edited content into the metadata sidecar
217 >> (creating it if necessary).
218 >>
219 >> I'd also need to make editpage (and also comments!) not allow the
220 >> creation of a file of type albumjpg, albumgif etc., which is something
221 >> I previously missed; and I'd need to make attachment able to
222 >> upload-and-rename.
223 >> -s
224
225 >>> I believe the current branch meets your requirements, by having
226 >>> first-class wiki pages spring into existence using `add_autofile`
227 >>> to be viewer pages for photos. -s
228
229 > In a way, what you really want for metadata is to have it in the album
230 > page, so you can batch-edit the whole lot by editing one file (this
231 > does mean that editing the album necessarily causes each of its viewers
232 > to be rebuilt, but in practice that happens anyway). -s
233
234 >> Replying to myself: in practice that *doesn't* happen anyway. Having
235 >> the metadata in the album page is somewhat harmful because it means
236 >> that changing the title of one image causes every viewer in the album
237 >> to be rebuilt, whereas if you have a metadata file per image, only
238 >> the album itself, plus the next and previous viewers, need
239 >> rebuilding. So, I think a file per image is the way to go.
240 >>
241 >> Ideally we'd have some way to "batch-edit" the metadata of all
242 >> images in an album at once, except that would make conflict
243 >> resolution much more complicated to deal with; maybe just
244 >> give up and scream about mid-air collisions in that case?
245 >> (That's apparently good enough for Bugzilla, but not really
246 >> for ikiwiki). -s
247
248 >>> This is now in the main page's TODO list; if/when I implement this,
249 >>> I intend to make it a specialized CGI interface. -s
250
251 >> Yes, [all metadata in one file] would make some sense.. It also allows putting one image in
252 >> two albums, with different caption etc. (Maybe for different audiences.)
253 >> --[[Joey]]
254
255 >>> Eek. No, that's not what I had in mind at all; the metadata ends up
256 >>> in the "viewer" page, so it's necessarily the same for all albums. -s
257
258 >> It would probably be possible to add a new dependency type, and thus
259 >> make ikiwiki smart about noticing whether the metadata has actually
260 >> changed, and only update those viewers where it has. But the dependency
261 >> type stuff is still very new, and not plugin friendly .. so only just
262 >> possible, --[[Joey]] 
263
264 ----
265
266 ## alternative "special extension" design (conclusion: "don't")
267
268 '''I think the "special extension" design is a dead-end, but here's what
269 happened when I tried to work out how it would work. --[[smcv]]'''
270
271 Suppose that each viewer is a JPEG-or-GIF-or-something, with extension
272 ".albumimage". We have a gallery "memes" with three images, badger,
273 mushroom and snake.
274
275 > An alternative might be to use ".album.jpg", and ".album.gif"
276 > etc as the htmlize extensions. May need some fixes to ikiwiki to support
277 > that. --[[Joey]] 
278
279 >> foo.albumjpg (etc.) for images, and foo._albummeta (with
280 >> `keepextension => 1`) for sidecar metadata files, seems viable. -s
281
282 Files in git repo:
283
284 * index.mdwn
285 * memes.mdwn
286 * memes/badger.albumjpg (a renamed JPEG)
287 * memes/badger/comment_1._comment
288 * memes/badger/comment_2._comment
289 * memes/mushroom.albumgif (a renamed GIF)
290 * memes/mushroom._albummeta (sidecar file with metadata)
291 * memes/snake.albummov (a renamed video)
292
293 Files in web content:
294
295 * index.html
296 * memes/index.html
297 * memes/96x96-badger.jpg (from img)
298 * memes/96x96-mushroom.gif (from img)
299 * memes/96x96-snake.jpg (from img, hacked up to use totem-video-thumbnailer :-) )
300 * memes/badger/index.html (including comments)
301 * memes/badger.jpg
302 * memes/mushroom/index.html
303 * memes/mushroom.gif
304 * memes/snake/index.html
305 * memes/snake.mov
306
307 ispage("memes/badger") (etc.) must be true, to make the above rendering
308 happen, so albumimage needs to be a "page" extension.
309
310 To not confuse other plugins, album should probably have a filter() hook
311 that turns .albumimage files into HTML? That'd probably be a reasonable
312 way to get them rendered anyway.
313
314 > I guess that is needed to avoid preprocess, scan, etc trying to process
315 > the image, as well as eg, smiley trying to munge it in sanitize.
316 > --[[Joey]] 
317
318 >> As long as nothing has a filter() hook that assumes it's already
319 >> text... filters are run in arbitrary order. We seem to be OK so far
320 >> though.
321 >>
322 >> If this is the route I take, I propose to have the result of filter()
323 >> be the contents of the sidecar metadata file (empty string if none),
324 >> with the `\[[!albumimage]]` directive (which no longer requires
325 >> arguments) prepended if not already present. This would mean that
326 >> meta directives in the metadata file would work as normal, and it
327 >> would be possible to insert text both before and after the viewer
328 >> if desired. The result of filter() would also be a sensible starting
329 >> point for editing, and the result of editing could be diverted into
330 >> the metadata file. -s
331
332 do=edit&page=memes/badger needs to not put the JPG in a text box: somehow
333 divert or override the normal edit CGI by telling it that .albumimage
334 files are not editable in the usual way?
335
336 > Something I missed here is that editpage also needs to be told that
337 > creating new files of type albumjpg, albumgif etc. is not allowed
338 > either! -s
339
340 Every image needs to depend on, and link to, the next and previous images,
341 which is a bit tricky. In previous thinking about this I'd been applying
342 the overly strict constraint that the ordered sequence of pages in each
343 album must be known at scan time. However, that's not *necessarily* needed:
344 the album and each photo could collect an unordered superset of dependencies
345 at scan time, and at rebuild time that could be refined to be the exact set,
346 in order.
347
348 > Why do you need to collect this info at scan time? You can determine it
349 > at build time via `pagespec_match_list`, surely .. maybe with some
350 > memoization to avoid each image in an album building the same list.
351 > I sense that I may be missing a subtelty though. --[[Joey]] 
352
353 >> I think I was misunderstanding how early you have to call `add_depends`
354 >> as mentioned above. -s
355
356 Perhaps restricting to "the images in an album A must match A/*"
357 would be useful; then the unordered superset could just be "A/*". Your
358 "albums via tags" idea would be nice too though, particularly for feature
359 parity with e.g. Facebook: "photos of Joey" -> "tags/joey and albumimage()"
360 maybe?
361
362 If images are allowed to be considered to be part of more than one album,
363 then a pretty and usable UI becomes harder - "next/previous" expands into
364 "next photo in holidays/2009/germany / next photo in tagged/smcv / ..."
365 and it could get quite hard to navigate. Perhaps next/previous links could
366 be displayed only for the closest ancestor (in URL space) that is an
367 album, or something?
368
369 > Ugh, yeah, that is a problem. Perhaps wanting to support that was just
370 > too ambitious. --[[Joey]] 
371
372 >> I propose to restrict to having images be subpages of albums, as
373 >> described above. -s
374
375 Requiring renaming is awkward for non-technical Windows/Mac users, with both
376 platforms' defaults being to hide extensions; however, this could be
377 circumvented by adding some sort of hook in attachment to turn things into
378 a .albumimage at upload time, and declaring that using git/svn/... without
379 extensions visible is a "don't do that then" situation :-)
380
381 > Or extend `pagetype` so it can do the necessary matching without
382 > renaming. Maybe by allowing a subdirectory to be specified along
383 > with an extension. (Or allow specifying a full pagespec,
384 > but I hesitate to seriously suggest that.) --[[Joey]] 
385
386 >> I think that might be a terrifying idea for another day. If we can
387 >> mutate the extension during the `attach` upload, that'd be enough;
388 >> I don't think people who are skilled enough to use git/svn/...,
389 >> but not skilled enough to tell Explorer to show file extensions,
390 >> represent a major use case. -s
391
392 Ideally attachment could also be configured to upload into a specified
393 underlay, so that photos don't have to be in your source-code control
394 (you might want that, but I don't!).
395
396 > Replying to myself: perhaps best done as an orthogonal extension
397 > to attach? -s
398
399 > Yet another non-obvious thing this design would need to do is to find
400 > some way to have each change to memes/badger._albummeta show up as a
401 > change to memes/badger in `recentchanges`. -s
402
403 Things that would be nice, and are probably possible:
404
405 * make the "Edit page" link on viewers divert to album-specific CGI instead
406   of just failing or not appearing (probably possible via pagetemplate)
407
408 * some way to deep-link to memes/badger.jpg with a wikilink, without knowing a
409   priori that it's secretly a JPEG (probably harder than it looks - you'd
410   have to make a directive for it and it's probably not worth it)
411
412 ----
413
414 ## bug: unable to vary thumbnail size
415
416 Hi smcv, great plugin. I am an ikiwiki newbie but so far I've had success using your plugin.
417 I've integrated the jquery masonry plugin into the albumitem template and it works great.
418 But is there a way to create thumnails of different sizes? I've passed thumnailsize option
419 and value to album directive and while it does create the new thumbnail sizes it doesn't use them,
420 The 96x96 thumbnails still appear on the page no matter what I do. - jaime
421
422 > [[KathrynAndersen]] fixed this, see below. --[[smcv]]
423
424 ----
425
426 ## failed installation
427
428 Hi, the plugin looks great, but I am probably too dumb to use it ;( here is what I did:
429 created page gal.mdwn with just \[\[!album\]\] directive (no arguments) and subdirectory gal/ with images in form img_1234.jpg
430
431 when I run ikiwiki, I get something completely wrong though:
432
433 generated gal/index.html page contains following code repeated for every image:
434
435     <div class="album-viewer">
436       <div id="album-img">
437         <div class="album-finish">
438           <a href="./"><span class="album-arrow">↑</span></a>
439         </div>
440       </div>
441     </div>
442
443 So no links to any images, etc.
444
445 The pages for individual images are generated though, but also not correct. Trails section is perfect, but the main part is wrong:
446
447     <div class="album-prev">
448       <a><span class="album-arrow">â†<90></span></a><br />
449       <div class="album-thumbnail">
450         <span class="selflink">
451           <img src="./96x96-img_2913.jpg" width="96" height="72" alt="img 2913" title="img 2913" class="img" /></span>
452       </div>
453     </div>
454
455 This really seems like this should be in the album page and not individul page. It is only thumbnail and not full image. Also the full image is not in the generated html tree at all!
456
457 I am using ikiwiki 3.20130518, and got the album sources from the links of [this page](http://ikiwiki.info/plugins/contrib/album/) (part manual installation)
458
459 Any hint about what do I do wrong?
460
461 Thanks Lukas
462
463 > This plugin is not really finished. I probably need to update it for
464 > current ikiwiki. I'll try to update it (and also update my demo
465 > and installation instructions) at some point. --[[smcv]]
466
467 >> I have to appologize, I accidentally copied the template wrongly and that caused all the issues ;(
468 >> So now after two days debugging and tracing, I just fixed that and it works. Well, at least a learnt
469 >> a lot about ikiwiki internal ;-)
470 >> Thanks for all the work you did on the plugin! --Lukas
471
472 ----
473
474 ## bug + patch: not all images shown on album page
475
476 Hi smcv, we spoke on irc the other day. Passed `show => "0"` on line 126 in album.pm to remove the limit on the thumbnails shown on the album page. Setting it on the album directive didn't work.
477
478 --kjs
479
480 > That sounds like a correct solution. I'll fix that in my branch when I work on
481 > this again. --[[smcv]]
482
483 ----
484
485 ## bug: thumbnailsize doesn't work
486
487 As mentioned above by Jaime setting the thumbnailsize doesn't catch either. Or rather if I git push after changing the album directive the generated thumbnails (the image files) are the correct size as set in the directive. The html however uses the default thumbnailsize as hardcoded in album.pm and has broken thumbnails as it links to a file with the default size in the filename.
488
489 > [[KathrynAndersen]] fixed this, see below. --[[smcv]]
490
491 Issuing `ikiwiki --rebuild` knocks the system into another gear where the thumbnails show up correctly but this is only due to the html being the same as above (linking to hardcoded thumbnailsize) but the generated thumbnail images are now matching the hardcoded size ignoring the thumbnailsize attribute on the album directive.
492
493 For me this behaviour is way beyond my skills to sort out (I'm no coder). The albumplugin ikiwiki combo is very attractive to me and the plugin i soo close to working!
494
495 --kjs
496
497 ----
498
499 ## wishlist + patch: make clicking on the large image go to the next
500
501 I've changed the behavior of the "slideshow" to show the next image when clicking the large image as downloading a full resolution image is a rare use case in a gallery of this type imho. The large clicktarget means you are likely to unnecessarily download large files otherwise. I can't quite follow the template, album.pm flow so I can't figure out how to put a "download full resolution" link on the viewer page which would be my next step. To achieve the next link i added ` link => ($nextpage or $album),` around line 454 in `my $img`
502
503 --kjs
504
505 > That seems reasonable. I'll consider that when I work on this
506 > plugin again next. --[[smcv]]
507
508 ----
509
510 ## wishlist from kjs
511
512 My wishlist for the plugin would include:
513
514 - Reading exif info from the imagefile
515 - ~~Keeping the full resolution image files out of version control~~ Solved this by simply creating a underlay for the images. Works out of the box for my non cgi workflow.
516 - Being able to create new albums by tag or by manually picking images from other albums. Could be a simple comma separated list of viewer names, or even full urls, in the album directive.
517 - A counter showing **current image/total number of images in album**. This would mean that you know how many images you have left to click through before you have seen all images in an album. This gives you enought info to decide weather to click through or go back/leave.
518
519 --kjs
520
521 > I want the first two of those too, perhaps one day I'll get round to
522 > implementing them.
523 >
524 > For the third, you can get the same practical effect using an inline
525 > as documented in the main page. --[[smcv]]
526 >> The downside to current behaviour is that clicking an inlined thumbnail will take you to the original album context. Previous/Next image will not match the thumbnails in the inline but the thumbnails in the album. This is a bit confusing for users and prevents using the image in multiple contexts without duplicating the image. To achieve what I'm looking for there would have to be several AlbumViewer pages for a single image. --kjs
527
528 ----
529
530 ## suggested fix for thumbnail size bug
531
532 I've tracked down the "always showing the 96x96 thumbnails" bug!
533
534 The problem is in the pagetemplate function, which calls "thumbnail" to determine the name of the thumbnail image to use. As you know, the "img" method of generating thumbnails includes the size of the thumbnail as part of its name (to ensure that resizing thumbnails will create a new file of the correct size). The problem is... that in the pagetemplate function, the thumbnailsize is NOT passed in to the call to "thumbnail", so it always returns the default size, 96x96. Hence nothing that anyone can do will change the thumbnails to anything else. Oh, the different-sized thumbnail images ARE created, but they're never linked to.
535
536 Here's a context-diff of my fix:
537
538 <pre>
539 *** /home/kat/files/repos/ikiwiki_smcv/IkiWiki/Plugin/album.pm  2013-12-18 14:50:06.861623226 +1100
540 --- album.pm    2013-12-18 15:51:09.393582879 +1100
541 ***************
542 *** 484,489 ****
543 --- 484,490 ----
544                 my $viewer = $params{page};
545                 my $album = $pagestate{$viewer}{album}{album};
546                 my $image = $pagestate{$viewer}{album}{image};
547 +                 my $thumbnailsize = $pagestate{$album}{album}{thumbnailsize};
548   
549                 return unless defined $album;
550                 return unless defined $image;
551 ***************
552 *** 495,501 ****
553   
554                 if ($template->query(name => 'thumbnail')) {
555                         $template->param(thumbnail =>
556 !                               thumbnail($viewer, $params{destpage}));
557                 }
558                 if (IkiWiki::isinlinableimage($image)
559                         && ($template->query(name => 'imagewidth') ||
560 --- 496,502 ----
561   
562                 if ($template->query(name => 'thumbnail')) {
563                         $template->param(thumbnail =>
564 !                               thumbnail($viewer, $params{destpage}, $thumbnailsize));
565                 }
566                 if (IkiWiki::isinlinableimage($image)
567                         && ($template->query(name => 'imagewidth') ||
568 </pre>
569
570 -- [[KathrynAndersen]]
571
572 > I haven't tried this change, but it seems sane. I'll apply it
573 > when I next work on this plugin.
574 >
575 > (OOI: why not a unified diff? The VCS world seems to have
576 > settled on those as universal, and I find them easier to
577 > read.)
578 >
579 > --[[smcv]]
580
581 ----
582
583 ## bug: inability to show more than 10 items
584
585 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.
586
587 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).
588
589 -- [[KathrynAndersen]]
590
591 > My intention was that all items would always be shown, so I would always pass
592 > `show => 0` to `preprocess_inline` (as kjs suggested above), but that must have
593 > got lost somewhere. I'll apply it next time I work on this plugin.
594 >
595 > An optional `show` parameter would be a possible enhancement beyond that,
596 > although I don't know how useful it would be; if it isn't passed, the
597 > default should be 0 (unlimited). --[[smcv]]
598
599 ## cbaines' branch
600
601 Regarding the CSS changes: I'll try to have a look soon, work out
602 what actually changed (since you re-ordered the CSS, so it isn't
603 immediately obvious from the diff), and integrate some or all of your
604 changes. Since Joey shows no signs of wanting to merge it, and "out of tree"
605 installation is currently a pain, I might split out the CSS changes into a
606 separate `ikiwiki/album.css` so that the only thing that needs to be merged
607 into style.css and each theme (or into local.css) is an appropriate
608 `@import` rule.
609
610 Regarding commit `Change the default thumbnail size`: as far as I
611 understand it, `size => 96x96` is meant to set the image size to
612 be as large as possible given these constraints: width ≤ 96px,
613 height ≤ 96px, and the original aspect ratio is preserved. So I
614 would hope that 96x96 doesn't distort the thumbnails. What distortion
615 are you seeing, and which versions of Imagemagick and Perlmagick
616 are you using?
617
618 --[[smcv]]