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 recipe. --Petko December 12, 2006
  • You can link your galleries in the "Examples" section on the main page. --Petko

Latest versions

Tips

  • Always get the latest official release of the script (currently: version 20240217).
  • 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
  • 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 (sometimes 2 megapixel max: 1600*1200). If you have problems with some pictures, try to resize them down a little: a picture of 1000*750 pixels is more than enough for most visitors' screens.

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

If you write about a problem, linking here your example galleries greatly speeds the diagnosis and the fixes.

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


Can the thumblist cache and/or supercache be put into a separate directory?

Can you make a directory inside the image directory and place the thumblist cache inside that?
I have a lot of files and often use the commandline. Seeing cache files mixed with my image files is frustrating.
Perhaps set a variable in the config such as '$ThumbListCacheDir="images/thumblist_cache"'?
I would be happy if the dir were just automatically put into the image directory to keep the cache separate. gnuzoo

Do you also mean the thumbnails? Let me think about it. --Petko

I mean all the files generated by the ThumbList recipe. gnuzoo


Custom Question-variables

Is it possible to define custom question variables for use in CaptionFmt and TitleFmt? I'd like to create a custom question-variable that massages the name of the file to use in a caption.

ngā mihi simon ; awesome, thanks simon

Yes, it was possible but hacky. I have now released 20230118 which will make this both slightly simpler and more flexible. See an example here. --Petko


(:thumb :) as an inline block

I want to be able to say
(:thumb :) /
(:thumb :) /
(:thumb :) 
and have the three photos side by side (e.g. an inline block). Is there a way of achieving this? thanks
simon December 14, 2021, at 05:06 AM

Try (:thumb ... style="display:inline-block;":) --Petko December 14, 2021, at 05:48 AM

If you have to do many of these, I would define a CSS class and wrap them in it. In pub/css/local.css:

.thumbs-inlineblock .thumbtable { display:inline-block; }

Then in the wiki page:

>>thumbs-inlineblock<<
(:thumb :) /
(:thumb :) /
(:thumb :)
>><<

Demo. Petko December 14, 2021, at 05:55 AM


Adding custom variables

Hello, Petko!

I'm integrating FancyBox with ThumbList, and I need one more argument to pass through (:thumblist:) to control if my big photos will be automatically resized by JavaScript or not. In my config.php I have something like this: $ThumbList['_tmpl']['awrap'] = "<a href='?L' class='single_image' title='?2' %2\$s>%1\$s</a> ";. I want if in wiki I write (:thumblist resize=0:), in HTML I get class='single_image_NoResize'.

Much better solution could be (:thumblist ClassPostfix="_abcd":) -> class='single_image_abcd'

What is the best way to do it?

Thank you!

Finar February 12, 2011, at 07:49 AM

This is not currently supported, sorry. But you can redefine the $ThumbList['_tmpl']['awrap'] in a local/Group.Page.php configuration script. --Petko February 14, 2011, at 01:59 AM


Group.Page to link gallery from other pages or from other group

I Petko ! It is said, in your doc, that « If you need to create a gallery of pictures uploaded in another Group (or Group.Page, depending on your wiki settings), add it immediately after thumblist or thumbgallery: (:thumblist Group.Page:) ».
Isn't it an automatic way to make thumblist program always use, by default {{$Group}}.{{$Name}} or the $UploadPrefixFmt (so one doesn't need to write explicitly where are the pics) ? My motivation, here, in my case, is I forgot to use Group.Page param for thumblists : so I'm in trouble for showing some pics on pageA (pics are on pageB, pageC, etc.) I know it is easy to solve this with mass search and replace but my question is : isn't it a config or php way to make
(:thumblist:) use by default $UploadPrefixFmt ? Thank you. --gb March 02, 2010, at 10:01 AM

It uses $UploadPrefixFmt, only it needs to know where your pictures are. If you have (:thumblist:) without Group.Page, it assumes the pictures are attached to the page you're viewing, like if you had (:thumblist {*$FullName}:). To display pictures attached to other page, use (:thumblist OtherPage:). If the documentation is not clear enough, we should improve it. Or may be I don't quite understand your problem? --Petko March 02, 2010, at 12:56 PM


Thumb List Templates: Problem with Upload Directory

Hi Petko, i use the latest Thumb List with automated ImageTemplate creation if you click on a Thumbnail. It all works so far, but i discovered a problem with the upload directories and image paths. I try to explain step by step what i did: First of all, my upload directory configuration is by page, using $UploadPrefixFmt = '/$Group/$Name';". in config.php. I created the page "Site/ImageTemplate" and included (:include Site.{*$UpFilePage}:) [[Site.{*$UpFilePage}(?action=)edit]]. At my main gallery page i use ThumbList with this code: (:thumblist cols=3 order=-name name="thumb_*" captionfmt="?f ?N ?N" usetemplate=1:). On click at one thumbnail, i get a new individual page.

For example, the main gallery has the path: http://localhost/pmwiki/pmwiki.php/Site/Test, if i click on thumbnail "thumb_01.jpg" i`ll get the path: http://localhost/pmwiki/pmwiki.php/Site/Test?action=imgtpl&G=1&upname=thumb_01.jpg. This new page shows the link: Site.thumb_01jpgedit. If i click on it, i`ll get a new page: http://localhost/pmwiki/pmwiki.php/Site/thumb_01jpg?action=edit. Everything works fine so far. I include ThumbList again at this new page using this code: (:thumblist cols=3 order=name name="gal_*" captionfmt="?f ?N ?N" link=-1:). I upload my pictures (gal_01.jpg-gal_09.jpg for example) to the page "Site/thumb_01jpg". Now there is the problem: Everything works fine at page "Site/thumb_01jpg". But if i go back to my main gallery page: "Site/Test" and click on "thumb_01.jpg" i still get the path: http://localhost/pmwiki/pmwiki.php/Site/Test?action=imgtpl&G=1&upname=thumb_01.jpg and ThumbList can't find the images name="gal_*" because it tries to receive the images from path "Site/Test" and not from the original upload directory "Site/thumb01jpg".

I think its possible to solve this problem if i switch the upload directory to sitewide. Is there any chance to get this working without changing the upload directory? I hope you understand my problem, my english is not the best. ;) Thank you very much! - Michael, February 4th, 2010.

Hello. The {*$UpFilePage} page was really not intended to contain other thumbnails, but to contain descriptions or comments about one picture, which are included from the ImageTemplate, just a technical page. If you add more stuff in it, especially other thumblists, your setup may become so messy that even you may not be able to manage. Ask yourself if you really need what you want -- or you prefer the simplicity and the serenity. So, my advice is to try keeping things as simple as possible.

About your question, you can list thumbnails attached to a different page with this command:
(:thumblist OtherGroup.OtherPage [other options]:)
in your case, inside the included page, you can use
(:thumblist {$FullName}:) which will be automatically expanded to Site.Thumb01jpg. --Petko February 05, 2010, at 08:56 AM

P.S. Note that the Site.* wikigroup was intended for the software interface -- if you can, you'd better use other groups for your content. Also, in your case -- a gallery leading to other pages -- it may be more convenient to use in the template not Site.{*$UpFilePage}?action=edit but {*$FullName}-{*$UpFilePage}?action=edit which will name the subpages Main.Test-Thumb01jpg and Main.Test-Thumb02jpg. In the long run, this may be much easier to manage. --Petko February 05, 2010, at 08:56 AM

Petko, thank you very much for your detailed reply! To solve the problem described above, i used your suggestions and played with the code a bit:

At Site.ImageTemplate i included:

[[Pics.{*$Title}-{*$UpFilePage} | Click here to Edit this Page.]]
(:include Pics.{*$Title}-{*$UpFilePage}:)

At the NewGalleryPage (Those new pages if i click on a thumbnail at the main gallery) i included: (:thumblist Pics.{*$Title}-{*$UpFilePage} cols=3 order=name name="gal_*" captionfmt="?f" link=-1 quiet=3:)

Now the new Gallery pages will be saved in ''Pics.{*$Title}{*$UpFilePage}''. For example: The main gallery hast the path Main.Gallery1, the name of the thumbnail i want to create a new gallery for, has the name "thumbnail1.jpg". The final path is: ''Pics.Gallery1thumbnail1jpg''.

Now i get the following errors at "Site/ImageTemplate":

Warning: htmlspecialchars() expects parameter 1 to be string, array given in G:\apache\htdocs\pmwiki\cookbook\thumblist2-actions.php on line 210

Warning: Cannot modify header information - headers already sent by (output started at G:\apache\htdocs\pmwiki\cookbook\thumblist2-actions.php:210) in G:\apache\htdocs\pmwiki\pmwiki.php on line 1064

What does those errors mean and how can i fix them? Thanks again for help! - Michael, February 21th, 2010.

First, I'd suggest using the {*$Name} variable instead of {*$Title}, see Page variables. $Name is fixed and unique for a given page (gallery) while $Title can be changed, and then your links and includes will stop working. Second, it looks like you are using an older version, if it is the case, you can upgrade -- update both files thumblist2.php and thumblist2-actions.php. If it still gives the warnings, do you have some custom question-variables defined, and how? (Something could be optimized there.) --Petko February 21, 2010, at 06:25 AM


Lightbox going through all images not only the one which are displayed with the perpage-option enabled

Hello Petko, I'm using the latest version of thumblist (20090831) and I want to use the lightbox with the perpage-option. For example I have 15 images and set the perpage-argument to display 3 images at once, so 5 pages a 3 images will be created. If I switch on some page, then Lightbox show me only 3 pictures and I must close the javascript window to switch to the other page. Is it possible to navigate for and back through the whole images without clicking on the next page to see the other pictures. So if I'm on page 2 and looking at the first picture and I want to see the last picture of page 1, I just must click the back-button on the javascript-window to turn to the images of the first page (the very same is for the for-button in the javascript-window). Hope you understand my concern, if not I will post some images :)

--MatthiasGünther October 05, 2009, at 12:29 AM

Not if you use the perpage= parameter, but it may be possible if you use one visible and one hidden thumblists:
(:thumblist count=3:)
>>comment<<
(:thumblist count=4.. :)
>><<

The first one will display pictures 1-3, the second one will be hidden, but it contains pictures 4-15 and Lightbox should show them. (I say "should" because the same works with Mini -- it should work with Thumblist too.) --Petko October 05, 2009, at 07:05 PM

It doesn't work for me, but I get nearly a solution with mini which also works for the perpage setting. I use the following:

Mini_Slice:4,*
SubPagesMini:3
>>comment<<
Mini:*
>><<

So maybe you could add this feature in the next version.

--MatthiasGünther October 05, 2009, at 11:58 AM


Lightbox integration, changing <img> title to caption.

If you have integrated LightBox and want it to show picture's captions as comments in fullsize view (instead of file name), please change #73 string in thumblist2.php to

'awrap' => '<a href="?L" class="thumblink" title=" ?3" %2$s>%1$s</a> ',

You can find an example web.finar.ru/pmwiki.php

I'am not shure that it is very correct way, can anyone suggest better way?

Finar.

You shouldn't ever need to modify the script files, almost everything can be changed with variables in config.php, and the program should continue working if you upgrade to a newer version. In your case, here is the code to use:
 $ThumbList['_tmpl']['awrap'] = "<a href='?L'
 class='thumblink' title='?4' %2\$s>%1\$s</a> ";

Instead of ?3, I recommend using ?4 which escapes some special characters. --Petko August 17, 2009, at 10:02 AM

Thanks, Petko! OK, I did as you said and it's work OK. But now I made up my mind to use ?2 istead of ?4 (because of this way I can use description to image without caption.) In this case if I have no "title" specified, I get "?f: ?wx?h, ?kk (?t)" istead of my description in Lightbox. I can manually solve it by adding #307: $_lightboxtitle = (@$arr['_t'])? $arr['_t']: ' '; and #325: "?5" => $_lightboxtitle, and than use ?5. But as you said it is not correct way, what is better for this problem?
Finar.

You can disable the default title format (which is "?f: ?wx?h, ?kk (?t)") by adding to config.php such a line:
$ThumbList['TitleFormat'] = '';
This way, if you have image.jpg"Some title" it will appear as a lightbox caption, if not, it will show nothing. Is this what you are trying to achieve? --Petko August 17, 2009, at 12:59 PM

Not exactly. The way you suggested will show tooltip only if it was manually added. In my example above with $_lightboxtitle variable (you can see it working now on web.finar.ru/pmwiki.php) standart tooltips (e.g. "a2.jpg 800x600 ...") are shown even if no "Some title" was specified. After specifing "Some title" it will be shown instead of standart tooltips
Finar.

I modified the script to process the ?1-?4 variables before the other ones; if ?1-?4 contain some other ?variable, it will be reprocessed. Could you test the new version and report any problems? Thanks. --Petko August 17, 2009, at 02:30 PM

Oh, thank you very much, Petko! I've tested it and it looks like it works as I was expected! I'm very happy now :)
Finar.

Example of $ThumbList['EXIFvars'] .

in config.php add

$ThumbList['EXIFvars']['x_orientation']='IFD0.Orientation'; [1]

and then use ?x_orientation

EXIF tag list


Thumbgallery seems to have a bug.

When I make a Thumbgallery with the option usetemplate=1, only one of the images will be opened correctly. All of the other thumbnails open a template page with no image in it. This seems to be not the case on the ThumbList homepage, though. See an example at http://discographydb.info/wiki/Main/WikiSandbox. Though the links look OK on all thumbnails, they show different behavior. When I leave out "usetemplate=1" then both links work.

thanks, Markus

There may be a bug indeed: I'll try to find some time to investigate it. Meanwhile, you can create an "image template" page, eg. "Site.ImageTemplate", as explained in the recipe. --Petko October 17, 2009, at 02:55 AM

Thanks for looking into this. I can't make parts of the main wiki world editable but I can install another wiki for testing: http://discographydb.info/pmwiki/Main/WikiSandbox . Feel free to edit any part in the "pmwiki" branch. - Markus

Could you try a test version of the thumblist2-actions.php file? (Just replace the one in your pmwiki/cookbook directory.) if it works, I'll release a new version. --Petko October 21, 2009, at 06:31 PM


Support for other image types

Is it possible to enable support for the tiff image type thanks, simon October 17, 2009, at 02:00 AM

No, neither PHP/GD can read TIFF images to produce thumbnails, nor the browsers can display TIFF images. Convert them to PNG or JPEG. --Petko October 17, 2009, at 02:55 AM

ImageMagick supports tiff, so does modern IE. Is there any possibility of using ImageMagick, if available, to thumbnail tiff images, thanks simon October 04, 2014, at 10:18 PM

It is probably possible to implement it but would you really require that all your visitors switch to Windows and to MSIE if they want to see the pictures? If you have ImageMagick available, isn't it better to convert those to JPEG with this simple command: mogrify -format jpeg *.tiff and let every browser display them? --Petko October 05, 2014, at 04:35 AM

Thenks. For this instance, all my users are IE users, of course I'd be very happy if other browsers modernised themselves to support .tiff too, lol simon October 09, 2014, at 03:35 AM


There might be a bug with (:thumbgallery:) markup:

  • (:thumb Gr./img.jpg:) leads to /Gr/Gr?action=upload&upname=img.jpg,

whereas

  • (:thumbgallery:)Gr./img.jpg(:thumbgalleryend:) leads to //?action=upload&upname=img.jpg

-- Rogutės, 2009-10-21

No, it should be written like (:thumbgallery Gr. :)img.jpg(:thumbgalleryend:) - and you don't have to write Gr./ at all img.jpg lines. On the other hand, you cannot mix files from different groups in one thumb list/gallery. --Petko October 21, 2009, at 02:00 PM


To add a download link to the original full size image under each thumbnail

(:thumblist captionfmt="[[?U|download]]" supercache=1:)
simon November 12, 2009, at 02:55 AM

Template Trails and Named Anchors

Is there a way to get a template trail and image template to retain a named anchor?

For example, when jumping to the gallery portion of a page...

https://www.herpsofarkansas.com/Snake/AgkistrodonContortrix#Gallery

But the template trail offers a link...

https://www.herpsofarkansas.com/Snake/AgkistrodonContortrix?page=2

This causes the page to jump back to the top. What it really should offer is...

https://www.herpsofarkansas.com/Snake/AgkistrodonContortrix?page=2#Gallery

The situation is similar using a "Back" link in an image template: [[{*$FullName} | $[Back] ]]

Thanks. kaptainkory December 22, 2009, at 11:46 PM

In the ImageTemplate, can't you have a back link like [[{*$FullName}#Gallery | $[Back] ]] ? --Petko December 24, 2009, at 01:22 PM


200px high or 1200px wide (whichever comes first)

In my wiki I am displaying some panoramas, it there a way I can say the thumbnail must not exceed 200px high or 1200px wide (whichever comes first)? simon March 27, 2010, at 02:15 AM

Sorry, not at the moment. --Petko March 31, 2010, at 06:42 AM


Shortcut when titlefmt and captionfmt are the same

It would be useful to have a shortcut way of entering titlefmt and captionfmt at the same time as often they are the same. eg titlefmt=captionfmt="some caption" and captionfmt=titlefmt="some caption" or something better

simon August 13, 2010, at 04:18 PM

There are two shortcuts ?2 and ?4, see [2]. Not to be used with markup/colors/styles in the captions. --Petko August 13, 2010, at 06:22 PM

thanks, brilliant simon August 16, 2010, at 03:45 AM

Lightbox not working

Thumblist2 is enabled and works fine by itself. It's when it's integrated with Lightbox that brings it to a halt. Nothing comes up at all when you click on a thumbnail. I had done a fresh install of PmWiki 2.2.18 on a new wiki. To test, I tried to implement LB on a blog with 2.2.17 installed. The same thing happened.

http://www.intrepidtrek.com/gamma/Main/HomePage (wiki with 2.2.18 - click any thumbnail on page) http://www.intrepidtrek.com/alpha/pmwiki.php/Blog/Blog (blog with 2.2.17 - click any thumbnail on page)

--Sovvie September 23, 2010, at 09:58 AM

Also, just out of curiosity I pulled up the error console on my browser (Firefox 2.0.0.20 Mac OS X) and found two errors:

Error: Builder not defined /gamma/pub/lb/lightbox.js line 141
Error: $("overlay") has no properties /gamma/pub/lb/lightbox.js line 218

Is this any help? --Sovvie September 23, 2010, at 02:08 PM

Thanks for the report -- indeed after Lightbox was upgraded to version 2.04, I forgot to update the config.php code. See the new install function here [3]. --Petko September 24, 2010, at 02:16 AM

Everything works now. Thank ye much! :D --Sovvie September 24, 2010, at 08:10 AM

Banner

Is it possible to get thumblist to produce on the fly a banner like to one shown at the very top of https://tl.5ko.fr/T/T, thanks simon September 08, 2012, at 10:20 PM

No, this was done with ImageMagick, see https://www.imagemagick.org/Usage/montage/#overlap. --Petko September 09, 2012, at 05:57 AM

I also have this page only for very advanced administrators, so it is entirely unsupported. It relies on ImageMagick correctly installed and configured on the system, and on the correct command lines. Every system has its differences, the command line templates will not work everywhere, and I'll not have enough free time to fix things for less advanced administrators. :-) --Petko September 09, 2012, at 07:13 AM

Use actual image size

Is there a shortcut to display a thumb at the original resolution, eg

(:thumb pic.jpeg px=*:)

simon September 29, 2012, at 03:15 PM

Why not use Attach:pic.jpeg? Alternatively, set px=99999 and you'll see the original picture if it is less than 99999 pixels high. --Petko

Thanks, 1) because the frame is distorted when px=99999 (see example), 2) because I like having all users use the same markup, and the thumb frame with all pictures looking the same simon September 30, 2012, at 09:37 PM

When we have captionmt or cols the thumb(list) is placed in a table (easier to have a centered caption below the thumbnail, has been this way in thumblist since 2006). Unfortunately for our original-resolution-shortcut, the table frame is adapted to the supposed size of the thumbnail from "px" and may appear larger than we want (but as large as we ask with "px":-). But you may use it without setting captionmt or cols.--Petko October 01, 2012, at 05:54 AM

Transparent background

Is it possible to specify bgcolor=transparent, eg if page has gradient background?

simon October 13, 2012, at 12:44 AM

Not for the thumbnails, the JPEG file format doesn't have transparency. But if you just don't set the bgcolor argument, the table containing thumbnails will be without background, and the thumbnails of pictures with transparency will have the default background (white if you haven't changed it). --Petko October 13, 2012, at 03:18 AM

For .png or .gif[4]?

simon October 13, 2012, at 03:21 PM

The thumbnails are in the JPEG format so they cannot have transparency. --Petko October 14, 2012, at 08:33 AM


thumnails regex

If you are using ftp to backup PmWiki you may not want to bother with the thumbnails. Somewhere the following regex was supplied (probably by Petko, but I can't trace the original source)

^th.*---.*\.jpe?g\.jpg$

You may want to enhance it to cater for .png and .gif files, e.g.

^th.*---.*\.(jpe?g|png|gif)\.jpg$

EXIF and IPTC attributes extracted by ThumbList

The EXIF and IPTC attributes associated with question variables. Variables are case sensitive

?EXIF attributeComment
?MIFD0.Make 
?mIFD0.Model 
?WCOMPUTED.Width, EXIF.ExifImageWidthUse computed if EXIF not available
?HCOMPUTED.Height, EXIF.ExifImageHeightUse computed if EXIF not available
?EEXIF.ExposureTime
?FEXIF.FocalLength
?ACOMPUTED.ApertureFNumber
?IEXIF.ISOSpeedRatings
?dDateTimeOriginal
?CEXIF.UserComment
 
Please consider adding
?cIPTC.Captionthe default field for captions used by Aperture (Apple)
?DEXIF.ImageDescription 
?OEXIF.Orientation 
?AEXIF.Artist 
?REXIF.Copyright 

There are online tools to view EXIF data, such as

simon June 22, 2013, at 05:30 PM

Adding more EXIF data was discussed on August 13, 2009; adding more IPTC tags was documented here. --Petko June 23, 2013, at 02:22 AM


ThumbList CSS formatted

CSS laid out with indentation and new lines to read easily

img.thumbs {
  border:1px solid #dddddd; 
  margin:2px; 
  padding:4px; 
  vertical-align: middle;
  }
img.thumbs:hover, table.thumbtable td.thumbtd div.img:hover {
  border:1px solid red;
  }
table.thumbtable img.thumbs { 
  border: 0; padding:0;
  }
table.thumbtable td.thumbtd {
  margin:4px; padding:2px;
  }
table.thumbtable td.thumbtd:hover {
  border-color:red;
  }
table.thumbtable {
  border:1px solid #cccccc;
  }
table.thumbtable td.thumbtd div.img {
  border: 1px solid #dddddd;
  text-align: center;
  }
.caption {
  font-size:.8em; 
  overflow:hidden; 
  padding:0px; 
  line-height:1.1em;
  }
img.current, table.thumbtable td.thumbtd div.current {
  border-color: red;
  }

Note: #cccccc (Gray80) and #dddddd are nearly indistinguishable shades of grey


order=random,name

I'm trying to have thumblist show count=6 order=random images, then sorted by name, it seems to me order=random,name should do this, but I tested it[5] and as soon as I add name (or $Name) the first count pictures are always selected.

simon August 09, 2014, at 01:15 AM

Sorry, thumblist cannot order by two criteria, if the order= parameter contains something different than those defined, it will sort by name. For example, there is no "random,name" or "$Name" orders defined in the script so your first example orders by name. BTW, PmWiki's PageLists would probably not sort like you expect: order=AAA,BBB will first sort by AAA, then if there are two items with the same AAA, these two will be ordered by BBB. --Petko August 09, 2014, at 09:45 AM

order2 parameter added 2014-08-25, thanks!


Is it possible to use wildcards in the Group.Page parameter

simon September 24, 2014, at 03:24 AM

No, but see MultiThumblist. --Petko October 05, 2014, at 04:35 AM


Is it possible to have a link to an external page, e.g. (:thumb example.jpeg link="http://example.com" :) simon October 30, 2014, at 03:01 PM

Use [[http://www.pmwiki.org/ | (:thumb example.jpg link=-1:)]] with link=-1. --Petko October 30, 2014, at 05:54 PM


{*$NextLink} and {*$UpFile} do not generate a valid link in an image template[6] for a photo named 2014-11-29T14.01.20-PB297709-Siân.jpeg[7]

simon March 16, 2015, at 03:52 AM

Can you please test this version which may fix the issue? It requires at least PmWiki 2.2.58. --Petko March 16, 2015, at 05:37 PM

This works very well indeed, thanks simon March 20, 2015, at 10:42 PM

Is it possible to have the images displayed in the order they are defined within the thumbgallery markup?

simon May 07, 2015, at 03:47 PM

Yes, the images are displayed in the order they are defined within the thumbgallery markup. --Petko May 07, 2015, at 10:25 PM

In the above example the markup (:thumbgallery Order. px=30:) includes the parameter "Order.". When I try[8] with neither Order. or order= I don't get the order they are defined, when I add Order. no photos are displayed (acts a bit like tlmode=2).

simon April 22, 2016, at 02:32 AM

"Order." is the name of the wikigroup where my pictures with numbers are uploaded. It is documented that in thumblist mode the pictures are sorted as they would be in a (:thumblist:), so you might drop the tlmode=1 part. --Petko April 22, 2016, at 03:33 AM


I'm having trouble with the "?a"[9] in

(:thumbgallery :)
1919-07-04_Evening_Post_Article.jpg"THE TARARUAS (Evening Post, 04 July 1919)" | THE TARARUAS ([[Evening Post, 04 July 1919 -> http://paperspast.natlib.govt.nz/cgi-bin/paperspast?a=d&cl=search&d=EP19190704.2.62]])
(:thumbgalleryend:)

(:thumbgallery :) 1919-07-04_Evening_Post_Article.jpg"THE TARARUAS (Evening Post, 04 July 1919)" | THE TARARUAS (Evening Post, 04 July 1919) (:thumbgalleryend:)

It shows up as http://paperspast.natlib.govt.nz/cgi-bin/paperspast173500=d&cl=search&d=EP19190704.2.62, spot the missing "?a"

any ideas on how to remedy, simon May 16, 2015, at 01:04 AM

?a is a question variable (area) so replace ?a with ??a in your link. --Petko May 16, 2015, at 03:05 AM

Thanks very much, this is a good work around. I'm dealing with 'novice' editors, is it possible to disable these (?a etc) variables selectively in config.php.

simon May 16, 2015, at 03:46 PM

If for you a user who uploads a file and masters a thumbgallery, with the correct file name, a tooltip title, a caption with a link, is a novice user, I can only imagine the capabilities of your normal users, and dare not speculate what your advanced users can do. :-D You can try version 20150525 from my server, then set in config.php something like $ThumbList['disableQVars'] = array('?a', '?r'); Do not disable variables like ?G, ?f, ?L, ?u which are used in templates/snippets. Report whether it works. Note that potentially any link you insert as caption might break if it contains "?" and many do; you should estimate if it is worth it to add links and other markup in the captions - and if it is, use double question marks. --Petko May 24, 2015, at 07:18 PM

works well, thankyou. They are novice editors, but they can copy and reuse :-) simon May 25, 2015, at 04:56 AM

For some little time I have noticed that my thumbnails don't render the first time they display. But they do render if the page is refreshed. (latest version of PmWiki and ThumbList 20150525).

simon February 12, 2016, at 01:48 AM

You have a "Byte order mark" in one or more of your PHP files (local, cookbook, scripts, skins). See Troubleshooting#headers and LocalCustomizations#encoding and save your files "Without Byte order mark" (or mask). --Petko February 12, 2016, at 04:43 AM


I find that for a filename such as "exāmple.jpeg" ThumbList doesn't pick up the image[10]

simon July 18, 2017, at 04:16 AM

You haven't written "exāmple.jpeg" but "ex&#257;mple.jpeg". Attach:ex&#257;mple.jpeg doesn't work either. We've already discussed this before, spaces, international or other special characters are not recommended in the file names, use at your own risk. --Petko July 18, 2017, at 05:51 AM

I thought we had discussed it, but I couldn't find it. As an international wiki I do find this anomalous.
Note I didn't enter &#257;, either PmWiki or all browsers converted the character ē to the html character entity. Thanks

simon July 19, 2017, at 05:22 AM

Yes, the browsers convert characters (ē) that are not available in your current character set (ISO8859-1, check column Missing Characters) to entities, this is normal, standard and expected. See/try here that it appears to work with UTF-8 enabled and $UploadNameChars = '\\w\\x80-\\xfe.-'; (even if still unsupported). Enabling UTF-8 on a running wiki is not trivial, see the documentation and have backups. --Petko July 19, 2017, at 06:34 AM


?N does not work in titlefmt. Is it possible to add a line break in titlefmt?

Yes, enter &#10;

Is it possible to support "?N" in title formats by inserting "&#10;" please?

Simon July 19, 2019, at 02:27 AM

Done for 20190726, demo. --Petko July 21, 2019, at 11:10 PM

Talk page for the ThumbList² recipe (users).