Revision [16667]
This is an old revision of ChangesTeaser made by GqdXbi on 2007-05-31 10:34:26.
Changes Teaser action
changesteaser.php
%%(php)
<?php
$exclude = array("SandBox"); add any other pages to be excluded from listing like thus - array("SandBox", "OtherPage"); etc.
if ($pages = $this->LoadRecentlyChanged())
{
$max = is_numeric($vars['max']) ? $vars['max'] : false;
$curday = ;
foreach ($pages as $i => $page)
{
if (($i < $max) || !$max)
{
// day header
list($day, $time) = explode(" ", $page["time"]);
if ($day != $curday)
{
$dateformatted = date("D, d M Y", strtotime($day));
if ($curday) print("
\n"); print("$dateformatted:
\n"); $curday = $day; } $timeformatted = date("H:i T", strtotime($page["time"])); $page_edited_by = $page["user"]; if (!$this->LoadUser($page_edited_by)) $page_edited_by .= " (unregistered user)"; // print entry if ($page["note"]) $note=" [".$page["note"]."]"; else $note =;
\n"); print("$dateformatted:
\n"); $curday = $day; } $timeformatted = date("H:i T", strtotime($page["time"])); $page_edited_by = $page["user"]; if (!$this->LoadUser($page_edited_by)) $page_edited_by .= " (unregistered user)"; // print entry if ($page["note"]) $note=" [".$page["note"]."]"; else $note =;
$pagetag = $page["tag"];
if ( !in_array($pagetag, $exclude)) {
if ($this->HasAccess("read", $pagetag)) {
print("