This is the WordPress posting screen. I hacked a plugin that adds an ‘Upload’ icon at the top-right. When clicked the button pops-up a window that lets you upload papers, presentations, or images
This has nothing to do with Sri Lanka though it is intended for Sri Lankan clients. WordPress is the blogging software I use for everything. It has an elegant plugin architecture which I don’t understand. It is written in the simple PHP programming language, which I don’t know. Hence this is the worst plugin ever and it may explode the sun or give you seizures or whatever. What this lets you do is upload images, PDFs, Word Docs, whatever as you’re writing a blog post. Actually, all it really does is make a button, those features are built in. The code is stupid and you still have to copy-and-paste the link into the post manually. I took Martin Chlupac’s elegant IImage-Browser plugin and changed a few lines so that it pops up the WordPress Upload page instead. There is no other functionality, if you’re using Firefox tabs intelligently you can do the same thing. The code is stupid and you still have to copy-and-paste the link into the post manually. Please note that I haven’t really tested this, it’s active at LIRNEasia and one unlaunched site. I guess I’ll see if they break it.
# Download the plugin (Upload File Plugin)
# Copy the plugin and the ‘images’ folder to your Plugins folder
# Activate the plugin from the WordPress admin page
A document icon should appear at the top right when you write a new post. If you don’t upload the ‘images’ folder it’ll just say ‘Upload’ in text. Click it and upload your file in the pop-up window. Copy and paste the code back into your post. It doesn’t matter if you understand the HTML, it’s just a link to the file you’ve uploaded.
# Stop sucking
# Make the image link work for people with their blog in a subfolder. Right now the image won’t be found if you have your site in a subdirectory (like kottu.org/blog/). It degrades to text, but I’m sure it’s simple to ask WordPress for the real address using PHP [ bloginfo(‘wpurl) ]. I’m just, how do you say, lazy.
I can’t believe it took me two days to try stupid ideas and then end up editing like 4 lines of code. If somebody wants to AJAX it and add a sexy dialog to the Post page I’d pay for it, GPL’d (free for everybody else). Say, 40$, and it has to spit the code up into the post automatically. I basically need professional people comfortable with email to be able to upload documents easily. This plugin works, but an AJAX solution would mean they never have to look away from the Post screen. Fast and elegant, unlike this ghetto solution.