autoapprove plugin autoapprove plugin
 

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]

Main Menu

autoapprove plugin

Started by 406man, August 11, 2023, 04:53:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

406man

Coppermine allows uploads to optionally be set so that they require administrator approval. The way Approvals are set in the gallery is crude: for a particular user either all their uploads need approval or none of them. For those who aren't familiar with this feature, the upload Approval setting is set in the Album Upload section of the Groups (user groups) menu used by the administrator. Put another way, the requirement for uploads to be approved is applied to a user group rather than each album. Note that users have to be set up to belong to one or more user groups.

This plugin - autoapprove - was created to provide more flexibility. It allows uploads to a particular album to be approved automatically. Where albums don't require administrator approval of uploads this plugin has no role to play.

Here is an example of its use. In a gallery operated by the author all uploads have to be approved. There are times when this is a nuisance and I want new uploads to go straight into the gallery without any intervention. This plugin implements automatic approval which allows images uploaded to a particular gallery to be viewed straight away.

When designing the plugin I didn't want to design a complex new screen for managing a new field in the album record to allow auto approval. Instead I decided to take a simpler approach and use the existing album keyword facility. Obviously this relies on album keywords not being used already so for those administrators whose galleries use keywords, apologies, this plugin may not be suitable. The keyword can be set to anything in the plugin configuration screen. By default it is set to AUTO. By setting the keyword in an album to the relevant word (for example AUTO) using the Administrators Album menu option, automatic approval will be enabled for that gallery and will take effect provided the overall enable/disable option in the plugin is set to "enabled".

The plugin has three configurable settings.
1) a checkbox which allows automatic approval to be enabled or disabled.
2) a text box where the keyword is set. It is pre-set during plugin installation to be AUTO but can be changed to anything. It must not contain spaces, however.
3) a feature that operates with the uploadnotify plugin. The uploadnotify plugin sends a configurable email when a file is uploaded which includes some text. autoapprove allows a text field to be configured which replaces the text of the notification email when a file is automatically approved. The default text is "The uploaded file has been approved automatically". Where an uploaded file is not auto-approved the notification email uses the text configured in the uploadnotify plugin.

LIMITATION:  In galleries where album keywords are already in use, use of this plugin may interfere with the standard keyword functionality