View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

PG Resizing Images Displayed in Template/Reducing the # of thumbs

Thread began 1/04/2010 1:09 pm by pnealis225525 | Last modified 1/19/2011 7:49 am by pnealis225525 | 7252 views | 35 replies

Jason ByrnesWebAssist

The widths that the full size images and thumbnails are created at are set in the admin/common/properties.php file.


There are two arrays created, one for proportional images (mostly used by the large images):

php:
$GLOBALS['resize_proportional'] = array(

    array('w' => 1024, 'h' => 768, 'watermark' => true),
    array('w' => 782, 'h' => 481, 'watermark' => true),
    array('w' => 163, 'h' => 92)
);




another for cropped images (mostly used by the thumbnails):

php:
$GLOBALS['resize_cropped'] = array(

    array('w' => 62, 'h' => 62),
    array('w' => 132, 'h' => 140),
    array('w' => 102, 'h' => 102),
    array('w' => 42, 'h' => 42),
    array('w' => 782, 'h' => 481)
);




when you process the images to upload them, they are crated at the sizes in both arrays.


So to add 680 x 420 images for both thumb and large image, you would need to modify both arrays:

php:
$GLOBALS['resize_proportional'] = array(

    array('w' => 1024, 'h' => 768, 'watermark' => true),
    array('w' => 782, 'h' => 481, 'watermark' => true),        
    array('w' => 163, 'h' => 92),
        array('w' => 680, 'h' => 420, 'watermark' => true)
);
$GLOBALS['resize_cropped'] = array(
    array('w' => 62, 'h' => 62),
    array('w' => 132, 'h' => 140),
    array('w' => 102, 'h' => 102),
    array('w' => 42, 'h' => 42),
    array('w' => 782, 'h' => 481),
        array('w' => 680, 'h' => 420)
);



Then, in the index.php file in the gallery directory you are using. On about line 14, there should be some code like this: &thumb=62c&full=782p.


"&thumb=62c" is telling it to use "array('w' => 62, 'h' => 62)," from the resize_cropped array for the thumbnail. "&full=782p" is telling it to use "array('w' => 782, 'h' => 481, 'watermark' => true)," from the resize_proportional array for the large images. to change that so the large image uses the 680 x 420 image we added:
&thumb=62c&full=680p.



the following how to has instructions for changing the number of images that are displayed in the ribbon:
powergallery_custom_gallery_ht.pdf

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...