Table of Contents

Simple PHP Blog

Feeds

If you want to create different RSS feeds for each of your categories, use the c variable in rss.php. For example to see only posts in category number 1 :

blog/rss.php?c=1

You can also put several categories in the feed :

blog/rss.php?c=2,3

There is no native support of comments feed, but you can find a patch here.

Modifications

I use the theme slick, but I have done some changes :

themes/slick/themes.php:83
+// Display CATEGORIES
+// This is an array. There can be multiple categories per entry.
+if ( array_key_exists( "categories", $entry_array ) ) {
+	$blog_content  .= ' <font size="-1">{';
+	for ( $i = 0; $i < count( $entry_array[ 'categories' ] ); $i++ ) {
+		$cat_id = $entry_array[ 'categories_id' ][$i];
+		if ( $i > 0 ) 
+		{
+			if (intval($prev_id/100) != intval($cat_id/100)) 
+				$blog_content .= ' | ';
+			else
+				$blog_content .= ', ';
+		}
+		$prev_id = $cat_id;
+		$blog_content .= '<a href="index.php?category=' . $cat_id . '">' .
+			$entry_array[ 'categories' ][$i] . '</a>';
+	}
+	$blog_content .= '}</font>';
+}

Some changes in the core too:

scripts/sb_display.php:116
-$cat_sub_arr = get_sub_categories($category);
-array_push( $cat_sub_arr, $category );
 
+$cats = split( ',', $category);
+$cat_sub_arr = array();
+for ($i = 0; $i < count($cats); $i++)
+{
+	$subcats = get_sub_categories($cats[$i]);
+	for ($j = 0; $j < count($subcats); $j++)
+		array_push($cat_sub_arr, $subcats[$j]);
+	array_push($cat_sub_arr, $cats[$i]);
+}
scripts/sb_comments.php:160
 $entry_array[ 'website' ] = blog_to_html( $website, true, false, true );
+$entry_array[ 'comment' ][ 'url' ] = $comment_entry_data[ 'URL' ];
 }