In preparation for the next Google dance I have gone and ported
Julien De Luca's freshy wordpress theme to serendipity. Freshy is one of the most popular themes for wordpress and it includes a whole host of options for users wanting to customize it. I decided to port it after a user requested it on the s9y forums. But I later realised that it wasn't as easy to port as I first thought. All those admin options make the theme really complicated and I haven't included some options so it is really a partial port. The following options are available to users of s9y 1.1 who use the ported theme:
- Change header image. You can choose from a number of images included with the theme.
- Customize the links in the navigation bar
- Change the highlight colour of the navigation bar
-
UPDATE: 30 Jan 2007 - You can now customize the label of the link in the top navigation bar that points to your blog front page i.e. the "home" link. This option allows you to specify a label in your own language to fit in with the rest of your blog.
-
UPDATE: 11 May 2007 - You can now also use a custom header image using the serendipity media manager. This feature was back ported from the beautiful day theme.
-
UPDATE: 1 April 2008 - Freshy now supports two sidebars. If you have plugins in both the left and the right sidebar freshy will expand to accommodate them.
-
UPDATE: 15 April 2008 - Fixed a bug that caused certain plugins to not display correctly with freshy in 2 sidebar mode.
-
UPDATE: 18 April 2008 - Improved security of the header image selection code.

I omitted the option to customize the colours of text, links etc. and the option to choose between predefined styles that are included with the original theme. I did however compress the header images so they take less time to load. You can
download freshy here.
Technical details and customization info for pre 1.1 s9y users follows.
Freshy customization by pre s9y 1.1 users
Most
customization can be done simply by editing the index.tpl file. I have
placed appropriate comments at the lines where you can enter your
customizations. You can change the header image by adding css code at
line 52:
<style type="text/css">
#title_image
{ldelim}
background-image:url("{serendipity_getFile file=images/headers/filename.jpg}") !important;
{rdelim}</style>
Replace
filename.jpg with your choice of header image.To change the links in
the nav bar you must add appropriate code at lines 81. A sample link is
included in index.tpl. Remember to retain the links with classes
"first_menu" and "last_menu". You may customize them but don't delete
them since that will break the layout.
Highlighting the current page link
One
of the requirements of porting this theme was the need to highlight or
differentiate the nav bar link pointing to the current page that the
user is viewing. This is important because it helps the user know which
page he is viewing when he is navigating a site. With help from Garvin at the s9y forums the problem was solved in this fashion. First the current page is exported as a smarty variable in config.inc.php:
$serendipity['smarty']->
assign(array('currpage'=>
"http://".
$_SERVER['HTTP_HOST'].
$_SERVER['REQUEST_URI']));
Then it is compared to the navigation links as set by the blogger:
<li class="{if $currpage==$navlink.href}current_{/if}page_item"><a href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>