forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: jjhat1 on June 06, 2006, 11:36:40 pm

Title: Remove Crop and Rotate (remove_modify)
Post by: jjhat1 on June 06, 2006, 11:36:40 pm
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]
Title: Re: Remove Crop and Rotate
Post by: Nibbler on June 06, 2006, 11:49:43 pm
Thank you for your contribution.

Note: by the looks of it this is only intended to work with the English language.
Title: Re: Remove Crop and Rotate
Post by: jjhat1 on June 06, 2006, 11:54:51 pm
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.
Title: Re: Remove Crop and Rotate
Post by: Paver on June 07, 2006, 12:05:02 am
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.
Title: Re: Remove Crop and Rotate
Post by: itsanna on January 14, 2008, 03:57:49 am
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
Title: Re: Remove Crop and Rotate
Post by: Nibbler on January 14, 2008, 04:13:20 am
Upgrade to PHP5.
Title: Re: Remove Crop and Rotate
Post by: GFL on January 24, 2008, 05:46:01 pm
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....
Title: Re: Remove Crop and Rotate
Post by: LeAnnSmith on February 16, 2008, 10:26:12 pm
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.
Title: Re: Remove Crop and Rotate
Post by: LeAnnSmith on February 17, 2008, 04:54:04 am
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.
Title: Re: Remove Crop and Rotate
Post by: ady1503 on February 10, 2010, 08:56:54 pm
can somehow be left alone for the admin buttons?
Title: Re: Remove Crop and Rotate
Post by: ady1503 on February 10, 2010, 08:58:31 pm
Control groups or users that you have permission to edit photos.
Title: Re: Remove Crop and Rotate (remove_modify)
Post by: smithlanger on September 29, 2010, 11:44:23 am
sounds good to me...god bless u all people,,,prety much useful info i got so far