Categories > TinyButStrong general >

Timing on rendered field

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Brandon
Date: 2006-05-31
Time: 13:58

Timing on rendered field

I have a page that contains:
<?
    require($_SERVER['DOCUMENT_ROOT'] . '/config.php');
    include_once($classDir . '/tbs/tbs_class.php') ;
    $TBS = new clsTinyButStrong ;
    //Connect to the database
    if (!isset($_SERVER)) $_SERVER=&$HTTP_SERVER_VARS ; //PHP<4.1.0
    require($classDir . '/db/cnx_mysql.php');
    $TBS->LoadTemplate($_SERVER['DOCUMENT_ROOT'] . '/includes/header.html') ;
    $TBS->LoadTemplate($_SERVER['DOCUMENT_ROOT'] . '/includes/reviewTable.html', '+') ;
    $TBS->MergeBlock('blk1',$cnx_id,'SELECT * FROM reviews') ;
    mysql_close($cnx_id) ;
    $TBS->LoadTemplate($_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php', '+') ;
    $TBS->Show(TBS_OUTPUT) ;
    $last_modified = filemtime($_SERVER['DOCUMENT_ROOT'] .$PHP_SELF);
    print("<center>Page last modified: ");
    print(date("j M y h:i", $last_modified)."</center>");
?>;

footer.php contains:

.
[onshow;script='./includes/lastMod.php';]
.

lastMod contains:

<?php
     $last_modified = filemtime($_SERVER['DOCUMENT_ROOT'] .$PHP_SELF);
    print("<center>Page last modified:");
    print(date("j M y h:i", $last_modified)."</center>");
?>

The code is all correctly executing but the message ( 'Page last modified:25 May 06 08:50') is appearing at the top of the rendered page instead of the bottom.

How do I delay it?
By: Skrol29
Date: 2006-05-31
Time: 14:03

Re: Timing on rendered field

You have to active the subtemplate mode:
[onshow;script='./includes/lastMod.php';subtpl]
By: Brandon
Date: 2006-05-31
Time: 14:05

Re: Timing on rendered field - solved

Yes - that was what I was missing - thanks!