Changeset 14
- Timestamp:
- 05/06/2003 08:06:57 AM (22 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2-include/b2template.functions.php
r12 r14 764 764 765 765 // 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;766 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = 'blah', $list=true) { 767 global $tablecategories, $querycount; 768 768 global $pagenow; 769 769 global $querystring_start, $querystring_equal, $querystring_separator; … … 775 775 if (intval($optionall) == 1) { 776 776 $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"; 778 779 } 779 780 while($row = mysql_fetch_object($result)) { 780 781 $cat_name = $row->cat_name; 781 782 $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 } 784 790 } 785 791 } -
trunk/b2archives.php
r2 r14 9 9 10 10 // this is what will separate your archive links 11 $archive_line_separator = '<br />';12 11 // this is what will separate dates on weekly archive links 13 $archive_week_separator = ' -';12 $archive_week_separator = '–'; 14 13 15 14 … … 60 59 $arc_year = $arc_row['YEAR(post_date)']; 61 60 $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).'">'; 63 62 echo $month[zeroise($arc_month,2)].' '.$arc_year; 64 echo '</a>'; 65 echo $archive_line_separator."\n"; 63 echo "</a></li>\n"; 66 64 } 67 65 } elseif ($archive_mode == 'daily') { … … 73 71 $arc_month = $arc_row['MONTH(post_date)']; 74 72 $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).'">'; 76 74 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"; 80 76 } 81 77 } elseif ($archive_mode == 'weekly') { … … 96 92 $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); 97 93 $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']); 98 echo "< a href=\"$siteurl/".$blogfilename."?m=$arc_year&w=$arc_w\">";94 echo "<li><a href=\"$siteurl/".$blogfilename."?m=$arc_year&w=$arc_w\">"; 99 95 echo $arc_week_start.$archive_week_separator.$arc_week_end; 100 echo '</a>'; 101 echo $archive_line_separator."\n"; 96 echo "</a></li>\n"; 102 97 } 103 98 } … … 108 103 while($row=mysql_fetch_object($resultarc)) { 109 104 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.'">'; 111 106 $arc_title = stripslashes($row->post_title); 112 107 if ($arc_title) { … … 115 110 echo $row->ID; 116 111 } 117 echo '</a>'; 118 echo $archive_line_separator."\n"; 112 echo "</a></li>\n"; 119 113 } 120 114 } 121 115 } 122 116 123 # echo $querycount."<br />\n";124 # timer_stop(1,8);117 # echo $querycount."<br />\n"; 118 # timer_stop(1,8); 125 119 ?> -
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 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"> 3 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <!-- layout credits goto http://bluerobot.com/web/layouts/layout2.html -->5 4 6 5 <head> … … 8 7 9 8 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 10 <meta http-equiv="imagetoolbar" content="no" />11 9 12 10 <style type="text/css" media="screen"> … … 33 31 <?php the_date('','<h2>','</h2>'); ?> 34 32 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() ?> 36 34 </h3> 37 35 … … 86 84 </li> 87 85 <li>Categories: 88 89 <?php list_cats(0, 'All', 'name'); // fix this ?> 86 <ul> 87 <?php list_cats(0, 'All', 'name'); ?> 88 </ul> 90 89 </li> 91 90 <li>Search: … … 98 97 </li> 99 98 <li>Archives: 100 <?php include("b2archives.php"); // fix this too ?> 99 <ul> 100 <?php include("b2archives.php"); // fix this too ?> 101 </ul> 101 102 </li> 102 103 <li>Other: … … 116 117 </div> 117 118 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 122 120 </body> 123 121 </html> 124
Note: See TracChangeset
for help on using the changeset viewer.