Skip To Navigation

RdMise Developments

First, I coded a little RdMise app to track my chemotherapy (currently seen on the right of the home page). I doubt anyone cares much, especially since I haven't released the RdMise code yet, but I'm posting this anyway:

$apptypes['chemo'] = array('class' => 'ChemoApp',
                           'title' => 'Chemotherapy counter',
                           'version' => '1.0',
                           'url' => 'http://rdmsoft.com/');
class ChemoApp
{
   function ChemoApp($id, &$attribs, $parentid)
   {
      $this->cycno = 1;
      $this->dayno = tzdate('z') - 262;
      if(tzdate('Y') > 2005) $this->dayno += (tzdate('Y') - 2005) * 365;
      while($this->dayno > 28) { ++$this->cycno; $this->dayno -= 28; }
   }
   function Code_ProcessAppTag($attribs)
   {
      switch($attribs['do'])
      {
      case 'dayno': return $this->dayno;
      case 'cycno': return $this->cycno;
      }
   }
}

To use it, I create an instance by adding <app id=chemo type=chemo/> to site.xml, and then add RdCode to index.rdmise:

<p>Warning: Contains cancer.
Today is Day <rdcode for=chemo do=dayno/> of
 Cycle <rdcode for=chemo do=cycno/>.</p>

If I cared enough, I'd make it generic so the starting day could be set via the <app/> tag. I'd also make it cope with leap years, but I don't care at the moment as I'm hoping to be done with this stuff before 2008...

Oh, and I coded the new style system for RdMise 1.2. It reads CSS files from folders and outputs them as one stylesheet, rather than using nasty config files and lots of link tags. I'm happy, everyone else is indifferent, makes for a good average.

⇐09 Oct 2005 - 1.2: Stuff I want. / 06 Oct 2005 - Catching up, take 2⇒

Feedback

Feedback is closed. Feel free to contact me privately.

tH