[ 新規 | 編集 | 差分 ] [ 検索 | 一覧 | FrontPage ] [ 履歴 (RSS) | 差分履歴 (RSS) ] [ ログイン ]
【PR】Amazon | SL-C3000 | SL-C1000(3/18発売!) | SL-C860 | SL-6000W | SL-6000L | SL-6000N

WalWiki/カスタマイズ/履歴ページに月毎の見出し表示

編集

RecentChangesに月毎の見出しを表示します。

%page_commandへの追加

編集
my %page_command = (
    $IndexPage => 'index',
    $SearchPage => 'searchform',
    $CreatePage => 'create',
    $RssPage => 'rss',
    $AdminChangePassword => 'adminchangepasswordform',
    $FrontPage => 'FrontPage',
    $RecentChanges => 'recent',                             # yakty add [modify recentpage]
);

%command_doへの追加

編集
my %command_do = (
    read => \&do_read,
    edit => \&do_edit,
    adminedit => \&do_adminedit,
    adminchangepasswordform => \&do_adminchangepasswordform,
    adminchangepassword => \&do_adminchangepassword,
    write => \&do_write,
    index => \&do_index,
    searchform => \&do_searchform,
    search => \&do_search,
    create => \&do_create,
    createresult => \&do_createresult,
    FrontPage => \&do_FrontPage,
    comment => \&do_comment,
    rss => \&do_rss,
    diff => \&do_diff,
    interwikibox => \&do_interwiki_box, # Walrus add [InterWikiBox]
    recent => \&do_recent,                                  # yakty add [modify recentpage]
);

do_recent()追加

編集
# yakty add [modify recentpage] start
sub do_recent {
    &print_header($RecentChanges);
    my $content = $database{$RecentChanges};
    my %check;
    $content =~ s/^- (\d\d\d\d-\d\d)/($check{$1}++ ? $& : qq(*$1\n$&))/gme;
    &print_content($content);
    &print_footer($RecentChanges);
}
# yakty add [modify recentpage] end

02623