We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28150
    • 155 Posts
    Well, after pouring through oodles of Flickr API documentation (you wanna talk about how an API should be written? Get back to me after you have seen how awesome Flickr’s is), staring at the possibilities of wedging another CMS’s gallery plugin into MODx, attempting to bribe you all, and even contacting developers of similar plugins...

    I decided to write my own.

    It’s heavily based on phpFlickr, so PEAR is needed. Since privacy is not a concern for my need, I haven’t even begun looking into public v. private on Flickr. Finally, I still can’t make it public yet, since I am not caching anything locally, which is apparently a no-no.

    That being said, here are the huge benefits to my simple little script:

    - My code is only 78 lines long. That’s heavily commented and spaced out fairly well.

    - It will be very very VERY simple to convert into a MODx Snippet.

    - The codebase is independent of any one system. In other words, we can share it with the world.

    But before I do that, I need some help. First, I will need some beta testers. I’m asking in advance because this will be a pretty kickass addition to MODx, but I don’t want a support nightmare...I’m just not that good at PHP yet.

    Second, I need someone who is decent at being able to look for security holes. I don’t want to unleash this to the world and then realize I just gave everyone access to your computers.

    Finally, I need to figure out two minor things when running this code in MODx:

    1. If I am going to create a cache within the snippet, I need to tell ti where to dump images from the Flickr servers. Where should I tell it to dump, and how can I call that variable easily within a snippet?

    2. How can I declare the server path to the page the snippet is being run on, and how can I call the exact page the snippet is being run on? The script will call the same page three times (for album, thumbnails and large image) and I need to know how to tell it to come right back to where we are.

    That’s it! I hope to have this online soon, so I would love some feedback. My goal is to make it very simple to use, and very simple to implement. So far, all you need is to declare your Flickr Username and then you are done!

    Take a look at the rough cut here and let me know what you think:

    http://www.johnvilsack.com/flickr/gal.php

    Finally, my goal is to make some forward and back previews of images, as well as cull a bit more information from the servers. In true Web 2.0 fashion, I promise to release it with a very nice looking template (gradients and everything!) and I have even toyed with the possibility of throwing in some Asynch Javascript to limit the amount of page reloads.

    Hrmm...Asynch Javascript parsing XML data. That sounds like something someone should come up with a catchy name for smiley

    Thoughts and feedback are appreciated!

    - John
      • 32241
      • 1,495 Posts
      This is cool.
      Nice to know that you work your way out.

      Sorry we couldn’t help you, but I believe you already contribute to the community by releasing this code. Feel free to modify your first post and upload the script. We will help you beta test this system, just make a warning on your post about the current version of the script, so people won’t miss use it.

      Thanks
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 28150
        • 155 Posts
        Once I work out a few (read: cache) of the kinks, i intend on releasing it...even in a rough cut mode.

        I’m thinking I could dump into assets/files, right? Or should I dump into one of the cache folders?


        Quote from: Djamoer at Jan 30, 2006, 08:44 AM

        This is cool.
        Nice to know that you work your way out.

        Sorry we couldn’t help you, but I believe you already contribute to the community by releasing this code. Feel free to modify your first post and upload the script. We will help you beta test this system, just make a warning on your post about the current version of the script, so people won’t miss use it.

        Thanks
          • 25663 MODX Staff
          • 12,272 Posts
          Hmmm... that’s really a matter of semantics, really. I’d say it belongs either in the images directory inside a flickr_cache folder. wink

          John looks like you’re back in action! laugh

            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 28150
            • 155 Posts
            Quote from: rthrash at Jan 30, 2006, 04:14 PM

            Hmmm... that’s really a matter of semantics, really. I’d say it belongs either in the images directory inside a flickr_cache folder. wink

            John looks like you’re back in action! laugh



            Yeah! To say I have been busy would be an understatement!

            Good to be back though!
              • 25663 MODX Staff
              • 12,272 Posts
              Welcome back sir! laugh

              Agree with the cache location rec?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 28150
                • 155 Posts
                It certainly sounds like a plan.

                Any thoughts on the calling of the fileloc or webloc? Or should I just cull it from an existing snippet?
                  • 25663 MODX Staff
                  • 12,272 Posts
                  I’m a huge fan of re-use. wink
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 28150
                    • 155 Posts
                    UPDATE: I haven’t forgotten about you all. I have cracked the caching issue and am working on implementing an optional GD function to help resize the images since large images come from Flickr at 500px. This may pose an issue on some sites (such as the MODx standard design) so it felt like a necessity.

                    Any feature requests for a gallery should be put in right away. I’m hoping to finish this by Friday.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Nice work John! Would be very cool to build differnt galleries from different availble sets, or only sets tagged a certain way, or only images tagged a certain way.

                      BTW, have you checked out the latest nightly Flock builds... with Flickr, they absolutely rock. In a big way. They allow you to drag-and-drop images to transfer/upload them to Flickr!
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me