WebsiteBaker Community Forum

General Community => WebsiteBaker Website Showcase => Topic started by: Ruud on March 10, 2008, 05:33:10 PM

Title: Some of my sites
Post by: Ruud on March 10, 2008, 05:33:10 PM
Ok,

Time to show some of my work.

My own site:
www.allwww.nl (http://www.allwww.nl)

Some customers
www.golfbanenspanje.nl (http://www.golfbanenspanje.nl)
www.koppelwebwatch.nl (http://www.koppelwebwatch.nl)
www.unitautos.nl (http://www.unitautos.nl)
www.rietdijkauto.nl (http://www.rietdijkauto.nl)

Please be nice to me  :wink:

Ruud
Title: Re: Some of my sites
Post by: GRID8400 on March 10, 2008, 07:49:29 PM
looks okay..
was wondering what mod you used for  rietdijk auto / Voorraadlijst????
Is it a WB module???
Title: Re: Some of my sites
Post by: Ruud on March 11, 2008, 09:25:13 AM
was wondering what mod you used for  rietdijk auto / Voorraadlijst????
Is it a WB module???

Yes, it is a slightly modified version of the (not yet supported, but well working) catalog module.
https://forum.WebsiteBaker.org/index.php/topic,1463.0.html (https://forum.WebsiteBaker.org/index.php/topic,1463.0.html)

I changed the smarty templates a bit so that it would use the lightbox2 module javascript on the details page.
I also added a small resize routine (copy/change/paste from the lightbox2 mod), so my car delaers can upload their 5+ megapixel images directly.
I now have 3 sites running this, and the customers love it.

Ruud

Title: Re: Some of my sites
Post by: GRID8400 on March 11, 2008, 10:25:30 AM
COOL! tnx for the info..
Title: Re: Some of my sites
Post by: nibz on September 23, 2008, 10:14:49 PM
Small question, i want to use this module to, but i don't know how i can make a rezise tool, can you please explain?

Title: Re: Some of my sites
Post by: Ruud on September 23, 2008, 11:00:40 PM
It was a long time ago, but I think this was all...

In the file save_pic.php add the following code just before the line (77) that says:
Code: [Select]
//guardar el file en la base de datos
Code to add:
Code: [Select]
//Resizer
// Check if the original image is greater than the max_size
if (is_file($nuevo_sitio)) {
    $image_info = getimagesize($nuevo_sitio);
}
   
$max_width = 640;
//If the image is wider than the max size resize it
if ($image_info[0] > $max_width && $max_width > 0) {
    echo ( 'Resizing');
     // Instantiate the GD class.
    $new_image = new GD;
    // Set parent image path and thumbnail path.
    $new_image->setFile($nuevo_sitio);
    $new_image->setNewFile($nuevo_sitio);
    // Resize image.
    $new_image->getImageInfo();
    $new_image->calcSize_thumb($max_width);
    $new_image->createImage();
 }
// End Resizer

Good luck.

Ruud
Title: Re: Some of my sites
Post by: Stefek on September 24, 2008, 12:19:53 AM
It looks interesting, but I can't really follow you.
Which module do you use it in... and (more important) can this snippet be also used for another modules where I have the need to upload images (so they would be resized)?
And what happens with the original ones (5+ MegaPix)?

Best Regrards,
Stefek
Title: Re: Some of my sites
Post by: Ruud on September 24, 2008, 09:22:17 AM
Yes, you could use this (it might need a bit of modification for filename variables) anywhere.
I used it in the Catalogs module so my customer could upload pictures from his camera directly to the module.
The images were fixed on 640px width. (example (http://www.unitautos.nl/pages/occasions.php))

This simple method will overwrite the original image, so that one is lost.
The line: $new_image->setNewFile($nuevo_sitio); sets the output file. So a new filename would create a resized copy.

The size of the image you can upload and resize depends a bit on your host. It takes pretty much memory and time to resize large images. My dev server had problems with really big (8mpx) images, where my host server didn't have problems.

Ruud
Title: Re: Some of my sites
Post by: Stefek on September 24, 2008, 10:46:54 AM
Thank you Ruud.

I'll get back to this trick once I need it.
Very helpful modification.

Regards,
Stefek
Title: Re: Some of my sites
Post by: nibz on September 24, 2008, 11:00:17 PM
Many thanks!, It realy takes time to uplode the images, but it's a good addition to the module
Title: Re: Some of my sites
Post by: Ruud on September 24, 2008, 11:24:35 PM
Many thanks!, It realy takes time to uplode the images, but it's a good addition to the module

That is the penalty for a consistent image size.
My customer didn't know how to resize images, so this was the best solution. The only other solution was to install software and do a training session on image resizing. I liked this better.

Ruud