We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10449
    • 956 Posts
    I was playing around with the Flickr API recently. I started out using simpleXML, but when I realized Flickr is offering now also serialized PHP response format, I abandoned XML altogether.

    Anyway... I finally made a snippet for myself. Very basic so far. It doesn’t allow using all of the API’s methods or parameters. Its aim is to just display a few pics either by tag-searching, by user-id, from a set or randomly. Nothing fancy.

    Here’s a demo-page with various snippet parameters: http://www.screenlab.ch/flickr-api-tests.html
    Code/Infos: http://www.screenlab.ch/assets/snippets/flickrX.phps

    I just named it flickrX and installed it with:
    include($modx->config[’base_path’]. ’assets/snippets/flickrX.php’);

    As already said... it’s far from perfect or complete, but maybe somebody else might find it useful.
      • 7231
      • 4,205 Posts
      This is great, I will definitely take a closer look at this api/snippet.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 8883
        • 59 Posts
        me too!!
        I already integrated the XML feeds (newest pics of a group).
        But thats all.
        I will watch
          • 8883
          • 59 Posts
          aehm...
          I tried to use method http://flickr.com/services/api/flickr.favorites.getList.html
          This method needs an authentication.
          But I failed...

          Can anyone help?
            • 10449
            • 956 Posts
              • 8883
              • 59 Posts
              Yes, but I dont have enough knowledge about php and API programming. That’s the problem.
                • 10449
                • 956 Posts
                I never actually used those methods that require special authentication. In any case, here’s the API docs:

                http://flickr.com/services/api/misc.userauth.html
                http://flickr.com/services/api/auth.howto.web.html

                Seems like a pain in the neck... basically a few extra requests to the Flickr server prior to using the flickr.favorites.getList method.
                It’s also necessary for doing actual manipulations of your own photos, such as adding tags, removing pics, change permissions etc.
                Security measures I reckon... though I don’t think viewing someone’s favorite pics should be considered "insecure" per se... maybe over-zealous lawyers believe it’s breaking some privacy laws or something smiley

                  • 436 ☆ A M B ☆
                  • 265 Posts
                  This thread is so old SMF has warned me to start a new topic!

                  but anyway, from searching around this seems to be the only good Flickr snippet for MODx - but for a particular project I’m working on being able to interface with a Flickr Group is key; is anybody familiar with the the Flickr API or good enough at PHP to implement this into flickrX?

                  Of if there’s a newer snippet i missed can anybody point me in the right direction? smiley
                    MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
                    • 10449
                    • 956 Posts
                    Well, I built something recently that takes tags from a TV, and generates Flickr thumbnails, decriptions, links etc. from one particular group only.

                    Can you describe what functionality you need exactly?
                      • 436 ☆ A M B ☆
                      • 265 Posts
                      Hey ganeshXL, thanks for getting back to me,

                      Can you describe what functionality you need exactly?
                      Yeah, basically I’ve been asked by a Flickr group Admin to build a site to help the community he’s build up move away from Flickr - I thought instead of transferring the users to something like WebLoginPE and getting them to signup and upload their photos, for now they could stick to Flickr for the data side of things.

                      The most basic functionality I’d say is needed would be to pull the group’s photos into MODx and be able to organize them by their user, date taken or by their tags.

                      I’m not sure what the extent of the Flickr API is, would it theoretically be possible to reconstruct most of Flickr’s functionality, like comments, tagging, adding photos, favorites etc in a custom designed MODx site; and then being able to add extra functionality and features through MODx?

                      The idea behind the group is that artists do a painting and leave it around cities for people to pick up and find for free and the whole process is documented with photos - Additionally the group’s Admin has asked about perhaps intergrading Google Maps (or perhaps the Flickr Maps, but I’ve hardly used them) so people who find these paintings can go onto the site and mark where they found it and where that panting has gone to now; its life’s journey if you like - he’s also asked about artist blogs, which would totally be possible with MODx - and being able to organize the photos by user I’d be able to build a nice artist portfolio on the site...
                        MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.