Remove Crop and Rotate (remove_modify) Remove Crop and Rotate (remove_modify)
 

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

Remove Crop and Rotate (remove_modify)

Started by jjhat1, June 06, 2006, 11:36:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jjhat1

I was never a big fan of the built in crop and rotate tools.  I use Coppermine primarily as an archival tool and this feature would "destroy" the original file.  I use Coppermine at my school to assist in the production of the yearbook and all of the cropping and modifying is done after the file is downloaded.

This is a very simple mod that removes the option to click on "Crop and Rotate" and also prevents the page that performs the function from ever loading if it was manually accessed.

This plugin can also be used by those that simply do not use this function to clean up the interface a little bit.

EDIT: Updated to work with any language, not just English.

[Edit GauGau 2010-03-05]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_remove-modify_v1.2.zip/download
[/Edit]

Nibbler

Thank you for your contribution.

Note: by the looks of it this is only intended to work with the English language.

jjhat1

#2
That is a very good point.  I did not even consider the fact that this would not work in another language.  I was not able to identify any other method of removing this specific segment of HTML but I could in theory use a section of the HTML to identify the segment that needs to be removed.  I updated the code to use HTML instead of the English phrase and I attached the updated version to this post.  It worked during my test.

As suggested I updated my original post to include the new version.

Paver

It's easier for users to see all the versions in the first post.  Take a look at a few other threads on this board to see what I mean.

In addition, if your updated version supercedes the past one, you should remove the past one and only have the updated one, for simplicity.  If you have different features in both that some users might want to choose, then having both might be better.  And if you name your plugin package like others on this board (i.e. "cpg1.4_plugin_remove_modify_1.1.zip"), that makes it easier to keep track of changes as well.

Just some suggestions.  You are welcome to do as you see fit.

itsanna

I tried using this and got this error when I went to look at one of my pictures:

Fatal error: Call to undefined function: strripos() in /home/adorsco/public_html/g/plugins/remove_modify/codebase.php on line 11

Is there a simple fix for this?

Thanks

Anna

Nibbler


GFL

Quote from: Nibbler on January 14, 2008, 04:13:20 AM
Upgrade to PHP5.

Excuse me, but im new here....I tried this plug in also and got that error.  You say to update to PHP5.... is this something the server owner needs to do? 
again im sorry if its a dumb question....

LeAnnSmith

Yes, it is up to the server's administrator to upgrade to PHP5.  This effort must be coordinated with everyone since all scripts will most likely require changes.
You can change remove_modify\codebase.php:
// Remove:   $pos = strripos($haystack, $needle);
// Add:
   $pos = strrpos(strtoupper($haystack), strtoupper($needle));

By the way, this plugin removes the entire menu below the picture -that is, all 3 buttons:
"Crop and Rotate"  "Edit file information"  "DELETE THIS FILE"
That is OK for me because the Edit and Delete actions can be done from the album list view.

LeAnnSmith

Oh yea, and instead of installing this remove_modify plugin, you could simply turn off:

Admin/Config/User settings
"Allow users to retain control over their pics in public galleries"

All 3 buttons will not show up on the enlarged photo view, but any user can still delete or edit from the album list view.

ady1503

can somehow be left alone for the admin buttons?

ady1503

Control groups or users that you have permission to edit photos.

smithlanger

sounds good to me...god bless u all people,,,prety much useful info i got so far
 *Link Removed*  |  *Link Removed*  |  *Link Removed*  |  *Link Removed*