I modified my /inc/html.php to mark minor changes and new pages.
That way
* minor changes are marked with a bold
M if you look at recent changes or old revisions
* if no text is entered to "summary", $lang['minoredit'] will be displayed in recent changes or old revisions - useful for example if you use
http://wiki.splitbrain.org/wiki:tips:summary_enforcement
* if a page is new, "neu" (not "new" because my language is German) is displayed after summary in recent changes (maybe in lang.php a "new_page" entry would be a better idea) - my style "recent_new" looks that way:
.recent_new {
color: #FF0000;
line-height: 0.6em;
font-size: 0.75em;
position:relative;
top:-7px;
padding-left: 0.1em;
}
[/color]
Have a look at
http://www.heine-wiki.de/doku.php?do=recent
What do you think about it? Perhaps something like that should be included in one of the next DokuWiki-Releases (?)
The following code should be around line 420 - I don't know exactly because I have allready done some changes in my html.php
/**
* list old revisions
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
function html_revisions($first=0){
global $ID;
global $INFO;
global $conf;
global $lang;
/* we need to get one additionally log entry to be able to
* decide if this is the last page or is there another one.
* see html_recent()
*/
$revisions = getRevisions($ID, $first, $conf['recent']+1);
if(count($revisions)==0 && $first!=0){
$first=0;
$revisions = getRevisions($ID, $first, $conf['recent']+1);;
}
$hasNext = false;
if (count($revisions)>$conf['recent']) {
$hasNext = true;
array_pop($revisions); // remove extra log entry
}
$date = @date($conf['dformat'],$INFO['lastmod']);
print p_locale_xhtml('revisions');
print '<ul>';
if($INFO['exists'] && $first==0){
print (isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>';
print '<div class="li">';
print $date;
print ' <img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" /> ';
/*********************** mark minor change **************************************************/
print (isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<b>M</b> ' : '<img src="'.DOKU_BASE.'lib/images/blank.gif" width="17" height="11" alt="" />';
/**********************************************************************************************/
print '<a class="wikilink1" href="'.wl($ID).'">'.$ID.'</a> ';
print ' – ';
/*********************** $lang['minoredit'] if summary is empty *******************************/
/** print $INFO['sum']; changed line to: */
print (empty($INFO['sum']))?($lang['minoredit']):$INFO['sum'];
/**********************************************************************************************/
print ' – ';
print ' <span class="user">';
print (empty($INFO['editor']))?('('.$lang['external_edit'].')'):$INFO['editor'];
print '</span> ';
print '('.$lang['current'].')';
print '</div>';
print '</li>';
}
foreach($revisions as $rev){
$date = date($conf['dformat'],$rev);
$info = getRevisionInfo($ID,$rev,true);
print ($info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>';
print '<div class="li">';
print $date;
if(@file_exists(wikiFN($ID,$rev))){
print ' <a href="'.wl($ID,"rev=$rev,do=diff").'">';
$p = array();
$p['src'] = DOKU_BASE.'lib/images/diff.png';
$p['width'] = 15;
$p['height'] = 11;
$p['title'] = $lang['diff'];
$p['alt'] = $lang['diff'];
$att = buildAttributes($p);
print "<img $att />";
print '</a> ';
/*********************** mark minor changes *************************************************/
print ($info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<b>M</b> ' : '<img src="'.DOKU_BASE.'lib/images/blank.gif" width="17" height="11" alt="" />';
/**********************************************************************************************/
print '<a class="wikilink1" href="'.wl($ID,"rev=$rev").'">'.$ID.'</a>';
}else{
print ' <img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" /> ';
print $ID;
}
print ' – ';
/*********************** $lang['minoredit'] if summary is empty *******************************/
/** print htmlspecialchars($info['sum']); changed line to: */
print (empty($info['sum']))?($lang['minoredit']):htmlspecialchars($info['sum']);
/**********************************************************************************************/
print ' – ';
print ' <span class="user">';
if($info['user']){
print $info['user'];
}else{
print $info['ip'];
}
print '</span>';
print '</div>';
print '</li>';
}
print '</ul>';
print '<div class="pagenav">';
$last = $first + $conf['recent'];
if ($first > 0) {
$first -= $conf['recent'];
if ($first < 0) $first = 0;
print '<div class="pagenav-prev">';
print html_btn('newer',$ID,"p",array('do' => 'revisions', 'first' => $first));
print '</div>';
}
if ($hasNext) {
print '<div class="pagenav-next">';
print html_btn('older',$ID,"n",array('do' => 'revisions', 'first' => $last));
print '</div>';
}
print '</div>';
}
/**
* display recent changes
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
function html_recent($first=0){
global $conf;
global $lang;
global $ID;
/* we need to get one additionally log entry to be able to
* decide if this is the last page or is there another one.
* This is the cheapest solution to get this information.
*/
$recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
if(count($recents) == 0 && $first != 0){
$first=0;
$recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
}
$hasNext = false;
if (count($recents)>$conf['recent']) {
$hasNext = true;
array_pop($recents); // remove extra log entry
}
print p_locale_xhtml('recent');
print '<ul>';
foreach($recents as $recent){
$date = date($conf['dformat'],$recent['date']);
print ($recent['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>';
print '<div class="li">';
print $date.' ';
print '<a href="'.wl($recent['id'],"do=diff").'">';
$p = array();
$p['src'] = DOKU_BASE.'lib/images/diff.png';
$p['width'] = 15;
$p['height'] = 11;
$p['title'] = $lang['diff'];
$p['alt'] = $lang['diff'];
$att = buildAttributes($p);
print "<img $att />";
print '</a> ';
print '<a href="'.wl($recent['id'],"do=revisions").'">';
$p = array();
$p['src'] = DOKU_BASE.'lib/images/history.png';
$p['width'] = 12;
$p['height'] = 14;
$p['title'] = $lang['btn_revs'];
$p['alt'] = $lang['btn_revs'];
$att = buildAttributes($p);
print "<img $att />";
print '</a> ';
/*********************** mark minor changes *************************************************/
print ($recent['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<b>M</b> ' : '<img src="'.DOKU_BASE.'lib/images/blank.gif" width="17" height="11" alt="" />';
/**********************************************************************************************/
print html_wikilink(':'.$recent['id'],$conf['useheading']?NULL:$recent['id']);
/*********************** mark new pages *****************************************************/
print ($recent['type']===DOKU_CHANGE_TYPE_CREATE) ? '<span class="recent_new">[neu]</span>' : '';
/**********************************************************************************************/
/*********************** $lang['minoredit'] if summary is empty ******************************/
/* print ' – '.htmlspecialchars($recent['sum']); changed line to: */
print ' – ';
print (empty($recent['sum']))?($lang['minoredit']):htmlspecialchars($recent['sum']);
/**********************************************************************************************/
print ' <span class="user">';
print ' – ';
if($recent['user']){
print $recent['user'];
}else{
print $recent['ip'];
}
print '</span>';
print '</div>';
print '</li>';
}
print '</ul>';
print '<div class="pagenav">';
$last = $first + $conf['recent'];
if ($first > 0) {
$first -= $conf['recent'];
if ($first < 0) $first = 0;
print '<div class="pagenav-prev">';
print html_btn('newer','',"p",array('do' => 'recent', 'first' => $first));
print '</div>';
}
if ($hasNext) {
print '<div class="pagenav-next">';
print html_btn('older','',"n",array('do' => 'recent', 'first' => $last));
print '</div>';
}
print '</div>';
}