=====Additional Options for ""RecentChanges"" action===== This code adds a little extra functionality to the ""RecentChanges"" action. It allows to override the "max" (maximum) amount of changes shown, as well as turning on or off the RSS icon. I think it would be useful for inclusion on a ""HomePage"", for instance, when you just want to show the last 10 pages changed. ====Parameters==== {{table columns="4" cells="Parameter;Values;Default;Description;max;integer;User's profile or 50 for anonymous user;Maximum amount of recent changes to show;showrss;true|false;true;Show the rss icon"}} ====Useage examples==== **""{{RecentChanges}}""** Will produce the exact same results as the original action **""{{RecentChanges max="10" showrss="false"}}""** Show last 10 pages changed, and do not show the RSS icon Replace recentchanges.php with: %%(php) LoadRecentlyChanged()) { $max = is_numeric($vars['max']) ? $vars['max'] : false; $showrss = $vars['showrss'] ? strtolower($vars['showrss']) : "true"; $curday = ""; if ($showrss == "true") { print("

href("recentchanges.xml", $this->page["tag"])."\">\"XML\"

\n"); } if (! $max) { if ($user = $this->GetUser()) { $max = $user["changescount"]; } else { $max = 50; } } 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 =""; $pagetag = $page["tag"]; if ($this->HasAccess("read", $pagetag)) { print("    (".$this->Link($pagetag, "revisions", $timeformatted, 0, 1, "View recent revisions list for ".$pagetag).") [".$this->Link($pagetag, "history", "history", 0, 1, "View edit history of ".$pagetag)."] -  ".$this->Link($pagetag, "", "", 0)." ⇒ $page_edited_by ".$note."
"); } else { print("    ($timeformatted) [history] -  ".$page["tag"]." ⇒ $page_edited_by ".$note."
"); } } } print "
\n"; $wikipingserver = $this->config["wikiping_server"]; if ($wikipingserver) { $wikipingserver_url_parsed = parse_url($wikipingserver); $wikipingserver_host = $wikipingserver_url_parsed["host"]; echo "

[WikiPing enabled: Changes on this wiki are broadcast to http://$wikipingserver_host]"; } } ?> %% ---- CategoryDevelopmentActions