Hi
I am using CPG 1.4.1, therefore
I made few modifications to make SIDEBAR work with CPG 1.4.1 beta
Need to fix these two functions in sidebar.php:
function get_subcat_data($parent, $ident = '')
{
global $CONFIG, $catStr;
if ($parent == 0) {
get_album_data($parent,$ident );
}
$sql = "SELECT cid, name, description " . "FROM {$CONFIG['TABLE_CATEGORIES']} " . "WHERE parent = '$parent' " . "ORDER BY pos";
$result = cpg_db_query($sql);
if (($cat_count = mysql_num_rows($result)) > 0) {
$rowset = cpg_db_fetch_rowset($result);
$pos = 0;
foreach ($rowset as $subcat) {
$catStr .= $ident."|".$subcat['name']."|index.php?cat=".$subcat['cid']." \n";
get_album_data($subcat['cid'], $ident . '.');
get_subcat_data($subcat['cid'], $ident . '.');
}
}
}
function get_album_data($category,$ident)
{
global $CONFIG, $catStr,$ALBUM_SET;
$sql = "SELECT aid,title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = $category ".$ALBUM_SET;
$result = cpg_db_query($sql);
if (($cat_count = mysql_num_rows($result)) > 0) {
$rowset = cpg_db_fetch_rowset($result);
foreach ($rowset as $subcat) {
$catStr .= $ident."|".$subcat['title']."|thumbnails.php?album=".$subcat['aid']."\n";
}
}
}
And also i found that there are no need for PEAR, but you need to comment out following lines in layersmenu-common.inc.php:
/**
* You need PEAR only if you want to use the DB support.
*/
//require_once "PEAR.php";
/**
* You need DB.php only if you want to use the DB support.
*/
//require_once "DB.php";
/**