Index: tensions/Crop_Image/functions.inc.php
===================================================================
--- /extensions/Crop_Image/functions.inc.php	(revision 22851)
+++ 	(revision )
@@ -1,101 +1,0 @@
-<?php
-/*
-Plugin Name: Crop Image
-Version: 2.5.c
-Description: Enables to Crop Images already uploaded to the gallery, basic functionality.  Tested with v2.5.1, v2.4.6
-Plugin URI: http://piwigo.org/ext/extension_view.php?eid=700
-Author: Chillexistence
-Author URI: http://piwigo.org
-
-Parts of this functions.inc.php were taken from Header Manager Extension and adapted.
-*/
-if (!defined('CROPIMAGE_PATH')) die('Hacking attempt!');
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/image.class.php');
-
-/**
- * get full size and thumbnail urls and size for a banner
- * @param: string filename
- */
-function get_file_to_crop($file)
-{
-	if (file_exists(get_root_url().$file))
-  {
-	    return array(
-      'NAME' => $file,
-      'PATH' => get_root_url(). $file,
-      'SIZE' => getimagesize($file),
-      );
-  }
-  else
-  {
-    return false;
-  }
-}
-
-/**
- * get properties of the jCrop window
- * @param: array picture(width, height[, coi])
- * @return: array crop(display_width, display_height, l, r, t, b, coi(x, y))
- */
-function get_crop_display($picture)
-{
-  global $conf;
-  
-  // find coi
-  if (!empty($picture['coi']))
-  {
-    $picture['coi'] = array(
-      'l' => char_to_fraction($picture['coi'][0])*$picture['width'],
-      't' => char_to_fraction($picture['coi'][1])*$picture['height'],
-      'r' => char_to_fraction($picture['coi'][2])*$picture['width'],
-      'b' => char_to_fraction($picture['coi'][3])*$picture['height'],
-      );
-  }
-  else
-  {
-    $picture['coi'] = array(
-      'l' => 0,
-      't' => 0,
-      'r' => $picture['width'],
-      'b' => $picture['height'],
-      );
-  }
-  $crop['coi']['x'] = ($picture['coi']['r']+$picture['coi']['l'])/2;
-  $crop['coi']['y'] = ($picture['coi']['b']+$picture['coi']['t'])/2;
-  
-	$conf['original_resize_maxwidth'] = (isset($conf['original_resize_maxwidth']) and $conf['original_resize_maxwidth'] > 500) ? $conf['original_resize_maxwidth'] : 1000;
-  $conf['original_resize_maxheight'] = (isset($conf['original_resize_maxheight']) and $conf['original_resize_maxheight'] > 500) ? $conf['original_resize_maxheight'] : 2000;
-
-	// define default crop frame
-  /*if ($picture['width'] > $conf['original_resize_maxwidth'])
-  {
-    $crop['display_width'] = $conf['original_resize_maxwidth'];
-    $crop['display_height'] = round($picture['height']*$crop['display_width']/$picture['width']);
-    
-    $crop['coi']['x'] = round($crop['coi']['x']*$crop['display_width']/$picture['width']);
-    $crop['coi']['y'] = round($crop['coi']['y']*$crop['display_height']/$picture['height']);
-    
-    $crop['l'] = 0;
-    $crop['r'] = $conf['original_resize_maxwidth'];
-    $crop['t'] = max(0, $crop['coi']['y']-$conf['original_resize_maxheight']/2);
-    $crop['b'] = min($crop['display_height'], $crop['t']+$conf['original_resize_maxheight']);
-  }
-  else
-  {*/
-    $crop['display_width'] = $picture['width'];
-    $crop['display_height'] = $picture['height'];
-    
-    $adapted_crop_height = round($conf['original_resize_maxheight']*$picture['width']/$conf['original_resize_maxwidth']);
-    
-    $crop['l'] = 0;
-    $crop['r'] = $picture['width'];
-    $crop['t'] = max(0, $crop['coi']['y']-$adapted_crop_height/2);
-    $crop['b'] = min($crop['display_height'], $crop['t']+$adapted_crop_height);
-  //}
-  
-  return $crop;
-}
-
-?>
Index: tensions/Crop_Image/main.inc.php
===================================================================
--- /extensions/Crop_Image/main.inc.php	(revision 22851)
+++ 	(revision )
@@ -1,102 +1,0 @@
-<?php
-/*
-Plugin Name: Crop Image
-Version: 2.5.c
-Description: Enables to Crop Images already uploaded to the gallery, basic functionality.  Tested with v2.5.1, v2.4.6
-Plugin URI: http://piwigo.org/ext/extension_view.php?eid=700
-Author: Chillexistence
-Author URI: http://piwigo.org
-*/
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-define('CROPIMAGE_PATH',    PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)));
-
-add_event_handler('init', 'cropImage_init' );
-add_event_handler('tabsheet_before_select','crop_image_add_tab', 50, 2);
-
-function crop_image_add_tab($sheets, $id)
-{  
-	$image_id = isset($_GET['image_id'])? $_GET['image_id'] : '';
- 
-	if ($id == 'photo')
-  {
-    $sheets['crop'] = array(
-      'caption' => l10n('Crop'),
-      'url' => get_root_url().'admin.php?page=plugin-cropImage-'.$image_id,
-      );
-  }
-  
-  return $sheets;
-}
-		
-function cropImage_init()
-{
-  global $conf, $pwg_loaded_plugins;		
-  if (!defined('PWG_HELP') and !defined('IN_ADMIN') and is_admin())
-  {
-		// Add an event handler for a prefilter on picture.php pages
-		add_event_handler('loc_begin_picture', 'cropImage_set_prefilter_add_to_pic_info', 55 );
-	}
-}	
-	
-////////////////////////////////////////////////////////////////////////////////
-// Add the prefilter for the Crop Link on the template on picture.php
-////////////////////////////////////////////////////////////////////////////////
-function cropImage_set_prefilter_add_to_pic_info()
-{
-	global $template, $conf, $user, $page;
-	
-	$url_admin =
-    get_root_url().'admin.php?page=plugin-cropImage-'.$page['image_id']
-    .(isset($page['category']) ? '&amp;cat_id='.$page['category']['id'] : '')
-    ;
-	$template->set_prefilter('picture', 'cropImage_add_button');
-	
-	$template->func_combine_css(array('path' => CROPIMAGE_PATH.'/css/cropimage_toolbar_buttons.css'));
-	
-	//Get the Theme to display the correct icon style
-	if ( in_array($user['theme'], array('Sylvia','sylvia')) )
-	{
-	 	 $ButtonTheme = "sylvia";
-	}
-	elseif ( in_array($user['theme'], array('elegant')) )
-	{
-	 	 $ButtonTheme = "elegant";
-	}
-	elseif ( in_array($user['theme'], array('clear')) )
-	{
-	 	 $ButtonTheme = "clear";
-	}
-	elseif ( in_array($user['theme'], array('dark')) )
-	{
-	 	 $ButtonTheme = "dark";
-	}
-	else
-	{
-	 	 $ButtonTheme = "clear";
-	}
-	
-	$template->assign(
-    array(
-      'U_CROPIMAGE' => $url_admin,
-			'U_CROPIMAGE_THEME' => $ButtonTheme,
-      )
-    );
-}	
-////////////////////////////////////////////////////////////////////////////////
-// Insert the template for the Crop Link on picture.php
-////////////////////////////////////////////////////////////////////////////////
-function cropImage_add_button($content)
-{
-	// Add the information after imageInfoTable so before everything else like author and date.
-	$search = '{strip}{if isset($U_CADDIE)}{*caddie management BEGIN*}';
-	
-	$replacement = '
-	<a class="pwg-state-default pwg-button" href="{$U_CROPIMAGE}" title="Crop Image" rel="nofollow">
-    	 <span class="ci-icon ci-icon-cropimage-{$U_CROPIMAGE_THEME}"> </span><span class="pwg-button-text">Crop Image</span>
-  </a>
-	' . $search;
-
-	return str_replace($search, $replacement, $content);
-}
-	
-?>
