1
jfebus
XCGAL:Ordering Albums by User Name
  • 2004/11/19 22:42

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 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!

2
Anonymous
Re: XCGAL:Ordering Albums by User Name
  • 2004/11/19 23:08

  • Anonymous

  • Posts: 0

  • Since:


Nice idea, much more instressting would it be to set the orderby value via the module preference, so you can select in the settings which order do you want, will keep this in mind.

Login

Who's Online

249 user(s) are online (167 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits