[PR]¡“ú‚ÌÆ­°½‚Í
¢Infoseek ÓÊÞ²Ù£


Jan 20, 2004 (Tue)

â– add 'date' field to the writeback format

  • I use the original writeback plugin:
    # Blosxom Plugin: writeback
    # Author(s): Rael Dornfest <rael@oreilly.com>
    # Version: 2003-09-18
    # Documentation: See the bottom of this file or type: perldoc writeback
     
  • Here is my change:
    diff writeback.orig writeback.new
    7a8,9
    > use Time::Local;
    > 
    15c17,18
    < my $writeback_dir = "";
    ---
    > #my $writeback_dir = "";
    > my $writeback_dir = "$blosxom::plugin_state_dir/writeback";
    27c30,31
    < my @fields = qw! name url title comment excerpt blog_name !;
    ---
    > #my @fields = qw! name url title comment excerpt blog_name !;
    > my @fields = qw! name url title comment excerpt blog_name date !;
    133a138,147
    >       # add 'date:' field -- tedious, though, it is working here
    >       my ($Second, $Minute, $Hour,
    >         $Day, $Month, $Year,
    >         $WeekDay, $DayOfYear, $IsDST) = localtime ();
    >       my $postdate = sprintf ("%d/%d/%d %d:%02d:%02d",
    >                             $Year + 1900,
    >                             $Month + 1,
    >                             $Day,
    >                             $Hour, $Minute, $Second);
    >       print $fh "date: $postdate\n";
     
  • cf.コメントã€ãƒˆãƒ©ãƒƒã‚¯ãƒãƒƒã‚¯ã«ã‚‚投稿ã•ã‚ŒãŸæ™‚間を表示 @UnknownPlace.

- Posted at 15:51 | comment (0)


TrackBack URL: http://kichiki.hp.infoseek.co.jp/cgi-bin/blosxom.cgi/blosxom/20040120-writeback.trackback

 
Name:
URL/Email: (optional)
Title: (optional)
Comments:
Save my Name and URL/Email for next time

Writebacks so far (0)