• Resolved colinmcd3

    (@colinmcd3)


    Hi, I love your plugin and open-source approach! I just fired it up at the included link (plugin block is near the footer) and it’s looking/working great, except it shows 25 images no matter what number I choose. Changing column numbers seems to work fine, though. Any tips? FYI I had this plugin installed a few months ago then uninstalled, not sure if that makes a difference… and I’d also be interested in the CSS you mentioned to help with older browsers. Totally agree that they’re holding things back, but trying to accommodate folks the best I can! Many thanks for all of your work. -Colin

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter colinmcd3

    (@colinmcd3)

    Hello, just an update, I moved the Kona block I’ve been testing to this URL for now, still seeing same behavior as originally described:

    https://ww2.green-wood.com/kona-test/

    Thanks for looking into this!

    Hi there,

    I’ve figured out why this is happening by looking at the code repo for this plugin and the Instagram API reference. The short version is that the developer’s old way of specifying the number of images was set up to only request your chosen number from Instagram. But IG changed the API and now you can only retrieve them in batches of 25. The dev has not yet updated the code in the plugin to discard the excess images after they’re retrieved.

    I figured out a way to do it, but it requires editing the code inside this actual plugin, which means if you make this change, it’ll get erased next time the plugin is updated. (though hopefully the plugin devs will fix the bug in the meantime!). I haven’t done lots of testing, but I got it to work on one site. If you want to risk it:

    1. Find the file server.php inside the plugin’s src directory
    2. go to line 161. It should currently read foreach($thumbs as $thumb) {
    3. Delete the line and replace it with the following: foreach (array_slice($thumbs, 0, $numberImages) as $thumb) {
    4. Save the file and reload a page on your site that uses the block

    Once again, only do this if you’re comfortable editing files on your site. I’m not responsible for outages or data loss etc. etc. And remember, this edit will disappear if you update the plugin!

    Thread Starter colinmcd3

    (@colinmcd3)

    Thanks so much! I made that change and it worked. I’m going to keep testing and go from there, maybe see if the developer chimes in here about the solution and the browser compatibility CSS I mentioned in my initial post. I’ve also been noticing that this plugin gets flagged by GTMetrix, Pingdom etc for not serving scaled images, wondering if there’s an alternative solution for that.

    Plugin Author gubbigubbi

    (@gubbigubbi)

    Thank you @yonatron for your help! Bingo ill update the plugin today.

    Also thank you @colinmcd3 for noticing. Sometimes I cant believe this little thing I made is being used all around the world.

    v1.7 will fix this and merge @yonatron’s code.

    In terms of browser compat, @colinmcd3 if I was to release this as an addon, would it be something you would consider purchasing?

    Thread Starter colinmcd3

    (@colinmcd3)

    Glad to help @gubbigubbi and yes, our Brooklyn NY nonprofit is a big fan of your work! I’d definitely consider purchasing the add-on for browser compatibility, and even more so if it also addressed what I mentioned about the plugin getting flagged by GTMetrix, Pingdom etc for not serving scaled images. Just let me know if I can do anything else to help, and I’ll be following along…

    Plugin Author gubbigubbi

    (@gubbigubbi)

    @colinmcd3 – sounds good thank you for your help! Also thank you @yonatron.

    Ill let you know when I have a release ready ??

    I have a few things I need to do first such as our own API key method (not using a 3rd party).

    Glad I was able to help! It took me a while to figure out how to make myself a new Access Token now that ig has changed the Basic Display stuff so much. So I imagine you have your hands full trying to fix that. Will be on the lookout for updates!

    Plugin Author gubbigubbi

    (@gubbigubbi)

    Hey @yonatron could you please PM me on twitter, I would love your help. Im looking to develop a premium version of this plugin and you could be a partner?

    My twitter thingy is @RhysClay

    @gubbigubbi, I don’t mean to derail the thread, but I couldn’t DM you on Twitter so I sent a public reply. Don’t know if you saw it, but if you still want to talk, my handle is @yonatron on Twitter and on the Making WordPress slack.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Photo limit not working’ is closed to new replies.