close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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

Thread began 1/04/2010 10:09 am by pnealis225525 | Last modified 1/19/2011 4:49 am by neilo | 12147 views | 35 replies |

pnealis225525

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

I know this was asked before but after going over the thread I don't see where there was a complete resolution posted.

I am trying to resize both of the large images in ribbon_fullsize_lightbox template and reduce the number of thumbs displayed from 10 to 8. What files and lines of code need to be adjusted?

Could you please shed some light on this for me. Thank you.

Sign in to reply to this post

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

Sign in to reply to this post

pnealis225525

Thanks allot for the help, Jason. I will give this a whirl!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Lee Firth

It would be good if this solution was added to the "How To" section of the PowerGallery support and training.

Sign in to reply to this post

Jason ByrnesWebAssist

I will pass this along to our documetation team.

Please use the feed back form:
submit-idea.php

and select Documentation to submit ideas directly to the documentation team.

Sign in to reply to this post

pnealis225525

OK, Jason. Sorry this took so long to get back to you. Once you change the code per your instructions I assume you have to re-upload the images in orfer for them to be resized properly.

I would also like to find out where in the code can you eliminate some of the templates and replace one or say two with my own like the pan and zoom one I showed you some time ago.

main.html

Coupled with this I assume there is a way to create and store only the image sizes you use rather than all generated by the properties.php.

Thanks in advance, Jason.

Sign in to reply to this post

Justin Nemeth

You'll need to re-process the image yes. However, a quick way to do it is to update the image watermark. This will re-size all the images without you actually having to re-upload them all.

All the front end designs are in the galleries folder. If you remove a gallery from there, it won't show up in the admin. If you add a new one, it will show up in the admin. Each gallery has a unique admin/design.xml which controls the name and description that shows up in the admin. For each css style (i.e. dark, light), there is a dark.png and light.png that are the thumbnails in the admin.

The properties.php file contains all the sizes, so just like adding the lines of code will create the new sizes, removing the lines you don't want will not create those sizes. I would recommend keeping all the default sizes though since all the built in galleries and admin need all those sizes to work properly.

-justin

Sign in to reply to this post

pnealis225525

Thanks, Justin. That is very helpful!

Sign in to reply to this post

elevy388997Beta Tester

I know this is an old topic but I went to the index.php file to change the '&thumb=62c&full=782p' on line 14 to '&thumb=132c&full=782p' . This should change the thumbnail size to 132 x 140 as indicated by the admin/common/properties.php... correct? I also "updated" my watermark, and it is still 62 x 62.

specialevents.html

Sign in to reply to this post
loading

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...