Index: /extensions/square_thumbnails/branch/2.1/functions.inc.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/functions.inc.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/functions.inc.php	(revision 9754)
@@ -0,0 +1,263 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+// Resize function for thumbnails creation page
+function thumbnail_square_resize($info, $path, $newWidth, $newHeight, $tn_ext)
+{
+  global $conf, $lang, $page;
+
+  if ($info !== false)
+  {
+    //someone hooked us - so we skip
+    return $info;
+  }
+
+  if (!function_exists('gd_info'))
+  {
+    return;
+  }
+
+  $filename = basename($path);
+  $dirname = dirname($path);
+  
+  // extension of the picture filename
+  $extension = get_extension($filename);
+
+  if (in_array($extension, array('jpg', 'JPG', 'jpeg', 'JPEG')))
+  {
+    $srcImage = @imagecreatefromjpeg($path);
+  }
+  else if ($extension == 'png' or $extension == 'PNG')
+  {
+    $srcImage = @imagecreatefrompng($path);
+  }
+  else
+  {
+    unset($extension);
+  }
+
+  if ( isset( $srcImage ) )
+  {
+    // width/height
+    $srcWidth    = imagesx( $srcImage ); 
+    $srcHeight   = imagesy( $srcImage ); 
+    $x = 0;
+    $y = 0;
+
+    if($srcWidth > $srcHeight)
+    {
+      $x = ceil(($srcWidth - $srcHeight) / 2 );
+      $srcWidth = $srcHeight;
+    }
+    elseif ($srcHeight > $srcWidth)
+    {
+      $y = ceil(($srcHeight - $srcWidth) / 2);
+      $srcHeight = $srcWidth;
+    }
+
+    $ratioWidth  = $srcWidth/$newWidth;
+    $ratioHeight = $srcHeight/$newHeight;
+
+    // maximal size exceeded ?
+    if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
+    {
+      if ( $ratioWidth < $ratioHeight)
+      { 
+        $destWidth = $srcWidth/$ratioHeight;
+        $destHeight = $newHeight; 
+      }
+      else
+      { 
+        $destWidth = $newWidth; 
+        $destHeight = $srcHeight/$ratioWidth;
+      }
+    }
+    else
+    {
+      $destWidth = $srcWidth;
+      $destHeight = $srcHeight;
+    }
+
+    // according to the GD version installed on the server
+    if ( $_POST['gd'] == 2 )
+    {
+      // GD 2.0 or more recent -> good results (but slower)
+      $destImage = imagecreatetruecolor( $destWidth, $destHeight); 
+      imagecopyresampled( $destImage, $srcImage, 0, 0, $x, $y,
+                          $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+    else
+    {
+      // GD prior to version  2 -> pretty bad results :-/ (but fast)
+      $destImage = imagecreate( $destWidth, $destHeight);
+      imagecopyresized( $destImage, $srcImage, 0, 0, $x, $y,
+                        $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+
+    if (($tndir = mkget_thumbnail_dir($dirname, $page['errors'])) == false)
+    {
+      return false;
+    }
+
+    $dest_file = $tndir.'/'.$conf['prefix_thumbnail'];
+    $dest_file.= get_filename_wo_extension($filename);
+    $dest_file.= '.'.$tn_ext;
+    
+    // creation and backup of final picture
+    if (!is_writable($tndir))
+    {
+      array_push($page['errors'], '['.$tndir.'] : '.l10n('no write access'));
+      return false;
+    }
+    imagejpeg($destImage, $dest_file, $conf['tn_compression_level']);
+    // freeing memory ressources
+    imagedestroy( $srcImage );
+    imagedestroy( $destImage );
+    
+    list($tn_width, $tn_height) = getimagesize($dest_file);
+    $tn_size = floor(filesize($dest_file) / 1024).' KB';
+    
+    $info = array( 'path'      => $path,
+                   'tn_file'   => $dest_file,
+                   'tn_width'  => $tn_width,
+                   'tn_height' => $tn_height,
+                   'tn_size'   => $tn_size );
+    return $info;
+  }
+  // error
+  else
+  {
+    echo l10n('Picture unreachable or no support')." ";
+    if ( isset( $extenstion ) )
+    {
+      echo l10n('for the file format').' '.$extension;
+    }
+    else
+    {
+      echo l10n('for this file format');
+    }
+    exit();
+  }
+}
+
+
+// Resize function for Upload Form
+function upload_square_resize($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality)
+{
+  if ($result !== false)
+  {
+    //someone hooked us - so we skip
+    return $result;
+  }
+
+  if (is_imagick())
+  {
+    return pwg_image_resize_im($source_filepath, $destination_filepath, $max_width, $max_height, $quality, $strip_metadata);
+  }
+  else
+  {
+    return pwg_image_resize_gd($source_filepath, $destination_filepath, $max_width, $max_height, $quality);
+  }
+}
+
+function upload_square_resize_gd($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality)
+{
+  if (!function_exists('gd_info'))
+  {
+    return false;
+  }
+
+  // extension of the picture filename
+  $extension = strtolower(get_extension($source_filepath));
+
+  $source_image = null;
+  if (in_array($extension, array('jpg', 'jpeg')))
+  {
+    $source_image = imagecreatefromjpeg($source_filepath);
+  }
+  else if ($extension == 'png')
+  {
+    $source_image = imagecreatefrompng($source_filepath);
+  }
+  else
+  {
+    die('unsupported file extension');
+  }
+
+  $rotation = null;
+  if (function_exists('imagerotate'))
+  {
+    $rotation = get_rotation_angle($source_filepath);
+  }
+  
+  // width/height
+  $source_width  = imagesx($source_image); 
+  $source_height = imagesy($source_image);
+  $x = 0;
+  $y = 0;
+
+  if($source_width > $source_height)
+  {
+    $x = ceil(($source_width - $source_height) / 2 );
+    $source_width = $source_height;
+  }
+  elseif ($source_height > $source_width)
+  {
+    $y = ceil(($source_height - $source_width) / 2);
+    $source_height = $source_width;
+  }
+  
+  $resize_dimensions = get_resize_dimensions($source_width, $source_height, $max_width, $max_height, $rotation);
+
+  // testing on height is useless in theory: if width is unchanged, there
+  // should be no resize, because width/height ratio is not modified.
+  if ($resize_dimensions['width'] == $source_width and $resize_dimensions['height'] == $source_height)
+  {
+    // the image doesn't need any resize! We just copy it to the destination
+    copy($source_filepath, $destination_filepath);
+    return true;
+  }
+  
+  $destination_image = imagecreatetruecolor($resize_dimensions['width'], $resize_dimensions['height']);
+  
+  imagecopyresampled(
+    $destination_image,
+    $source_image,
+    0,
+    0,
+    $x,
+    $y,
+    $resize_dimensions['width'],
+    $resize_dimensions['height'],
+    $source_width,
+    $source_height
+    );
+
+  // rotation occurs only on resized photo to avoid useless memory use
+  if (isset($rotation))
+  {
+    $destination_image = imagerotate($destination_image, $rotation, 0);
+  }
+  
+  $extension = strtolower(get_extension($destination_filepath));
+  if ($extension == 'png')
+  {
+    imagepng($destination_image, $destination_filepath);
+  }
+  else
+  {
+    imagejpeg($destination_image, $destination_filepath, $quality);
+  }
+  // freeing memory ressources
+  imagedestroy($source_image);
+  imagedestroy($destination_image);
+
+  // everything should be OK if we are here!
+  return true;
+}
+
+add_event_handler('thumbnail_resize', 'thumbnail_square_resize', 40, 5);
+add_event_handler('upload_thumbnail_resize', 'upload_square_resize', 40, 6);
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/cs_CZ/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/cs_CZ/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/cs_CZ/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Přídá možnost vytvářet čtvercové náhledy obrázků.
Index: /extensions/square_thumbnails/branch/2.1/language/cs_CZ/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/cs_CZ/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/cs_CZ/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/cs_CZ/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/cs_CZ/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Čtvercové náhledy obrázků';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/de_DE/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/de_DE/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/de_DE/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Erweitert Piwigo um die Möglichkeit, quadratische Vorschaubilder zu erzeugen
Index: /extensions/square_thumbnails/branch/2.1/language/de_DE/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/de_DE/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/de_DE/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/de_DE/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/de_DE/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Quadratische Vorschaubilder';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/en_UK/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/en_UK/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/en_UK/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+﻿Add an option to make square thumbnails
Index: /extensions/square_thumbnails/branch/2.1/language/en_UK/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/en_UK/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/en_UK/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/en_UK/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/en_UK/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Square Thumbnails';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/es_ES/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/es_ES/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/es_ES/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Añade una opción para hacer miniaturas cuadradas
Index: /extensions/square_thumbnails/branch/2.1/language/es_ES/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/es_ES/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/es_ES/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/es_ES/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/es_ES/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniaturas cuadradas';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/fr_FR/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/fr_FR/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/fr_FR/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Ajoute une option pour faire des miniatures carrées
Index: /extensions/square_thumbnails/branch/2.1/language/fr_FR/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/fr_FR/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/fr_FR/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/fr_FR/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/fr_FR/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniatures carrées';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/hu_HU/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/hu_HU/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/hu_HU/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Azonos alakú bélyegképek lehetőség hozzáadása a bélyegképek oldalhoz
Index: /extensions/square_thumbnails/branch/2.1/language/hu_HU/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/hu_HU/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/hu_HU/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/hu_HU/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/hu_HU/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Azonos alakú bélyegképek';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/it_IT/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/it_IT/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/it_IT/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+﻿Aggiungere un'opzione per fare miniature quadrate
Index: /extensions/square_thumbnails/branch/2.1/language/it_IT/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/it_IT/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/it_IT/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/it_IT/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/it_IT/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniature Quadrate';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/lv_LV/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/lv_LV/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/lv_LV/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Pievieno iespēju, lai izveidotu kvadrātveida sīkbildes
Index: /extensions/square_thumbnails/branch/2.1/language/lv_LV/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/lv_LV/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/lv_LV/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/lv_LV/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/lv_LV/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kvadrātveida Sīkbildes';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/no_NO/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/no_NO/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/no_NO/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Legg til et alternativ for å kunne lage firkantede miniatyr bilder
Index: /extensions/square_thumbnails/branch/2.1/language/no_NO/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/no_NO/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/no_NO/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/no_NO/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/no_NO/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/no_NO/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Firkantede miniatyr bilder';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/pl_PL/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/pl_PL/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/pl_PL/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Dodaje opcję tworzenia kwadratowych miniatur
Index: /extensions/square_thumbnails/branch/2.1/language/pl_PL/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/pl_PL/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/pl_PL/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/pl_PL/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/pl_PL/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/pl_PL/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kwadratowe Miniatury';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/ru_RU/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/ru_RU/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/ru_RU/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Добавляет возможность делать миниатюры квадратными
Index: /extensions/square_thumbnails/branch/2.1/language/ru_RU/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/ru_RU/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/ru_RU/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/ru_RU/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/ru_RU/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Квадратные миниатюры';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/sk_SK/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sk_SK/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sk_SK/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Pridanie voľby na vytvorenie štvorcových náhľadov
Index: /extensions/square_thumbnails/branch/2.1/language/sk_SK/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sk_SK/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sk_SK/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/sk_SK/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sk_SK/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sk_SK/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Štvorcové náhľady';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/sv_SE/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sv_SE/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sv_SE/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Lägg till alternativet att använda kvadratiska miniatyrbilder
Index: /extensions/square_thumbnails/branch/2.1/language/sv_SE/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sv_SE/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sv_SE/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/sv_SE/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/sv_SE/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/sv_SE/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kvadratiska Miniatyrbilder';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/tr_TR/description.txt
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/tr_TR/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/tr_TR/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Küçük resimler oluşturmak için bir seçenek ekle
Index: /extensions/square_thumbnails/branch/2.1/language/tr_TR/index.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/tr_TR/index.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/tr_TR/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/branch/2.1/language/tr_TR/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/language/tr_TR/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/language/tr_TR/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Küçük Resimler';
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/main.inc.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/main.inc.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/main.inc.php	(revision 9754)
@@ -0,0 +1,51 @@
+<?php
+/*
+Plugin Name: Square Thumbnails
+Version: auto
+Description: Add an option to make square thumbnails
+Plugin URI: auto
+Author: P@t
+Author URI: http://www.gauchon.com
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('SQUARE_THUMB_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+if (defined('IN_ADMIN'))
+{
+  add_event_handler('init', 'square_thumbnails_init');
+
+  function square_thumbnails_init()
+  {
+    global $conf;
+
+    // Thumbnail creation page
+    if (isset($_GET['page']) and $_GET['page'] == 'thumbnail')
+    {
+      include(SQUARE_THUMB_PATH.'thumbnail.php');
+    }
+
+    // Upload Form
+    if (isset($_GET['page']) and $_GET['page'] == 'photos_add')
+    {
+      if (isset($_POST['submit_upload']) and @$conf['upload_form_thumb_square'])
+      {
+        include(SQUARE_THUMB_PATH.'functions.inc.php');
+      }
+
+      if (isset($_GET['section']) and $_GET['section'] == 'settings')
+      {
+        include(SQUARE_THUMB_PATH.'photo_add_settings.php');
+      }
+    }
+
+    // Uploadify
+    if (script_basename() == 'uploadify' and @$conf['upload_form_thumb_square'])
+    {
+      include(SQUARE_THUMB_PATH.'functions.inc.php');
+    }
+  }
+}
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/photo_add_settings.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/photo_add_settings.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/photo_add_settings.php	(revision 9754)
@@ -0,0 +1,90 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template;
+
+load_language('plugin.lang', SQUARE_THUMB_PATH);
+
+// Insert param in DB if not exists
+if (!isset($conf['upload_form_thumb_square']))
+{
+  mass_inserts(
+    CONFIG_TABLE,
+    array('param', 'value'),
+    array(
+      array(
+        'param' => 'upload_form_thumb_square',
+        'value' => 'false'
+        )
+      )
+    );
+}
+
+// Update param on submit
+if (isset($_POST['submit']))
+{
+  $conf['upload_form_thumb_square'] = isset($_POST['square']);
+
+  mass_updates(
+    CONFIG_TABLE,
+    array(
+      'primary' => array('param'),
+      'update' => array('value')
+      ),
+    array(
+      array(
+        'param' => 'upload_form_thumb_square',
+        'value' => $conf['upload_form_thumb_square'] ? 'true':'false'
+        )
+      )
+    );
+}
+
+// Template init
+$template->assign('SQUARE', $conf['upload_form_thumb_square']);
+
+// Add prefilter
+$template->set_prefilter('photos_add', 'add_square_option');
+
+function add_square_option($content, $smarty)
+{
+  $search = '<legend>{\'Thumbnail\'|@translate}</legend>
+
+    <table>';
+
+  $replacement = '
+{html_head}
+{literal}
+<script type="text/javascript">
+jQuery().ready(function(){
+  jQuery("input[name^=\'thumb_max\']").keyup(function(){
+    if(jQuery("#square").attr("checked")){
+      if (this.name == "thumb_maxwidth"){
+        jQuery("input[name=\'thumb_maxheight\']").attr("value", this.value);
+      }else{
+        jQuery("input[name=\'thumb_maxwidth\']").attr("value", this.value);
+      }
+    }
+  });
+  jQuery("#square").click(function(){
+    if (this.checked)
+      jQuery("input[name^=\'thumb_maxheight\']").attr("value", jQuery("input[name^=\'thumb_maxwidth\']").attr("value"));
+  });
+});
+</script>
+{/literal}
+{/html_head}
+
+<legend>{\'Thumbnail\'|@translate}</legend>
+
+    <table>
+      <tr>
+        <th>{\'Square Thumbnails\'|@translate}</th>
+	      <td><input type="checkbox" name="square" id="square" {if $SQUARE}checked="checked"{/if}></td>
+      </tr>';
+
+  return str_replace($search, $replacement, $content);
+}
+
+?>
Index: /extensions/square_thumbnails/branch/2.1/thumbnail.php
===================================================================
--- /extensions/square_thumbnails/branch/2.1/thumbnail.php	(revision 9754)
+++ /extensions/square_thumbnails/branch/2.1/thumbnail.php	(revision 9754)
@@ -0,0 +1,59 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template;
+
+load_language('plugin.lang', SQUARE_THUMB_PATH);
+
+// Add handler for square resize
+if (isset($_POST['square']))
+{
+  include(SQUARE_THUMB_PATH.'functions.inc.php');
+}
+
+// Add prefilter
+$template->set_prefilter('thumbnail', 'add_square_option');
+
+function add_square_option($content, $smarty)
+{
+  $search = '<li>
+        <span class="property">
+          <label for="width">{\'maximum width\'|@translate}</label>';
+
+  $replacement = '
+{html_head}
+{literal}
+<script type="text/javascript">
+jQuery().ready(function(){
+  jQuery(":text").keyup(function(){
+    if(jQuery("#square").attr("checked")){
+      if (this.id == "width"){
+        jQuery("#height").attr("value", this.value);
+      }else{
+        jQuery("#width").attr("value", this.value);
+      }
+    }
+  });
+  jQuery("#square").click(function(){
+    if (this.checked)
+      jQuery("#height").attr("value", jQuery("#width").attr("value"));
+  });
+});
+</script>
+{/literal}
+{/html_head}
+
+      <li>
+        <span class="property">{\'Square Thumbnails\'|@translate}</span>
+	     <label><input type="checkbox" name="square" id="square" {if $params.SQUARE}checked="checked"{/if}></label>
+      </li>
+
+      <li>
+        <span class="property">
+          <label for="width">{\'maximum width\'|@translate}</label>';
+
+  return str_replace($search, $replacement, $content);
+}
+
+?>
Index: tensions/square_thumbnails/functions.inc.php
===================================================================
--- /extensions/square_thumbnails/functions.inc.php	(revision 9753)
+++ 	(revision )
@@ -1,244 +1,0 @@
-<?php
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-// Resize function for thumbnails creation page
-function thumbnail_square_resize($info, $path, $newWidth, $newHeight, $tn_ext)
-{
-  global $conf, $lang, $page;
-
-  if ($info !== false)
-  {
-    //someone hooked us - so we skip
-    return $info;
-  }
-
-  if (!function_exists('gd_info'))
-  {
-    return;
-  }
-
-  $filename = basename($path);
-  $dirname = dirname($path);
-  
-  // extension of the picture filename
-  $extension = get_extension($filename);
-
-  if (in_array($extension, array('jpg', 'JPG', 'jpeg', 'JPEG')))
-  {
-    $srcImage = @imagecreatefromjpeg($path);
-  }
-  else if ($extension == 'png' or $extension == 'PNG')
-  {
-    $srcImage = @imagecreatefrompng($path);
-  }
-  else
-  {
-    unset($extension);
-  }
-
-  if ( isset( $srcImage ) )
-  {
-    // width/height
-    $srcWidth    = imagesx( $srcImage ); 
-    $srcHeight   = imagesy( $srcImage ); 
-    $x = 0;
-    $y = 0;
-
-    if($srcWidth > $srcHeight)
-    {
-      $x = ceil(($srcWidth - $srcHeight) / 2 );
-      $srcWidth = $srcHeight;
-    }
-    elseif ($srcHeight > $srcWidth)
-    {
-      $y = ceil(($srcHeight - $srcWidth) / 2);
-      $srcHeight = $srcWidth;
-    }
-
-    $ratioWidth  = $srcWidth/$newWidth;
-    $ratioHeight = $srcHeight/$newHeight;
-
-    // maximal size exceeded ?
-    if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
-    {
-      if ( $ratioWidth < $ratioHeight)
-      { 
-        $destWidth = $srcWidth/$ratioHeight;
-        $destHeight = $newHeight; 
-      }
-      else
-      { 
-        $destWidth = $newWidth; 
-        $destHeight = $srcHeight/$ratioWidth;
-      }
-    }
-    else
-    {
-      $destWidth = $srcWidth;
-      $destHeight = $srcHeight;
-    }
-
-    // according to the GD version installed on the server
-    if ( $_POST['gd'] == 2 )
-    {
-      // GD 2.0 or more recent -> good results (but slower)
-      $destImage = imagecreatetruecolor( $destWidth, $destHeight); 
-      imagecopyresampled( $destImage, $srcImage, 0, 0, $x, $y,
-                          $destWidth,$destHeight,$srcWidth,$srcHeight );
-    }
-    else
-    {
-      // GD prior to version  2 -> pretty bad results :-/ (but fast)
-      $destImage = imagecreate( $destWidth, $destHeight);
-      imagecopyresized( $destImage, $srcImage, 0, 0, $x, $y,
-                        $destWidth,$destHeight,$srcWidth,$srcHeight );
-    }
-
-    if (($tndir = mkget_thumbnail_dir($dirname, $page['errors'])) == false)
-    {
-      return false;
-    }
-
-    $dest_file = $tndir.'/'.$conf['prefix_thumbnail'];
-    $dest_file.= get_filename_wo_extension($filename);
-    $dest_file.= '.'.$tn_ext;
-    
-    // creation and backup of final picture
-    if (!is_writable($tndir))
-    {
-      array_push($page['errors'], '['.$tndir.'] : '.l10n('no write access'));
-      return false;
-    }
-    imagejpeg($destImage, $dest_file, $conf['tn_compression_level']);
-    // freeing memory ressources
-    imagedestroy( $srcImage );
-    imagedestroy( $destImage );
-    
-    list($tn_width, $tn_height) = getimagesize($dest_file);
-    $tn_size = floor(filesize($dest_file) / 1024).' KB';
-    
-    $info = array( 'path'      => $path,
-                   'tn_file'   => $dest_file,
-                   'tn_width'  => $tn_width,
-                   'tn_height' => $tn_height,
-                   'tn_size'   => $tn_size );
-    return $info;
-  }
-  // error
-  else
-  {
-    echo l10n('Picture unreachable or no support')." ";
-    if ( isset( $extenstion ) )
-    {
-      echo l10n('for the file format').' '.$extension;
-    }
-    else
-    {
-      echo l10n('for this file format');
-    }
-    exit();
-  }
-}
-
-
-// Resize function for Upload Form
-function upload_square_resize($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality)
-{
-  if ($result !== false)
-  {
-    //someone hooked us - so we skip
-    return $result;
-  }
-
-  if (!function_exists('gd_info'))
-  {
-    return false;
-  }
-
-  // extension of the picture filename
-  $extension = strtolower(get_extension($source_filepath));
-
-  $source_image = null;
-  if (in_array($extension, array('jpg', 'jpeg')))
-  {
-    $source_image = @imagecreatefromjpeg($source_filepath);
-  }
-  else if ($extension == 'png')
-  {
-    $source_image = @imagecreatefrompng($source_filepath);
-  }
-  else
-  {
-    die('unsupported file extension');
-  }
-  
-  // width/height
-  $source_width  = imagesx($source_image); 
-  $source_height = imagesy($source_image);
-  $x = 0;
-  $y = 0;
-
-  if($source_width > $source_height)
-  {
-    $x = ceil(($source_width - $source_height) / 2 );
-    $source_width = $source_height;
-  }
-  elseif ($source_height > $source_width)
-  {
-    $y = ceil(($source_height - $source_width) / 2);
-    $source_height = $source_width;
-  }
-  
-  $ratio_width  = $source_width / $max_width;
-  $ratio_height = $source_height / $max_height;
-  
-  // maximal size exceeded ?
-  if ($ratio_width > 1 or $ratio_height > 1)
-  {
-    if ($ratio_width < $ratio_height)
-    { 
-      $destination_width = ceil($source_width / $ratio_height);
-      $destination_height = $max_height; 
-    }
-    else
-    { 
-      $destination_width = $max_width; 
-      $destination_height = ceil($source_height / $ratio_width);
-    }
-  }
-  else
-  {
-    // the image doesn't need any resize! We just copy it to the destination
-    copy($source_filepath, $destination_filepath);
-    return true;
-  }
-  
-  $destination_image = imagecreatetruecolor($destination_width, $destination_height);
-  
-  imagecopyresampled(
-    $destination_image,
-    $source_image,
-    0,
-    0,
-    $x,
-    $y,
-    $destination_width,
-    $destination_height,
-    $source_width,
-    $source_height
-    );
-  
-  imagejpeg($destination_image, $destination_filepath, $quality);
-  // freeing memory ressources
-  imagedestroy($source_image);
-  imagedestroy($destination_image);
-
-  // everything should be OK if we are here!
-  return true;
-}
-
-add_event_handler('thumbnail_resize', 'thumbnail_square_resize', 40, 5);
-add_event_handler('upload_thumbnail_resize', 'upload_square_resize', 40, 6);
-
-?>
Index: tensions/square_thumbnails/index.php
===================================================================
--- /extensions/square_thumbnails/index.php	(revision 9753)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | PhpWebGallery - a PHP based picture gallery                           |
-// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
-// +-----------------------------------------------------------------------+
-// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
-// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
-// | last modifier : $Author: rub $
-// | revision      : $Revision: 1912 $
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
Index: tensions/square_thumbnails/main.inc.php
===================================================================
--- /extensions/square_thumbnails/main.inc.php	(revision 9753)
+++ 	(revision )
@@ -1,51 +1,0 @@
-<?php
-/*
-Plugin Name: Square Thumbnails
-Version: auto
-Description: Add an option to make square thumbnails
-Plugin URI: auto
-Author: P@t
-Author URI: http://www.gauchon.com
-*/
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-define('SQUARE_THUMB_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
-
-if (defined('IN_ADMIN'))
-{
-  add_event_handler('init', 'square_thumbnails_init');
-
-  function square_thumbnails_init()
-  {
-    global $conf;
-
-    // Thumbnail creation page
-    if (isset($_GET['page']) and $_GET['page'] == 'thumbnail')
-    {
-      include(SQUARE_THUMB_PATH.'thumbnail.php');
-    }
-
-    // Upload Form
-    if (isset($_GET['page']) and $_GET['page'] == 'photos_add')
-    {
-      if (isset($_POST['submit_upload']) and @$conf['upload_form_thumb_square'])
-      {
-        include(SQUARE_THUMB_PATH.'functions.inc.php');
-      }
-
-      if (isset($_GET['section']) and $_GET['section'] == 'settings')
-      {
-        include(SQUARE_THUMB_PATH.'photo_add_settings.php');
-      }
-    }
-
-    // Uploadify
-    if (script_basename() == 'uploadify' and @$conf['upload_form_thumb_square'])
-    {
-      include(SQUARE_THUMB_PATH.'functions.inc.php');
-    }
-  }
-}
-
-?>
Index: tensions/square_thumbnails/photo_add_settings.php
===================================================================
--- /extensions/square_thumbnails/photo_add_settings.php	(revision 9753)
+++ 	(revision )
@@ -1,90 +1,0 @@
-<?php
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-global $template;
-
-load_language('plugin.lang', SQUARE_THUMB_PATH);
-
-// Insert param in DB if not exists
-if (!isset($conf['upload_form_thumb_square']))
-{
-  mass_inserts(
-    CONFIG_TABLE,
-    array('param', 'value'),
-    array(
-      array(
-        'param' => 'upload_form_thumb_square',
-        'value' => 'false'
-        )
-      )
-    );
-}
-
-// Update param on submit
-if (isset($_POST['submit']))
-{
-  $conf['upload_form_thumb_square'] = isset($_POST['square']);
-
-  mass_updates(
-    CONFIG_TABLE,
-    array(
-      'primary' => array('param'),
-      'update' => array('value')
-      ),
-    array(
-      array(
-        'param' => 'upload_form_thumb_square',
-        'value' => $conf['upload_form_thumb_square'] ? 'true':'false'
-        )
-      )
-    );
-}
-
-// Template init
-$template->assign('SQUARE', $conf['upload_form_thumb_square']);
-
-// Add prefilter
-$template->set_prefilter('photos_add', 'add_square_option');
-
-function add_square_option($content, $smarty)
-{
-  $search = '<legend>{\'Thumbnail\'|@translate}</legend>
-
-    <table>';
-
-  $replacement = '
-{html_head}
-{literal}
-<script type="text/javascript">
-jQuery().ready(function(){
-  jQuery("input[name^=\'thumb_max\']").keyup(function(){
-    if(jQuery("#square").attr("checked")){
-      if (this.name == "thumb_maxwidth"){
-        jQuery("input[name=\'thumb_maxheight\']").attr("value", this.value);
-      }else{
-        jQuery("input[name=\'thumb_maxwidth\']").attr("value", this.value);
-      }
-    }
-  });
-  jQuery("#square").click(function(){
-    if (this.checked)
-      jQuery("input[name^=\'thumb_maxheight\']").attr("value", jQuery("input[name^=\'thumb_maxwidth\']").attr("value"));
-  });
-});
-</script>
-{/literal}
-{/html_head}
-
-<legend>{\'Thumbnail\'|@translate}</legend>
-
-    <table>
-      <tr>
-        <th>{\'Square Thumbnails\'|@translate}</th>
-	      <td><input type="checkbox" name="square" id="square" {if $SQUARE}checked="checked"{/if}></td>
-      </tr>';
-
-  return str_replace($search, $replacement, $content);
-}
-
-?>
Index: tensions/square_thumbnails/thumbnail.php
===================================================================
--- /extensions/square_thumbnails/thumbnail.php	(revision 9753)
+++ 	(revision )
@@ -1,59 +1,0 @@
-<?php
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-global $template;
-
-load_language('plugin.lang', SQUARE_THUMB_PATH);
-
-// Add handler for square resize
-if (isset($_POST['square']))
-{
-  include(SQUARE_THUMB_PATH.'functions.inc.php');
-}
-
-// Add prefilter
-$template->set_prefilter('thumbnail', 'add_square_option');
-
-function add_square_option($content, $smarty)
-{
-  $search = '<li>
-        <span class="property">
-          <label for="width">{\'maximum width\'|@translate}</label>';
-
-  $replacement = '
-{html_head}
-{literal}
-<script type="text/javascript">
-jQuery().ready(function(){
-  jQuery(":text").keyup(function(){
-    if(jQuery("#square").attr("checked")){
-      if (this.id == "width"){
-        jQuery("#height").attr("value", this.value);
-      }else{
-        jQuery("#width").attr("value", this.value);
-      }
-    }
-  });
-  jQuery("#square").click(function(){
-    if (this.checked)
-      jQuery("#height").attr("value", jQuery("#width").attr("value"));
-  });
-});
-</script>
-{/literal}
-{/html_head}
-
-      <li>
-        <span class="property">{\'Square Thumbnails\'|@translate}</span>
-	     <label><input type="checkbox" name="square" id="square" {if $params.SQUARE}checked="checked"{/if}></label>
-      </li>
-
-      <li>
-        <span class="property">
-          <label for="width">{\'maximum width\'|@translate}</label>';
-
-  return str_replace($search, $replacement, $content);
-}
-
-?>
Index: /extensions/square_thumbnails/trunk/functions.inc.php
===================================================================
--- /extensions/square_thumbnails/trunk/functions.inc.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/functions.inc.php	(revision 9754)
@@ -0,0 +1,263 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+// Resize function for thumbnails creation page
+function thumbnail_square_resize($info, $path, $newWidth, $newHeight, $tn_ext)
+{
+  global $conf, $lang, $page;
+
+  if ($info !== false)
+  {
+    //someone hooked us - so we skip
+    return $info;
+  }
+
+  if (!function_exists('gd_info'))
+  {
+    return;
+  }
+
+  $filename = basename($path);
+  $dirname = dirname($path);
+  
+  // extension of the picture filename
+  $extension = get_extension($filename);
+
+  if (in_array($extension, array('jpg', 'JPG', 'jpeg', 'JPEG')))
+  {
+    $srcImage = @imagecreatefromjpeg($path);
+  }
+  else if ($extension == 'png' or $extension == 'PNG')
+  {
+    $srcImage = @imagecreatefrompng($path);
+  }
+  else
+  {
+    unset($extension);
+  }
+
+  if ( isset( $srcImage ) )
+  {
+    // width/height
+    $srcWidth    = imagesx( $srcImage ); 
+    $srcHeight   = imagesy( $srcImage ); 
+    $x = 0;
+    $y = 0;
+
+    if($srcWidth > $srcHeight)
+    {
+      $x = ceil(($srcWidth - $srcHeight) / 2 );
+      $srcWidth = $srcHeight;
+    }
+    elseif ($srcHeight > $srcWidth)
+    {
+      $y = ceil(($srcHeight - $srcWidth) / 2);
+      $srcHeight = $srcWidth;
+    }
+
+    $ratioWidth  = $srcWidth/$newWidth;
+    $ratioHeight = $srcHeight/$newHeight;
+
+    // maximal size exceeded ?
+    if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
+    {
+      if ( $ratioWidth < $ratioHeight)
+      { 
+        $destWidth = $srcWidth/$ratioHeight;
+        $destHeight = $newHeight; 
+      }
+      else
+      { 
+        $destWidth = $newWidth; 
+        $destHeight = $srcHeight/$ratioWidth;
+      }
+    }
+    else
+    {
+      $destWidth = $srcWidth;
+      $destHeight = $srcHeight;
+    }
+
+    // according to the GD version installed on the server
+    if ( $_POST['gd'] == 2 )
+    {
+      // GD 2.0 or more recent -> good results (but slower)
+      $destImage = imagecreatetruecolor( $destWidth, $destHeight); 
+      imagecopyresampled( $destImage, $srcImage, 0, 0, $x, $y,
+                          $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+    else
+    {
+      // GD prior to version  2 -> pretty bad results :-/ (but fast)
+      $destImage = imagecreate( $destWidth, $destHeight);
+      imagecopyresized( $destImage, $srcImage, 0, 0, $x, $y,
+                        $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+
+    if (($tndir = mkget_thumbnail_dir($dirname, $page['errors'])) == false)
+    {
+      return false;
+    }
+
+    $dest_file = $tndir.'/'.$conf['prefix_thumbnail'];
+    $dest_file.= get_filename_wo_extension($filename);
+    $dest_file.= '.'.$tn_ext;
+    
+    // creation and backup of final picture
+    if (!is_writable($tndir))
+    {
+      array_push($page['errors'], '['.$tndir.'] : '.l10n('no write access'));
+      return false;
+    }
+    imagejpeg($destImage, $dest_file, $conf['tn_compression_level']);
+    // freeing memory ressources
+    imagedestroy( $srcImage );
+    imagedestroy( $destImage );
+    
+    list($tn_width, $tn_height) = getimagesize($dest_file);
+    $tn_size = floor(filesize($dest_file) / 1024).' KB';
+    
+    $info = array( 'path'      => $path,
+                   'tn_file'   => $dest_file,
+                   'tn_width'  => $tn_width,
+                   'tn_height' => $tn_height,
+                   'tn_size'   => $tn_size );
+    return $info;
+  }
+  // error
+  else
+  {
+    echo l10n('Picture unreachable or no support')." ";
+    if ( isset( $extenstion ) )
+    {
+      echo l10n('for the file format').' '.$extension;
+    }
+    else
+    {
+      echo l10n('for this file format');
+    }
+    exit();
+  }
+}
+
+
+// Resize function for Upload Form
+function upload_square_resize($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality)
+{
+  if ($result !== false)
+  {
+    //someone hooked us - so we skip
+    return $result;
+  }
+
+  if (is_imagick())
+  {
+    return pwg_image_resize_im($source_filepath, $destination_filepath, $max_width, $max_height, $quality, $strip_metadata);
+  }
+  else
+  {
+    return pwg_image_resize_gd($source_filepath, $destination_filepath, $max_width, $max_height, $quality);
+  }
+}
+
+function upload_square_resize_gd($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality)
+{
+  if (!function_exists('gd_info'))
+  {
+    return false;
+  }
+
+  // extension of the picture filename
+  $extension = strtolower(get_extension($source_filepath));
+
+  $source_image = null;
+  if (in_array($extension, array('jpg', 'jpeg')))
+  {
+    $source_image = imagecreatefromjpeg($source_filepath);
+  }
+  else if ($extension == 'png')
+  {
+    $source_image = imagecreatefrompng($source_filepath);
+  }
+  else
+  {
+    die('unsupported file extension');
+  }
+
+  $rotation = null;
+  if (function_exists('imagerotate'))
+  {
+    $rotation = get_rotation_angle($source_filepath);
+  }
+  
+  // width/height
+  $source_width  = imagesx($source_image); 
+  $source_height = imagesy($source_image);
+  $x = 0;
+  $y = 0;
+
+  if($source_width > $source_height)
+  {
+    $x = ceil(($source_width - $source_height) / 2 );
+    $source_width = $source_height;
+  }
+  elseif ($source_height > $source_width)
+  {
+    $y = ceil(($source_height - $source_width) / 2);
+    $source_height = $source_width;
+  }
+  
+  $resize_dimensions = get_resize_dimensions($source_width, $source_height, $max_width, $max_height, $rotation);
+
+  // testing on height is useless in theory: if width is unchanged, there
+  // should be no resize, because width/height ratio is not modified.
+  if ($resize_dimensions['width'] == $source_width and $resize_dimensions['height'] == $source_height)
+  {
+    // the image doesn't need any resize! We just copy it to the destination
+    copy($source_filepath, $destination_filepath);
+    return true;
+  }
+  
+  $destination_image = imagecreatetruecolor($resize_dimensions['width'], $resize_dimensions['height']);
+  
+  imagecopyresampled(
+    $destination_image,
+    $source_image,
+    0,
+    0,
+    $x,
+    $y,
+    $resize_dimensions['width'],
+    $resize_dimensions['height'],
+    $source_width,
+    $source_height
+    );
+
+  // rotation occurs only on resized photo to avoid useless memory use
+  if (isset($rotation))
+  {
+    $destination_image = imagerotate($destination_image, $rotation, 0);
+  }
+  
+  $extension = strtolower(get_extension($destination_filepath));
+  if ($extension == 'png')
+  {
+    imagepng($destination_image, $destination_filepath);
+  }
+  else
+  {
+    imagejpeg($destination_image, $destination_filepath, $quality);
+  }
+  // freeing memory ressources
+  imagedestroy($source_image);
+  imagedestroy($destination_image);
+
+  // everything should be OK if we are here!
+  return true;
+}
+
+add_event_handler('thumbnail_resize', 'thumbnail_square_resize', 40, 5);
+add_event_handler('upload_thumbnail_resize', 'upload_square_resize', 40, 6);
+
+?>
Index: /extensions/square_thumbnails/trunk/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/cs_CZ/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/cs_CZ/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/cs_CZ/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Přídá možnost vytvářet čtvercové náhledy obrázků.
Index: /extensions/square_thumbnails/trunk/language/cs_CZ/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/cs_CZ/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/cs_CZ/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/cs_CZ/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/cs_CZ/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Čtvercové náhledy obrázků';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/de_DE/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/de_DE/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/de_DE/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Erweitert Piwigo um die Möglichkeit, quadratische Vorschaubilder zu erzeugen
Index: /extensions/square_thumbnails/trunk/language/de_DE/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/de_DE/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/de_DE/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/de_DE/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/de_DE/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Quadratische Vorschaubilder';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/en_UK/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/en_UK/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/en_UK/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+﻿Add an option to make square thumbnails
Index: /extensions/square_thumbnails/trunk/language/en_UK/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/en_UK/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/en_UK/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/en_UK/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/en_UK/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Square Thumbnails';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/es_ES/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/es_ES/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/es_ES/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Añade una opción para hacer miniaturas cuadradas
Index: /extensions/square_thumbnails/trunk/language/es_ES/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/es_ES/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/es_ES/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/es_ES/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/es_ES/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniaturas cuadradas';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/fr_FR/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/fr_FR/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/fr_FR/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Ajoute une option pour faire des miniatures carrées
Index: /extensions/square_thumbnails/trunk/language/fr_FR/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/fr_FR/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/fr_FR/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/fr_FR/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/fr_FR/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniatures carrées';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/hu_HU/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/hu_HU/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/hu_HU/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Azonos alakú bélyegképek lehetőség hozzáadása a bélyegképek oldalhoz
Index: /extensions/square_thumbnails/trunk/language/hu_HU/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/hu_HU/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/hu_HU/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/hu_HU/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/hu_HU/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Azonos alakú bélyegképek';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/it_IT/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/it_IT/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/it_IT/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+﻿Aggiungere un'opzione per fare miniature quadrate
Index: /extensions/square_thumbnails/trunk/language/it_IT/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/it_IT/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/it_IT/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/it_IT/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/it_IT/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Miniature Quadrate';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/lv_LV/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/lv_LV/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/lv_LV/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Pievieno iespēju, lai izveidotu kvadrātveida sīkbildes
Index: /extensions/square_thumbnails/trunk/language/lv_LV/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/lv_LV/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/lv_LV/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/lv_LV/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/lv_LV/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kvadrātveida Sīkbildes';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/no_NO/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/no_NO/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/no_NO/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Legg til et alternativ for å kunne lage firkantede miniatyr bilder
Index: /extensions/square_thumbnails/trunk/language/no_NO/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/no_NO/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/no_NO/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/no_NO/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/no_NO/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/no_NO/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Firkantede miniatyr bilder';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/pl_PL/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/pl_PL/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/pl_PL/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Dodaje opcję tworzenia kwadratowych miniatur
Index: /extensions/square_thumbnails/trunk/language/pl_PL/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/pl_PL/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/pl_PL/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/pl_PL/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/pl_PL/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/pl_PL/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kwadratowe Miniatury';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/ru_RU/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/ru_RU/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/ru_RU/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Добавляет возможность делать миниатюры квадратными
Index: /extensions/square_thumbnails/trunk/language/ru_RU/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/ru_RU/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/ru_RU/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/ru_RU/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/ru_RU/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Квадратные миниатюры';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/sk_SK/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/sk_SK/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sk_SK/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Pridanie voľby na vytvorenie štvorcových náhľadov
Index: /extensions/square_thumbnails/trunk/language/sk_SK/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/sk_SK/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sk_SK/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/sk_SK/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/sk_SK/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sk_SK/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Štvorcové náhľady';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/sv_SE/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/sv_SE/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sv_SE/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Lägg till alternativet att använda kvadratiska miniatyrbilder
Index: /extensions/square_thumbnails/trunk/language/sv_SE/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/sv_SE/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sv_SE/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/sv_SE/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/sv_SE/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/sv_SE/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Kvadratiska Miniatyrbilder';
+
+?>
Index: /extensions/square_thumbnails/trunk/language/tr_TR/description.txt
===================================================================
--- /extensions/square_thumbnails/trunk/language/tr_TR/description.txt	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/tr_TR/description.txt	(revision 9754)
@@ -0,0 +1,1 @@
+Küçük resimler oluşturmak için bir seçenek ekle
Index: /extensions/square_thumbnails/trunk/language/tr_TR/index.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/tr_TR/index.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/tr_TR/index.php	(revision 9754)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/square_thumbnails/trunk/language/tr_TR/plugin.lang.php
===================================================================
--- /extensions/square_thumbnails/trunk/language/tr_TR/plugin.lang.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/language/tr_TR/plugin.lang.php	(revision 9754)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Square Thumbnails'] = 'Küçük Resimler';
+
+?>
Index: /extensions/square_thumbnails/trunk/main.inc.php
===================================================================
--- /extensions/square_thumbnails/trunk/main.inc.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/main.inc.php	(revision 9754)
@@ -0,0 +1,51 @@
+<?php
+/*
+Plugin Name: Square Thumbnails
+Version: auto
+Description: Add an option to make square thumbnails
+Plugin URI: auto
+Author: P@t
+Author URI: http://www.gauchon.com
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('SQUARE_THUMB_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+if (defined('IN_ADMIN'))
+{
+  add_event_handler('init', 'square_thumbnails_init');
+
+  function square_thumbnails_init()
+  {
+    global $conf;
+
+    // Thumbnail creation page
+    if (isset($_GET['page']) and $_GET['page'] == 'thumbnail')
+    {
+      include(SQUARE_THUMB_PATH.'thumbnail.php');
+    }
+
+    // Upload Form
+    if (isset($_GET['page']) and $_GET['page'] == 'photos_add')
+    {
+      if (isset($_POST['submit_upload']) and @$conf['upload_form_thumb_square'])
+      {
+        include(SQUARE_THUMB_PATH.'functions.inc.php');
+      }
+
+      if (isset($_GET['section']) and $_GET['section'] == 'settings')
+      {
+        include(SQUARE_THUMB_PATH.'photo_add_settings.php');
+      }
+    }
+
+    // Uploadify
+    if (script_basename() == 'uploadify' and @$conf['upload_form_thumb_square'])
+    {
+      include(SQUARE_THUMB_PATH.'functions.inc.php');
+    }
+  }
+}
+
+?>
Index: /extensions/square_thumbnails/trunk/photo_add_settings.php
===================================================================
--- /extensions/square_thumbnails/trunk/photo_add_settings.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/photo_add_settings.php	(revision 9754)
@@ -0,0 +1,90 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template;
+
+load_language('plugin.lang', SQUARE_THUMB_PATH);
+
+// Insert param in DB if not exists
+if (!isset($conf['upload_form_thumb_square']))
+{
+  mass_inserts(
+    CONFIG_TABLE,
+    array('param', 'value'),
+    array(
+      array(
+        'param' => 'upload_form_thumb_square',
+        'value' => 'false'
+        )
+      )
+    );
+}
+
+// Update param on submit
+if (isset($_POST['submit']))
+{
+  $conf['upload_form_thumb_square'] = isset($_POST['square']);
+
+  mass_updates(
+    CONFIG_TABLE,
+    array(
+      'primary' => array('param'),
+      'update' => array('value')
+      ),
+    array(
+      array(
+        'param' => 'upload_form_thumb_square',
+        'value' => $conf['upload_form_thumb_square'] ? 'true':'false'
+        )
+      )
+    );
+}
+
+// Template init
+$template->assign('SQUARE', $conf['upload_form_thumb_square']);
+
+// Add prefilter
+$template->set_prefilter('photos_add', 'add_square_option');
+
+function add_square_option($content, $smarty)
+{
+  $search = '<legend>{\'Thumbnail\'|@translate}</legend>
+
+    <table>';
+
+  $replacement = '
+{html_head}
+{literal}
+<script type="text/javascript">
+jQuery().ready(function(){
+  jQuery("input[name^=\'thumb_max\']").keyup(function(){
+    if(jQuery("#square").attr("checked")){
+      if (this.name == "thumb_maxwidth"){
+        jQuery("input[name=\'thumb_maxheight\']").attr("value", this.value);
+      }else{
+        jQuery("input[name=\'thumb_maxwidth\']").attr("value", this.value);
+      }
+    }
+  });
+  jQuery("#square").click(function(){
+    if (this.checked)
+      jQuery("input[name^=\'thumb_maxheight\']").attr("value", jQuery("input[name^=\'thumb_maxwidth\']").attr("value"));
+  });
+});
+</script>
+{/literal}
+{/html_head}
+
+<legend>{\'Thumbnail\'|@translate}</legend>
+
+    <table>
+      <tr>
+        <th>{\'Square Thumbnails\'|@translate}</th>
+	      <td><input type="checkbox" name="square" id="square" {if $SQUARE}checked="checked"{/if}></td>
+      </tr>';
+
+  return str_replace($search, $replacement, $content);
+}
+
+?>
Index: /extensions/square_thumbnails/trunk/thumbnail.php
===================================================================
--- /extensions/square_thumbnails/trunk/thumbnail.php	(revision 9754)
+++ /extensions/square_thumbnails/trunk/thumbnail.php	(revision 9754)
@@ -0,0 +1,59 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template;
+
+load_language('plugin.lang', SQUARE_THUMB_PATH);
+
+// Add handler for square resize
+if (isset($_POST['square']))
+{
+  include(SQUARE_THUMB_PATH.'functions.inc.php');
+}
+
+// Add prefilter
+$template->set_prefilter('thumbnail', 'add_square_option');
+
+function add_square_option($content, $smarty)
+{
+  $search = '<li>
+        <span class="property">
+          <label for="width">{\'maximum width\'|@translate}</label>';
+
+  $replacement = '
+{html_head}
+{literal}
+<script type="text/javascript">
+jQuery().ready(function(){
+  jQuery(":text").keyup(function(){
+    if(jQuery("#square").attr("checked")){
+      if (this.id == "width"){
+        jQuery("#height").attr("value", this.value);
+      }else{
+        jQuery("#width").attr("value", this.value);
+      }
+    }
+  });
+  jQuery("#square").click(function(){
+    if (this.checked)
+      jQuery("#height").attr("value", jQuery("#width").attr("value"));
+  });
+});
+</script>
+{/literal}
+{/html_head}
+
+      <li>
+        <span class="property">{\'Square Thumbnails\'|@translate}</span>
+	     <label><input type="checkbox" name="square" id="square" {if $params.SQUARE}checked="checked"{/if}></label>
+      </li>
+
+      <li>
+        <span class="property">
+          <label for="width">{\'maximum width\'|@translate}</label>';
+
+  return str_replace($search, $replacement, $content);
+}
+
+?>
