|
Tuesday, February 8
Minor tweaks
Yes, I am a whore for Google now. I know I once promised that long ago that this site would be ad free. That was before I drank the Google kool-aid. It is damn fine kool-aid, I must say. I'm quite happy with AdSense on our Talk About USA forum, so I figure it wouldn't hurt to try it out here. We will see. And the more observant may have noticed I changed my search-widget thingy on the side from Atomz to PicoSearch. PicoSearch is a bit smarter about ways to handle multiple search words (it let's you tell it what to do) and also PicoSearch let's me give it some guidance on where to search (I only let it search the archives, never the index, thus preventing returing duplicate results). The only drawback is having to tell Picosearch to reindex manually, which I seem to remember about every third post or so. Though I really should get cracking and migrate over to WordPress... Update Ok, that kool-aid is really good. I've dropped PicoSearch for the completely automatic Google SiteSearch tool. 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); ?> |