coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: JohnCage on August 24, 2006, 12:02:35 PM

Title: How to limit each user to only one album?
Post by: JohnCage on August 24, 2006, 12:02:35 PM
Hello,

I want to limit each user to have only 1 album.
Why ?
We have 13.000 members (artists) and I think that 13.000 albums is enough ;o)

Could you please help me?

Thanks
JC
Title: Re: How to limit each user to only one album?
Post by: Abbas Ali on August 24, 2006, 01:01:50 PM
Edit albmgr.php

Replace


                                        <td align="center" style="background-color: #D4D0C8; width: 80px; height: 21px; border-top: 1px solid White; border-left: 1px solid White; border-right: 1px solid #808080; border-bottom: 1px solid #808080;"><a href="javascript:Album_Create();" style="color: Black; font-weight: bold;"><?php echo $lang_albmgr_php['new'?></a>
                                        </td>


with


<?php
if (GALLERY_ADMIN_MODE || (!GALLERY_ADMIN_MODE && count ($rowset) < 1)) {
?>

                                        <td align="center" style="background-color: #D4D0C8; width: 80px; height: 21px; border-top: 1px solid White; border-left: 1px solid White; border-right: 1px solid #808080; border-bottom: 1px solid #808080;"><a href="javascript:Album_Create();" style="color: Black; font-weight: bold;"><?php echo $lang_albmgr_php['new'?></a>
                                        </td>
<?php ?>


Note: This will just hide the New button. However, users who know their way around can overcome this.

Abbas