The new version of WordPress as you might already know features a fancy new file uploader. It actually uses a hidden Flash movie to allow you to choose multiple files at once for uploading and displays a progress of uploading.
The thing is — it doesn’t really work.
There are numerous reports of people for whom the new uploader just hangs forever in a so called “Crunching” final state. I’ve tried it on two different computers with two different browsers and it didn’t work for me ANYWHERE. The files were actually uploaded on the server, but the uploader didn’t seem to understand that this actually happened.
I am mentioning this mostly because we’ve actually tried to use a Flash-based file uploader in Factory Nova more then a year ago. It is very tempting to finally be able to show the progress of a file upload in the browser without any server-based tricks (which get much more trickier if you are using PHP on the server).
But we’ve eventually got rid of it as not ready for real-life use. There were (and as WordPress experience shows — still are) two major problems with Flash-based uploading:
- The progress of uploading doesn’t show what’s really going on. Usually it quickly gets to 100% and then hangs there for a long time. As I understand this happens because as far as Flash is concerned it has already sent all the bytes of the file to the network (so it shows 100% completion), but it has no clue if all of the bytes actually arrived to the receiving party or not.
- We wanted (as WordPress also does) to communicate with the Flash-based uploader in the page in order to do some stuff when the upload was finished, but this seemed to be buggy as hell, sometimes this worked, sometimes not, this also depended on the machine where we tried, the browser, the exact Flash version — a complete nightmare.
Unfortunately, as the latest version of WordPress shows, Flash-based uploading is still not ready for production server/software use. Which is a pitty, it could have been a great addition to the Web experience.
While examining the most frequently used keywords on Google which were used to arrive to this blog (as reported by our own Stuffed Tracker, of course), Ivan has discovered that lots of them are related to porn for some reason. That was strange, since this blog has nothing to do with porn in any way, so we started investigating.
It turned out that WordPress which powers this blog had an unfortunate security hole in one of the previous versions which allowed anyone to modify already existing posts via XML-RPC interface. Our version was newer that the one that was affected, but apparently someone managed to use this exploit on our blog while we still used the older unprotected version of the blog software. So we had links to porn sites in a hidden layer on the front page in the latest 5-6 posts, they were indexed by Google and we got first places on some specific porn-related searches.
The amusing thing is that the people who modified the posts kept the original posts untouched (thank you very much!) and just added their hidden HTML in the end (yeah, I know they did it to stay unnoticed, but still that was good of them). Getting rid of this stuff was trivial of course.
And Stuffed Tracker saved the day!
BTW, we’ve launched a completely new stand-alone site for the new 3rd generation of Stuffed Tracker not long ago.
After using Flickr Tags plugin on this blog for a week I’ve decided that it slows down displaying of every post by too much. I still plan to include the photos from Flickr in the posts in the future, but I don’t think I’ll do it very often.
So I’ve created yet another WordPress-Flickr plugin. It is basically the same Flickr Tags (which is itself based on Flickr Post) but the behaviour is completely different. Instead of placing the photos from Flickr in the post when the post is displayed, the plugin now does the same when the post is published or updated. It also now retrieves thumbnails from Flickr and stores them on your own server, so later, when the post is displayed, thumbnails are taken directly from your server.
You can get Flickr Insert v0.2 here.
Installation instructions
- Unpack the zip, upload the contents to wp-content/plugins folder on your site.
- Make sure that “flickr-insert” folder is writable by web server (for example, by setting 0777 access rights for it). This is the folder where the thumbnails will be stored.
- Rename flickr-insert.conf.sample to flickr-insert.conf and edit it.
- Insert the contents of flickr-insert.css file in your theme’s css file (for example, wp-content/themes/default/styles.css).
- Activate the plugin in the WordPress control panel.
Usage
Upload photos that you want to use in the post to Flickr, use some unique tag that would let us identify them later (I’ll use “test” tag for this example). Inside your post put the following control text where you want the photos to be inserted (there should be no spaces between underscrore and “flickr” and “test” and underscrore):
_ flickr:test _
Then just save the post and check how it is displayed to the public.
Update October 3rd, 2005.
Just used the plugin myself first time after a long break and I can confirm that your properly tagged photos might not be found. But the problem is really in Flickr itself. It seems that a new tag and the information about newly tagged photos propagate through the Flickr system with some delay. After I waited for some time (maybe an hour) the photos which were not found at first by this plugin were finally fetched from Flickr.
Update March 16th, 2006.
I’ve just released a fixed version of the Flickr Insert plugin (version 0.2) with a small but vital change — thumbnails of the photos are now taken from the new static.flickr.com URL that Flickr is now using. You can get it from a link above or just click here.
While writing the previous post I’ve started experimenting with an excellent Flickr Post plugin by David McNicol which integrates photos from Flickr with WordPress posts in an automatic way.
However, I was not very comfortable with the idea of the plugin. Instead of its automatic behaviour I wanted to completely control where in the post the photos should be inserted, I also wanted to insert the photos using particular flickr tags. So I’ve created my own version of the Flickr Post plugin called Flickr Tags.
Now I can insert any tagged photos from Flickr in any place of any post in WordPress by simply inserting a line similar to this:
_ flickr:tagname _
All the magic is still done inside the functions borrowed from Flickr Post. And I am not sure whether my changes should better be integrated inside the David’s plugin or not. I’ve asked David about this and awaiting his reply.
Other imporovements:
- It is possible now to link to the photo page on Flickr (Flickr Post links to the photos directly, which is not desirable sometimes).
- It is possible to open all links in the new window.
- Small optimization: 10kb of core functions are not compiled if flickr tags are not found inside the post saving a fraction of CPU :)
There is a side effect of such a way of working with Flickr. If later you will add photos in Flickr to the tag that you’ve used inside one of the published posts, the photos will automatically appear inside that post. Not sure right now if this is good or bad, but at least this is interesting.
You can download Flickr Tags here.