Coppermine Anti-Copy

Released: Aug 03, 2007

Type: / Tool / Script / Mod /

Download Here: Coppermine Anti-Copy

Num. Downloads: 362

Version: 1.02

Questions/Comments | Topic

Tested on Coppermine Galleries 1.4.10
You can see it in action on my very own site:

This is my first time modding the Coppermine software.  There may be better ways to achieve the same effect.  Please let me know if you have suggestions on improving this! :)

This mod will do the following:

- Basic Protection: Overlay a blank image over all pictures (prevent right-click copying)

- Hiding Links: Pass all picture addresses through an image-generating file:
--* Requires random code from server to generate an image.
----* Random code generated from timestamp + offset from any resource of your choosing
--* Optional caption on generated images.
--* Optional resizing on the fly.
--* Image-generator and its features usable independently from mod and gallery (see CUSTOMIZATION)

- For those with Apache: Deny access to files
--* Deny direct access to all image files (specify types in .htaccess file)
--* Forward those who find the images to a page of your choice.
--* Allow you to rename the image-generating file to any name and extension.

- Copying Permissions: Specify specific users and groups to allow copying
--* Enter the user id # or group name into the Gallery Description or Album Password Hint
--* Seperate with commas, no spaces (unless part of group name)
--* Place a negative in front to deny. ex -1, -banned
--* Denying has priority over allowing.
--* Optional removal of caption for those allowed to copy, see CUSTOMIZATION

- Extra features I added to my own gallery and am too lazy to undo:
--* Categories with no visible albums (to the user) and no thumbnail/description become hidden from view.
--* Videos default to 640x480 dimensions
--* Non-image files can now use custom intermediate images if uploaded (default normal_ prefix)

INSTALLATION ===================

- Apache support on your server (for .htaccess); see below if you don't have
- FTP or some sort of file access to your site
- Some php experience.  This is not difficult but it's still easy to get lost.

Sorry but this WILL modify two files. :( Back up the and profile.php file in the include/ folder before overwriting it.

Otherwise copy paste each file (except this readme) into the directories indicated (they should already be in their proper folders).  Of course, 'yourtheme' should be your theme name.  Those not in a folder are in the upper most root directory of your gallery.

NO APACHE ----------------
For those without Apache on their server, do not put in the .htaccess file.  Rename example.jfASjaweaxSPAt to use the .php extension (remember to rename the setting in the themes/yourfile/imagix.php as well).

CUSTOMIZATION =====================
The following files have settings you can change:

- themes/yourtheme/imagix.php > Removal of caption for allowed users and some essential+security settings
- example.jfASjaweaxSPAt > Customize optional captioning and some security features
- .htaccess > Essential settings if you want to use Apache features

Open files with text editor (Notepad).  Read through the comments for details.

IMAGE GENERATOR ------------------
The image generator file (defaulty named example.jfASjaweaxSPAt) can be used as an image for backgrounds, image tags, anything an image is used for.  It is also capable of resizing images through the server, without having to save extra files.  Along the way, you can caption the image as well.  Some may be tempted to use this file alone without the rest of the mod.
As a randomly generated code is required (unless you set it to an easily guessable value), this is only recommended to those who know some PHP at least.  I will only explain basically what you need to do.

The basic layout for using the file is this: (example for example.jfASjaweaxSPAt)

path to file - this is the relative location from the image generator to the picture.
/ must be replaced with __
. must be replaced with -_-
spaces are not supported (they are converted to _ by coppermine anyways)
.. is ignored for security reasons (not allow access outside root), make sure this file is at highest level

special code - the special code is calculated from time()+$offsetex (the offset you specified)

caption size - obviously the caption size.  Goes up to amount you specified in the generator

rsize width - optional, ignored if 0.  It resizes the width to that num. pixels.  Height follows proportionally.

quality - optional to reduce size of JPEG.

MODIFICATION AND DISTRIBUTION ========================

Go to to contact before modifying to distributing.

CHANGELIST ===========================
Version 1.01 (August 17 2007)
- Updated to provide capability for other language galleries.  Originally failed to work for special characters from other languages.
Version 1.02 (January 12 2008)
- Fixed bug with spaces in picture filepath reducing image view to 1x1px; fixed by converting '%20' back to ' ' from URL.
- Added quality setting to image generator.  Optional setting.

Tags/Keywords: PHP, mySQL, Coppermine

Back to pftq Creations Index