Nov 13 2007

We're getting near the end of the first round of blocktype work for Mahara now. Evonne's made some cool images for all the blocktypes, Penny has been furiously hacking away on allowing users to embed videos and music from their files section and I've been working on a search tab for the artefact chooser. All in all, quite a haul of improvements! Here's a rundown of the changes made recently.

Editing a view

This is a screenshot of editing a view. As you can see, there are quite a few more blocktypes available now, and thanks to Evonne we have some snazzy new images for the blocktypes. On the right is the RSS block and at the bottom left is the new profile information block [1].

As mentioned, a search tab has been added to the artefact chooser. The image blocktype is one that uses the new search tab, which looks like this when in use:

The search tab of the artefact chooser

This allows you to easily drill through your artefacts to find the one you want, rather than browsing them all.

Naturally, it works without javascript too. Currently, it has some problems in IE7 and Konqueror, but I hope to iron them out quickly.

We plan to release a second alpha of 0.9 this Friday, so soon you'll be able to have a play with it on dev.mahara.org. Alternatively, those people adventurous enough to be running off of trunk can play with it now, after re-installing as appropriate.

[1]Just to clear things up, or possibly confuse the issue some more - a block type is a type of block that can be placed - like image, video etc. They're in the top panel. When dragged on to a view, they make a block, or block instance. Each instance has its own configuration - for example, there is a video block type but the particular block instance you can see in the screenshot is for one particular Youtube video.

Like this post? Subscribe to my RSS feed and follow me on twitter to hear about new posts early.

Want to share this post?

Nov 3 2007

The hacky first - I've been hacking some more on my blogging "software" - if you can call it that - and now I can add, edit and delete blog posts from the command line/vim. There's also a one step deploy command as well. I fixed up the HTML4 validation problems and did some other cleanup too. Who knows, maybe one day it will be in a condition to release :P. At the moment though, it still stinks to high heaven of "big hack".

While working on it I've been sorta listening to The Rock, a radio station, which has been playing in the lounge for the last few hours. I have to say, it's been everything I thought it would be - repetitive, boring and mainstream. I've heard "Bleed It Out" by Linkin Park twice and some new song from the Foo Fighters three times over the time I've been listening in. There are little soundbites, like the one declaring Michael Jackson as the ugliest musician for 2007, repeating every now and then too, which quickly get boring. And of course, advertising. It's not a good sound.

Anyhow, in other, better sounding news, Mahara has a few more blocktypes now, in the blog and profile department. The blog blocktype still does its pagination through javascript, because there was already code to do that, but this can be fixed later. So once the resume related blocktypes are done I can go back to the template migration [1] that Penny started.

Also, we have a Summer of Code student working on Mahara - in particular, implementing forums for groups! That will be a real boost for the social networking side of things. If all goes well, the forums will be merged for 1.1 and there will be an API in place to implement more things for groups, such as wikis/polls/games etc.

[1]Script to migrate views in the old template format from 0.8 to the new view format in 0.9

Like this post? Subscribe to my RSS feed and follow me on twitter to hear about new posts early.

Want to share this post?

Oct 26 2007

While working on the image blocktype for the views interface in Mahara, I realised that the current support in Mahara for resizing images did not exactly work as advertised. Requesting a 300x300 version of an image artefact does not give you that, but rather an image where the largest dimension is 300. The image kept its aspect ratio, which was nice, but it seemed a little misleading to call a 300x250 image "300x300".

There were other problems too. Profile icons currently must be between 100x100 and 300x300, and are forcibly scaled to 100x100 [1]. I haven't heard any feedback but I'll bet that has annoyed someone at some point. I'll bet for certain that the size limitation did. So, I got sidetracked from what I was doing near the end of today to fix these issues, and now Accio [2] will have much better image resizing support. Here's a few examples of how things will be better.

The Profile Icons screen

The image above shows that the new size limit for images is between 16x16 and 1024x1024 pixels big. That's not precisely true - one side must be at least 16 pixels long and one side at most 1024 pixels long - but explaining this in a short sentence is quite hard and the limits are quite generous now anyway. The upper limits for width and height are configurable by the Mahara administrator through config.php.

The penguin image you can see is not square. Now, correctly, it is not forced to become square when being shown, and instead maintains its correct aspect ratio.

Configuring an image block in a view

The image above shows the configuration form for the image blocktype (including, as you can see, the ability to configure the title of the block). You can specify the width you wish the image to be. This can be left blank if wanted to have the image show at its original size, however generally you will want to set the width, especially for photos imported from digital cameras. The little thumbnails are 20x20 versions of the originals, which is why the penguin looks fat. I might change this later to generate properly scaled minature thumbnails.

A resized, yet scaled, image in a viwe

Finally, you can see a resized image. The image is 400 pixels wide, and its height has been scaled appropriately. (Note that the image has been scaled up, which has caused the slightly reduced quality).

I'm really excited about how this work is coming along. With the slow but steady addition of more block types, the interface is growing exponentially more useful. Penny, Donal and I were making views the other day for fun. I've duplicated mine and put it online [3] for all to see, but I thought that Donal's tribute to The Muppets was coolest.

You can play with all of this stuff too, by the way. Just head over to dev.mahara.org, register an account and start making your own views. It's a good way to check out what will be in Accio without having to install the alpha build yourself.

[1]Note that the profileicon handling script, thumb.php, is different from the image artefact viewing script, which accounts for the differences in behaviour, even if not in a satisfactory DRY manner.
[2]Accio is the codename for the Mahara 0.9 release - we're naming releases after Harry Potter spells. Unstable is always known as Cruciatus, by the way.
[3]This view has since changed to one with more information about the new views interface, previously it was a tribute to Dream Theater

Like this post? Subscribe to my RSS feed and follow me on twitter to hear about new posts early.

Want to share this post?