Make WordPress Core

Changeset 14


Ignore:
Timestamp:
05/06/2003 08:06:57 AM (22 years ago)
Author:
saxmatt
Message:

Update to use real lists.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2template.functions.php

    r12 r14  
    764764
    765765// out of the b2 loop
    766 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = 'blah') {
    767     global $tablecategories,$querycount;
     766function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = 'blah', $list=true) {
     767    global $tablecategories, $querycount;
    768768    global $pagenow;
    769769    global $querystring_start, $querystring_equal, $querystring_separator;
     
    775775    if (intval($optionall) == 1) {
    776776        $all = apply_filters('list_cats', $all);
    777         echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a><br />\n";
     777        if ($list) echo "\n\t<li><a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a></li>";
     778        else echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a><br />\n";
    778779    }
    779780    while($row = mysql_fetch_object($result)) {
    780781        $cat_name = $row->cat_name;
    781782        $cat_name = apply_filters('list_cats', $cat_name);
    782         echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';
    783         echo stripslashes($cat_name)."</a><br />\n";
     783        if ($list) {
     784            echo "\n\t<li><a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';
     785            echo stripslashes($cat_name)."</a></li>";
     786        } else {
     787            echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';
     788            echo stripslashes($cat_name)."</a><br />\n";
     789        }
    784790    }
    785791}
  • trunk/b2archives.php

    r2 r14  
    99
    1010// this is what will separate your archive links
    11 $archive_line_separator = '<br />';
    1211// this is what will separate dates on weekly archive links
    13 $archive_week_separator = ' - ';
     12$archive_week_separator = '&#8211;';
    1413
    1514
     
    6059        $arc_year  = $arc_row['YEAR(post_date)'];
    6160        $arc_month = $arc_row['MONTH(post_date)'];
    62         echo "<a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).'">';
     61        echo "<li><a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).'">';
    6362        echo $month[zeroise($arc_month,2)].' '.$arc_year;
    64         echo '</a>';
    65         echo $archive_line_separator."\n";
     63        echo "</a></li>\n";
    6664    }
    6765} elseif ($archive_mode == 'daily') {
     
    7371        $arc_month = $arc_row['MONTH(post_date)'];
    7472        $arc_dayofmonth = $arc_row['DAYOFMONTH(post_date)'];
    75         echo "<a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).zeroise($arc_dayofmonth,2).'">';
     73        echo "<li><a href=\"$archive_link_m$arc_year".zeroise($arc_month,2).zeroise($arc_dayofmonth,2).'">';
    7674        echo mysql2date($archive_day_date_format, $arc_year.'-'.zeroise($arc_month,2).'-'.zeroise($arc_dayofmonth,2).' 00:00:00');
    77 #       echo $month[zeroise($arc_month,2)]." $arc_year";
    78         echo '</a>';
    79         echo $archive_line_separator."\n";
     75        echo "</a></li>\n";
    8076    }
    8177} elseif ($archive_mode == 'weekly') {
     
    9692            $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
    9793            $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
    98             echo "<a href=\"$siteurl/".$blogfilename."?m=$arc_year&amp;w=$arc_w\">";
     94            echo "<li><a href=\"$siteurl/".$blogfilename."?m=$arc_year&amp;w=$arc_w\">";
    9995            echo $arc_week_start.$archive_week_separator.$arc_week_end;
    100             echo '</a>';
    101             echo $archive_line_separator."\n";
     96            echo "</a></li>\n";
    10297        }
    10398    }
     
    108103    while($row=mysql_fetch_object($resultarc)) {
    109104        if ($row->post_date != '0000-00-00 00:00:00') {
    110             echo "<a href=\"$archive_link_p".$row->ID.'">';
     105            echo "<li><a href=\"$archive_link_p".$row->ID.'">';
    111106            $arc_title = stripslashes($row->post_title);
    112107            if ($arc_title) {
     
    115110                echo $row->ID;
    116111            }
    117             echo '</a>';
    118             echo $archive_line_separator."\n";
     112            echo "</a></li>\n";
    119113        }
    120114    }
    121115}
    122116
    123 #echo $querycount."<br />\n";
    124 #timer_stop(1,8);
     117# echo $querycount."<br />\n";
     118# timer_stop(1,8);
    125119?>
  • trunk/index.php

    r12 r14  
    1 <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ("blog.header.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ('blog.header.php'); ?>
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    33<html xmlns="http://www.w3.org/1999/xhtml">
    4 <!-- layout credits goto http://bluerobot.com/web/layouts/layout2.html -->
    54
    65<head>
     
    87   
    98    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    10     <meta http-equiv="imagetoolbar" content="no" />
    119   
    1210    <style type="text/css" media="screen">
     
    3331<?php the_date('','<h2>','</h2>'); ?>
    3432
    35 <h3 class="storyTitle"><?php the_title(); ?> <span class="storyCategory"><a href="?cat=<?php the_category_ID() ?>" title="Category: <?php the_category() ?>">[<?php the_category() ?>]</span></a> - <span class="storyAuthor"><?php the_author() ?></span> @ <a href="<?php permalink_link() ?>"><?php the_time() ?></a>
     33<h3 class="storyTitle"><a href="<?php permalink_link() ?>"><?php the_title(); ?></a> <a href="?cat=<?php the_category_ID() ?>" title="Category: <?php the_category() ?>" class="storyCategory">[<?php the_category() ?>]</a> - <span class="storyAuthor"><?php the_author() ?></span> @ <?php the_time() ?>
    3634</h3>
    3735
     
    8684 </li>
    8785 <li>Categories:
    88 
    89 <?php list_cats(0, 'All', 'name'); // fix this ?>
     86    <ul>
     87    <?php list_cats(0, 'All', 'name'); ?>
     88    </ul>
    9089 </li>
    9190 <li>Search:
     
    9897 </li>
    9998 <li>Archives:
    100  <?php include("b2archives.php"); // fix this too ?>
     99    <ul>
     100     <?php include("b2archives.php"); // fix this too ?>
     101    </ul>
    101102 </li>
    102103 <li>Other:
     
    116117</div>
    117118
    118 <div id="chaff">
    119 <a href="mailto:abuse@[127.0.0.1]" title="anti sp@mbot addrss">4 sp@mbots e-mail me</a>
    120 </div>
    121 <!-- BlueRobot was here. -->
     119
    122120</body>
    123121</html>
    124 
Note: See TracChangeset for help on using the changeset viewer.