1 patrick Mar 04, 2004 21:43
3 ricci Dec 12, 2005 19:44
Hello, I'm a newbie and I have exactly the same question. One post in a category contains (chronologically) sorted links to all other posts in this category, plus a description of what the category is about, so this post should always be shown on top when one clicks on the category link. Is this possible in any way? I don't know anything about PHP or mySQL, so I didn't really get the reply above this post. The link in this post also seems to be dead.
Sorry if this is a dumb question, I'm eager to learn and will be very grateful for any helpful comments!
4 liphtier Apr 26, 2006 11:03
Still there's no interface to handle category descriptions so I brutally added the following to the _main.php
<?php
request_title( '<h2>', '</h2>' );// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
if ($_REQUEST['cat']) {
$cat_longdesc = cat_longdesc($_REQUEST['cat']);
echo $cat_longdesc."<br><br>";
}
?>
and the function to the evocore/category.funcs.php
function cat_longdesc($cat_ID)
{
global $DB, $cache_categories;
// $cat = get_the_category_by_ID( $cat_ID );
$sql = "SELECT cat_longdesc
FROM T_categories
WHERE cat_ID = $cat_ID";
$cat_data = $DB->get_results( $sql, ARRAY_A );
return $cat_data[0]['cat_longdesc'];
}
But currently I need to write the description via the DB managment tools
5 nomad Jun 29, 2006 23:58
Liphtier wrote:
But currently I need to write the description via the DB managment tools
You mean phpMyAdmin? How can we add the description?
If you look at the evo_categories table in your database, you'll see columns for an icon, description, and long description. I don't know for sure, but I'd guess that that means that someday you'll be able to enter a short and long description, and a picture, for each category. Then, you could have something like the blog description that'd only show up at the top when it's just one category.
http://forums.b2evolution.net/viewtopic.php?t=1181