Moodle Flickr Integration
I stumbled across integrating flickr into Moodle by mistake. I was browsing flash photo gallerys and came across Tiiltviewer (http://www.simpleviewer.net/tiltviewer/) a 3D photo viewer which can automatically pull photos from a local folder or flickr photostream. Like a lightbulb I came up with the idea of integrating this into Moodle.
After researching and understanding the code of tiltviewer it was quite simple how it works, normally you would enter your flicker id, nope not your flickr username (eg 'sukhwant') but your flickr id ('81336486@N00') manually into the correct location of the file and then it would automatically put your flickr photos into the 3D flash viewer.
As this worked locally with me manually entering my flickr id, we needed an easier way for students to be able to do this. Moodle has the built in ability for admin to create user profile fields, so I created one called flickr id and this would ask users to enter their id in their Moodle profile.
Next we needed to get the users ID and enter it into the tiltviewer file, those of you who know a bit of PHP you will know that you have to do a query on the User_Profile_Info_data table and then echo the users results into the code of the correct location in the file.
I know there is a bit more jiggery pokery with the code but it is relatively simple.
The problem we has with this method is that students don't know their own flickr ID (I didn't even know I had one) and trying to explain this to students is a task of it's own, short of me changing every users flickr username to ID as they entered their username into Moodle.
So never the less I carried on researching into a better and easier way, I wanted users to be able to enter their username and even flickr ID (if possible!) if they were geeky enough to know it.
After looking at the flickr api and browsing my own photostream I noticed that flickr provides a slideshow of your photos, this is at a static URL ('http://www.flickr.com/photos/username/show/') In the URL flickr is happy to accept both the flickr id and username! awesome!
So to fix this, I scrapped the previous gallery and switched to flickr's own slideshow by simply linking users to the url - http://www.flickr.com/photos/username/show/ and echo their username or id into the required location.
Once users have entered their id, they would see a link on their Moodle profile page which opened up in an ajax window their photo gallery.
This worked a treat and we've been using it ever since, it's also very popular with our Photography and media departments.
This was my first integration into Moodle, we then proceeded on integrating Twitter, Xbox and stumbleupon in a similar fashion.