Here is the album moderators mod for
cpg 1.4.x. Admin can assign moderator group for each album from album properties page.
Moderators can do following things
- Approve uploads in that album
- Edit/Delete pics from that album
- Reset views counter/comments for that album
Moderators
cannot edit the album itself i.e. they cannot delete the albums or edit their name/description and such other things.
Do make
backups before applying this mod.
Step 1Modify the database table cpgPrefix_albums by running following query (Use phpMyadmin or other application)
Replace Prefix with your prefix for database tables.
ALTER TABLE `cpgPrefix_albums` ADD `moderator_group` INT NOT NULL;
Step 2
Download the zip file and replace
modifyalb.php, db_input.php, index.php and editpics.php in your coppermine root folder.
english.php in lang folder
init.inc.php, functions.inc.php, themes.inc.php in include folder.
theme.php in themes/yourtheme folder (Attached theme file is for classic)
For those who are already using modified cpg or have applied some mods it is recommended to open the respective files and see the diff and then insert the appropriate code to your scripts. To make it easy i have marked all the modification with ######## characters.
Update: Everyone should make the changes manually as the attached files are of 1.4.3 version and if you replace it in the latest version then that might cause issues. If you do the changes manually then mod will work with all cpg1.4.x versions. Attached files are for cpg1.4.19. If you are using any other version then do the changes manually
For those who are using customized theme they will have to modify their respective theme.php instead of themes.inc.php
Also i have modified themes.inc.php for the sake of simplicity. The correct way would be to modify your respective theme file.
Those who are using unmodified version, it is highly recommended to download the files and replace your current files with these.
Latest file : moderator_cpg1419.1.zipStep 2Download the zip file and extract it. It contains the file changes.txt which has the instructions to modify the scripts. The zip also contains a theme.php (classic theme). You need to manually edit your theme file and apply the changes as given in attached theme.php. The newly added lines are marked with
######### Added ##########
some code
#########################
The modified lines are marked with
######### Modified #########
some code
#########################
If your theme file does not have that piece of code then you can copy it from themes/sample/theme.php and then make the changes.
Latest File : moderator_cpg14x.zipP.S: Thanks to Nibbler and amirw2k for fixing bugs in previous version.
Abbas.