|
Cookbook /
Mini-TalkPicture name under Thumbnail & Automatic Link to new Page?I have hundreds of images in multiple galleries. i use "mini:*" tag to automatically create those galleries in my pages and it works great, this saves a lot of time! Hello - and sorry for the late reply. I am glad to hear that Mini saves you a lot of time. Unfortunately, the features you ask for are not implemented. Both are possible with ThumbList though, (1) is enabled by default, and (2) can be done with an ImageTemplate which contains the line Thanks again! works perfect for me! :) - Jack Lighbox tweaks???if i replace the bundled Lightbox javascript with a newer version it stops working in Pmwiki. so i am guessing you have tweaked the bundled Lightbox code Petko? if so, can you document the necessary changes? i ask because i am seeing some odd behavior of the Lightbox close link: it often responds to a click by moving a bit to the left and not closing the image overlay til a second click. anyone else see this? if not, what could i be doing wrong? tia!!! /dan - bang December 17, 2009, at 02:43 PM Yes, there are some changes for the script to work with the PmWiki's uploads, pub and css directories that need to be parameterizable and not hard-coded. Bigger problem is that the new Lightbox version uses a more recent Prototype release, and it will not work with the older ones. I'll try to find some time to upgrade all to the new version. --Petko December 19, 2009, at 03:59 AM Remote imagesHi Petko, I'd love to use Mini (or its bigger brother) to display thumbnails of external images. Any chance that we might see that in the future or on how to quickly achieve this? --destotelhorus? October 28, 2009, at 05:17 PM No, Mini is specifically designed to integrate with PmWiki uploads directories. WikiGallery and QDIG should be able to show thumbnails of pictures on the same server, even out of the PmWiki's uploads structure. I know no PHP online gallery creating thumbnails of pictures on remote servers. But Galleria may be what you want (JavaScript, which means that visitors download all images from the remote site and their browsers scale the pictures down, simulating thumbnails). --Petko October 29, 2009, at 06:58 PM
Yes, you can have a sub-directory per-page instead of per-group, see the variable Mini with autogenerated page navigation![]() Petko, is it possible to create something like on the picture, because I have over 100 pictures and want to separate them on different pages. Of course, I can do it with range but then I must generate the linking pages manully. Thanks for your answer -- MatthiasGünther September 27, 2009, at 8:30 AM Please look at How to slice a large Mini list into subpages. --Petko September 30, 2009, at 05:52 PM It's working perfect, thanks a lot -- MatthiasGünther October 05 , 2009, at 12:05 AM Now I have another question: Is it possible to add << and >> buttons in the perpages, so that the user can navigate to previous respectively next page like it is in ThumbList? --MatthiasGünther October 06 , 2009, at 12:07 AM Yes, with a different link function like Again, thousands thanks for your fast support, you are a real wiki-god for me :), hope I will be in the future as fast as you, if some are going to ask for additional features. --MatthiasGünther October 07 , 2009, at 00:45 AM Displaying pictures attached to more than one pagePetko, If I want to list specific images for display, and I need or want to specify the group.page/filename.jpg for each one, the images do not display. Is this a problem with the code, or with my comprehension? Thanks! -- TeganDowling September 13, 2009, at 12:25 PM You can display many pictures attached to another page with Lightbox not working when Mini is used in SideBarI'm having trouble using Mini with Lightbox in the SideBar. I want to display one or two thumbs in the SideBar, but when putting them in, Lightbox stops working, although the thumb shows up and they have the I am not sure why this happens, I'll have to find some time to review it. In the meantime, you can add the following in Thanks for the quick reply, it does work now. I'm guessing this is injecting the lightbox css code at anytime. --JK? August 29, 2009, at 06:04 AM
The problem comes from the way PmWiki processes a skin template, see PITS:01139 for details. Yes, the command injects the Lightbox library in all pages. --Petko September 13, 2009, at 02:12 PM Return to the galleryWhen you click on a thumbnail, it opens the original image. Is there a function for clicking on the larger image to return to the gallery? - Ian MacGregor? No, the readers have to use their browsers' Back button. However, the recipe can be used with Lightbox JavaScript, and it offers better usability. Try it with $Mini['EnableLightbox']=1; [1] --Petko July 13, 2008, at 12:24 AMLightbox sounds interesting and may be worth allowing javascript. I'll give Mini+Lightbox a try. - Ian MacGregor?
Links to galleries
IPTC captionsIt is an exelent application, but it would be even better for me if the iptc caption field could be used. With this I could easily comment my pictures in Picassa, IrfanView; upload them as a batch and find those comments displayed when looking at the pictures online. Damien September 27, 2008, at 04:18 PM See this recipe. --Petko September 27, 2008, at 05:33 PM
Random Thanks and StuffI have been looking for a solution like this for such a long time. Thank you for such a wonderful work! -- JLuk, October 27, 2008 Thanks for your kind words! --Petko November 23, 2008, at 07:35 PM
Lightbox is not working for me.I have tried everything but Lightbox seems not to work with my pmwiki (i have the latest version). Maybe there are some bugs in the latest version of 2 december? I spent 2 hours trying to figure out whats wrong but i can't find anything. Maybe there is something wrong with the javascript because i can't see it in the page source code of my website. Here is part of my configuration file: $Mini['EnableLightbox'] = 1; $Mini['LbUrl'] = " Here is the part from mini.php: 'EnableLightbox' => 1, 'Px' => 150,'Quality' => 90, 'CropXPos' => 0.5, 'CropYPos' => 0.5, 'LbMaxH'=> 800,'LbMaxW'=> 800, I followed the documentation and placed mini.php in the cookbook directory and the lb directory in my /pub directory. But Lightbox just doesn't work. -- miranon?, 3 december 2008 Hi. First, you should not edit the mini.php file. All settings could be done in config.php and they automatically override the internal variables. This is part of the PmWiki Philosophy #5 -- easier to upgrade to a newer version of Mini. (Set $Mini['Px']=150; in config.php.) Second, I feel the problem comes from your line $Mini['LbUrl'] = " where the $FarmPubDirUrl variable may not yet exist; just remove the line. Other possible issue may be that you defined LbMaxH and LbMaxW, but your original pictures are larger than 800 px. If this doesn't help, is there a page I could look at? --Petko December 02, 2008, at 06:23 PM
Lightbox is now working. Thanks!
Hi Petko, everything is working now. I figured out that the reason was my template for pmwiki, i forgot to include the -><!--HTMLHeader-->. Now i have fixed it and everything is working fine. Thanks for your help and tips! Greetings, -- miranon, 3 december 2008
Troubleshooting tips for LightboxIf Lightbox is not working usually the problems are:
(Tips from Petko on the mailing list on 2010-03-08.) xmps()What is this xmps() function on line 207 of mini.php? It seems non-existant neither in PmWiki, nor in PHP... Mini version 20090203.
It is a debug function that I use. Sorry, I forgot to clean it up. I just released a new, fixed version. Thanks. --Petko February 14, 2009, at 05:40 PM
Uppercase extensionsGreat extension, very useful and really easy to use. Sorry. Uppercase extensions,as well as filenames with spaces, are not supported, and will not be. It is written in the documentation. If the first markup works, it may be a bug and you shouldn't rely on it, as the bug will be fixed. (The only filenames that should be expected to work with Mini are those that can be displayed inline with Attach:picture.jpg.) --Petko February 21, 2009, at 08:02 AM
I am still using pmwiki-2.1.27 on a Windows Server (that I do not administrate) and their Attach:PicTure.JPG forks fine. But if You tel me that it may be a bug and is not supported any more in the newer pmwiki versions I should inform my user to principally not use any Uppercase extensions any more. The problem is that often cameras use Uppercase extensions for the filenames and we use ftp-upload for photo galleries so that I can not prevent this based on the pmwiki upload mechanism. Georges Schutz? February 21, 2009, at 08:55 AM Right, on Windows, filenames are case-insensitive, but on most servers they are not: pic.JPG and pic.jpg can be different files. PmWiki officially supports only lowercase extensions, and if you upload your files via the ?action=upload link, they are renamed to acceptable filenames (lowercase extensions). I am considering adding a variable that will automatically rename existing files with unsupported names, to correct ones. --Petko February 21, 2009, at 09:14 AM
Could be a solution. Is there a possibility to scan for filename conformity in all side-specific uploads (in all upload directories)? I sow that their is a recipe RecentUploadsLog that I could perhaps use to regularly check the uploads. But does this only show files uploaded by ?action=upload or all files in the multiple upload directories? Georges Schutz? February 21, 2009, at 11:32 AM As of version 20090321, Mini can autorename existing files to the right filenames, as if you uploaded them via the ?action=upload. --Petko March 21, 2009, at 06:17 PM
a.jpg to c.jpgI'm running an architecture website (zapgun.pt) using PmWiki engine with a lot of your recipes & tips (Maxi, Mini, UnToggle...). We are grateful towards your work around here (I'm just looking for a beautiful postcard to send ;) Hi. I'm not sure I completely understand what you try to achieve. In your example page, you can use I didn't make myself clear: what I was asking was about some line that produces images From X To Y (using the abc dictionary index). For instance, I have 01.jpg 02.jpg 03.jpg (...) 50.jpg uploaded but I only want to display in thumbnails images from 05.jpg to 15.jpg; It was very useful, also, if we could use different combination of From>To like: You can add a custom function which slices the Mini set. See Mini_Range. --Petko June 10, 2009, at 11:18 AM Thanks, obrigado, merci & Много благодаря. This recipe will be very helpful to me. I didn't had time to test it properly, so, I will write my opinion about Mini Range in a few days. Concerning the chapter "Title and text around the gallery" in Mini Cookbook: Is it possible to have different titles, texts or tooltips for each thumb/frame in the same gallery?
Concerning the Mini Range recipe: It would be nice to have a crossed features with the command lines available in the mother Mini.
Other thing that I had noticed (but I'm sure that this one is about my inability to deal properly with a correct installation) is that in the local folder with different Group.php instead of the main config.php I can't deal with the Mini Range because of this error:
Fatal error: Cannot redeclare umini_range() in /home/zapgun/public_html/wiki/local/Blog.php on line 20
Print out a page with Mini imagesIs it possible to have a "print view" for printing out all Mini images in one page? You can click on the "Print" action link somewhere in the page. Like here. --Petko November 19, 2009, at 03:50 PM Use tooltip titles for entire listHello - first, thanks for the great work. This is exactly precisely what I've been looking for. Now my question: I'd like to display a list of images in one lightbox gallery, and did this like: Mini:m1.jpg,m2.jpg,m3.jpg
Now, I'd like to additionally provide tooltip titles - to be displayed within the lightbox presentation. I tried Mini:m1.jpg"Description one",m2.jpg"Description two",m3.jpg"Description three"
but it doesn't work. Any ideas? I tried the above suggested: You can have Mini:1.jpg"Title 1" Mini:2.jpg"Title 2" Mini:3.jpg"Title 3"
but it results in the images not being displayed as a single gallery anymore (I'm using lightbox with parameter "2"). thank you again! Mike You are correct, this splits the gallery in a number of Mini sets. If you require both individual descriptions and prev-next slideshow, you have to use Lightbox mode 1. --Petko December 28, 2009, at 03:56 AM Mini and MakeUploadNamePatternsThe Pacific Bulb Society wiki has the first character of uploaded picture file names capitalised. When pmwiki 2.2.6 allowed modifications to uploaded file names, I added:
'/^./e'=>'strtoupper("$0")'
to After a while we noticed that when a page display required a thumbnail to be created, the thumbnail was created but did not display - subsequent page displays working correctly. I've decided that this is because after creating the thumbnail, mini displays it via HandleDownload(), that function applies the MakeUploadNamePatterns to the thumbnail name, we end up with Th00---. I have fixed things by adding another file name mapping: '/^Th00---/e'=>'"th00---"' I suspect if I was better at regex I could sort things out with one expression. The general point is that additions to MakeUploadNamePatterns either have to skip thumbnails or must have no effect on thumbnails, for example forcing extensions to lower case is OK because thumbnails already have lower case extensions. |