|
Cookbook /
ThumbList-Talk-archiveBack to Cookbook.Thumb list This is an archive of the ThumbList Talk page. Please post your new questions to ThumbList-Talk. Changelog for Thumblist version 1, up to 2007-11-202007-11-20
2007-10-22
2007-09-17
2007-08-27
2007-08-26
2007-08-19 Major release, important changes
2007-08-02, 2007-08-02a
2007-08-01
2007-07-29
2007-05-16
2007-05-14
2007-05-04
2007-05-01
2007-03-21, 2007-03-21a
2007-03-18
2007-03-15
2007-02-26
2007-02-02
2007-02-01, 2007-02-01a
2007-01-20
2007-01-19 (not released)
2007-01-18, 2007-01-18a, 2007-01-18b
2007-01-16a
2007-01-16
2007-01-14 (many changes)
2007-01-10
2007-01-09a
2007-01-09
2007-01-04
2006-12-31
2006-12-28a:
2006-12-28 (lots of changes):
2006-12-27:
2006-12-17:
2006-12-15:
2006-12-14. This version has adds some important features:
2006-12-12
Creeping featurismThank you all for your ideas and suggestions on how to improve the thumb list recipe, that I received here or by e-mail. I am considering every one for inclusion. However, my intention was (and still is) to write an easy, fast and simple script that lists attached images, without complicating things. Consider it an extension of the Some of the proposed features require opening external pages to extract variables or comments. This can be really slow on a shared hosting, because PmWiki has to check Group and page permissions and read the external page for every thumbnail -- if you have 40-50 per page, this may even not work (Supercache cannot help because it will never be up-to-date). Note that with the "Image templates" you can include other pages, or extract variables, or set a comments feature, for the currently displayed picture, using the variables About extracting metadata from the pictures, or worse, modifying it, currently much of these things are not really stable and interoperable: the usable scripts able to do this are almost 1 megabyte of code, or require PHP 5.1. Besides, extracting metadata will make things slower. One can implement a recipe that will try to read such metadata on one individual image at a time, but it will be a different script. It can then collaborate with ThumbList, for example in an Image template, something like: Also note that there are other fine gallery scripts that can do titles, captions, individual comments, pagelists, categorisations, unlimited subdirectories and more, you can give them a try. You can also take the thumblist script and add some functions, and then you can support a "ThumbListPro" with all other features. To resume: our script should be working, easy, simple and fast, but talk to me, because I am considering all propositions. If your nice idea can be done simply and easily, I will add it. Thanks, and a Happy New Year! (Already said that, but) Wishing you for 2007 to take lots of nice pictures and to display them in many nice galleries! --Petko January 02, 2007, at 05:32 PM Survey comments (optional) There was a survey which features to remove. It is now closed, with Thumblist˛ staying small and allowing virtually any feature to be added as local customization. --Petko November 29, 2007, at 02:30 PM
I'm sorry you feel you need to remove features. As the instigator for several of these I feel that to meet the needs of a wide(ish) audience it is inevitable that there will be more features than any one person would want. Having said that I think there are a few areas where supporting a feature that is available elsewhere would work, eg
About my general feeling, and why, you can read the "Feature Selection" chapter of "Getting Real". --Petko January 19, 2007, at 04:28 PM
Comment
Displaying the full image inside a wiki pageI like this very much. One request: It would be nice if there was an option for some back link to appear on the full image view. Or perhaps provide an option for the new page to use the current skin, or a custom header or footer with content supplied by a wiki page. You might take a look at Hagan's ThumbnailLinkToImage to see how he handled the issue. Thank you! Well, it was meant to be simple, and as most browsers have a "Back" button (or the user can press Backspace), I wouldn't complicate things more. It is also much less load for the server this way. Note that the other galleries in Category.Images can do this, and even more, if it is required. --Petko December 12, 2006, at 02:49 PM
Done, will appear on the next release. You can see how it works at my sandbox. Thanks for this idea! --Petko December 13, 2006, at 09:41 PM
Gallery without thumbnails, real pictures resized down in the browserNice and easy to use. Thanks. I have tried several gallery recipes but none of them is as easy as this (I even didn't manage to get WikiGallery working at all) I'd like to use my local PmWiki with my pictures. So there's no use to resize the pictures smaller. But somewhere there is a limitation because Thumblink don't work with big images. Could someone advice me in this. I use Puppy -linux and Xampp. But thanks for this recipe: it's great ! Teukka Even if I believe such option will be rarely used, this can be done easily and lightly so I added it to the code (yet to be released, hopefully before the end of the week). --Petko December 13, 2006, at 12:17 PM Set $ThumbRedoThumbs=-1; to your config.php. --Petko January 09, 2007, at 05:06 PM
Width parameter, Image templates, Alt and external directoriesThanks, very nice recipe. However, there are few things I'd like to request/ask:
Reda Those pictures cannot be displayed if $EnableDirectDownload is set to 0. The "picture folder" should be kept a PmWiki Uploads directory structure, but see also PmWiki.UploadsAdmin, especially the setting $UploadPrefixFmt = '/$Group/$Name'; which may be all you need. There are other scripts that can do what you wish, and more, check out Category.Images. --Petko December 28, 2006, at 06:59 AM
If you use , you must then name your upload directory /uploads/MyGroup/MyGalleryPage (case sensitive, the bold part same as the page where the command (:thumblist:) is) and all files should be inside. It depends on your wiki settings. If you change the $UploadPrefixFmt variable, chances are that files uploaded before the change may become invisible to PmWiki. So, maybe, move the files in the new directory. If you don't know what is the exact directory, upload a test file from the attach link on that page, PmWiki will create the directory and you can see it through ftp. --Petko December 28, 2006, at 08:48 AM
Image trails, custom page variablesHow can I create an image trail in an Image Template? Image trails are available in the version 2007-01-14. See example: Thumblist/TemplateTrails; docs updated. --Petko January 14, 2007, at 12:17 AM
Custom width page variableWould it be possible to make image height and width available as $ page variables, eg $ThumbWidth and $ThumbHeight. The reason for this is that if I display the full image (ie click through from the thumb) with no template then Firefox nicely resizes the image down to exactly fit in the space available if the image is larger. Using the template the image is displayed full size and I get scroll bars. What I'd like to achieve in some manner is %width=95pct max-width={$ThumbWidth}%Attach:{$UpDirUpFile}
These variables would have the same values as %w and %h = width and height in pixels of the actual displayed picture, not a fixed constant. How can I use the actual image width and height in the ImageTemplate? Available in the version 2007-01-14. Use {$ThumbList_w} and {$ThumbList_h} for %w and %h, etc. --Petko January 14, 2007, at 12:17 AM
Lightbox integrationIt is a very nice and handy recipe indeed. Sadly i have already built my image galleries with ImageSets. One addition i implemented there was the use of Lightbox v2 ( http://www.huddletogether.com/projects/lightbox2/ ). All you have to do is include the .js files and add a "rel='lightbox[galleryname]'" to the hrefs. I was very pleased with the result. I'm sure it will also work for this recipe. * Thanks for the lightbox link, looks quite nice!! Reda Very small change to the recipe. Very big increase in usability (IMHO). And in browsers with JavaScript turned off it simply defaults to linking to the original picture. Done (in theory, please test it), in version 2006-12-28. You should be able set in your config.php $ThumbLinkAdd="rel='lightbox[set%G]'";. --Petko December 28, 2006, at 06:59 AM
Probably, I don't know Lightbox. Try without usetemplate=1. If you have set $ThumbListUseTmpl=1;, try with usetemplate=0 --Petko December 28, 2006, at 08:48 AM
I've set a page at my site to demonstrate that the Lightbox javascript is working. I just had to adapt the image urls in the .CSS file and in the beginning of lightbox.js -- you can see/take them here. --Petko December 28, 2006, at 11:21 AM
Bug fixesOn my skin, (Triad), when I use the template, the link back to the gallery doesn't work, but it works fine on PmWiki skin. The problem is that Triad disables self-referencing links. I'll have to look where that is and disable it. For now, my workaround is to simply add an action to the self-referencing link, that is:
[[{$FullName}?action=browse|$[Back to Gallery]]]
Thanks for the "autolink", I'll change it in the documentation and in the code (if a template is not found, there is a link back). --Petko December 30, 2006, at 12:17 PM
Lightbox - better integrationOk, now in setting up Lightbox, for the lines that you add to your config.php (or Group.Page.php file), I had to change the references from "/pub/lb/..." to " Even on a simple non-farm configuration, hardcoding the reference to "/pub/lb" seems like it wouldn't work for anyone that installs PmWiki in a subdirectory (/pmwiki/pub/lb), at least not with clean urls (I say that because when I tried moving the code and files from my farm to my field, the hardcoded reference did not find the files). Pico December 30, 2006, at 02:24 PM It is possible to define a JavaScript variable that will contain the $FarmPubDirUrl. The latest howto and modified files are available here and should be OK in almost all configurations. Thanks for your observations and remarks. --Petko December 30, 2006, at 03:24 PM''
Individual image captions and external page comment variablesnice script. It would be nice to be able to add a caption to each image (like the optional attribute that can be added in the config file).
Tried to reply at Creeping featurism. I am considering the idea of individual captions though, how do you think it can be implemented (without external page reads)? (I mean wiki markup.) --Petko January 02, 2007, at 05:32 PM
Individual captions are now available with the (:thumbgallery:) markup. --Petko January 22, 2007, at 10:40 AM
Extracting IPTC/EXIF metadataVery nice recipe, I know You want to keep it simple and easy but I have to ask, is there any way to get it reading IPTC -captions? Not to edit them just to show somehow. Thanks for this! PeeJii Probably not from this recipe, but someone can write another one. See Creeping featurism. I tried to extract IPTC headers, but was unable to do this from PHP (even if the images contained such data). What is more likely to work, would be reading EXIF data, but, again, from another recipe. --Petko January 02, 2007, at 05:32 PM
It's probably not as hard as you think to extract metadata, nor as "expensive". Think about it, you are already opening all of the image files to get the dimensions, so reading EXIF data won't take much extra time. I suggest you forget comprehensive extraction and stick with common (and easy) image parameters such as date/time, exposure, aperture, ISO value, and -- the one your script needs most by far -- comment (or "JPEG comment", which I think is a special case). See qdig-metadata.php for my perhaps crude metadata-extraction code from qdig-devel. Allowing people to embed comments/captions in the images with something like IrfanView would really round out the feature set. It's surprising how much of a jumbled mess EXIF support in PHP turns out to be. I spent a long time just getting as far as I got, but having my code to start with might speed things up for you. I also have a bunch of images from various cameras to use for testing, if you would like those. Testing for EXIF support is very easy, btw. Just do something like if (!function_exists('exif_read_data')) { $exif['ena'] = FALSE; }
All that said, I took the same "EXIF is creeping featuritis" position for years, so I can understand why you'd give up on adding it, at least for now. Btw, I gave your script a quick test and it's very impressive. I'm particularly impressed with how quickly you've blasted through a lot of problems that I experienced during the development of Qdig. Nice work Petko! Oh... another suggestion I was going make was to add a gd-detection function. There's one in Qdig and also a generic example I posted as a comment in the PHP manual. I imagine by now GD 2.x is extremely common, but someone trying to run your script on a machine with 1.x will get a rude surprise in the form of a fatal error. It shouldn't be necessary. The PHP developers should have handled that differently, IMHO. --Hagan
It will be easy to test how much the EXIF function slows page rendering by using a skin that prints out $StopWatch at the bottom and enable/disable the feature. I predict the slowdown will be measurable, but not noticeable on a reasonably powerful server, that being a server powerful enough to resample thumbnails without too much trouble. Your imagename | caption idea is a good one. Syntax for image alt-text, titles, and captions has been agreed upon via discussion on the pmwiki-users list, so I recommend keeping it consistent with that. See PITS:00657 . --Hagan
Basic EXIF extraction is now available with the exif=1 parameter as percent variables. See also titlefmt= and captionfmt=. Individual captions/comments, however, may be easier to add/edit with the (:thumbgallery:) markup. --Petko January 22, 2007, at 10:40 AM
Random ThumbnailThis is definitely a creaping feature, but how about ... Simon
Try shuffle=1 at Thumblist/Shuffle. May appear in next release. --Petko January 18, 2007, at 06:34 PM
Parameter shuffle=1 is available from version 2007-01-20. --Petko January 22, 2007, at 10:40 AM
Variable to testIf the thumblist does not return anything because there are no pictures, is there anything I can test for true or false to hide/show also some related text? Thanks. Yes, this may be improved. These are the cases ThumbList returns nothing: (1) no read permissions on the other page where the pictures are uploaded, (2) a thumblist command and no picture files or files invisible to PmWiki, or name and skip patterns defined and no matching filenames, (3) start= defined more than the number of matching files, (4) a thumb command and no file specified, (5) a thumb command and file not found. I'll add this, but displaying a message will be optional (from variable in config.php). Thanks. --Petko January 04, 2007, at 06:59 AM
Available from version 2007-01-10 --Petko January 14, 2007, at 12:17 AM
New development versionDownload - see and test. Just installed this - deleted all the thumbs and it created them all in one go!. Works wonderfully well, my compliments on your hard work and great product, I recommend it to anyone. - Simon New version ready to be testedHi, I rewrote the documentation page to give the basic usage first, and the advanced usage below, so that new users will hopefully not be scared by the added complexity. The new script version from today fixes some bugs and adds some new advanced features (read the Release Notes). Please test it. Your comments are welcome. --Petko January 09, 2007, at 04:59 PM ![]() Captions and Order
To avoid entering each image name, and assuming pictures are ordered consistently in some manner (eg alphabetically ascending by name, or by EXIF date (now there's a thought, how about an order parameter)), could the picture name be optional, and captions assigned to pictures in the order they are loaded, eg
(:thumbgallery:) | Caption | Tooltip title | | Another tooltip title | | Another caption | previous picture had no caption (:thumbgalleryend:)
That's why, currently, the script is as it is. Thanks. --Petko January 09, 2007, at 05:27 PM that is very helpful, thanks. Would it be possible then to have a thumgallery parameter that showed all thumbnails, whether or not they had a caption specified? Available from version 2007-01-14, "ThumbList mode". Use (:thumbgallery tlmode=1:).
Just to drop a noteJust to drop a note to say thanks Petko. This is what I manage to cook up with the basic version of thumbnail. --hua January 13th, 2007 Thanks! --Petko January 14, 2007, at 12:17 AM
I'll second those thanks in spades, great recipe Simon Bug report and CSS suggestionExcellent script! And please keep it simple and clean. I hate recipe scritps that do everything for everybody. Do one thing and do that well. Unfortunately I have a bug to report:
The css you give for the .thumptable is useless as long as you set the styles in the thumblist.php script. The inline styles from the script override the styles set in the css. I have commented out theline and changed the line: $td1 = "<td class='thumbtd' align='center' valign='top'$h
width='$Px4'><div class='img' style='padding:$pad $pad'>";
to I use these two line css to get a marvelous gallery page .thumbtable { margin-top:20px; margin-bottom:40px; }
.thumbtd { padding-bottom:40px; padding-right:25px; }
Keep up the good works, Han, jan 19, 2007 Thanks for the bug report, fixed in version 2007-01-20 (just released).
Inline styles are used in order to center the thumbnail in the table cell. If you try to list small pictures, i.e. icons or other, smaller than the requested thumbnail, you will see the difference. Do you have a public website so that I can see your marvelously styled gallery? --Petko January 19, 2007, at 05:29 PM
Thanks for the quick fix. Site: http://palimpsest.xs4all.nl Han jan 22, 2007 at 10.06 AM CET
ThumbList warning: Only 0 files found but you set start=1.I'm sorry but I have run out of ideas to get this to work. I have tried everything on this page and the documentation page so far but I still only get this error: Any help is appreciated. Thanks, BillReveile January 30, 2007, at 12:32 AM I am assuming that you have the latest version of ThumbList that is "2007-01-20". There are two possible problems here:
Or maybe something else. I could try the script at your site sandbox, test some options and uploads, or send you a debugging version -- if you wish, please contact me at 5ko (snail) free.fr. --Petko January 30, 2007, at 06:55 AM Compliance with regular attachment behaviorSince the recipe deals with image uploaded as page attachments, this could be nice to have the markup acting as the attachement prefix, ie when I specify I don't want to sell my soup here, but you may have a look at LinkedResourceExtras ;). Dfaure February 01, 2007, at 11:34 AM Added in version 2007-02-01a (for the (:thumb:) and (:thumbgallery:) markups). The reason why it is this way, is that it began as an (:attachlist:) enhancement so it would normally display notning; the (:thumb:) markup came later and inherited this behaviour. About your soup, mine was cooked first, so, c'est la vie, chef. :-) --Petko February 01, 2007, at 12:22 PM
Image trailThere is an issue with your gallery: you cannot have filenames with spaces and hope to display them via an Attach: link in your template. This is a PmWiki limitation of the Attach: markup. You should rename the files that contain spaces. --Petko February 26, 2007, at 03:52 PM Actually a very handy hint from Uploads gets around this, viz
I tried to use The $NextLink allready contains the closing brackets. I made a new version with variables $NextLinkUrl and $PrevLinkUrl that may be used inside brackets like this: [[{*$NextLinkUrl} | Attach:{*$UpDirUpFile}"{*$UpFile}"]]. Feel free to test it. Note that these are not full URLs, no http://, just the PageName?action=imgtpl... and may change in the future, if I find a better name. --Petko February 27, 2007, at 01:50 PM
Thanks, these new variables appear to work $NextLink and $PrevLink seem not to be working, see [1].
Also where there is no $NextLinkUrl would it be possible to have the trail loop back to the beginning, because when $NextLinkUrl is null [[ | Attach:{*$UpDirUpFile}]] does not display anything.
New version 2007-02-28. I believe the first problem was fixed. In this version, if there is no previous/next picture, the *LinkUrl points back to the gallery (the *Link is empty like before). See example (template) - click on the picture to open the next one. --Petko February 28, 2007, at 05:20 AM
Note that this is experimental feature and code, I don't like much how it is handled now and it may change/dissapear. --Petko
That's great, a good solution, happy if it continues to evolve. --Simon Minor issues with version 2007-02-26This is a great recipe, thank you! I had some issues.
Thanks for your feedback. (1,2) the "name=" is not used for thumbgallery unless you have tlmode=1. With thumbgallery you need to list each file on a line, or use tlmode=1 and it behaves like a thumblist. If not, there may be a bug, please show me a page or set one on Thumblist/Sandbox. (3) To never display warnings, you can set in config.php $ThumbShowErrors=0;. (4) Yes, you should be able to set in config.php or 'read' or another auth-level. (5) Thanks, will be fixed (at one time it was, then the code changed, forgot this). --Petko March 14, 2007, at 04:12 AM
(4)In my config.php I set
then I login as a member of @zapentry, go the my custom upload page (I changed Site.UploadQuickReference and click on a link to {*$FullName}?action=purgethumbs, the login form is shown (shouldn't be) and any attempts to login as a member of @zapentry bring back the same login form. I can break the loop by logging in as admin, which purges the thumbnails. ThumbList doesn't seem to honor the HandleAuth in this case...
Thank you: there was an omission, now hopefully fixed. Can you please test the new version and confirm that it works? If it's the case, I'll release it. --Petko March 14, 2007, at 05:06 PM
Yes, it's fixed, thank you. However, I noticed that this version has other changes that apparently affect the size of my fonts in some pages. I noticed that pages that load thumblist and thumgallery now show bigger fonts in Site/PageFootMenu and in some input form button labels. I used fixflow skin if that matters.
Back to (1) above, I think the issue is when Group.Name is specified as a PTV
:TheGroup:SomeGroup
:ThePage:SomePage
:Gallery:{$:TheGroup}.{$:ThePage}
(:thumbgallery {$:Gallery} ...:)
OK, I believe this one is fixed too (please test the version 2007-03-15). FWIW, it worked if you have :Gallery:SomeGroup.SomePage but not if you have a PageTextVar definition made of other PTVs (now corrected). You are building quite complex applications if you need to control the ThumbList displays with PageTextVariables made of other PageTextVariables... good luck! (About the font styles, nothing has changed in that direction since version 2007-02-02 of the script, maybe you updated a skin, a style, or a browser, or set a browser minimum font size.) --Petko March 14, 2007, at 07:07 PM
Great, it's fixed. Thank you very much! -- SteP March 15, 2007, at 11:50 AM
Thumbgallery and AttachThis is a bit of a problem. Normally thumbgallery shows upload links for pictures in its list that have not yet been uploaded. However, when the upload scheme is Group.Name and there are no uploaded pictures (or uploads/Group.Name doesn't exists), thumbgallery shows no upload links at all. This is inconvenient, as one is forced to add Attach links to the page, and as soon as the first picture is uploaded, the names of the missing pictures show up twice, once in thumblist and once in the added Attach link. SteP March 18, 2007, at 09:29 AM Done as of version 2007-03-18 (now thumbgallery will show upload links even if the directory does not exist). Thanks! --Petko March 18, 2007, at 10:13 AM
Confirmed, thank you! SteP
Printing from templateIs it possible to define a template that includes a link to print the current image with the print skin? SteP April 30, 2007, at 01:17 PM Unfortunately no, because the print skin is called by the URL-parameter action=print, and the image-inside-template by action=imgtpl, there may be only one action= at a time. --Petko April 30, 2007, at 01:42 PM
Multiple Image UploadOn my site, I have about 40 pictures to upload to my gallery. Is there a way I can upload multiple files at once? I wish you could just select multiple files on the attach page. Would that be possible? Thanks a bunch! --diafygi May 2, 2007, at 05:00 PM Not with this recipe, and currently, there is no other recipe that can do this. If you have an FTP access, you can copy the files with FTP. To make sure you copy the files in the correct directories, first upload one file to each directory through the attach link, and PmWiki will create the directories. --Petko May 02, 2007, at 05:33 PM
Multiple ThumbGalleriesI am using two thumbgallery instances on a page, each using the 'usetemplate' tag. When I click on the images in the second gallery, the 'nextlink' links don't work correctly.[2] I've set a test page at [3] and [4] and it works. I suggest you upgrade the recipe to the current version (you have 2007-02-26, current is 2007-05-01), and delete from the upload directory the cache files .thumblist*.cache where there is a problem. --Petko
I have to say, I like very much your meccano-encyclopedia and the way you're using the thumblist recipe, very nice pages! :-) --Petko May 05, 2007, at 07:48 PM
That worked, thanks very much for such a useful recipe. Thanks for the compliment, I rely heavily on your recipe, so the site owes a lot to you. - P.B Supercache and conditionalsUsing Cookbook.MultiLanguage the following source (:cell:) (:if userlang de:) (:thumbgallery cols=2 align=center usetemplate=1 supercache=1:) p1.jpg | de p2.jpg | de (:thumbgalleryend:) (:if userlang en:) (:thumbgallery cols=2 align=center usetemplate=1 supercache=1:) p1.jpg | en p2.jpg | en (:thumbgalleryend:) (:fi:) doesn't switch the caption when the language is switched. Remove supercache=1 and now the caption language switches properly. My guess is that captions are supercached. SteP April 30, 2007, at 04:16 PM You need to indicate different "supercache-IDs" for each gallery, and to do this, set manually a different number>1000:
Added as of version 2007-05-01. --Petko April 30, 2007, at 06:31 PM Valid CSSI just wanted to let ya'll know that
from:
table.thumbtable td.thumbtd div.img { border: 1px solid #dddddd; text-align:middle;}
to:
table.thumbtable td.thumbtd div.img { border: 1px solid #dddddd; text-align:center;}
I don't really feel qualified to change the front page, so I just wanted to let everyone know. Thanks, now changed. --Petko July 12, 2007, at 04:15 PM
Improper Display on IE7For those of us not using *real* operating environments :-), a user reports a problem with IE7 not displaying all the thumbnails if the thumbs are particularly large. The same user reports flawless operation under Firefox 2. If I set (:thumblist px=240 target=_blank:) in a group with a bunch of 2800x1600 or so images in it, Firefox shows all the thumbs in a scrolled window. IE7, however, seems to only display the 4 or so thumbs that appear in the first page, omitting the scrollbar on the side, such that you only see 4 images. Odd, IE6 works great just like FF2 for this. Is there some javascript or something that is occurring that might be causing IE7 to choke? Can anyone else independently verify? Thanks --RussFink There is a problem with the following code from your local.css:
body, html, #wikibody, #wikimid, #wikitext { height:100%; }
object { overflow:hidden; }
Try to use min-height:100%; overflow:auto; instead of height:100%; (or remove the first line), and/or overflow:auto; (or remove the second line). This is unrelated to thumblist, different interpretation by IE7, of the CSS that you added. --Petko October 24, 2007, at 06:29 PM
Thank you very much! I had added local.css months ago to combat a problem with my earlier attempts at a gallery, which was to include a Picasa-generated page. Someone on the Pmwiki users list gave me some CSS to run. Disabling the local.css to get Thumbnails to work conflicts with the changes to get Picasa's page to load sensibly, but since Thumblist works much better anyway, I'm throwing out Picasa. Take care, RussFink Geotagging(Reda - 05/07/2007). Geotagging would be a nice feature to have. I.e. It would be nice to see a small image thumb when clicking on a marker on googlemaps. Clicking on the image would show the full picture. Possibly it can be achieved by using the thumblist and GoogleMapAPI cookbooks. Thumblist could be expanded to generate a text file (in same folder) with image location, thumb location, lat and long (from Exif info) for each picture in a folder... The GoogleMapAPI cookbook then would only need to read the text file and generate a gma-point for each line with lat-long and image thumb location... I'm asking a lot, I know... but seems nice. Any comments? Can it be done? Not easy, and for some months (until Jenuary 2007 likely later) I will be unable to code this. --Petko July 12, 2007, at 04:15 PM
CaptionsThe new caption feature is great[5]. Two suggestions please
I don't really know how to do this without complexifying and slowing a lot the script (I tried). What I will do really soon is a demonstration for a commenting feature with PmForm and an included {*$FullName}-{*$UpFilePage} page where you can put the description, links, bold texts, and comments. It will allow you to do better, more things than extracting a line from the gallery page. --Petko November 20, 2007, at 03:40 PM
Ampersand in file names
PmWiki itself seems not recognize the file name as a valid upload. If you try to upload such a file in PmWiki, it will remove the ampersand. If you copy the file with FTP, the Attach: link will not work. Test. I have no intention to support this, because the ampersand is a special symbol both in URLs and in shell command line (listing and ImageMagick). Sorry.
I am considering all such cases as bugs, if the files were uploaded by the PmWiki interface, and are visible to PmWiki both in an (:attachlist:) and in Attach:File.jpg links. Thanks. --Petko November 20, 2007, at 08:10 PM
Specify Alternate LinkIs there a way to specify an alternate link for each image (Ex: linkfmt=SomeGroup.SomeName)? This would be particularly useful when sampling images on a different page, allowing users to jump to the source page rather than the image. From version 2007-09-17 you can also use link=2, then clicking on a thumbnail will point to the (different) page where the gallery is uploaded. For example, (:thumblist Photos.Paris limit=3 link=2:)= will display the first three thumbnails from the page Photos.Paris, and each thumb will link to that page Photos.Paris. Demo. --Petko September 16, 2007, at 09:09 PM
In Thumblist˛ (from 2007-11-28) you can also use link=Group.Page. --Petko November 28, 2007, at 01:01 PM
Multiple source pages, wildcardsCan I say Simon (using latest version)
Not at the moment. But you can do (:thumblist TTC.Activities:)(:thumblist TTC.Activities-Gallery:) or for more complicated stuff, insert the thumblist inside a PageList template. --Petko September 03, 2007, at 01:42 PM
See also MultiThumblist. --Petko November 28, 2007, at 01:01 PM
Sort by upload dateI don't know if Thumblist already does this. But I would gladly add this feature to the latest version by request. Else check out thumblist_sort.php. --Aidin Abedi Thanks. I plan to add ordering of the thumbnails by name, ctime, mtime, size (all ascending or descending), no sort at all (directory default) or random, and possibly on other/EXIF variables. But because getting most of these bits of data require at least a stat or even opening and reading every file in the upload directory, such a feature will slow down a lot any website, so the sorting will be optional (using a supercache will be recommended). --Petko November 04, 2007, at 12:00 PM
Or maybe we'll figure out a plug-in/recipe capability for ThumbList, so as people will be able to add their own features and functions while the ThumbList core stays small, slim and fast. I just need some time to think of the implementation. --Petko November 04, 2007, at 12:00 PM
By file extension would be useful too. SteP November 07, 2007, at 01:32 AM
These and a number of other sort orders were added at the new Thumblist˛. Demo. --Petko November 28, 2007, at 01:01 PM
Lightbox in v.2Hi Petko I'm new to pmwiki and Thumblist, but I am liking the recipe a lot. I was trying to use lightbox but it doesn't seem to work. I followed the directions on the pages but no luck. I'm not using template trails or anything so I'm not sure what it could be. Not much info here for troubleshooting I'm afraid. bilu Is there a webpage where I could take a look and eventually test it? Like a Wiki sandbox. --Petko December 11, 2007, at 06:03 PM
I have the gallery at http://vnblukas.net/index.php/Main/NewHouse. Hope that's enough information to work with. There is improvement since my last message as the images superimpose, but the next and back arrows don't appear. I appreciate your response. -bilu @ 10:45 PM on December 12, 2007. THX rel=lightbox[?G] for the arrows to work. This is a Lightbox "feature": when you use just rel=lightbox, it works for single images, and if you use an array it will display the arrows (with [?G] you point to all pictures in this thumblist).THANKS! I misunderstood where I was supposed to put I added today one line to the user function, so that slideshows be enabled even with rel=lightbox only. It's simpler and easier to write. Thanks. --Petko January 04, 2008, at 08:30 AM
Thumblist on OSX 10.5 LeopardPetko, Since I installed Apple's OSX 10.5 Leopard, the php is installed (by default) without the GD libs. I try to use your exellent recipe with Imagemagic. That doesn't work.
So something else is (not?) happening. Han, december 12 2007, 19.24 CET You need to set in your config.php, before including the Thumblist recipe, such a line: $ThumbList['ImageMagickExe'] = '/usr/bin/convert'; If you don't know where is your convert executable, write in a console: type convertand it will show you. Then you enter it instead of '/usr/bin/convert' above. The other way is to install the php5-gd2.so library from your manager. Note that you should not need to comment lines in the script: if there is a problem, I need to fix it, for all users. :-) In your case, if ImageMagick's path is correctly written, it should work without commenting out lines. --Petko December 12, 2007, at 05:15 PM InlineCaptionCSS Is No, it was dropped because the new "snippet" template system is much more flexible. Please see an example at FineTuningHTML: you can have the previous behavior and much more.
Linking the image back to the pageHi Petko, I am using Thumblist2 (latest version) with PmWiki. It is an excellent recipe and immensely useful. Thank you! Would it be possible to have the image link back to the page? In other words, once the image has loaded, can clicking on it again take me back to the original page? Is that possible? Is this outside the scope of your recipe? Another question: I am continously running into people uploading large images that load with vertical and horizontal scroll bars. Is there a way that through this recipe, the original image is loaded relative to the screen resolution?? Again, I truly appreciate your recipe and all the help! skumar? January 02, 2008, at 02:48 PM Hi, thanks for the kind words! (1) Read about the special ImageTemplate pages. Yes, you can have the big picture link back to the gallery by using something like [[{*$FullName}| Attach:{*$UpDirUpFile} ]] in your ImageTemplate page, or just have a text link below the picture [[{*$FullName}| Back to gallery ]]. (2) It is not possible for the script to know what is your visitor's screen size. But you can select a fixed size and again, in the ImageTemplate, instead of an Attach: link to the file, use (:thumb "{*$UpDirUpFile}" width=800:) for a 800px wide copy. If the file is larger than 800px, it will be scaled down, linking to the original; to link back to the gallery you'll need to use a text link. There are some examples here: [7] [8] and around. --Petko January 02, 2008, at 03:52 PM
Case-sensitive Extensions ProblemHello - I'm having a problem on my site with images that end in upper-case ".JPG" . I'm using the thumbgallery tag to match name="*.JPG". It finds the files just fine. However, when I click on any of the thumbs of those files ending in .JPG, instead of showing the full file, it presents me with a link to let me upload the image. I tried another test pointing to files that had lowercase ".jpg" mixed in with upper case ".JPG". While the uppercase versions give me a link instead of an image, the lowercase images take me to the full sized image as expected. Can you look at it when you get a chance? Here is my test page. The first and last image are .jpg and "work," the middle two are ".JPG" and don't work: http://www.finalscoretrivia.com/Main/Sandbox Here is my code for the thumb gallery: (:thumbgallery MDPhotos.MDPhotos name="TB16_*0441.JPG|*DeltaForce28*|*princ*" width=375 usetemplate=1 supercache=1 cols=2 tlmode=1:) AppCol_DeltaForce28.jpg| test1 | TB16_c1.JPG | | beerprincess.jpg | | (:thumbgalleryend:) Thanks! --RussFink
Thumbnails from pages in a categoryHi Petko Is there a way, how i can make the thumbnail link to the page where it is atattched, and not the whole group? I know its possible for one image alone by specifying the link, but how can it be done when there are more pages in a category and each thumbnail should link to the page of the category its attached and not the whole group? and is it possible to only show the thumbnails of pages that are specified to a category, when there are more categories in a group? thx I'm not sure I understand everything. Something similar is possible (only) if you have "per-page upload directories", see $UploadPrefixFmt, UploadsAdmin and UploadGroups. You can use page lists like (:pagelist link=Category.Christmass2007 fmt=#thumbnails:) and in the Site.LocalTemplates you define the #thumbnails template like: (:thumblist {=$FullName} link=2:) or link={=$FullName}. It is an advanced configuration, you need to know or to learn about PageLists and PageListTemplates manipulations. They are out of the scope of this manual and help page. --Petko December 26, 2007, at 03:22 PM
Supercache is broken in version 2008-02-08It seems that the usage of the Keep() function is messing up the supercache function of ThumbList2. Obviously Keep() replaces the markup that is to be kept with some cryptic number code and reinserts it at the end. Too bad that this cryptic number code gets cached within the supercache. Then upon reloading the cached thumb list, the PmWiki engine doesn't know anymore what the code meant in the first place. How could it, anyway? The solution obviously is to uncommented the commented out line in the ThumbReturn() function and to ban all usage of Keep() from the FmtThumbList() function. Here is the patch: supercache-fix.patch.txtΔ This bug was exceptionally hard to find since the supercached page worked when the cache was being created in the first place but not when it was being loaded from the cache. Also I didn't know the Keep() function which is only implicitly documented on dubious pages and not explicitly on the functions page. See CustomMarkup under "Define a custom markup to produce a specific HTML or Javascript sequence" or search for "keep(". --Fritz Webering? March 09, 2008, at 06:04 PM Thanks for finding this bug. I fixed it differently, as the Keep()s are needed when there is markup in captions. Before the cache is stored, it is now converted to HTML including all "cryptic" (actually escaped) entries. Thanks again. --Petko March 10, 2008, at 04:16 PM Well, that's a point. I already thought you must have had your reasons to do it that way, because of the commented out line in ThumbReturn(). But the way you do it now causes problems when the content of the supercache is loaded and output to the page as raw HTML. The PmWiki engine will screw up all of the links. But that's easy to fix: just do ThumbReturn(Keep($output)) on line 137. --Fritz Webering? March 13, 2008, at 05:33 AM
I believe it is now fixed with version 83D (using MarkupRestore instead of MarkupToHTML). Please test the new version and confirm if supercache is working as you expect. Thanks. --Petko March 13, 2008, at 10:19 AM No, it's still not working. For a moment I thought that the problem might be due to the fact that I override the '_tmpl' settings to make the pictures display as floating <div>s. But it's just the same when I comment out the according lines in the config.php. The problem seems to be that the supercache files contain raw HTML, such as <a href="http://tbwiki/uploads/Jahr2006/Fotos/IMG_2416.JPG" class="highslide" onclick="return hs.expand(this)" >. This causes the PmWiki engine to interpret the "http://" part as a link, just as it does here, and replace it with another <a></a> tag. The only way I see to get rid of this is to pipe the contents of the supercache through Keep() before passing it to PmWiki. This only applies when the gallery has been retrieved from the cache though. Not when the page is first being generated. Since I don't really need markup in the image captions I'll just stick with this solution. -- Fritz Webering? March 22, 2008, at 10:03 AM
Thanks for this report: at all my installations this problem didn't appear, and the reason was that I had manually defined three variables as I've had problems with their automatic detection by PmWiki:
However, Thumblist2 should work with a default PmWiki installation, so I'll look closer to fix this problem. It appears that the newest requested feature with markup in captions has caused much more problems than it solved... Thanks, --Petko March 22, 2008, at 11:18 AM Please test the new version 83M (just released). It should finally work. Thanks for your help improving the recipe. --Petko March 22, 2008, at 03:43 PM Hey, that seems to work. Maybe the solution is not too efficient, but it looks like it does its job as long people don't use fancy JavaScript in their templates. The JavaScript code would be stripped of its opening and closing tags and be processed as markup, as would any type of plain text that's included in HTML tags. At least from what I see on the first glance. But so far that's only hypothetical I think. -- Fritz Webering? March 25, 2008, at 01:50 PM
The version 83P is quite efficient. Could you possibly tell me what fancy JavaScript and HTML are you using in your snippets: it should be possible to manage it. Also note that usually you would want to enclose JavaScript in comments to hide the code from older browsers: Single random thumbAny reason why we can't have a randon single thumb, viz (:thumb TTC/WellingtonsRuggedSouthwest-Gallery order=random titlefmt="Wellington's rugged southwest coast" link=TTC/WellingtonsRuggedSouthwest :) ?
Please use OK[10], makes sense, thanks, you are so fast ! Simon
|