New Section on Portfolio Website
Posted in Projects, Technology, The Internet on January 1st, 2010 by Paul Boocock – 4 CommentsWell, I hope you aren’t all too hungover today, luckily I’m not despite having a little tipple last night. Its finally time to share some of this news that I’ve promising to spill over the past few days.
I’ve started developing Android applications and my Android apps now have their very own section on my portfolio website. If you head over there now (www.paulboocock.net) and have a look in the Android section, you’ll be able to get a glimpse of my first project, a widget called Social Update.
I’ve also made some nice under the hood improvements to my site, including the navigation section. It now loads from an external php file which works out which link needs to be white depending on your current URL. Its my first attempt at php and I was really surprised at how easy it was, although I did only need a couple of simple if statements. I’ve also used a server side include (SSI) to load this navigation file so it should appear invisible to users, very nice indeed.
To load the external file, I simply used
<!–#include virtual=”menu.php” –>
at the location where I wanted my Navigation section on my page.
I also had to include a .htaccess file on my server so SSI’s worked.
.htaccessOptions +IncludesOptions +FollowSymLinksAddHandler server-parsed .htm .html
<?phpif (curPageName() == “index.htm”)echo “<li><a href=\”index.htm\” class=\”whiteLink\”>Home</a></li>”;elseecho “<li><a href=\”index.htm\” class=\”blackLink\”>Home</a></li>”;?>
<?phpfunction curPageName() {return substr($_SERVER["REQUEST_URI"],strrpos($_SERVER["REQUEST_URI"],”/”)+1);}?>


