[phplib] PHPLIB's Template Class From: Sebastian Bergmann (sebastian.bergmann <email protected>)
Date: 05/26/00

Hi,

I want to add a report generation module for my phpOpenCounter
(http://phpopencounter.sourceforge.net) project, based on PHPLIB's
Template Class.

I understand the basic concept behind PHPLIB's template system (thanks
to David Orr's article on phpbuilder.com), but what I want to do is the
following, and I don't know how to do this the right way:

I want to add a generateReport( "/path/to/template.inc" ) method to the
phpOpenCounter class, so that the following code fragement parses the
given template and outputs it to the browser-side:

  <?php
    $counter = new phpOpenCounter( 0 );
    $counter->generateReport( "/path/to/template.inc" );
  ?>

A simple "/path/to/template.inc" could then look like

  visitors today : {visitors_today}

So, I need a list of keywords ("visits_today", "visits_thisHour", ...)
and the appropriate calls to phpOpenCounter's get() method stored in
some way, so that PHPLIB's Template Class can do its magic. This list of
keyword -> get() call should be easy maintainable.

Has anyone a hint or tip on how to implement this smart, effienciently,
whatever? :)

-- 
 Sebastian Bergmann
 
 Homepage : http://gravedancer.rc5.de \ eMail: sebastian.bergmann <email protected>
 Fax/Voice: +49 180 50 52 54 04 86 39 \ Mobil: +49 170 125 85 78

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>