After stumbling upon Gravatar, a site serving your avatar globally, I looked for an easy way to add this functionality to Joomla!. After ditching Gravatar/Avatar for needing some other plugin to work in the first place, I installed gAvatar.
This plugin worked without dependencies and gAvatar is dead simple to set up. Just enable the plugin, change the rendering mode and you are done.
The only thing that can go wrong (and did for me) was the fact that you can choose for a floating avatar (which ended up floating in the text), a table avatar (using the default Joomla header style - which this site doesn't use) or advanced templating.
That last option seemed like a good solution except that nowhere was described what it did or how it worked. A quick dive in the source showed me everything I needed to know: gAvatar adds a 'avatar' parameter to the article object. To use it, find the classes generating the article layouts and modify those.
To find those class files, I used the following in the template folder:
fgrep "article->text" * -R
And add the following (for example) to insert the avatar:
<?php if (isset($this->article->avatar)) : ?> <div style="float: right"><?php echo $this->article->avatar; ?></div> <?php endif; ?>
After installing JoomGallery and writing a migration script to migrate from Menalto Gallery2 (G2) , I finally got to uploading photos. But for some mysterious reason, every attempt to upload images would fail.
The manual upload did not work (blank page), the FTP upload did not work (blank page), the batch upload did not work (blank page or session timeout sending me back to the login) and the Java upload did not work either:
wjhk.jupload2.exception.JUploadExceptionUploadFailed: wjhk.jupload2.policies.PictureUploadPolicy.checkUploadSuccess(): The string "JOOMGALLERYUPLOADSUCCESS" was not found in the response body
After posting that Bilbo worked out of the box, I was bound to run into a world of trouble - and so I did...
You see, when I was trying out KBlogger, I ran into the "Invalid request payload xmlrpc element STRING cannot be child of DATA" error you find in some KBlogger related posts. After playing around a little I realised that the error prevented me from posting anything and I ditched KBlogger as being buggy as hell (which it actually still is).
But when I installed Bilbo, I ran into the same problem! Only this time I knew that it should work as I posted before using Bilbo. After investigating a bit I found the culprit: KBlog. This backend library handles the communication with the server over the XML-RPC protocol. The error is produced on the server side and to be exact it is PHP XML-RPC that generates the error.
Because the XML-RPC library on the server is very strict (and probably error free), I turned to see what Bilbo actually sent to the server. The problem appears to be in the category structure that is generated. In my first posting, I did not select a category to post to. But when you select one or more categories, a QStringList object is populated with the category names. This is converted into XML somewhere in KDE (I haven't figured out where yet).
After talking to the Bilbo devs for a bit they pointed me to the Wordpress API in KBlog. For some reason, that one generates a string holding the XML for the server. And in that class, the metaWeblog.newPost function is called using a properly constructed category array.
Alas, switching to the Wordpress API did not help: "STRUCT cannot be child of PARAM" and whether I used categories or not, the error remained. A quick inspection showed where that error comes from: the 'struct' element should not be directly put inside a 'param' element. The XML-RPC specifications state that the 'struct' should be placed in a 'value' element first. After fixing this and recompiling Bilbo, everything is working now!
Well, not everything as the metaWeblog API is still broken. I have filed a bug report with KDE upstream so they can add my fixes to the Wordpress API and hopefully someone with more KDE programming experience can fix the metaWeblog API. Or rather, fix the conversion from a QStringList to proper XML-RPC compatible XML.
On a side note: while debugging the XML-RPC protocol I discovered that the Joomler XML-RPC plugin for Joomla! did not apply the categories that are sent along. I've modified my (already heavely patched) version of Joomler and once I've tested it a bit more, I'll send the patches to the Joomler devs. Hooray for open source I guess ^^.
The experimental ebuild for Gentoo worked like a charm: I am typing this on Bilbo. The editor seems to Just Work (tm), the previews are functioning (both rich text and the website preview) and the account creation worked out of the box.
The only thing that took some time to figure out is the fact that the auto-config option did not configure my site. In fact it started looking for a xmlrpc.php file to talk to, which results in a 404 as Joomla! does not have a file but rather a folder with that name. So after setting it to the correct location and switching to the metaWeblog API in the Advanced settings I hit 'Fetch blog ID' and voila, we are up and running.
Well, kind of: the plugin I use to provide the blog API on the site is incomplete. I have been tweaking it for months now, adding missing functions as I went. So when I wanted to select a category, I got an error stating that the XMLRPC function was not found.
After enabling the debug info on my server, I saw that Bilbo tried to access metaWeblog.getCategories - which is unimplemented in the original version of the plugin. So after adding the missing function, everything came to live and here we are...
Now if you excuse me, I have a virtual machine to dispose of as I can retire Windows Live Writer now ^^
While the development on KBlogger has somewhat picked up and some features have been pushed back to allow for a semi-working release, I just found a little gem hidden on the big wide web.
In a mailing list post on the development on KDE, someone is suggesting to take a look at Bilbo instead of KBlogger for the ‘extra-gear’ package. Of course, I was expecting a simple blog editor similar to all the other projects out there that never quite made it. Boy, was I in for a surprise!
Bilbo has the features I need in a blogging program (similar to the Windows Live Writer interface) and even better, it should be in working order!
I will report back once I get it to install on KDE 4.3 using Gentoo.