Awesome Flickr Gallery
[resolved] Custom Image size not functioning (20 posts)

  1. bretjg
    Posted 3 years ago #


    Thanks for the great plugin! I am running into an issue where custom sizes are not working. I have disabled all plugins and activated the default theme and neither have helped.

    Here is the URL: http://stage.pactimo.com/the-pactimo-story/the-pactimo-peloton/ where the flickr gallery is located.

    With debug set to true I get this error: Notice: Use of undefined constant SHORTCODE_PRIORITY - assumed 'SHORTCODE_PRIORITY' in /htdocs/stage/wp-content/plugins/awesome-flickr-gallery-plugin/index.php on line 125

    I am using 3.3.3.

    Any help would be appreciated!


  2. Ronak Gandhi
    Plugin Author

    Posted 3 years ago #

    Create a directory called "cache" inside the plugin directory and make sure the permissions for this cache directory is 777.

  3. bretjg
    Posted 3 years ago #

    Thanks, there are still issues I see:

    1. In the source code, the A tag is in the middle of the IMG tag:
    <img class="afg-img" src="http://stage.pactimo.com/wp-content/plugins/awesome-flickr-gallery-plugin/afg_img_rsz.php?src=http://farm9.static.flickr.com/8048/8138903607_416efc0d45_m.jpg&q=100&w=116&h=116" alt="2012 Boulder Cup CX • <a style=&quot;font-size:0.8em;&quot; href=&quot;http://www.flickr.com/photos/33527461@N03/8138903607/&quot; target=&quot;_blank&quot;>View on Flickr</a>">

    2. The image src produces an error when accessing it directly, .e.g http://stage.pactimo.com/wp-content/plugins/awesome-flickr-gallery-plugin/afg_img_rsz.php?src=http://farm9.static.flickr.com/8048/8138903607_416efc0d45_m.jpg&q=100&w=116&h=116 produces the error:

    A TimThumb error has occured

    The following error(s) occured:
    An error occured fetching image.

    Query String : src=http://farm9.static.flickr.com/8048/8138903607_416efc0d45_m.jpg&q=100&w=116&h=116
    TimThumb version : 2.8.5

  4. markpea
    Posted 3 years ago #

    "Create a directory called "cache" inside the plugin directory and make sure the permissions for this cache directory is 777. "

    There is a directory called cache inside awesome-flickr-gallery-plugin but it inherits it's permissions from when it was created and so may not be writable by the apache user (mine was not). I changed permissions with chmod 775 cache and that fixed the problem I was having (basically the message mkdir(): File exists appeared on every page). Would you add a note to the installation instructions suggesting to check that the cache directory is writable by the owner of the http process (ie www / nobody) -- so permissions may be 775 or 777?

  5. bretjg
    Posted 3 years ago #

    markpea - are you using custom image sizes?

  6. mja2009
    Posted 3 years ago #

    I've been having this problem with custom image sizes for a month or two now. Initially blamed the hosting provider as nothing had changed (as far as I knew) with my site.

    However, I've now tested it with three different hosting platforms (running both PHP5.3 and 5.2) with a clean WP 3.5 install on each and only AFG 3.3.3 plugin activated. Two out of the three hosts failed to show the custom sized thumbnails I'd specified.

    Read on RonakG's site a couple of threads where users had downgraded AFG to 3.2.4. I've now tried this and am happy to say all is now well with both of my websites and custom thumbnail sizes.

    I've made no changes to my hosts standard folder permissions (though haven't checked what they are either).

    I can only conclude that with 3.2.4 working nicely, 3.3.x seems to have custom thumbnail sizing issues with certain hosting provider setups.

    Hope that helps folks who are trying to get this to work.


  7. Ronak Gandhi
    Plugin Author

    Posted 3 years ago #

    Can you folks update to latest version 3.3.6 and let me know if it is working or not?

  8. jampafoo
    Posted 3 years ago #

    Oh WHY is TimThumb doing this to us!!!!! This latest script sucks!!!!!

    Also, my flicker gallery still does not show thumbnails with the custom size setting on version 3.3.6 either.

  9. Ronak Gandhi
    Plugin Author

    Posted 3 years ago #

    Make sure there is a cache directory inside AFG plugin directory and cache directory's permissions are set to 777.

  10. jampafoo
    Posted 3 years ago #

    Yes, I have the cache directory set to 777. Still isn't working.

  11. markpea
    Posted 3 years ago #

    I haven't fooled around with this recently but if my experience with other plugins using Flash to do things is anything to go by, the regular updates from Adobe have killed certain aspects of plugin functionality.
    I'm going to test this theory in a PC Lab that has an older version of Flash installed into Firefox. Will get back.

  12. skylacking
    Posted 3 years ago #

    I have 3.3.6 as well, but the thumbnails do not correctly show when selecting custom width.

    I guess where would we go to change the default size option? Since its already set to 75px (Square) How would I change the 75px, to say 150px?

  13. skylacking
    Posted 3 years ago #

    I changed lines in the index.php file that referenced the photo size as width=75, to width=150, however I did not see any change...

  14. skylacking
    Posted 3 years ago #

    Sorry, Not sure why this is marked as resolved...lol what is the solution?

  15. jampafoo
    Posted 3 years ago #

    Yeah... there is no solution yet.

  16. skylacking
    Posted 3 years ago #

    Oh, Ok I thought I missed it.

  17. fabbbyu
    Posted 3 years ago #

    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 = "http://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat'];
    }else if($size == 'large_square'){
    $url = "http://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_q" . "." . $photo['originalformat'];//this my custom size
    $url = "http://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 http://www.flickr.com/services/api/flickr.photos.getSizes.html.


  18. Ronak Gandhi
    Plugin Author

    Posted 3 years ago #

    I'll add the new sizes in next release.

  19. fabbbyu
    Posted 3 years ago #

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

  20. tdmac
    Posted 3 years ago #


    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 150x150. I entered 800 as my value, but am getting the 150x150 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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Awesome Flickr Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.