Upload custom thumbnails for your pictures and files (videos, documents, audio files, etc.). It will display a new button under the file in the intermediate/displayimage.php view. Thumbnails will be automatically downsized.
Version 1.2 currently has English and German output.
french lang file attached
Thanks. Added to svn.
Upload of thumbs doesn't work ATM with installed SEF_URL plugin. So uninstall SEF plugin before uploading custom thumbs. Afterwards you may install it again.
Version 1.6 visually integrates to the new file menu (buttonlist).
hi everyone, i'm new here, just wondering what does it mean " It will display a new button under the file in the intermediate/displayimage.php view"?
do i just need to upolad the whole "custom thumb" folder to the plugin folder?
http://documentation.coppermine-gallery.net/en/plugins.htm
Hi! I would like to ask: is there any chance that you might support the creation of "normal_" thumbnail and keeping the original version of the uploaded image as well, alongside the "thumb_" that is currently created by your plugin?
It occurs to me that using this plugin in combination with Flash Media Player, FMP uses the thumbnail produced by Custom Thumbnail. But it's always way too small compared to player dimensions and when the image is enlarged by FMP the result is ugly to see. I presume this can be workarounded increasing the thumbnail size setting in the coppermine configuration, but then it would be awful to navigate through albums and categories.
Having thumb_ and normal_ it'd be possible to navigate through albums and categories diplaying the smallest thumbnail (which is right for that task) and to set the FMP to use the intermediate or full preview image to be displayed inside the player (which i think it'd be more eye-candy for that task).
Anyway, thanks for creating this =)
What you are asking is possible. But if you'd create normal_ files, you have to adjust the FMP plugin to use that file. That is not a straightforward solution.
Instead, open codebase.php, find
resize_image($thumb, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
and replace $CONFIG['thumb_width'] with your desired picture size.
Hi Andrè, thanks for your advice.
The resizing part is ok, now i can have uniform AND custom size for thumbnails customized with this plugin.
However, there's still a layout problem: for any size that is reasonable for a video-preview thumbnail (400-500px), although browsing through gallery pages is fine because actual thumbnails get downscaled with height and width arguments of <img> tag, the filmstrip in the displayimage.php page you can browse next and previous videos with is unusable, because it displays full-size thumbnails (as specified replacing $CONFIG['thumb_width']), and this leads to no more than one thumbnail displayed correctly instead of 5, which are displayed cut.
Any more advice?
Thanks anyway =)
Feel free to modify the plugin, so it creates regular thumbnails and a video thumbnail (e.g. prefix 'video_') at the same time (and adjust FMP to use the big file as preview).
Second possibility: adjust the film strip code to downscale thumbnails as well or disable the film strip.
demo or screenshot please
Your gallery is your demo. Respect board rules if you want supporters to look into your suggestions.
Quote from: olaechea on June 17, 2010, 10:31:20 PM
demo or screenshot please
Not sure what you expect, but here is a picture of the button ::)
Hi!
I've a probleme with the watermark on custom thumbnail for video.
When I Upload a custom thumb for a video I've the thumb but no watermark.
yet everything is ok in my main configuration.
Is it possible that the problem comes from this plugin?
Anyway, thanks for creating this§
As far as I can see, Coppermine doesn't watermark thumbnails, so why should the plugin does? Correct me if I'm wrong.
It's new in Coppermine 1.5
config > Displaying images > watermarking option (only in cpg1.5.x)
Not sure what you are talking about. config > Displaying images > watermarking option doesn't exist in cpg1.5.x.
At Configuration → Image watermarking → Which files to watermark you cannot select thumbnails, but pnly original, intermediate files or both. If you upload pictures to your gallery, there won't be a watermark on them. So where's the benefit of having watermarked custom thumbnails, but for pictures you'll have thumbnails without a watermark?
Quote from: cl9m on June 30, 2010, 09:03:51 AM
I've a probleme with the watermark on custom thumbnail for video.
When I Upload a custom thumb for a video I've the thumb but no watermark.
That's not a feature of this plugin nor is it a feature of Coppermine? Why would you want a watermark on a thumbnail? A watermark on intermediates or full-sized images makes sense, but it doesn't make sense on thumbnails. If you want your custom thumbs watermarked, watermark them on your client before you upload them. The entire discussion is beyond the scope of this plugin announcement thread though imo and should be lead elsewhere (if at all).
ok sorry, I am wrong.
If I want watermark on thumbnails it's just differing picture thumb and movie thumb
I used watermark for put a icon movie on other file as picture.
(sorry for my english) :-\
Quote from: cl9m on June 30, 2010, 03:13:00 PM
I used watermark for put a icon movie on other file as picture.
That's of course a feature request for this plugin.
If a user uploads a custom thumbnail for a movie we could add a film strip overlay to the thumb. I currently do this client-sided (before I upload that thumbnail). But we have to consider different video dimensions (4:3, 16:10, 16:9, etc.).
ok thanks for your answers.
I use Custom Thumbnail plugin as recommended with plugin Flash Media Player plugin with visual integration (play flv/mp4/mp3/aac files) (http://forum.coppermine-gallery.net/index.php/topic,62704.0.html), but when I view the video page /coppermine/displayimage.php, after the video (when an automatic start) is the thumbnail that appears in large format.
So the quality is really bad. Can not we create an intermediate image of better quality?
Thank's
Open codebase.php, find
resize_image($thumb, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
and replace with
$resize_method = $CONFIG['picture_use'] == "thumb" ? ($CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use']) : $CONFIG['picture_use'];
resize_image($thumb, $thumb, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method);
The image to replace the video in the page /coppermine/displayimage.php, at the end of the video
with this modification is of good quality now.
But unfortunately, now in the FilmStrip is a great image that appears, and is less well.
But perhaps this new problem is generated by other change Film strip - Overlap Thumbails (http://forum.coppermine-gallery.net/index.php/topic,68450.msg340187.html#msg340187)
In that case you'll have to do more things.
I assume you're using unmodified versions of the both plugins.
First you have to modify the Custom Thumbnail plugin to create a thumbnail and an intermediate-sized image. Then you have to modify the Flash Media Player plugin to use the intermediate-sized image as preview image for the video.
Please give me some time and I'll release new packages of both plugins. I don't know if I find some time this weekend, but I think I'll solve it this year ;)
Version 1.7 (attached to initial post) has a new option to create an additional intermediate-sized picture. It's now also compatible with the sef_url plugin.
Thank you, works perfectly with Flash Media Player plugin with a new option to create intermediate picture.
Αndré,
I love this mod - it works great.
This was discussed in another thread, but - it would be really cool if, in addition to being able to assign a custom thumbnail to a video or file, you could also do so to a category. e.g., I have a category for my Plymouth Gallery for the Sport Fury model, and categories underneath for individuals owning that model, with their albums under that. I'd like to show a stylized thumbnail for the category, as in the attachment.
Perhaps if I knew how difficult that might be, I wouldn't even post the suggestion! But I'm out of my depth in terms of doing it myself. Just thought I'd ask!
Thanks
Dan
Quote from: shortmort37 on December 30, 2010, 03:47:32 PM
I'd like to show a stylized thumbnail for the category, as in the attachment.
Oops! Sans attachment. I also neglected to add: I'd like for the thumbnail to not be constrainted to already be in any set underneath it. With that constraint, it must also exist within an album that is exposed to all users, and I'd prefer not to create an album with category icons only.
Thanks
Dan
shortmort37, that's not what this plugin was designed for. It's only a user-friendly interface for the already built-in mechanism of custom thumbnails. I don't know exactly what we discussed in the thread you mentioned, but I think what you tried to do isn't possible by default. Please start a new thread in the plugins board or in the feature requests board if you want to be able to do what you want to do in the future.
OK - done.
http://forum.coppermine-gallery.net/index.php/topic,69438.0.html
Thanks
Dan
Great plugin - exactly what I needed. Here's a quick question/problem. Do the dimensions of the new thumb have to stay the same as the dimensions of the old thumb? I just tried replacing a tall, rectangular thumb with a square thumb and the square thumb was squished horizontally to the dimensions of the old thumb's tall rectangle. Is this just unavoidable or am I doing something wrong? Thanks.
The thumbnail will always be resized to the values you specified in Coppermine's config. At least this is how the plugin should work by design.
"The thumbnail will always be resized to the values you specified in Coppermine's config. At least this is how the plugin should work by design."
Right, that's a given - let's say 120 on the longest side. What I'm wondering about is the proportions. As I look at the thumbs in my gallery I see squares (120x120), long rectangles (120xwhatever) and tall rectangles (whateverx120). I was trying to substitute a square (120x120) for a tall rectangle (70x120). When I uploaded a square thumb (120x120), it was squished into the proportions of the original thumb (70x120). If this is unavoidable... oh well, but I was hoping it was just a mistake I was making.
Thank you for your prompt reply.
Please post a link to your gallery, especially to a thumbnail which doesn't have the correct size after you updated it with the plugin.
Is there a way to prevent it from converting it to .jpg if I upload .png?
Quote from: Alu on April 18, 2011, 11:12:28 AM
Is there a way to prevent it from converting it to .jpg if I upload .png?
Open
codebase.php, find
if (!is_image($row['filename'])) {
$path_parts = pathinfo($row['filename']);
$row['filename'] = str_replace($row['filename'], basename($row['filename'], '.'.$path_parts['extension']).'.jpg', $row['filename']);
}
and replace with
if (!is_image($row['filename'])) {
$imginfo = cpg_getimagesize($fileupload['tmp_name']);
switch ($imginfo[2]) {
case '1': $extension = '.gif'; break;
case '3': $extension = '.png'; break;
default: $extension = '.jpg'; break;
}
$path_parts = pathinfo($row['filename']);
$row['filename'] = str_replace($row['filename'], basename($row['filename'], '.'.$path_parts['extension']).$extension, $row['filename']);
}
Note: it only works if you upload a custom thumbnail for non-images, as Coppermine assumes the same file type for images and their thumbnails. Additionally if you upload more than one custom thumbnail for the same file (with different extensions) more than one thumbnail for the same file may exists. In that case the standard routine of detecting custom thumbnails applies (GIF -> PNG -> JPG).
Plugin works great. Thank you. Of course I have a question though, what is the proper way to remove a custom thumbnail? I see how to change the custom thumbnail if desired by uploading a new image for it, but I can't figure out how to properly remove a custom thumbnail (and let it go back to the system thumbnail).
The "official" way is to delete the thumbnail file via FTP. I personally never needed that option, but I can of course add it to the plugin if you like. It might be tricky if there's a picture file with the same base name. In this case we either need to move the file to another location, where no file with the same base name exist. Alternatively we need to hide that option for such files. I added it to my to-do list.
Put it WAY down on your todo list. From a home PC, I run a small family-only website that includes CPG and can just delete the custom thumbnail in a file manager. In the rare cases when a member wants to remove a custom thumbnail, I will have them request me to delete it. I don't allow FTP into my home PC anymore because it was constantly being hammered by the script kiddies. BTW, 6 of the 7 plugins I use have been authored by you, Thank you.
Hi and sorry ...
But is there way to use this plugin for 1.6x or any similar plugin for 1.6x ?
I think you could have found it yourself ???
https://forum.coppermine-gallery.net/index.php/topic,79519.0.html
Hello, this plugin seems to not be working at all. Whenever i try to upload a thumbnail for muy .mov file (using the pluign) it just does nothing. I attached a photo of how it looks.