You can do it in about 90 lines of code if you use the UNL Templates PEAR package...
http://pear.unl.edu/index.php?package=UNL_Templates
Micah Walles also has built a UNL MediaWiki Skin... He is sending me what he has and I'll try and get something in the CVS server we can start working with --- the biggest issue is making sure the skin stays updated with the latest code... which means updated templatedependents... and ideally some easy way to package and update them (or just build it using the UNL Templates PEAR Package).

