Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

ThumbList-Talk

Summary: Talk Page for ThumbList recipe
Maintainer: Petko
Categories: Images, Uploads

Back to Cookbook.Thumb list

  • You can tell me here what you think about the Thumb list extension. --Petko December 12, 2006, at 10:01 AM
  • I am also curious how you use it -- please post links to your nice galleries, if they are public! (Please list them in the "Examples" section on the main page.) --Petko

Latest versions

Tips

  • Always get the latest official release of the script (currently: version 20080714).
  • ensure the PHP image functions (GD) are enabled in your php.ini (for Windows)
    • change extension_dir from its default value to the directory where your extensions are (files like php_gd2.dll, iconv.dll and other DLLs)
    • set extension=php_gd2.dll (if there is a semicolon ";" in front of it, remove it), then restart Apache
  • try it with limited selections
    • (:thumb MyPicture.jpg:) - one image only, or
    • (:thumblist count=10:) - ten images only, or
    • (:thumblist name=*.png:) - try different image types
  • to simply display the original pictures and not generate thumbnails set px=10000 -- if px is more than the largest file size, the original will be shown
  • How to display random thumbnail(s)

PHP is not meant to do heavy image processing, so the thumbnails may not work with very big images. Most default PHP installations (usually 8M memory) can handle maximum a 2 megapixel image (about 1600*1200 pixels, colored at 4 bytes/px). If you have problems with some pictures, try to resize them down a little: a picture of 1024*768 pixels is more than enough for most visitors' screens. These image conversions also take a considerable time (several seconds, and this may go over the max_execution_time limits) and ThumbList "threaded" versions from 2006-12-31 on, seemingly work much better in such cases, see ThumbList#relnotes.

Your files must be visible to PmWiki, so be sure to have (1) a PmWiki uploads directory structure and (2) a file name allowed by PmWiki. The easiest way to do it is by uploading a file through the "Attach:" link on the wiki page and see if it was renamed (i.e. lowercase extension). This way PmWiki will also create the uploads directory, so you can browse there by FTP and copy your pictures more easily.

Archive

Recent discussions

Add a new section and a brief description at the bottom of the page. Please mention if you are using the latest version, and if possible, link any webpages if needed. --Petko

You can sign by adding ~~~~ (four tildes) at the end of your post, which will be translated to your name and the date. --Petko


Wiki markup in captions

On allowing formatting in captions, I note that images support basic formatting in captions

From version 2008-01-18 it is possible to have inline formatting (links, bold, colors...) in thumbgallery captions. --Petko February 03, 2008, at 07:26 AM

Access control for the pictures

This might be a stupid question but is there any kind of access control for the pictures? I understand that I can protect a wiki page but is there some way of preventing unauthorized access to a picture (I mean directly through the image URL)?

Yes, set in config.php $EnableDirectDownload = 0; and password-protect the group/page. Also, protect your directory /uploads/ with a .htaccess file containing the line
Deny from all
See also: Uploads, Uploads admin, Upload variables. --Petko April 29, 2008, at 07:01 AM


Force thumbnail heights

PS How about a height= to go with the width=. The px= seems to set either height or width depending on context (in table[1], out of table[2]) and I don't seem to get the results I expect.

Looking at your page I feel that you would like to achieve (again) something like [3] (check the divs and the css). In a non-tabled thumblist, the px= parameter sets the height of the list. --Petko June 30, 2008, at 08:31 PM

When I change height= to px= in the above page the photos go to 350 wide, not 350 high?

There is no height= parameter. When you use px=350 cols=2 you require a table in which the largest cell dimension is 350 px. Horizontal pictures get 350 px wide, vertical pictures get 350 px high. This is the expected behavior when you put many pictures in a table. If you want them all 350 px high, don't put them in a table (no cols=, or cols=0) and set px=350. --Petko

Petko, sorry to confuse things. I have set up a test page[4] that illustrates my lack of understanding, it does not use tables. Simon

The confusion comes from the "captionfmt" parameter which, as documented in the manual, transforms the single thumbnail in a one-cell table. I'll try to implement a new height= parameter this week. --Petko July 01, 2008, at 05:54 PM

Done in a development version. Please get it and test it. --Petko July 03, 2008, at 07:18 PM

  • Brilliant! Tested and very happy[5] [6], thanks very much
thanks for the new version, such a professional and useful recipe, Simon

Link whole galleries through a single thumbnail

Hello Petko, first off many thanks for this great recipe.

I was wondering, if it is possible to link a whole gallery (thumblist) through one thumbnail. Have a look at http://www.samba-osnabrueck.de/index.php/Ansehen/HomePage where I use Thumblist. It would be great if the gallery would open with its first picture (I configured it using lightbox) if I click on the single thumbnail. Is this already possible?

Also, I have noticed captioning doesn't work with lightbox, but I don't use this anyway.

--Jonas July 04, 2008, at 11:58 AM

  • Do you want to click on one thumbnail and to display the full Lightbox slideshow of pictures on an external gallery? I am not sure it is possible with Lightbox as it needs actual links to the files in the same page (let me investigate it a couple of days).
  • If you want to have a thumbnail linking to an external gallery page, there is the link=Group.Page parameter.
  • Thanks for the possible bug report, could you add a test page at the site with the current Thumblist version demonstrating the problem? (It does not happen for me.)

Thanks, --Petko July 04, 2008, at 03:09 PM


Inheriting the thumbnail caption in Lightbox

I think what Jonas is talking about re: captioning is that Lightbox uses the filename as a caption rather than inheriting the thumbnail caption one specifies in a Thumbgallery. The ability to have it do so would indeed be nice.

--Sean, Aug 20, 2008

This is possible from version 20080821 as shown here. Please get it and test it. (More documentation will be added in a couple of weeks.) --Petko August 21, 2008, at 06:08 AM

Edit - History - Print - Recent Changes - Search
Page last modified on August 21, 2008, at 06:12 AM