[Baypiggies] Web site changes

Rich Morin rdm at cfcl.com
Sun Apr 9 20:22:24 CEST 2006

At 7:22 AM -0700 4/9/06, Aahz wrote:
> Heh.  I guess that's proof of how difficult it is to get
> "2nd Thurs" right: it should be April 13.

Maintaining the date information for upcoming meetings is
both a nuisance and a source of error (I've botched this
more than once, myself).  So, when I set up the web page
for BASS (http://www.cfcl.com/rdm/bass), I decided to get
rid of the problem, programmatically.

The page is generated, on the fly, by a set of PHP scripts.
The code examines the current date, then calculates the
date for the upcoming meeting.

While I was at it, I set up boilerplate files to contain
the introduction and venue information.  The result of all
this is a tiny file that I only need to edit when the venue
changes or some special text needs to be added:

% cat more index.php
  $name  =  $_SERVER[SCRIPT_NAME];
  $intro =  (ereg('indexX', $name)) ? '__introX' : '__intro';
  include $intro;

  dt(dse(4, 3), '8:00 pm');  # 4th Wednesday

  include '_Wild_Pepper';

BTW, the $intro magic allows me to play with the introductory
text (in introX) via introX.html, while keeping intro.html
functional.  If anyone wants more details, please contact me

We now return you to your regular programming...

http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     rdm at cfcl.com
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development

More information about the Baypiggies mailing list