1
limecity
xcgal - limit member's album
  • 2008/12/18 16:23

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


I set the gallery to allow member to have own albums.

is there anyway to limit numbers of album created?

1 album per member.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
ghia
Re: xcgal - limit member's album
  • 2008/12/18 19:43

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Try replacing
define('USER_CAN_CREATE_ALBUMS', (int)$USER_DATA['can_create_albums']);
in /modules/xcgal/include/init.inc.php by
if (((int)$USER_DATA['can_create_albums'] == 1) && !USER_IS_ADMIN
{
        
$chk_user_albums $xoopsDB->query("SELECT aid FROM ".$xoopsDB->prefix("xcgal_albums")." WHERE category='".(FIRST_USER_CAT USER_ID)."' ");
        if (
$xoopsDB->getRowsNum($chk_user_albums) >= 1
        {
            
define('USER_CAN_CREATE_ALBUMS'0);
        } 
        else 
        {
            
define('USER_CAN_CREATE_ALBUMS'1);
        }

}
else
{
    
define('USER_CAN_CREATE_ALBUMS', (int)$USER_DATA['can_create_albums']);
}


3
limecity
Re: xcgal - limit member's album
  • 2008/12/19 0:14

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


hey that worked perfectly!

thanks ghia!

but one thing.
they will not able to access the properties of the album and configure it?
hhttp://www.mounthiking.com
all your hiking gears and gadgets


4
limecity
Re: xcgal - limit member's album
  • 2008/12/19 16:24

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


bump? if anyone can help
hhttp://www.mounthiking.com
all your hiking gears and gadgets


Login

Who's Online

438 user(s) are online (299 user(s) are browsing Support Forums)


Members: 0


Guests: 438


more...

Donat-O-Meter

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

Latest GitHub Commits