So here you go. prevnext.py goes around your blogger directory and makes little .prevnext files for every php file it finds that there is a previous or next one for. It' a little complicated by the fact you might post more than one post a day. It also makes a calendar in your archives directory called index.html that you can use CSS to style how you want it displayed.
Here is the css I use.
.code {
overflow:auto; white-space: pre;
}
.prev {
float: left;
}
.next {
float: right;
}
.prevnext {
clear: both;
}
.archive_calendar {}
.archive_calendar_start {}
.archive_calendar_year {
color: #B8A80D;
display: block;
}
.archive_calendar_month {
padding-left: 3px;
}
.archive_calendar_end {
display: block;
margin:0px 0px 14px 0px;
}
.archive_calendar_half_year {
display: block;
}
Here is how I include the .prevnext files in my templates
$pn = str_replace('.php', '.prevnext', $_SERVER['SCRIPT_FILENAME']);
if (strpos( $_SERVER['SCRIPT_FILENAME'], 'index.php') === False &&
file_exists($pn)) {
include($pn);
}
}
and I run this from my crontab
1-59/5 * * * * cd /home/blogger/scripts; $HOME/bin/share/prevnext.py -b /scripts
works o.k. every time I try and play with templates and whatnot, I always feel like redoing the whole thing, but then decide it's a huge waste of time, I should concentrate on getting the info out there rather than prettying it up for the 3 people who might actually read this blog, and most of them read it in an rss reader anyway!