ISSUE # 1 - missing rss.php file
There is no rss.php file in the downloads. The only way
to get it is to type it in from the book. It is on page
278.
ISSUE #2 - in rss.php file, did not include database code
The database code was not included.
You need to add it. I added it right after <?php
PHP Code:
<?php
include '../lib/db.php';
ISSUE #3 - in rss.php, printf contains &, should be &
The printf statement on about line 29, uses an ampersand on the
query string.
PHP Code:
printf('<link>http://www.example.com/myBlog/view.php?m=%d&y=%d</link>',
date('n', $row['POST_DATE'] ), date('Y', $row['POST_DATE']) );
This results in xml that is not
well formed. It needs to be changed to &
It should look like this.
PHP Code:
printf('<link>http://www.example.com/myBlog/view.php?m=%d&y=%d</link>',
date('n', $row['POST_DATE'] ), date('Y', $row['POST_DATE']) );
ISSUE #4 - in view.php , ob_get_clean
About 6 lines up from the bottom is the line.
PHP Code:
$GLOBALS['TEMPLATE']['content'] = ob_get_clean();
When you go to view.php in the browser there is no
output, the screen is blank. When you change it
to ob_get_contents, the output appears as it should.
PHP Code:
$GLOBALS['TEMPLATE']['content'] = ob_get_contents();
ISSUE #5 view.php
There is a mistake in the book, page 293, in the gray
box showing the view code, line 8, it says $day and
it should be $month.
PHP Code:
list($day, $year) = explode('/', date('m/Y', $timestamp));
It is correct in the download code. Here is how it should
look.
PHP Code:
list($month, $year) = explode('/', date('m/Y', $timestamp));
COMMENTS ABOUT RSS
I think the best approach is to go to one of the aggregators like
Google Reader and set that up. Subscribe to a couple of the
big rss feeds like CNN or The Official Google Blog. This
way you can get a feel for it.
Here are a couple links on RSS that may be helpful.
http://www.commoncraft.com/rss_plain_english
http://searchenginewatch.com/2175271
When you go to add your own site on Google Reader,
go to "Add a subscription" and type in the path
to your rss.php,
http://yourdomain/yoursite/public_files/rss.php