Viewing 4 replies - 16 through 19 (of 19 total)
  • Here my solution(but someone think its no to solution);

    I create a new default size in plugin, see this:
    in this file under plugin directory(afg_libs.php) modify this:

    $afg_photo_size_map = array(
    ‘default’ => ‘Default’,
    ‘_s’ => ‘Square (Max 75px)’,
    ‘_q’ => ‘Large square (150X150)’,//i will add this line
    ‘_t’ => ‘Thumbnail (Max 100px)’,
    ‘_m’ => ‘Small (Max 240px)’,
    ‘NULL’ => ‘Medium (Max 500px)’,
    ‘custom’ => ‘Custom’,
    );

    in this file under plugin directory(plugin/afgFilckr.php) modify this

    $sizes = array(
    “square” => “_s”,
    “large_square” => “_q”,//its my custom size created an after step
    “thumbnail” => “_t”,
    “small” => “_m”,
    “medium” => “”,
    “medium_640” => “_z”,
    “large” => “_b”,
    “original” => “_o”
    );

    and finily this, before this after step, in the same file

    if ($size == “original”) {
    $url = “https://farm” . $photo[‘farm’] . “.static.flickr.com/” . $photo[‘server’] . “/” . $photo[‘id’] . “_” . $photo[‘originalsecret’] . “_o” . “.” . $photo[‘originalformat’];
    }else if($size == ‘large_square’){
    $url = “https://farm” . $photo[‘farm’] . “.static.flickr.com/” . $photo[‘server’] . “/” . $photo[‘id’] . “_” . $photo[‘originalsecret’] . “_q” . “.” . $photo[‘originalformat’];//this my custom size
    }else{
    $url = “https://farm” . $photo[‘farm’] . “.static.flickr.com/” . $photo[‘server’] . “/” . $photo[‘id’] . “_” . $photo[‘secret’] . $sizes[$size] . “.jpg”;
    }
    return $url;

    to see al size is defined in flickr, acess https://www.flickr.com/services/api/flickr.photos.getSizes.html.

    Enjoy!

    Plugin Author Ronak Gandhi

    (@ronakg)

    I’ll add the new sizes in next release.

    \o/, i am interesting to help contribute if you like!

    fabbbyu,

    I like the vibe of where you were going with that resize. I’m not super savvy with code stuff. I implemented what you did above. I’m trying to adjust the size so that I have large images (Max 800) for my site controlled by AFG (Thanks, Ronak for your kick ass plugin!).

    Anyway, after inserting your code above, I got a difference, but that was a series of thumbnails are square at 150×150. I entered 800 as my value, but am getting the 150×150 result. I guess I can’t figure out where this value is coming from, if I entered 800? Is “_q” a dimensional value on it’s own?

    Anyway, surely I’m blinded by tiredness right now, but if you or anyone has ideas on how I can make my images bigger (800px) in my gallery, I’d super appreciate it!

    Thanks all! Great Plugin!
    tdmac

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Custom Image size not functioning’ is closed to new replies.