Update to use real lists.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt
2003-05-06 08:06:57 +00:00
parent 74d015f29b
commit 681e5b2998
3 changed files with 33 additions and 36 deletions

View File

@@ -8,9 +8,8 @@ require_once($b2inc.'/b2functions.php');
dbconnect();
// this is what will separate your archive links
$archive_line_separator = '<br />';
// this is what will separate dates on weekly archive links
$archive_week_separator = ' - ';
$archive_week_separator = '&#8211;';
// archive link url
@@ -59,10 +58,9 @@ if ($archive_mode == 'monthly') {
while($arc_row = mysql_fetch_array($arc_result)) {
$arc_year = $arc_row['YEAR(post_date)'];
$arc_month = $arc_row['MONTH(post_date)'];
echo "<a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).'">';
echo "<li><a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).'">';
echo $month[zeroise($arc_month,2)].' '.$arc_year;
echo '</a>';
echo $archive_line_separator."\n";
echo "</a></li>\n";
}
} elseif ($archive_mode == 'daily') {
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) FROM $tableposts WHERE post_date < '$now' AND post_category > 0 ORDER BY post_date DESC";
@@ -72,11 +70,9 @@ if ($archive_mode == 'monthly') {
$arc_year = $arc_row['YEAR(post_date)'];
$arc_month = $arc_row['MONTH(post_date)'];
$arc_dayofmonth = $arc_row['DAYOFMONTH(post_date)'];
echo "<a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).zeroise($arc_dayofmonth,2).'">';
echo "<li><a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).zeroise($arc_dayofmonth,2).'">';
echo mysql2date($archive_day_date_format, $arc_year.'-'.zeroise($arc_month,2).'-'.zeroise($arc_dayofmonth,2).' 00:00:00');
# echo $month[zeroise($arc_month,2)]." $arc_year";
echo '</a>';
echo $archive_line_separator."\n";
echo "</a></li>\n";
}
} elseif ($archive_mode == 'weekly') {
if (!isset($start_of_week)) {
@@ -95,10 +91,9 @@ if ($archive_mode == 'monthly') {
$arc_week = get_weekstartend($arc_ymd, $start_of_week);
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
echo "<a href=\"$siteurl/".$blogfilename."?m=$arc_year&amp;w=$arc_w\">";
echo "<li><a href=\"$siteurl/".$blogfilename."?m=$arc_year&amp;w=$arc_w\">";
echo $arc_week_start.$archive_week_separator.$arc_week_end;
echo '</a>';
echo $archive_line_separator."\n";
echo "</a></li>\n";
}
}
} elseif ($archive_mode == 'postbypost') {
@@ -107,19 +102,18 @@ if ($archive_mode == 'monthly') {
$resultarc = mysql_query($requestarc);
while($row=mysql_fetch_object($resultarc)) {
if ($row->post_date != '0000-00-00 00:00:00') {
echo "<a href=\"$archive_link_p".$row->ID.'">';
echo "<li><a href=\"$archive_link_p".$row->ID.'">';
$arc_title = stripslashes($row->post_title);
if ($arc_title) {
echo strip_tags($arc_title);
} else {
echo $row->ID;
}
echo '</a>';
echo $archive_line_separator."\n";
echo "</a></li>\n";
}
}
}
#echo $querycount."<br />\n";
#timer_stop(1,8);
# echo $querycount."<br />\n";
# timer_stop(1,8);
?>