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: Limit number of downloads per month?  (Read 2754 times)

0 Members and 1 Guest are viewing this topic.

scotch196

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Limit number of downloads per month?
« on: September 21, 2007, 11:03:31 am »

In a previous post, a member asked: "I have a client who wishes to restrict downloads for their web visitors, basically they want to limit downloads to  1 or 2 images per day. Is this possible just using Coppermine?"

GauGau replied: "Not out of the box - you'll have to code this extra feature in."

Following from the above, I'd like to use Coppermine with membership software (probably aMember) as a means of distributing images to members. However, I also want to limit downloads so that members (who will be registered for Coppermine) can only download 100 images per month (or, as an alternative, a total of 2MB per month).

Can anyone give me an indication how difficult it would be to code this extra function into Coppermine? (I'm assuming this question falls under "permissions")

Many thanks,

Scotch
« Last Edit: September 21, 2007, 03:23:22 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Limit number of downloads per month?
« Reply #1 on: September 21, 2007, 11:17:24 am »

Telling you how difficult this would be depends entirely on your skill levels. I can't give an estimate here. You'll need good PHP skills and readiness to look into the code in detail. Unless you're an experienced PHP coder I strongly suggest to review the idea. You'd have to come up with code that records what images a user has seen (because this equals "downloading") inside the database. You'd then have to come up with code that keeps him from seing more once he has reached the limit.
I guess a skilled coder could come up with a solution in two or three days.

You might want to search for the various discussions about "amember" as well, since you'd have to code a bridge for this app as well.
Logged

scotch196

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Limit number of downloads per month?
« Reply #2 on: September 21, 2007, 02:27:11 pm »

Thank you for your quick and comprehensive reply.

I would definitely not try this myself, but would have to get a programmer to do it. Reason I'm hoping this is possible is to prevent monthly members from simply downloading all or most the images and then cancelling. Commercial stock photo software like Photostore does offer a download limiter, but as far as I know Photostore can't easily be integrated with membership or CMS software.

I like all the features of Coppermine, and aMember Pro does offer bridging with Coppermine, so maybe I'll need to look at alternatives like only offering 6 or 12 month memberships.

Thank you again for your help.

Scotch
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Limit number of downloads per month?
« Reply #3 on: September 21, 2007, 03:29:45 pm »

OK, good to hear that you were able to benefit from my reply. I'd like to remind you of something that many tend to forget: applying a hack as the one you're up to will make many core code changes necessary. You have to understand that each time we release a maintenance release you'll have to re-apply all those code changes. That's one of the main drawbacks of heavy customization. Applying the customization and then never ever touching the app even though there are maintenance releases is not an option either: we release new versions to fix bugs and security issues in existing versions. If you don't upgrade on a regular basis, chances are high that you'll be hacked in the future.
I strongly suggest to thoroughly consider this.
To steer clear of the updating dilema, you (or the coder you hire) could try to implement the hack as a pplugin nthat uses coppermine's plugin interface. ZThe main drawback: when upgrading the core application, the plugins don't get touched. Subsequently, you don't have to worry about upgrades ruining your custom hack (making it necesary to re-apply it). I'm not sure though wether the feature you're looking for can be accomplished using the plugin architecture of coppermine, but it's worth considering it for a while.
Logged

scotch196

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Limit number of downloads per month?
« Reply #4 on: September 22, 2007, 12:41:28 pm »

Thanks GauGau, particularly for explaining the serious drawbacks of heavy customisation and how this impacts on new releases.

From what you have described, I now don't believe it's worth trying to make such major customisation to Coppermine. I will work instead on using Coppermine as it is, with a membership structure that allows members to download what they want, but will limit access to albums or categories based on the length of membership.

Your assistance on this is much appreciated.

Scotch

Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 17 queries.