We used
Smarty, and integrated alot of existing code (like Shadowbox Media Viewer, cafeRSS, phpBB and others). We choose this rather than writing everything on our own so we could focus on design and content, rather than recreating things that people have already coded more successfully.