Jon Haupt

I'm a wine librarian in Santa Rosa, California.

Projects

I'm working or have worked on a variety of wiki projects with PmWiki, including:

  • an internal library wiki
  • a personal wiki and blog
    • mostly for messing around
  • a wiki designed for giving presentations
    • commonly on wikis
  • making wikis look like "normal" web pages
  • various web creations for the Music Library Association

Stuff I have played with and/or use

Random useful tidbits

I was just trying to figure out how to display custom time of day messages with regard to blog posts (e.g. "It was late" instead of 11:47 PM). With Pm's help, here's what I came up with. Note this version would allow you to install this as a recipe and then set custom messages in config.php. I am thinking of including this bit of code in BlogSimple2.

  #settings you can change
  SDV($BlogTimeEarlyMorning, "Clearly not sleeping in");
  SDV($BlogTimeMorning, "Sometime after breakfast");
  SDV($BlogTimeNoon, "Around lunch time");
  SDV($BlogTimeAfternoon, "Afternoon");
  SDV($BlogTimeEvening, "Sometime after dinner");
  SDV($BlogTimeNight, "It was getting late");
  SDV($BlogTimeAfterMidnight, "It was getting REALLY late");
  SDV($BlogTimeTooEarly, "Too early");

  # time of day!
  $BlogPostHours = array(
    '00' => $BlogTimeAfterMidnight,
    '01' => $BlogTimeAfterMidnight,
    '02' => $BlogTimeAfterMidnight,
    '03' => $BlogTimeTooEarly, 
    '04' => $BlogTimeTooEarly,
    '05' => $BlogTimeTooEarly,
    '06' => $BlogTimeEarlyMorning,
    '07' => $BlogTimeEarlyMorning,
    '08' => $BlogTimeMorning,
    '09' => $BlogTimeMorning,
    '10' => $BlogTimeMorning,
    '11' => $BlogTimeNoon,
    '12' => $BlogTimeNoon,
    '13' => $BlogTimeNoon,
    '14' => $BlogTimeAfternoon,
    '15' => $BlogTimeAfternoon,
    '16' => $BlogTimeAfternoon,
    '17' => $BlogTimeAfternoon,
    '18' => $BlogTimeEvening,
    '19' => $BlogTimeEvening,
    '20' => $BlogTimeEvening,
    '21' => $BlogTimeEvening,
    '22' => $BlogTimeNight,
    '23' => $BlogTimeNight
    );
  $FmtPV['$BlogTimeOfDay'] = '$GLOBALS["BlogPostHours"][strftime("%H", $page["ctime"])]';