]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/contrib/album/discussion.mdwn
Merge remote-tracking branch 'anarcat/dev/syslog_utf8'
[git.ikiwiki.info.git] / doc / plugins / contrib / album / discussion.mdwn
index dad781808d32c462c50078cc16790162888201f7..074e2ece09f19d609a911e4c3edd1ec46cd1ba48 100644 (file)
@@ -476,3 +476,50 @@ My wishlist for the plugin would include:
 
 ----
 
+I've tracked down the "always showing the 96x96 thumbnails" bug!
+
+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.
+
+Here's a context-diff of my fix:
+
+<pre>
+*** /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') ||
+</pre>
+
+-- [[KathrynAndersen]]
+
+----
+
+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]]