Well, finally the day has come for me to put the phpSmug source code onto a public repository.
I've just spent the morning converting my internal Mercurial repo to a Git repo and uploading to GitHub. I have also manually transferred all the bugs logged to GitHub and now the Current Issues page pulls in the bugs from the issues on GitHub.
So with phpSmug out on GitHub, please feel free to log issues on GitHub or fork the code and submit your changes via pull requests.
Only a single small change in phpSmug 3.4: phpSmug was neglecting to set the appropriate "hidden" upload header when uploading photos that should be marked as hidden. phpSmug 3.4 now resolves this and "hidden" uploads should now show up as hidden when they arrive on SmugMug.
This resolves ticket #12.
phpSmug 3.4 is now available from the download page.
Well, hot on the heels of phpSmug 3.2 comes phpSmug 3.3.
For a long time now, I've been working around what I thought was an undocumented change in the way the API was handling the boolean literal FALSE and empty strings. My workaround seemed to work well for boolean literals, but fell apart when an empty string value was passed to the API, like when unsetting an album's password, as Anthony Humes discovered and from which I created ticket #11.
Well, after a bit of digging I discovered the problem was NOT with the API, but rather the way PHP's implode() and http_build_query() functions handle associative arrays with empty values. implode() seems to completely ignore the empty value when imploding and http_build_query() converts the empty value to a 0. Neither of which were desired behaviours and both of which I didn't notice until now.
phpSmug was using both of these methods in different places to effectively come to the same result - concat the keys and values into a single string for the POST data and for calculating the signature.
I have now fixed this by implemented a different method of reliably concatting the keys and values for submission to the API endpoint and for the signature calculation. The result of this is now 0, an empty string and the boolean literal FALSE all equate to FALSE and works with the API. Empty string values are now also correctly handled so doing things like unsetting passwords will now work too.
phpSmug 3.3 is now available from the download page.
Ladies and gentlemen, phpSmug 3.2 is now available for you.
Once again, this is a minor release and features a few "behind the scenes" changes and fixes which do not change the functionality. phpSmug should now work properly with the 1.3.0 API endpoint. I've also added the ability to force all API communication, except for uploads, to occur over HTTPS if you use OAuth for authentication. SmugMug are encouraging people away from using basic login authentication in favour of OAuth (the 1.3.0 endpoint has no support for basic authentication) so accordingly, I have not implemented the "secure only" functionality for basic authentication. I may add it at a later date if there is the demand for it.
The changelog entry for phpSmug 3.2 is...
- Improved support for the 1.3.0 API endpoint (Ticket #10)
- Implemented the ability to force all API communication to occur securely over HTTPS. OAuth Only. (Ticket #9)
- phpSmug now uses the documented secure.smugmug.com API endpoints (Ticket #8)
- Updated OAuth example to use new Album URL and to remove its use of the deprecated session_unregister() PHP function.
phpSmug 3.2 is now available from the download page.
Time for another update of phpSmug. I've just made phpSmug 3.1 available.
This is only a minor update which features a few "behind the scenes" changes and fixes which do not change the functionality. The only thing that may appear to change functionality is the default API endpoint is now 1.2.2 instead of 1.2.0. All earlier endpoints are still available, but technically deprecated by SmugMug.
For the curious, the exact changes from the change log are:
- phpSmug now defaults to using the 1.2.2 API endpoint. All earlier endpoints are still available, but technically deprecated by SmugMug.
- Removed erroneous re-instantiation of processor when setting adapter.
- Corrected check for safe_dir OR open_basedir so fails over to socket connection correctly
- Improved connection settings
phpSmug 3.1 is now available from the download page.
Support SmugMug
Help SmugMug get onto StackExchange by clicking the image below, clicking "Commit" and then confirming your email address.
SmugMug Discount
2ZxFXMC19qOxU
Use the above code to get $5 off your 1st year at SmugMug.
Register here.
phpSmug Users
-
SmugMug Media Silo
The SmugMug Media Silo is a plugin for Habari that uses phpSmug to interact with SmugMug and present a "silo" for access to a users photos for easy insertion into posts.
If you're using phpSmug and wish to let the world know, drop me a line and I'll add a link and short description here
Found phpSmug useful? Feel free to buy me a beer or make a donation.