This patch introduces link anchors on the history page, using the timestamps (seconds since epoch). It also sets a $CurrentTimestamp variable which can be used in formats. This allows to change the RecentChanges pages to create direct links to particular changes, by adding the following to local/config.php: $RecentChangesFmt['$SiteGroup.AllRecentChanges'] = '* [[$Group.$Name]] ([[$FullName?action=diff#$CurrentTimestampId|diff]]) . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; $RecentChangesFmt['$Group.RecentChanges'] = '* [[$Group/$Name]] ([[$FullName?action=diff#$CurrentTimestampId|diff]]) . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; Johannes Winkelmann, http://jw.smts.ch --- pmwiki.php.orig 2006-08-15 10:17:52.000000000 +0200 +++ pmwiki.php 2006-08-15 10:21:16.000000000 +0200 @@ -52,6 +52,7 @@ $Now=time(); define('READPAGE_CURRENT', $Now+604800); $TimeFmt = '%B %d, %Y, at %I:%M %p'; +$TimestampIdPrefix = 'id'; $MessagesFmt = array(); $BlockMessageFmt = "

$[This post has been blocked by the administrator]

"; $EditFields = array('text'); @@ -297,6 +298,7 @@ } SDV($CurrentTime,strftime($TimeFmt,$Now)); +SDV($CurrentTimestampId,$TimestampIdPrefix . $Now); if (IsEnabled($EnableStdConfig,1)) include_once("$FarmD/scripts/stdconfig.php"); --- scripts/pagerev.php.orig 2006-08-15 10:17:59.000000000 +0200 +++ scripts/pagerev.php 2006-08-15 10:32:07.000000000 +0200 @@ -24,7 +24,7 @@

$DiffMinorFmt - $DiffSourceFmt

"); SDV($DiffStartFmt," -
\$DiffTime +
# \$DiffTime \$[by] \$DiffAuthor - \$DiffChangeSum
"); SDV($DiffDelFmt['a'],"
\$[Deleted line \$DiffLines:]
@@ -62,7 +62,8 @@ function PrintDiff($pagename) { global $DiffShow,$DiffStartFmt,$TimeFmt,$DiffDelFmt,$DiffAddFmt, - $DiffEndDelAddFmt,$DiffEndFmt,$DiffRestoreFmt,$FmtV, $LinkFunctions; + $DiffEndDelAddFmt,$DiffEndFmt,$DiffRestoreFmt,$FmtV, $LinkFunctions, + $TimestampIdPrefix; $page = ReadPage($pagename); if (!$page) return; krsort($page); reset($page); @@ -74,6 +75,7 @@ $diffclass = $match[3]; if ($diffclass=='minor' && $DiffShow['minor']!='y') continue; $diffgmt = $match[1]; $FmtV['$DiffTime'] = strftime($TimeFmt,$diffgmt); + $FmtV['$DiffTimestampId'] = $TimestampIdPrefix . $diffgmt; $diffauthor = @$page["author:$diffgmt"]; if (!$diffauthor) @$diffauthor=$page["host:$diffgmt"]; if (!$diffauthor) $diffauthor="unknown";