WordPress.org

Ready to get started?Download WordPress

Forums

kPicasa Gallery
Custom Picture List thumbnail size? (6 posts)

  1. uxdesign
    Member
    Posted 3 years ago #

    Can anyone please help me define a custom Picture List thumbnail size, other than 72 144 or 288?
    I'd changed the value from 288 to 200 in param.php and kpicasa_gallery.php for all instances, to no avail (still shows as 72 or 288). Suggestions, solutions?

  2. kag
    Member
    Plugin Author

    Posted 3 years ago #

    Those aren't random values, they match the dimensions of all the different thumbnails provided by Picasa.

  3. uxdesign
    Member
    Posted 3 years ago #

    Ah, I see... thanks!

    Awesome plugin!

  4. ae-photo
    Member
    Posted 3 years ago #

    Is there a way to make the thumbnails into nice squares instead of this mess? I have pictures of all sizes and forms in one album, it looks terrible. How can I use a script like timthumb to do this. Is there a possibility. Or are they locked from picasa?

    I love the simplicity of this plugin, but want to style the thumbs a bit.

    Thanks.

  5. ptriek
    Member
    Posted 2 years ago #

    I've been digging in the code a bit, and found a way to make the thumbnails into squares:

    kpg.class.php, line 216:
    change
    $url = 'http://picasaweb.google.com/data/feed/api/user/'.urlencode($this->username).'/album/'.urlencode($album).'?kind=photo';
    into

    $url = 'http://picasaweb.google.com/data/feed/api/user/'.urlencode($this->username).'/album/'.urlencode($album).'?kind=photo&thumbsize=144c';'

    (add &thumbsize=xxxc - the c stands for 'cropped'

    kpg.class.php, line 329-331:
    change

    $thumbURL = (string) $photo->media_group->media_thumbnail[1]['url'];
    $thumbW   = (string) $photo->media_group->media_thumbnail[1]['width'];
    $thumbH   = (string) $photo->media_group->media_thumbnail[1]['height'];

    into

    $thumbURL = (string) $photo->media_group->media_thumbnail[0]['url'];
    $thumbW   = (string) $photo->media_group->media_thumbnail[0]['width'];
    $thumbH   = (string) $photo->media_group->media_thumbnail[0]['height'];

    This solution is of course a bit messy - the thumbnail size is now hard-coded in the php file.
    But it works like a charm...

  6. ptriek
    Member
    Posted 2 years ago #

    ... oh and also change this line (somewhere around line 410) to:

    $fullURL = (string) $photo->media_group->media_content[0]['url'];

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic