2012-08-31, 14:32:15
I think I found two problems in the latest version.
1) The following string in languages seems wrong: 'ALL_CATEOGIRES' => "View All Categories",
2) The feature "View All Categories" doesn't work as expected. Currently it displays "Uncategorized" posts and not all posts.
I believe the following function could be modified like this (change in bold):
/**
* Shows posts from a requested category
*
* @param $category the category to show posts from
* @return void
*/
function show_blog_category($category)
{
if ($category == "")
{
show_all_blog_posts();
return;
}
$Blog = new Blog;
$all_posts = $Blog->listPosts(true, true);
$count = 0;
foreach($all_posts as $file)
{
$data = getXML($file['filename']);
if($data->category == $category)
{
$count++;
show_blog_post($file['filename'], true);
}
}
if($count < 1)
{
echo '<p class="blog_category_noposts">'.i18n_r(BLOGFILE.'/NO_POSTS').'</p>';
}
}
I would prefer two features:
"View All posts"
"Uncategorized"
What are your thoughts on this?
1) The following string in languages seems wrong: 'ALL_CATEOGIRES' => "View All Categories",
2) The feature "View All Categories" doesn't work as expected. Currently it displays "Uncategorized" posts and not all posts.
I believe the following function could be modified like this (change in bold):
/**
* Shows posts from a requested category
*
* @param $category the category to show posts from
* @return void
*/
function show_blog_category($category)
{
if ($category == "")
{
show_all_blog_posts();
return;
}
$Blog = new Blog;
$all_posts = $Blog->listPosts(true, true);
$count = 0;
foreach($all_posts as $file)
{
$data = getXML($file['filename']);
if($data->category == $category)
{
$count++;
show_blog_post($file['filename'], true);
}
}
if($count < 1)
{
echo '<p class="blog_category_noposts">'.i18n_r(BLOGFILE.'/NO_POSTS').'</p>';
}
}
I would prefer two features:
"View All posts"
"Uncategorized"
What are your thoughts on this?