|
Due to lack of time, I could not implement sub category module, but I have implemented basic module for one of my client and updated cms.
I have updated the main Flax Article CMS, in this update I have made changed in functions.php and category.php file Here is the new function which I added in functions.php file
function get_sub_cats($cat_id) { global $settings; $g_arr = explode(",",SKIN_VARS); foreach($g_arr as $key => $val) global ${"$val"};
$cat_data = Array(); $res=query("select * from {$prefix}category WHERE cat_parent_id=$cat_id") or report(); if(mysql_num_rows($res)==0) echo "";
else { for($i=0;$i
$row=fetch($res);
$cat_url = $settings['set_seo_onoff'] =='on' ? "$root_path/category/".plaintext($row['cat_name'])."-$row[cat_id]-1.html" : "$root_path/category.php?cat_id=$row[cat_id]";
$cat_data []= "$row[cat_name]"; } } return implode(" | ",$cat_data);
}
this retrieves all the sub-categories of any specific category ID you pass to the function, and displays it through category.php file, well I never planned sub-categories to be displayed like this, but since I am currentluy busy, I hope it will be a quick update for the people who have been waiting for it, sorry mates, but its good with versoin 1 I guess.
|