chalow 1.0rc4 に更新
2005-01-05-3
- はまったところ
cl.conf の item のテンプレート ($item_template) に <TMPL_VAR name=cat> を
書かないと,カテゴリ [...] がアイテムヘッダに追加されない.
- 自分用のパッチ
--- chalow-orig 2004-12-24 13:09:50.000000000 +0100
+++ chalow 2005-01-05 21:51:41.070033000 +0100
@@ -302,7 +302,9 @@
my $replace_once = "";
### chalow 普及のため HTML の一番下にリンクを表示する。できれば消さないで。
-my $signature = qq(<p class="footer">Powered by
+my $signature = qq(<p class="footer"><a href="http://nais.to/~yto/tools/chalow/">
+<img src="./chalow88x31.png" width="83" height="31" alt="Powered by chalow"></a><br>
+Powered by
<a href="http://nais.to/~yto/tools/chalow/">chalow</a></p>);
### コマンドライン引数
@@ -601,7 +603,7 @@
# s/>/>/go; # > が &.. になると、URL とか引用のマッチ狂う
# s/"/"/go; # ";
### "<" は置き換える。
- s|<(/?[a-z!]+)|<$1|gio;
+ s|<(/?[a-z\?!]+)|<$1|gio;
# s|<(/?[a-z]+)|<$1|gio; # コメント (<!-- -->) をのこしたい場合はこれ
# カスタマイズのヒント: <s></s> を残す→
# s|<(/?[a-rt-z]+)|<$1|gi; <b> を残す→
@@ -680,7 +682,7 @@
my @ents = sort {$b->{eh} cmp $a->{eh}} @{$category_item{$catname}};
my $n = $cat_page_entry_max;
- my $num_of_old_pages = int(@ents / $n);
+ my $num_of_old_pages = int($#ents / $n);
my @fnames;
for (my $i = 0; $i <= $num_of_old_pages; $i++) {
@@ -952,13 +954,13 @@
my ($end_year) = ($month_list[$#month_list] =~ /^(\d\d\d\d)/);
my $month_page_list = "";
for (my $y = $end_year; $y >= $start_year; $y--) { # year loop
- $month_page_list .= "$y : ";
+ $month_page_list .= "'" . substr($y, 2, 2) . ": ";
for (my $m = 1; $m <= 12; $m++) { # month loop
my $m0 = sprintf "%02d", $m;
if (defined $month_page->{"$y-$m0"}) {
- $month_page_list .= "<a href=\"$y-$m0.html\">$m0</a> ";
+ $month_page_list .= "<a href=\"$y-$m0.html\">$m</a> ";
} else {
- $month_page_list .= "$m0 ";
+ $month_page_list .= "$m ";
}
}
$month_page_list .= "<br>\n";
@@ -1013,7 +1015,7 @@
$week++ if (($i + 1) % 7 == 0);
}
- my @wn = ("S", "M", "T", "W", "T", "F", "S");
+ my @wn = ("日", "月", "火", "水", "木", "金", "土");
# my @wn = ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
my $rv = << "CAL"
@@ -1171,7 +1173,7 @@
my $ostr = join("\n", map {s/\'/&\#x27;/g; "document.writeln('".$_."');"}
@lines);
- output_to_file("$outputdir/cl.js", \$ostr);
+# output_to_file("$outputdir/cl.js", \$ostr);
$latest_item_list = join("\n", @lines);
@@ -1201,7 +1203,7 @@
my $ostr = join("\n", map {s/\'/&\#x27;/g; "document.writeln('".$_."');"}
@lines);
- output_to_file("$outputdir/cl-cat.js", \$ostr);
+# output_to_file("$outputdir/cl-cat.js", \$ostr);
$category_list = join("\n", @lines);
}
@@ -1354,7 +1356,7 @@
my ($eh, $ymd) = @_;
if ($show_day_of_week == 1) { ### 日付の後ろをどうするか?
# 曜日(Mon, Tue, ...)を追加: "2000-10-19" --> "2000-10-19 Thu"
- $eh .= " ".get_day_of_week($ymd);
+ $eh .= " (".get_day_of_week($ymd).")";
}
return qq(<a name="$ymd" href="@{[datestr2url($ymd)]}">$eh</a>);
}