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: Limiting quota for users without a personal album  (Read 2164 times)

0 Members and 1 Guest are viewing this topic.

olandir

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Limiting quota for users without a personal album
« on: January 18, 2007, 06:29:12 am »

I've read both the documentation and several forum posts and have been unable to find an answer to this question.

I have Copermine 1.4.10 integrated with SMF 1.1.1, use post-based groups is set to 1.

I would like to set it so that any registered user can post to the public gallery, and when they reach a certain post-based group level, they get options like a personal album. However, I have read in the documentation that in order to set a quota for user groups, they have to have a personal album.

This does that make sense to me. Essentially the documentation reads that users without a personal album automatically have unlimited quota, which I certainly don't want. I need to be able to restrict these users as well so that they are limited to what they can post in the public albums.

Please let me know if I am missing any piece of information. As I said, I've read everything I can find and I've seen no one address this yet.

Logged

Nibbler

  • Guest
Re: Limiting quota for users without a personal album
« Reply #1 on: January 18, 2007, 01:09:33 pm »

You can change the quota check to do that, find in include/picmgmt.inc.php

Code: [Select]
$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE  {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND category = '" . (FIRST_USER_CAT + USER_ID) . "'");
change to

Code: [Select]
$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID);
Logged

olandir

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Limiting quota for users without a personal album
« Reply #2 on: January 18, 2007, 03:31:51 pm »

Just so I'm 100% clear, if I make this change, that means that even users without a personal album will adhear to whatever quota I set?
Logged

Nibbler

  • Guest
Re: Limiting quota for users without a personal album
« Reply #3 on: January 18, 2007, 03:42:35 pm »

The limit will apply to all the user's files, not just those in their user gallery.
Logged
Pages: [1]   Go Up
 

Page created in 0.074 seconds with 15 queries.