"Reading", "causes" => "Peacenik greenie liberal", "chuckles" => "Knee-slappin'", "garden" => "Gardening", "kids" => "Kiddie", "movies" => "Movie", "time" => "Entropy", ); $cattags = array( // These go in a TopMenu at the beginning of Content "" => "Weekly rat especial", // Default "art" => "I don't know what I like but I know about art", "austin" => "Keep Austin Blogging", "books" => "Inside of a dog it's too dark to read", "causes" => "Just 'cause", "chuckles" => "Heh", "garden" => "The best thing to see in a garden is your shadow", "kids" => "Darling daughters, whirly girlies, maari dikri, mis escuincles", "language" => "Language: a dialect with an army", "movies" => "The smell of the crowd", "music" => "It don't mean a thing", "time" => "You're older than you ever were and now you're even older", "toys" => "Things to want and buy", "travel" => "Itchy gringo", ); // DETERMINE CONTEXT: // Are we at in a particular category (AKA view) or at the top level? $uri = getenv('REQUEST_URI'); if (preg_match("/^\/($catpat)/", $uri, $match)) { // We're in a category $category = $match[1]; $uccat = ucfirst($category); // Don't know why, but when HostingMatters turned on PHPsuexec, // URL arguments like $item became undefined. :-( Fix that. if ( ! defined ("item") ) { $item = $_REQUEST["item"]; } // For consistency, operate in the root directory regardless chdir('..'); } if ( ! defined ("pagenum") ) { $pagenum = $_REQUEST["pagenum"]; } // More initialization (this required us to chdir to root if nec'y) require "blogstuff.php"; // If this is an individual entry, snarf it in its entirety and // extract item title (e.g., "Hello Kitty guitar" or "Uma on boys"). if ($category && $item) { $itemerr = ''; $itemtitle = ""; if (file_exists("$category/$item.ssi")) { if ($fh = fopen("$category/$item.ssi", 'r')) { $itembody = join(file("$category/$item.ssi"), ""); if ($itembody) { // We key on '

' or or preg_match('/<(h2 class=\"blogtitle\"|strong|b)>([^<]*)<\/(h2|strong|b)>/i', $itembody, $matches); $itemtitle = $matches[2]; if (! $itemtitle) { $itemerr = "No title."; } fclose($fh); } else { $itemerr = "Couldn't read: $php_errormsg"; } } else { $itemerr = "Couldn't open: $php_errormsg"; } } else { $itemerr = "File not found."; } } // Compose title for header. if ($itemtitle) { $title = "Prentiss Riddle: $uccat: $itemtitle"; } elseif ($index == "date") { $title = "Prentiss Riddle: aprendiz de todo: archive by date"; } elseif ($index == "title") { $title = "Prentiss Riddle: aprendiz de todo: archive by title"; } else { if ($category) { $title = "Prentiss Riddle: $uccat"; } else { $title = "Prentiss Riddle: aprendiz de todo, maestro de nada"; } if ($pagenum > 1) { $title = $title . ": page $pagenum"; } } // Compose text and tagline for banner. if ($category) { $bannertext = "Prentiss Riddle: $uccat"; $tagline = "aprendiz de todo, maestro de nada"; } else { $bannertext = "aprendiz de todo, maestro de nada"; $tagline = "You are in a maze of twisty little weblogs all alike."; } // Hallelujah -- finally we can start pumping HTML... ?> <? echo $title; ?> // @import "weblog-legacy.css'; // ?> \n"; } else { echo "\n"; } ?> \n"; echo "\n"; } ?>
\n"; if ($index == "title") { # Archives are generated statically -- just include them include "titles.ssi"; } elseif ($index == "date") { # Archives are generated statically -- just include them include "dates.ssi"; } elseif ($item) { if (empty($itemerr)) { echo "
\n"; echo $itembody; $ddate = dotdate($item); echo "\n"; // Try to match newsid. Examples: // $newsid = ''; // $newsid = '43RL8.75290$4i.7961081@bin2.nnrp.aus1.giganews.com'; preg_match('/\$newsid\s*=\s*[\'"](.*?)[\'"]\s*;/', $itembody, $matches); if ($newsid = $matches[1]) { newslink($matches[1]); } echo "
\n"; $commentID = "$category$item"; include "comments.php"; } else { echo "Sorry, couldn't show you $category/$item.
$itemerr\n"; } } else { # When $category is null, this defaults to top-page view showitems($category, $pagenum, $perpage); } ?>
"; if ($catadj[$category]) { # Override the name of the category with a better # adjective (e.g., "Reading links" not "Books links") print "$catadj[$category] links"; } else { print "$uccat links"; } print "

\n"; include "$category/links.ssi"; print " \n"; } if (file_exists("$category/sidebar-bottom.php")) { include "$category/sidebar-bottom.php"; } } else { # sidebar content for main page divbox(); ?>

Blast from the past

Twitter

My other blog: IAlog