I've just put out the most significant update to phpFlickr ever. It may very well break your current app. I knew that just switching to the serialized php might introduce some differences, so I went ahead and cleaned up some mistakes I made back when I put out version 1.0. Be sure to thoroughly test any apps if you are replacing an old version of phpFlickr with this one. You can expect phpFlickr 2.x to be almost completely backwards compatible with everything that version 2.0.0 does.
Let me outline the major changes:
- Support for Flickr's new serialized PHP format. This means no more mucking about with slow error-ridden XML parsers to get the results. This also means that until 23 does the same thing, I'm suspending support for their API. Download the latest 1.x version of phpFlickr to use 23.
- Better faster caching. For high performance sites, I was doing some things that were pretty dumb when it came to database caching. Now there is a class property that defines the maximum number of cached results it will allow before it runs the cleanup. This way, it'll only trigger cleanup every once in a while. The default is 1000, change this if you need it larger or smaller than this (1000 should be more than enough for most personal sites).
- Better error handling. In this new version, the $die_on_error is set to false by default. Every method will return a boolean false value if the API returns an error and you can access the error code and message using the getErrorCode() and getErrorMsg() methods. In methods that alter data (e.g. photos_delete) will return a boolean true if there is no error state. Of course, you can always turn the die_on_error flag if you want.
Get it while it's hot!
Thanks for the update, it's much appreciated!
I'm really surprised you made this release so quickly. Great job, and thanks as always!
-Chasen
Hey, I just hope I didn't screw up and miss tons of bugs!
Awesome! Looking forward to trying it out in a few projects.
Thanks once again – will implement comment fetching using this new version and see if there are any gotchas – I expect none
Correct me if I'm wrong, but when updating from vs > 1.3.1 it works probably best if you keep your 'old' auth.php, because:
a) the file didn't change
b) in it are all the Flickr settings like the api-key etc.and you will need these to let your sites work without problems (as I found out…)
Ttanks for all your work!
Nice, I updated TagBrowsr this weekend, there were very few changes I needed to make. Thanks for making the update available.
The only flaw I've found so far is on the photosets_getPhotos() function it's missing the per_page and page arguments. This has been a blessing so far though!!
Thanks so much for writing this.
Great piece of software, but I am having problems. I notice you don't have tags.getListUserRaw implemented, so I have added it in based on what I've seen in the code, however I cannot test it as I cannot figure out how to use authentication because both your documentation and forum links yield pages with errors on them.