how would i go about limiting the number of photos uploaded to a gallery?
not resolvedhow would i go about limiting the number of photos uploaded to a gallery?
To add to this, I'd like to do this on a user basis, so each user can upload a maximum of 5 photos to a particular gallery?
Hi Help,
PhotoSmash doesn't provide this ability. If you're comfortable with PHP, you should be able to make some modifications to the code. It would probably take a few hours to get it all thought through and coded. A general outline would be:
1) You'd need to hook into the filter that is called when the upload link is generated (bwb-photosmash.php). Here, you'd check to see if the user has already loaded too many times and then return nothing if they're at the limit or return the link if they're ok
2) You'd need to modify ajax-wp-upload.php to have a hook that where you could check if they're over the limit or not...if they're over the limit, you'd want to exit the upload routine and return a JSON message that tells them they're over the limit. The reason for this is that once they've got the upload form, they can keep uploading as much as they want, so you need to see at the upload time if they're over the limit.
Hope that helps,
Byron