|
Thursday, February 15
New Blogger = No archives!
Instead I hacked together a script to make a better archive index which will update itself automagically. You can see it here at Nosuch and at Leo's blog. I know it's tag soup, blah blah blah, but it works. If people care, I can make the script available. And for you Nosuch affiliates, you have this problem too now. Either tweak your templates (Blogger has new ways to present the archives, but I didn't look), or drop me a line and I'll set you up with the same script. Labels: sitenews '; } else { if(stristr($filename,"archive")) { $dir=$_SERVER['DOCUMENT_ROOT']; $template='_01_archive.html'; $tail=strlen($template); $thisArchive=$filename; //$files=scandir($dir); $dh = opendir($dir); while (false !== ($filename = readdir($dh))) { $files[] = $filename; } sort($files); $earlyarch=""; $laterarch=""; $prevarch=""; $next=0; foreach($files as $file) { if (substr($file,-$tail)==$template) { if ($next==1) { $laterarch=$file; $earlyarch=$prevarch; $next=0; } if ($file==$thisArchive) { $next=1; } else { $prevarch=$file; $earlyarch=$prevarch; } } } $link=''; $divider=''; if(file_exists($earlyarch)) { $link='< Earlier Archive'; $divider=" | "; } if(file_exists($laterarch)) { $link=$link.$divider.'Later Archive >'; } $link=$link.' '; } } echo($link); ?> |