Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How to limit each user to only one album?  (Read 6142 times)

0 Members and 1 Guest are viewing this topic.

JohnCage

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
How to limit each user to only one album?
« 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
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: How to limit each user to only one album?
« Reply #1 on: August 24, 2006, 01:01:50 pm »

Edit albmgr.php

Replace

Code: [Select]
                                        <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

Code: [Select]
<?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
Logged
Chief Geek at Ranium Systems
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.