Support > cpg1.5 plugin contributions

Fullsize access plugin for cpg1.5.x

(1/10) > >>

Αndré:
This is the cpg1.5.x port of the fullsize_access plugin by Klaus Schwarzburg. The port has been created as a freelance job (link), so there's just limited support.

From the original announcement thread:

--- Quote from: ks on September 17, 2006, 10:29:39 am ---this plugin controls access for downloading fullsize images and adds several features:

- restrict access to fullsize pics to registered users
- adds a download link to the image information section
- adds a fullsize download history (datetime,username,ip) table and a statistics page
- sending email to admin and/or customer for each download
- zip download link to download all pics in an album and in favorites
- clicking on medium sized pic to show fullsize pic is disabled
- Secure image files on the file system level via chmod

Most settings can be controlled by a configuration page added to the admin menu. Plugin language is english only, but some settings are in german. This may be improved in a future version... At the moment all registered users are allowed to download fullsize images. You can change this behavior by editing the file fullsize_check.php.

The zip download feature bypasses cpg's build-in favorites zip download. I recommend to switch off the cpg favorites-zip download in the cpg-config page if you want to use this plugin.


The optional file security feature will prevent users to download pics by entering the pics url directly and it works like this:
- if a fullsize pic is requested, the plugin first changes the file attributes from 660 (safe) to 666 (unsafe) and then sends the file to the user. After the download the attribute is set back to 660.
- The fullsize access conig panel has  buttons to secure and unsecure all files
- The file attribute is changed via ftp

If you want to use this feature you have to edit the file 'fullsize_secure.php'. At the beginning of the file there is a section where you must specify your ftp login and the path for the ftp client to the coppermine root.  New pics that are added to the cpg gallery are not automatically secured. You must use the secure button in the plugins config page. So this feature is only useful for galleries were only 1 or a few people are uploading pics.
I'm not an unix/apache expert and the security feature is open for discussion. On my present webserver the file attribute change from 660 to 666 is not needed to download the file via the script. However this was different on my old system.... Any suggestions are welcome!

--- End quote ---

The album ZIP download feature has been disabled, as it doesn't work (missing library).

Mimer:
Hi

I would like to change the plugin, so a specific user group can access fullsize and not all registred users.
For a test I changed fullsize_check.php:

--- Code: ---<?php
function fullsize_check_user(){
if( USER_GROUP=='Testing' ){
return(true);
} else{
return(false);
}
}
?>
--- End code ---
This doesn't do the trick.
Do I have to change something in the codebase.php as well?

Best regards
Mimer  8)

Αndré:
Try

--- Code: ---<?php
function fullsize_check_user(){
global $USER_DATA;
if($USER_DATA['group_name'] == 'Testing'){
return(true);
} else{
return(false);
}
}
?>
--- End code ---

Mimer:
Tnx - works fine now.

Mimer  8)

paquets:
Hi,

Great plugin! Do you know if it would be possible to move the download link from the file info section and position it right under the image itself in displayimage.php?

Thank you!

Navigation

[0] Message Index

[#] Next page

Go to full version