Over to Blighty!
So me and the family took the plane to the UK. We’re here primarly for the wedding of my wife’s sister. But it’s also nice to get around the see the rest of the family. Flew over on Virgin Atlantic (as usual!). Man.. that airline knows how to treat you as a customer. I’m very interested to see how the new Virgin America get on. I hope they do well.
Filed under Updates | Comment (0)zenphoto 1.0.0 beta released!
So the moment you’ve all been waiting for is here! We put out a new zenphoto release today. For the impatient, grab it here. For those who are interested, here’s the list of all the new features:
- Drag and drop sorting of the Gallery and Albums (and there was more rejoicing!)
- Album and Image deletion from the admin section (be careful!)
- Comment notification (so now you know what people are saying about you)
- Improvements to the Admin section
- And many behind the scenes architectural improvements.
You can check the full changelog here.
WARNING: Although we have made substantial progress in this release, this is still a beta.
Make sure that you take good backups of anything you can’t afford to lose when you upgrade.
Just in case..
Upgrading
First, make sure you back up your DB tables. Next, upload the new files over the top
of your existing installation. You will have to update your config.php file manually
with the new [admin_email] field and the new pathing at the bottom. Did we say back
up your DB tables? Finally, load http://hostname/zenphoto/zen/upgrade.php (or whatever
your path is) in your browser. Click on Go and watch the magic.
Known Issues
You may have to delete your admin cookie and log back into your site after the upgrade.
You may not. Let us know.
Requests
As usual, please post all issues to the Support forums. We also like to know when things
go right and how pleased people are
If you are keen to keep abreast of zenphoto changes
you can do so by following the zenphoto categories at Tristan’s and my blog.
Future Directions
We do listen to what everyone is saying. Really, we do. We try. So here are a few things that we know everyone would like: WP plugin(s), RSS feeds, easier installs, etc. We’ll get there. For now, enjoy!
Filed under Updates, Zenphoto | Comments (20)RSS Pulled
Bad news! We’re not going to include the RSS work I’ve been doing for zenphoto in the next release. I just didn’t think it was ready for primetime. It’s close, but the sticking point for me is that we don’t have a good value to put in the <pubDate> element for albums or images.
Sure, I can just stick in the current date, but that kinda defeats the object don’t you think? If all the RSS items just have the same date, how can you tell what’s changed? How can you do cool things like get a feed containing only the last 10 images added? Adding a “date added” field to both albums and images is a bit more than can be achieved in the next day or so (I do have a real job afterall!) so we’re pulling it for now.
Check the image to see what I mean. Pretty cool still though huh? Made possible because of Firefox, Sage and the plain_and_green_twocolumn style sheet.
I know there’s been a lot of clamouring for it in the Support Forums, so I might make it available from this site, until we’re ready to include it in a full ZP release.
Filed under Technology, Updates, Zenphoto | Comments (6)Credit where credit is due
I’ve been very remiss in the amount of energy I put into making this site somewhat decent. As I roam the web, I see so many really cool personal sites, and people doing awesome things in their blogs. I haven’t even changed the damn theme! Still, blue is my favorite colour so maybe there is no need
Anyway, I figured I’d better put a little effort in and installed a couple of excellent plugins:
- Brian’s Latest Comments: which gives me that nifty section at the top of the sidebar
- Brian’s Threaded Comments: which allows all comments posted to be threaded, and thus WAY easier to read.
These are really rather nifty, so thanks Brian!
Filed under Technology, Updates | Comment (0)RSS on the move
I dunno.. sometimes code just seems to pour out. I started working on RSS feeds for zenphoto. It’s still early days yet, but it’s coming along nicely. Check this one out for starters. Of course, I want to add more functionality for feeds of albums, images, comments, etc. But once again, the main plumbing is in place. Dunno if I’ll get it all done by our expected drop date, but I’ll sure try!!
Filed under Updates, Zenphoto | Comment (0)ZP Gallery updated
I think it’s always good to eat your own dogfood, especially when you’re writing open source software, so ahead of the upcoming ZP 1.0 beta release, I upgraded our family gallery to the current code base. No problems whatsoever! This was a good test since we were running 0.8, rather than 0.9. And man.. having sorting is very sweet!
Filed under Updates | Comment (0)Surf’s UP
I thought it was bigger than usual when I paddled out this morning. Then later
THE NATIONAL WEATHER SERVICE IN LOS ANGELES/OXNARD HAS ISSUED A HIGH
SURF ADVISORY…WHICH IS IN EFFECT FROM 4 AM TO 4 PM PST SATURDAY.A FRESH WEST SWELL WILL ARRIVE TONIGHT AND SURF WILL BUILD TO 6
TO 8 FEET…WITH OCCASIONAL 9 FEET ON EXPOSED WEST FACING SHORES
SATURDAY.ALL PERSONS SHOULD BE AWARE OF THE RISKS ASSOCIATED WITH WATER
RELATED ACTIVITIES DURING ABOVE NORMAL SURF EVENTS. USE EXTRA
CAUTION WHEN ENTERING THE OCEAN. WHEN IN DOUBT…JUST STAY OUT.
I guess I should check before I go out next time!
Filed under Updates | Comment (0)WP 2.0 initial thoughts
So I upgraded my dad’s site to WP 2.0 the other day. I used him as a guinea pig because a) he had no real posts to mention, and b) he was used to using Hello to upload pictures to his Blogger account, and didn’t like the fact that WP didn’t have something similar to offer. And WP 2.0 supposedly has this built into the add window now.
I saw supposedly, because when I tried it it’s perhaps the most broken bit of code I’ve come across in a while. Ok, you can upload images using the browse button, and you get a list of them below your edit window. But then what? Can you drag them into the post? No. Why not? Drag and drop is simple now! You can use the image button, or click on the image to be presented with some horrible popup box. That’s just broken! It’s not discoverable at all, I found it by accident. And what if I want to control the size of the thumbnail? SOL.
Let me be clear, there are some improvements in the Admin interface to WP 2.0, those guys have obviously been working hard, but my general overall impression was that this sentiment “Call it AJAX, call it DHTML, call it Larry” was taken too far. Horribly garish coloured status boxes that fade and change color just make me want to barf. Whoever did that was clearly under the influence of something illicit and got carried away for the sake of it, rather than trying to make the UI better for real reasons.
Filed under Rants, Technology, Updates | Comment (1)Comment notification in Zenphoto
Other than sorting, one of the things I found missing from ZP was some sort of notification of comments being posted to the gallery. With so many images it’s not as if you can come to one place to check back constantly. OK, the admin panel had the list of comments, but I don’t spend that much time administering my gallery, just uploading new albums.
So.. I added some rudimentary comment notification yesterday. Now when anyone make a comment, the admin user will get a nifty little email about it, with links to view or administrate the comments. I think this is another step towards full comment moderation, which is probably not that hard to complete. The db schema already supports the concept.
Expect to see it in the upcoming drop of ZP 1.0 beta. Tristan and I hope to release it next week.
Filed under Technology, Zenphoto | Comments (6)Using libcurl from C++
For a project I’ve been doing at work I’ve been building an RSS reader in C++. Yeah, I know, me .. C++ .. pigs are flying! Still, that miracle aside, the project has been pretty fun. To get a quick jump start, I began by using the PTypes networking classes to retrieve the RSS feeds. This worked out fine for simple cases but began to get complicated when dealing with server redirects, different HTTP versions, etc. So today I unplugged PTypes and replaced it with libcurl. I should have done this from the start. The easy interface to libcurl makes life.. well. really easy!. And a lot of the cruft I was adding to my code when using PTypes disappeared. This isn’t the fault of PTypes, though. While doing this exercise I wasn’t able to find a simple example of how to wrap libcurl from C++, so I’ve put together one below. I know I could have used cURLpp but I didn’t want to add the extra dependency since I was not really going to use the object bindings it offers to any great extent.
If you find this program useful, please consider a small donation:
/*
* This is a very simple example of how to use libcurl from within
* a C++ program. The basic idea is that you want to retrieve the
* contents of a web page as a string. Obviously, you can replace
* the buffer object with anything you want and adjust elsewhere
* accordingly.
*
* Hope you find it useful..
*
* Todd Papaioannou
*/
#include <string>
#include <iostream>
#include "curl/curl.h"
using namespace std;
// Write any errors in here
static char errorBuffer[CURL_ERROR_SIZE];
// Write all expected data in here
static string buffer;
// This is the writer call back function used by curl
static int writer(char *data, size_t size, size_t nmemb,
std::string *buffer)
{
// What we will return
int result = 0;
// Is there anything in the buffer?
if (buffer != NULL)
{
// Append the data to the buffer
buffer->append(data, size * nmemb);
// How much did we write?
result = size * nmemb;
}
return result;
}
// You know what this does..
void usage()
{
cout < < "curltest: \n" << endl;
cout << " Usage: curltest url\n" << endl;
}
/*
* The old favorite
*/
int main(int argc, char* argv[])
{
if (argc > 1)
{
string url(argv[1]);
cout < < "Retrieving " << url << endl;
// Our curl objects
CURL *curl;
CURLcode result;
// Create our curl handle
curl = curl_easy_init();
if (curl)
{
// Now set up all of the curl options
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
curl_easy_setopt(curl, CURLOPT_HEADER, 0);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
// Attempt to retrieve the remote page
result = curl_easy_perform(curl);
// Always cleanup
curl_easy_cleanup(curl);
// Did we succeed?
if (result == CURLE_OK)
{
cout << buffer << "\n";
exit(0);
}
else
{
cout << "Error: [" << result << "] - " << errorBuffer;
exit(-1);
}
}
}
}
Filed under C++, Technology, Updates | Comments (57)





