Categories
Programming

Adding Gravatar to Joomla!

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; ?>
Categories
How-To's

Debugging upload problems on JoomGallery

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

Categories
General blog entries

Autoupdate for Joomla 1.5.x

One of the annoying things about Joomla sites it the fact you have to manually upload any update for the system. The result is painfully obvious: uncountable websites running unsafe installations because nobody feels the urge to upgrade (unless stuff goes wrong ofcourse).

It seems that Joomla 1.6 is getting auto-update support which means that updating a website is a mere press of a button. It looks like they wan’t to make it even fancies to allow plugins and components to check for updates to be sure that you are running the latest version of everything.

For those who can’t wait for fancy features like that by the end of 2009, you can get Advanced Tools for 1.5 now. This component has some cool tools but the real candy here is the Updater which auto-updates Joomla itself .

Note that you need to have write access to your entire Joomla site for this to work or you could use a small script to temporarily change ownership.

Categories
Japan Blog Study Tour

Posting offline

The problem with being handy with websites is the fact that you manage to find new stuff to do over and over again (especially when your are supposed to be working on other stuff ;-))