Under Construction

?
Creative Commons License photo credit: carboila
So as some people have noticed lately my blog’s theme has changed. This is simply due to the fact that since last summer when I coded the old theme I have learned a lot about usability, accessibility and just general good practices on the web. As such I couldn’t stand the old theme any longer (due to its violation of those practices) and had to change.

While the new theme does still break a whole bunch of rules when it comes to accessibility and usability, I will be fixing those as soon as I can. The theme is chosen for its style and how I identify with it more than anything else. One of the key fixes is going to be a nice (really complex to code) JavaScript navigation. However, due to the fact that school is in crunch mode and due to my impending trip to Mexico, I will not be able to fix things up as early as I would like.

So there it is, new theme with many changes and improvements still to come. Comments, suggestions and all that jazz are welcome (especially as I am still on the fence about some of my ideas).

New content

So I finally got around to adding the stuff that I had planned to include on this site months ago (even though I probably have less time to do it now than ever)! The sections that previously said unknown now include a sparkly new resume and a mathematically challenging contact form. About time.

TiddlyRésumé
Creative Commons License photo credit: psd

Swurl, get your act together!

I really, really want Swurl to be something useful. For those who do not know what Swurl is,  is a lifestreaming app that does a beautiful job of displaying all of your internet activity in one place. The timeline view of Swurl is facinating, it really does a great job of visually representing your online life in a pretty calendar. I find myself taking pictures and uploading them, just to make my Swurl look prettier. Not only does Swurl do a good job of displaying your life, but it also discovers your friends in other social networks and keeps a list of them for you to view their activity… zero work is needed on your part.

So what is the problem?

Swurl doesn’t give you a way to take things out of Swurl. Yes there is an RSS feed… but any lifestreaming app has that. What makes Swurl brilliant is not its ability  to aggregate your life… it is Swurl’s ability to make it visually stunning. Swurl provides no mechanism for taking that great visual feast and putting it in your own space. I guess their intension is for you to turn your Swurl into your primary web presence… but for those with established blogs (which is something that is highly likely for their primary audience of early adopters) the idea is laughable. 

I think that in order for Swurl to not get lost in the infinity that is the Internet it needs to provide a way for users to bring their beautful Swurl content into their own spaces, through embed code, or badges… or anything that works really.

Until that day comes though I guess I will have to be happy with links and being the only person who ever really sees my Swurl.

My Swurl: http://andremalan.swurl.com/timeline
swurl.JPG

WordPress as a CMS… Advanced Navigation

Wordpress
Creative Commons License photo credit: drustar

One of the things that is starting to happen at OLT is that we are creating an increasing number of WordPress based websites. Using WordPress as a content management system is not a new idea at all, there are a ton of examples out there of WordPress blogs out there that have been turned into sites. There is however, a dearth of information out there on how to do it (there are some out there… including some in amazing detail from Alan Levine).

One of the things that I couldn’t find was a stable way to create a second level navigation that stays constant for every top level section. The problem with most of the solutions on the forums and sites around is that as soon as you drill down to the third level of navigation the second level disappears. As you can see at aboriginal.ubc.ca I was able to come up with a way to keep the navigation constant. Here is the loop that I had to create:

<?php
$secondAncestor = count($post->ancestors) -1; //figure out what level of navigation we are on, subtract one because we don't want to consider the top-level
if($post->post_parent!=0) //if the page is not a top-level category
{
echo '<h2 class="widgettitle">In this section:</h2><li class="sidebarlist">';
//the following lists children of second level ancestor of the current page.
wp_list_pages("title_li=&child_of=".$post->ancestors[$secondAncestor]."&    sort_column=menu_order&echo=1");
echo '</li>';
}
else //if the page is a top-level category
{
//listing only the child pages of the current section
$children= wp_list_pages("title_li=&child_of=".$post->ID."&  sort_column=menu_order&echo=0");
if($children) //this will stop it from displaying a section heading if there are   no elements in the section (for example on the home page)
{
echo '<h2 class="widgettitle">In this section:</h2><li>';
echo $children;

echo '</li>';

}
}
?>


This is the first time I’ve blogged code, I’m not even sure if it is readable… but here’s hoping. Basically I figure out what level of navigation the user is on and then list the pages of the current page’s ancestor… that many levels up (subtracting one for the top level navigation.

I am currently doing a lot of work on using WordPress as a content management system including coming up with plugins and modifications for using WordPress MU as a multi-site manager used purely for websites and not for blogs. Will blog it all once everything is stable and working.

Zemanta Pixie