Custom Intermediate and Thumb Images Custom Intermediate and Thumb Images
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Custom Intermediate and Thumb Images

Started by russell235, September 27, 2007, 04:54:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

russell235

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.

tristancol

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

Stramm

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
if ($mime_content_image['content'] != 'image' )
with
if ($mime_content_image['content'] != 'all_media' )

editpics.php
find
if($CONFIG['enable_custom_thumbs'] && !is_image($CURRENT_PIC['filename'])) {
replace with
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.


Stramm

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

russell235

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.