1
Hi All,
To order the album by the user name in XCGAL
in INDEX.PHP look for the list_users() function and change this:
$sql = "SELECT category, COUNT(DISTINCT a.aid) as alb_count,".
" COUNT(DISTINCT pid) as pic_count,".
" MAX(pid) as thumb_pid ".
"FROM ".$xoopsDB->prefix("xcgal_albums")." AS a, ".
"".$xoopsDB->prefix("xcgal_pictures")." AS p WHERE category > ".FIRST_USER_CAT." AND p.aid = a.aid ".
"AND approved = 'YES' ".
"$FORBIDDEN_SET ".
"GROUP BY category ".
"ORDER BY category ";
To this:
$sql = "SELECT category, COUNT(DISTINCT a.aid) as alb_count,".
" COUNT(DISTINCT pid) as pic_count,".
" MAX(pid) as thumb_pid ".
"FROM xoops_users x, ".$xoopsDB->prefix("xcgal_albums")." AS a, ".
"".$xoopsDB->prefix("xcgal_pictures")." AS p WHERE category > ".FIRST_USER_CAT." AND p.aid = a.aid ".
"AND approved = 'YES' ".
"AND uid=category-10000 ".
"$FORBIDDEN_SET ".
"GROUP BY category ".
"ORDER BY uname ";
Enjoy it!