2007/07/26 19:26
另外,无论从用户还是搜索引擎优化的角度来看,没有文章的那个月没有必要加链接。
自己动手改了一下:
在inc/mod_view.php中,搜索archivelist,在下面的
for ($i=0; $i<count($uniquedates); $i++) {
$y=$uniquedates[$i];
$result.="<tr><td colspan=\"4\"><strong>{$y}{$lnc[299]}</strong></td></tr>\n<tr>";
for ($j=1; $j<13; $j++) {
$resultdates[$y][$j]=floor($resultdates[$y][$j]);
$result.="<td><a href=\"index.php?go=archive&cm={$j}&cy={$y}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
if ($j%4==0) $result.="</tr><tr>";
}
$result.="</tr>\n";
}
$y=$uniquedates[$i];
$result.="<tr><td colspan=\"4\"><strong>{$y}{$lnc[299]}</strong></td></tr>\n<tr>";
for ($j=1; $j<13; $j++) {
$resultdates[$y][$j]=floor($resultdates[$y][$j]);
$result.="<td><a href=\"index.php?go=archive&cm={$j}&cy={$y}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
if ($j%4==0) $result.="</tr><tr>";
}
$result.="</tr>\n";
}
更改为
for ($i=0; $i<count($uniquedates); $i++) {
$y=$uniquedates[$i];
$result.="<tr><td colspan=\"4\"><strong>{$y}{$lnc[299]}</strong></td></tr>\n<tr>";
for ($j=1; $j<13; $j++) {
$resultdates[$y][$j]=floor($resultdates[$y][$j]);
//$result.="<td><a href=\"index.php?go=archive&cm={$j}&cy={$y}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
$outurl=($config['smarturl']==1 && $config['urlrewrite']==1) ? "/archive_{$j}_{$y}.htm" : "/index.php?go=archive&cm={$j}&cy={$y}";
if($resultdates[$y][$j]>0){
$result.="<td><a href=\"{$outurl}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
}else{
$result.="<td>{$j}{$lnc[298]} (0)</td>";
}
if ($j%4==0) $result.="</tr><tr>";
}
$result.="</tr>\n";
}
$y=$uniquedates[$i];
$result.="<tr><td colspan=\"4\"><strong>{$y}{$lnc[299]}</strong></td></tr>\n<tr>";
for ($j=1; $j<13; $j++) {
$resultdates[$y][$j]=floor($resultdates[$y][$j]);
//$result.="<td><a href=\"index.php?go=archive&cm={$j}&cy={$y}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
$outurl=($config['smarturl']==1 && $config['urlrewrite']==1) ? "/archive_{$j}_{$y}.htm" : "/index.php?go=archive&cm={$j}&cy={$y}";
if($resultdates[$y][$j]>0){
$result.="<td><a href=\"{$outurl}\"><strong>{$j}{$lnc[298]}</strong></a> ({$resultdates[$y][$j]})</td>";
}else{
$result.="<td>{$j}{$lnc[298]} (0)</td>";
}
if ($j%4==0) $result.="</tr><tr>";
}
$result.="</tr>\n";
}
效果如:http://www.9enjoy.com/archive.php

Mysql提示Too many connections的解决
Blog重新开通了

