File Upload Working

Well, after having some terrible problems with the file upload tool on the new version of webpad, I finally have it working.

Turns out the main problem was that my cleanup script that removes temp files periodically from webpad’s directory was cleaning up the uploaded files before you had a chance to move them to their permanent location. Now that that’s under control, all’s well!

Trialling webpad Personal Edition 3.0

I am posting this from webpad Personal Edition 3.0, which I am trialling in raw beta mode on my server at the moment (minus blogging functionality until I decide what to do about that).

Development is progressing well, and at this stage, I hope to release at least an official beta within a few weeks, pending more rigorous file and security tests, as well as some browser compatibility tests.

webpad 3.0 Nearing Completion

Well, call me crazy, but I had some time off work, so I went ahead and worked on webpad Personal Edition 3.0. I got a lot done in the week or so that I was working on it, and it’s nearing a point that I will be happy with, barring one major hurdle: blog operations.

In version 3.0, I’ve decided to attempt to support 3 platforms for blogging, namely:

  1. blosxom (what I use)
  2. Blogger (what I used to use)
  3. MovableType (which I’ve never used)

This isn’t a problem in itself (apart from the complexity it adds to those operations :), but I don’t want to release anything for Blogger which is based on the current Blogger API, because they are planning on implementing the Atom API in the near future, which will be much better than what they’ve got now. In the meantime, blosxom is easy to support (filesystem-based, what could be better?) and I think MovableType is also going to be changing their API structure in the near future (as mentioned here).

I’m leaving all the blog operations until as late as possible in the development cycle for this version of webpad, but basically if the blog vendors don’t sort themselves out, I’ll just release this with blosxom support, and perhaps support for the existing APIs, then extend support and release a patch once Blogger and MT have implemented their new APIs.

This version also has some more advanced features like renaming and deleting files, creating new folders and XHTML compliance on all HTML that gets created directly by webpad. The interface has been updated as well to make it a little slicker, and hopefully load a little quicker (more reliance on CSS). The big news though, is that this version will be compatible with Mozilla browsers as well as IE (still working on some of the HTML tools for Mozilla though…). Coming along, coming along. Get on the mailing list at https://beaulebens.com/webpad/ if you’re not already, because I’ll be sending an email to that list with notification when webpad Personal Edition 3.0 is released.

blosxxxom – it’s not porn

In amongst all the talk of the Atom API (which might one day actually be released and usable) and RSS, and with me working on some XML/XSL things at work, I realised that there’s probably another option entirely with blosxom as far as templates/flavours/themes goes, and it goes a little something like this;

Three Xs, therefore blosxxxom, that’s one for blosxom (Apple’s OSX), one for XML and one for XSL, which are the three technologies we’re dealing with here.

  1. Install the theme plugin for blosxom and get it working (this plugin makes life much easier!)
  2. Now create a new theme, with a suitable name (mine’s called ‘blosxxxom’ for the sake of the experiment, and it looks like this; page.blosxxxom. This theme should create a valid XML document from your posts.
  3. Your XML output should refer to an XSL stylesheet, which will actually take care of doing the formatting, entirely client-side (style.xsl in my example theme file)
  4. In the XSL file, just use normal XSL processing instructions to handle the output and presentation of the XML document into XHTML!
  5. Point your browser to blosxom and tell it to use the flavour name that you used to create this theme, and you should be able to see what the output looks like. View the source of the document and you should see the plain XML produced by blosxom 🙂

Now, for a couple notes;

  • I made my content_type value in the theme text/xml, but this forced blosxom to encode special characters to be nice for me. I found that it was better to comment this section of the main CGI out so that I could drop the values in, and wrap them in the CDATA tag seen in the XML theme.
  • Rather than worry about what’s in the body much, I just wrapped things in a <![CDATA[ tag ]]> to be safe.
  • Mozilla doesn’t currently display my output properly – it’s not doing links (or any tags) properly, and it’s just showing them rather than interpreting them as HTML. Anyone got any ideas on this one?
  • There’s more to be done, but it’s a fun point to start at, and there’s no reason why you can’t add things like a COMMENTS element to your STORY node, or a KARMA, a META node with a series of elements – it’s pretty free-form if you’re only doing the XML for your own presentation needs!

Hope that’s inspired some people to try some things out that they might not have otherwise tried, and if nothing else, it just demonstrates how flexible blosxom really is! 🙂

Local WSDL

I’ve modified XooMLe slightly (Search, Spell and Cache) so that they use a local copy of the Google WSDL, rather than retrieving the remote one, because it speeds things up slightly (one less remote request).

Everything appears to be operating correctly on all operations still, so all’s well. I will also be releasing a downloadable version of XooMLe soon, so that you can host it on your own server and more thoroughly integrate it with your own search solutions.

XooMLe will be a free download when it becomes available (hopefully within a week). Sign up to the mailing list on the XooMLe Project Page to be the first to know when it’s available.

Blosxconfig: PHP Tool To Configure blosxom Plugins

The most common complaints/questions on the blosxom developer’s mailing list all relate to difficulties with plugins, so I have been trying to think of a way to make them a little easier to work with for people. What I came up with is blosxconfig, a single PHP script which works with very basic configuration files to determine what variables a user should have access to and what format they should be in. It will also confirm the existence and readability of the plugin files, and write the modified variables directly into the plugin files.

Download blosxconfig BETA version now!

Here’s the details that I posted to the blosxom list;

WARNING: Back up all you plugins before saving changes via blosxconfig!!!

configure.php is a PHP script (duh!) so you’ll need PHP on your server to run it. You can pass a path to it to look for a specific config file via either a GET or POST request (GET use ?conf=path-to-conf.conf on the querystring, POST use variable name ‘conf’ with a value of a path to a config file). if you don’t pass a value, then blosxconfig will look for a file called blosxom.conf in the same directory as it, or die trying 😉

The config files are very basic, and look a little bit like a Windows ini file, but it’s a custom style; The first line is similar to a unix ‘shebang’ line, and should look like this;

#@/path/to/plugins

where obviously the /path/to/plugins is the full path to where your plugins live – this should be the same as the $blosxom::plugin_dir variable configured in your blosxom cgi executable.

After that line, you have plugin sections which are defined using [plugin_name] – be careful that you use the *exact* name of the plugin, because the value is used for confirming the plugin’s existence 🙂

Under each plugin section, you define definable variables on a line each, in this format;

variable_name|type|default

variable_name is the actual name of the variable (as written in the script), without the ‘$’ or ‘@’ (in the case of arrays)

type can be one of ‘string’, ‘boolean’ or ‘code’. Arrays should be defined as ‘code’. Strings are enclosed automatically in quotes (“) and all types are followed by a semi colon when written to file. Booleans are presented to the user as a Yes/No select box (0/1 passed as values) and other types are presented as simple text input fields.

default is a value to use by default. make sure this makes sense (so for a boolean make sure it’s 0/1, for a string it’s a string etc). You don’t need to wrap it in quotes or anything, this is handled automatically.


Now, assuming you have a valid config file and blosxconfig can find it, it will load the file, and present you with an interface where you should be able to modify all the values that you spcified as being editable in the config file. *hopefully* blosxconfig will also tell you at this point if plugin files are available (file exists in plugin dir) and if they are not readable or writeable. when you have made you changes – click ‘save’ and the following will happen;

WARNING: Back up all you plugins before saving changes via blosxconfig!!!

  1. All plugin files which are referenced in your config file will be MODIFIED – they will technically be overwritten entirely, since the contents of the file are processed, then the lines that look like they define the variables in question are replaced with new lines, with the new values.
  2. The config file will be updated with the new details that you specified and written back to file.
  3. blosxconfig will load again, with all your new values in place, and messages telling you what happened.

Assuming all goes well, you’ve just used an external interface to reach into your plugin files and modify certain details. The hope is that authors of plugins (or community-minded participants) can supply the simple, 1 – 10 lines worth of config required to add to this configuration file, which can then be distributed with this little application to help people configure their plugins.

Please be aware that I have *NOT* tested this extensively at all, it was hacked together and seemed to work for a couple of plugins that I was running (the ones in the config file included) on a Windows test box, other than that I can’t make any promises. I’d LOVE if some people could try it out on some other plugins, on other systems, and let me know (directly if
you like) how it goes. I’ll fix any problems and then release it as public so that other people can use it.

Hope it’s useful for someone out there, and can perhaps eventually make life easier for some newbies (and pro’s alike 🙂

Oh yeah – did I mention; BACK UP YOUR PLUGINS BEFORE YOU TRY THIS!

On the suggestion of Andreas Banze, I’ve removed one small section which checked to make sure that the plugin files were executable, since as he pointed out, this is not necessary, they are just included in the main operation of the blosxom script, not executed individually.

Download blosxconfig BETA version now!

AvantBlog Authentication Work-around

I’ve posted details of an authentication problem work-around for AvantBlog. Basically the problem arises because AvantGo appears to expire sessions after about 24 hours whether you want them to or not (correct me if I’m wrong here anyone…)

To get around this, you can easily configure your AvantBlog channel to pass your username and password along with each request for the channel, as per these instructions;

  1. Go to https://my.avantgo.com/home/ and log in using your *AvantGo* details
  2. Click the “My Device” tab on the left
  3. Click your “AvantBlog” channel to modify its settings
  4. In the “Location” box, add the following onto the end of the address “?username=USER&password=PASS” (no quotes), where USER is replaced with your Blogger.com username, and PASS is replaced with your Blogger.com password.
  5. Save the details (“Save Channel”) and exit AvantGo’s website
  6. Synch your handheld again – you should find that you are now automatically logged into AvantBlog, and this should continue each time you synch, whether you post or not!

I’ll also post my warning that went with the mailing list email I sent out here;

Obviously, this method means that your channel is defined using your actual Blogger.com username and password, in plain text. These details are passed ‘over-the-wire’ in plain txt, so this is not particularly secure. The chances of someone exploiting this are minimal, however if your blog contains any sensitive information or is of a secure nature of any sort, I do not recommend that you configure AvantBlog using this method.

Enjoy!

XooMLe-Lite?

I’ve been playing around with the idea of creating a “lite” version of XooMLe, which would have less information passed back in the resulting XML, making it easier to work with for simple projects, and probably quite a bit quicker as well. The system would be based on the current one, but for the search, things would be cut down, so it might just be that I end up making a /search-lite/ method available via the normal XooMLe server.

If this happens, it will probably be a chance for me to clean up the code on the entire project, and then I might also release the code so that you can “install” your own XooMLe server 🙂 Information will be posted here if that’s the case, and I’ll also post to the XooMLe-News mailing list (sign up on the XooMLe Project Page).

Anyone else hanging out for an even simpler version of the XML results? I am thinking of having something like this;

{sample removed}

Comments? Suggestions? Please use the comments link below (to the right).

Dano = AvantBlog-friendly

Slight update on my post about AvantBlog working now – it appears that only blogs which have been converted to the new Dano system are working, if you are still running an older version, then you will need to upgrade before you can use AvantBlog apparently. If anyone finds out anything to the contrary to this, please let me know!