PDA

View Full Version : Multiple size images from one uploaded


fredxeric
12-29-2007, 04:44 PM
I would like to understand something, Is there a way to when you upload an image you can have 2 set of 3 images uplaoded.
ex:
full_scale: 3008x2000 px, that what I need fullsize folder
pp_scale: 700x550 ok, images folder
thumbs_scale: 100x100 max ok thumbnails folder

ok lets start over, first I upload my original picture, full_scaled then during the process an pp_scale is made and also of course the thumbs_scale image.

I would like to create an other folder call Fullsize or large_images.

Is there a way to create this addons.... and if it's yes where I start my work?

Thanks.....

dakwegmo
12-29-2007, 05:31 PM
The AutoResize addon (http://www.pixelpost.org/extend/addons/auto-resize-addon/) does this. When you upload a full size image, you can have it save the full size image in your images directory along with the resized (PixelPost sized) image. The full sized image has the same name as the resized image with the prefix fullsize_. It's not a separate directory, but you should be able to modify the addon to suit your needs if you want them in a different directory.

fredxeric
12-29-2007, 05:32 PM
Ok I found my answer, I use the addon _autoresize but is there a way to add a tag like <FULL_SIZE_PICTURE_LINK>.


thanks

fredxeric
12-29-2007, 06:32 PM
ok I am trying to create an addon but something is missing

<?php
$addon_version = "1.0";
$addon_name = "image_fullsize_link";
$addon_description = 'Generate full size link';


$tpl = ereg_replace("<IMAGE_FULLSIZE>","<div style=\"width:100%; margin-top:10px; text-align:center;\" ><a style=\"color:#330000;\" href=\"images\fullsize_<IMAGE_NAME>\">Image fullsize link</a></div>",$tpl);
?>

but the link show
http://localhost/labroom/pixelpost_v1.7.0_RC1/images/fullsize_%3CIMAGE_NAME%3E

How do I set the image_name tag in the addon?

Thanks

fredxeric
12-29-2007, 07:00 PM
Ok it is working now


<?php
$addon_version = "1.0";
$addon_name = "image_fullsize_link";
$addon_description = 'Generate full size link';
$filename = $image_name;

$tpl = ereg_replace("<IMAGE_FULLSIZE>","<div style=\"width:100%; margin-top:10px; text-align:center;\" ><a style=\"color:#330000;\" href=\"images\fullsize_".$filename."\">Image fullsize link</a></div>",$tpl);
?>


Add this code to image_full_link.php into addon folder and then add <IMAGE_FULLSIZE>

to image_template

done...

GeoS
12-30-2007, 03:24 PM
Im moving this topic to Addons section.