[geeklog-devel] About the "internal" and Webservices APIs

Joe Mucchiello joe at ThrowingDice.com
Sat Aug 11 12:53:14 EDT 2007

At 11:26 AM 8/11/2007, Oliver Spiesshofer wrote:
>this is the header:
><tr><td>[image1]</td><td>text text text</td></tr>
>this is the content:
><table style="text-align:center">
><tr><td colspan="3">text text text</td></tr>
>[ repeats ]

Couldn't this be easily done using the existing template code. Just 
add something like this to SP_renderArticle():

     if( !empty( $bodytext ))

     if (!empty($_CONF['global_template'])) { // or however you want 
to find the template
        $T = new Template($_CONF['path_global_templates']);
         /// etc
        $templated_text = $T->finish($T->parse('output','data'));
    } else {
        $templated_text = $introtext . $bodytext;

Then your normal template just includes {templated_text} where you 
want to show the templated version. Everything else is just interface.

Joe Mucchiello
Throwing Dice Games

More information about the geeklog-devel mailing list