Thanks to the page at
http://ktyp.com/dev/doku/dokuwiki/hacks/prettyrecent I've tweaked the code of html_recent() function a bit, like this:
edit conf/dokuwiki.php or conf/local.php, to include:
<code php>
if (! eregi('WIN',PHP_OS)) {
@setlocale (LC_TIME, 'pt_PT');
} else {
setlocale (LC_TIME, 'Portuguese');
}
$conf['recent_pretty'] = 1; // Enable to see Recent Changes page in Pretty Format.
$conf['pretty_time_format'] = '%a, %d de %B de %Y'; //Date Format for Pretty RecentChanges page.
</code>
Replace pt_PT/Portuguese by the Default Country codes. Also, don't forget to tailor the DateTime Format String.
If the variable $conf['recent_pretty'] is disabled, then default RecentChanges page is shown, else the new pretty RecentChanges page is shown instead.
Edit inc/html.php, and replace existing html_recent() function with this new one:
<code php>
function html_recent(){
global $conf;
$recents = getRecents(0,true);
// DWD Modify -> Add: RecentChangesPretty Switch.
$cdate = '0000-00-00';
print parsedLocale('recent');
// DWD Modify -> Change: RecentChangesPretty Switch.
if(!$conf['recent_pretty']) {
print '<ul>';
}
// DWD Modify End.
foreach(array_keys($recents) as $id){
// DWD Modify -> Change: RecentChangesPretty Switch.
if($conf['recent_pretty']) {
if(date("Y-m-d", $recents[$id]['date']) != $cdate) {
echo '<h2><b>' . strftime($conf['pretty_time_format'], $recents[$id]['date']) . '</b></h2>' . "\\n";
// Fix Date String, using Language and Format.
$cdate = date("Y-m-d", $recents[$id]['date']);
}
$date = date('H:i', $recents[$id]['date']);
print '<div class="level2">';
} else {
$date = date($conf['dformat'], $recents[$id]['date']);
print '<li>';
}
// DWD Modify End.
print $date.' '.html_wikilink($id,$id);
print ' '.htmlspecialchars($recents[$id]['sum']);
print ' <span class="user">(';
print $recents[$id]['ip'];
if($recents[$id]['user']) print ' '.$recents[$id]['user'];
print ')</span>';
// DWD Modify -> Change: RecentChangesPretty Switch.
if($conf['recent_pretty']) {
print '</div>';
} else {
print '</li>';
}
// DWD Modify End.
}
// DWD Modify -> Change: RecentChangesPretty Switch.
if($conf['recent_pretty']) {
print "\\n";
} else {
print '</ul>';
}
// DWD Modify End.
}
</code>