Since I get dozens of hits on various directories which I have tucked away, (Such as my toys directory, I’ve opted to open it up cleanly, rather than force-redirect people to my software page. There’s nothing wrong with being a /little/ snoopy, after all. ;)
Whilst playing around with my lister, I recalled the silly functionality of 4DOS’s “descript.ion” files.
These files have a rather plain format, which is:
”[filename] description”, such as:
descript.ion This file, silly!
I decided I’d make my little indexer support that – rather than just spew out filenames.
Here’s some fairly trivial PHP; feel free to modify to your needs. Note that it is fairly incomplete, and I do have some things hard coded. I started breaking it apart for display here, but realize this is more of a task for anyone else to modify for their needs. You’ll probably want to remove my inlaid spanning. header.inc and footer.inc are merely for show, you can use them for html wrapping purposes.
’; ////////////////////////////////// // // VARIABLES // ////////////////////////////////// // How far away (in hours) is the server from our locale? $localTimeOffset = ”-15”; // What’s the name of our locale? $localTimeZone = “PST”; // Initialize our variables // No, we don’t know what this file is. $fileDescription = “”; // Do we have a “descript.ion” formatted file? not by default. $haveDescFile = 0; function number_friendly_conversion ($my_number , $round = 1) { if ($my_number < 1024 ) { return ”$my_number”.’b’; } else if ($my_number < 1048576 ) { $return_value = round ($my_number /1024 , $round ); $return_value = ”$return_value”.’k’; } else if ($my_number < 1073741824 ) { $return_value = round ($my_number /1048576 , $round ); $return_value = ”$return_value”.’M’; } else { $return_value = round ($my_number /1073741824 , $round ); $return_value = ”$return_value”.’G’; } return $return_value; } if (file_exists(“header.inc”)) { include(“header.inc”); } else { echo “Begrudgingly created on ” . date(“d.m.Y \\a\\t H:i ”, (date(“U”) + ($localTimeOffset * 3600))) . ”$localTimeZone”; ?>