forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: russell235 on September 27, 2007, 04:54:17 am

Title: Custom Intermediate and Thumb Images
Post by: russell235 on September 27, 2007, 04:54:17 am
Is there a plugin or hack out there that allows easy addition of custom intermediate and thumbnail images from the user side?  I've tried searching and nothing yet.  It isn't convenient or wise to give ftp access to everyone, and the little tricks to replace the thumb aren't great, and still do nothing about the intermediate image.  Ideally a nice button under the image that lets the owner or admin replace the preview/thumb, but leave the original image.
Title: Re: Custom Intermediate and Thumb Images
Post by: tristancol on September 27, 2007, 10:09:59 pm
I would be really interested in this too. Could be a great addition as replacing them through ftp is not really an option for my users
Title: Re: Custom Intermediate and Thumb Images
Post by: Stramm on October 11, 2007, 02:43:11 pm
custom thumbs is possible with the modpack by default for all non image files (cause they do not have thumbs generated automatically but get the media icons applied). Only lil changes have to be made to be able to create custom thumbs for images as well

changeThumb.php:
replace
Code: [Select]
if ($mime_content_image['content'] != 'image' )with
Code: [Select]
if ($mime_content_image['content'] != 'all_media' )
editpics.php
find
Code: [Select]
if($CONFIG['enable_custom_thumbs'] && !is_image($CURRENT_PIC['filename'])) {replace with
Code: [Select]
if($CONFIG['enable_custom_thumbs']) {
that'll give you a good start. However some enhancements are needed. This mod lets you upload gif, jpg and png files (cause the media icons can be either of these formats). But the thumbs need to be in the format the original image is. Eg. your original is jpg, then the thumb needs to be jpg. If you upload a custom thumb as gif, then ... problem... thumb can't be found.

And some other lil things need to be done when using this for image custom thumbs. You'll see.

Title: Re: Custom Intermediate and Thumb Images
Post by: Stramm on October 13, 2007, 07:51:49 pm
Okies, I've coded something more advanced. It takes care about your 'thumb' problem. Replacing the intermediate images is still up to you.

http://forum.coppermine-gallery.net/index.php?topic=47538.msg227090#msg227090
Title: Re: Custom Intermediate and Thumb Images
Post by: russell235 on October 15, 2007, 05:23:00 pm
thank you very much for your help.  :)

I can't figure out why on zip files (and likely others) it displays the thumb as the intermediate image.  Other than that, I think I can get this to display custom intermediate images.