JasonLeBrun

[(approve links) edit diff]

CommentBoxPlus: Last date

Just tack this onto the end of commentboxplus.php:

$FmtPV['$LatestPostDate'] = 'FindLatestPostDate($pn)';
function FindLatestPostDate($pagename) {
    $pagevar = ReadPage($pagename, READPAGE_CURRENT);
    $page=$pagevar['text'];
    $last_post=0;
    while($offset=strpos($page,">>messagehead<<",$last_post))
    {
         $last_post=$offset+1;
    }
    $date_start=strpos($page,"[-",$last_post)+2;
    $date_len=strpos($page,"-]",$last_post)-$date_start;
    return substr($page, $date_start, $date_len);