Monday, February 1, 2010

Elgg Me On

This week was continuing work on Elgg. After my last blog, I got it to a state where it looked like the mockups provided to us at the beginning of the semester. It was also somewhat functional. Admins can create commitments and actions for the users to take and messages could be posted to each person's profile. I even put in a simple Javascript function to count down from 10 to 0 to simulate the real time use.

"Complete" profile view as of last week.

What has helped me get this far are the plugins that come with Elgg. It's not the functionality of these plugins. Rather, it's the source code for the plugins themselves. For example, I wasn't sure how to make sure only admins were allowed to create commitments and actions. I took a look at the source of the default widgets plugin, which allows admins to define what widgets are automatically added to a user's profile or dashboard. By looking at the default widgets initialization script, I figured out how to add links to create commitments and actions in the admin interface.

Admin interface for creating a new commitment

Of course, there's a good amount of fakery in "version 0.01 pre-alpha". The created commitments and actions automatically belong to the user who created them. While it looks good as a fake interface, that's not how the actual application is going to be. I had tried to avoid going deep into Elgg, but since I'm working on this again this week, I might just have to.

Even at this point, I'm still wrapping my head around how the data in Elgg is arranged. I wasn't sure how to create an object like a commitment and have multiple users be associated with it. While poking around the source code, I did stumble on a function that creates relationships between two Elgg objects. So I think I can put together some kind of interface for next time. Source code to the rescue!

The lack of detailed documentation is kind of a bummer, but having the source code helps a lot (the API can be useful too if you know what you're looking for). And from what I can tell, the community is fairly active. I haven't had to ask them any questions yet, but Philip did suggest that I ask a question to gauge their response time. Just haven't thought of a good question to ask yet.

So, in short, my tasks for this week and next are to implement the commitment/action workflows, create a widget for an arbitrary Google Gadget, implement the default index page, and remove some extraneous features that we probably don't need. And we'll see how it goes from there.

No comments:

Post a Comment