|
From: <be...@us...> - 2012-12-19 02:04:43
|
Revision: 10467
http://sourceforge.net/p/xoops/svn/10467
Author: beckmi
Date: 2012-12-19 02:04:40 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
Updating to 1.11 Final
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/class/pclerror.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltar.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltrace.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/lang/lang_fr.properties
XoopsModules/extgallery/trunk/modules/extgallery/include/update_function.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/help/extgallery.html
XoopsModules/extgallery/trunk/modules/extgallery/language/english/help/module_index.html
XoopsModules/extgallery/trunk/modules/extgallery/language/english/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/german/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/german/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/german/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/german/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/italian/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/italian/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/help/extgallery.html
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/help/module_index.html
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Added Paths:
-----------
XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php
XoopsModules/extgallery/trunk/modules/extgallery/images/icons/extension.png
XoopsModules/extgallery/trunk/modules/extgallery/language/english/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/help/
XoopsModules/extgallery/trunk/modules/extgallery/language/french/help/extgallery.html
XoopsModules/extgallery/trunk/modules/extgallery/language/french/help/index.html
XoopsModules/extgallery/trunk/modules/extgallery/language/french/help/module_index.html
XoopsModules/extgallery/trunk/modules/extgallery/language/italian/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/templates/admin/extgallery_admin_extension.html
Removed Paths:
-------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extention.php
XoopsModules/extgallery/trunk/modules/extgallery/images/icons/extention.png
XoopsModules/extgallery/trunk/modules/extgallery/language/english/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/language/italian/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/extention.php
XoopsModules/extgallery/trunk/modules/extgallery/templates/admin/extgallery_admin_extention.html
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -405,15 +405,15 @@
$form = new XoopsThemeForm(_AM_EXTGALLERY_OVERLAY_CONF, 'overlay_conf', 'album.php', 'post', true);
$form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_OVERLAY_BG, 'album_overlay_bg', $xoopsModuleConfig['album_overlay_bg']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_WIDHT, 'album_overlay_width', '5', '5', $xoopsModuleConfig['album_overlay_width']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_WIDTH, 'album_overlay_width', '5', '5', $xoopsModuleConfig['album_overlay_width']),false);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_HEIGHT, 'album_overlay_height', '5', '5', $xoopsModuleConfig['album_overlay_height']),false);
$form->addElement(new XoopsFormHidden("op", 'overlay'));
$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
$xoopsTpl->assign('overlayform', $form->render());
$form = new XoopsThemeForm(_AM_EXTGALLERY_TOOLTIP_CONF, 'tooltip_conf', 'album.php', 'post', true);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_WIDHT, 'album_tooltip_width', '6', '6', $xoopsModuleConfig['album_tooltip_width']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_BORDER_WIDHT, 'album_tooltip_borderwidth', '6', '6', $xoopsModuleConfig['album_tooltip_borderwidth']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_WIDTH, 'album_tooltip_width', '6', '6', $xoopsModuleConfig['album_tooltip_width']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_BORDER_WIDTH, 'album_tooltip_borderwidth', '6', '6', $xoopsModuleConfig['album_tooltip_borderwidth']),false);
$form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_TOOLTIP_BORDERCOLOR, 'album_tooltip_bordercolor', $xoopsModuleConfig['album_tooltip_bordercolor']),false);
$form->addElement(new XoopsFormHidden("op", 'tooltip'));
$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
@@ -464,7 +464,7 @@
$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
$xoopsTpl->assign('prettyphotoform', $form->render());
- // Call template file
+ // Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_album.html');
xoops_cp_footer();
Added: XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php (rev 0)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * ExtGallery Admin settings
+ * Manage admin pages
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Zoullou (http://www.zoullou.net)
+ * @package ExtGallery
+ * @version $Id: extension.php 8088 2011-11-06 09:38:12Z beckmi $
+ */
+
+include '../../../include/cp_header.php';
+include 'function.php';
+
+xoops_cp_header();
+
+function extensionInstalled() {
+ return file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php');
+}
+
+function extensionActivated() {
+ $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
+ return $conf['extensions']['gallery'];
+}
+
+function activateExtension() {
+ $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
+ $conf['extensions']['gallery'] = 1;
+ file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
+}
+
+function desactivateExtension() {
+ $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
+ $conf['extensions']['gallery'] = 0;
+ file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
+}
+
+if(file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php')){
+ $xoopsTpl->assign('extensioninstalled', true);
+} else {
+ $xoopsTpl->assign('extensioninstalled', false);
+}
+
+// Call template file
+$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_extension.html');
+xoops_cp_footer();
+
+?>
\ No newline at end of file
Deleted: XoopsModules/extgallery/trunk/modules/extgallery/admin/extention.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/extention.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/extention.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -1,56 +0,0 @@
-<?php
-/**
- * ExtGallery Admin settings
- * Manage admin pages
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @author Zoullou (http://www.zoullou.net)
- * @package ExtGallery
- * @version $Id$
- */
-
-include '../../../include/cp_header.php';
-include 'function.php';
-
-xoops_cp_header();
-
-function extentionInstalled() {
- return file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php');
-}
-
-function extentionActivated() {
- $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
- return $conf['extensions']['gallery'];
-}
-
-function activateExtention() {
- $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
- $conf['extensions']['gallery'] = 1;
- file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
-}
-
-function desactivateExtention() {
- $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
- $conf['extensions']['gallery'] = 0;
- file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
-}
-
-if(file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php')){
- $xoopsTpl->assign('extentioninstalled', true);
-} else {
- $xoopsTpl->assign('extentioninstalled', false);
-}
-
-// Call template file
-$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_extention.html');
-xoops_cp_footer();
-
-?>
\ No newline at end of file
Added: XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php (rev 0)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -0,0 +1,106 @@
+<?php
+/**
+ * ExtGallery Admin settings
+ * Manage admin pages
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Zoullou (http://www.zoullou.net)
+ * @package ExtGallery
+ * @version $Id: install-extension.php 8088 2011-11-06 09:38:12Z beckmi $
+ */
+
+if(isset($_POST['step'])) {
+ $step = $_POST['step'];
+} else {
+ $step = 'default';
+}
+
+include '../../../include/cp_header.php';
+include 'function.php';
+
+// Change this variable if you use a cloned version of eXtGallery
+$localModuleDir = 'extgallery';
+
+$downloadServer = 'http://downloads.sourceforge.net/xoops/';
+//$downloadServer = 'http://localhost/divers/extgallery/';
+$extensionFileName = 'extgallery-extension-hook.tar.gz';
+
+switch($step) {
+
+ case 'download':
+
+ xoops_cp_header();
+
+ if(!$handle = @fopen($downloadServer.$extensionFileName, 'r')) {
+ printf(_AM_EXTGALLERY_EXT_FILE_DONT_EXIST, $downloadServer, $extensionFileName);
+ xoops_cp_footer();
+ break;
+ }
+ $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$extensionFileName, 'w+');
+
+ // Downlad module archive
+ if ($handle) {
+ while (!feof($handle)) {
+ $buffer = fread($handle, 8192);
+ fwrite($localHandle, $buffer);
+ }
+ fclose($localHandle);
+ fclose($handle);
+ }
+
+ xoops_confirm(array('step' => 'install'), 'install-extension.php', _AM_EXTGALLERY_DOWN_DONE, _AM_EXTGALLERY_INSTALL);
+
+ xoops_cp_footer();
+
+ break;
+
+ case 'install':
+
+ if(!file_exists(XOOPS_ROOT_PATH."/uploads/".$extensionFileName)) {
+
+ xoops_cp_header();
+ echo _AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT;
+ xoops_cp_footer();
+
+ break;
+ }
+
+ $g_pcltar_lib_dir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class';
+ include "../class/pcltar.lib.php";
+
+ // Extract extension files
+ PclTarExtract(XOOPS_ROOT_PATH."/uploads/".$extensionFileName,XOOPS_ROOT_PATH."/class/textsanitizer/","class/textsanitizer/");
+ // Delete downloaded extension's files
+ unlink(XOOPS_ROOT_PATH."/uploads/".$extensionFileName);
+
+ // Delete folder created by a small issu in PclTar lib
+ if(is_dir(XOOPS_ROOT_PATH."/class/textsanitizer/class")) {
+ rmdir(XOOPS_ROOT_PATH."/class/textsanitizer/class");
+ }
+
+ // Activate extension
+ $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.php';
+ $conf['extensions']['gallery'] = 1;
+ file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
+
+ redirect_header("extension.php", 3, _AM_EXTGALLERY_EXTENSION_INSTALLED);
+
+ break;
+
+ default:
+ case 'default':
+
+ redirect_header("extension.php", 3, "");
+
+ break;
+}
+
+?>
\ No newline at end of file
Deleted: XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extention.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extention.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extention.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -1,106 +0,0 @@
-<?php
-/**
- * ExtGallery Admin settings
- * Manage admin pages
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @author Zoullou (http://www.zoullou.net)
- * @package ExtGallery
- * @version $Id$
- */
-
-if(isset($_POST['step'])) {
- $step = $_POST['step'];
-} else {
- $step = 'default';
-}
-
-include '../../../include/cp_header.php';
-include 'function.php';
-
-// Change this variable if you use a cloned version of eXtGallery
-$localModuleDir = 'extgallery';
-
-$downloadServer = 'http://downloads.sourceforge.net/zoullou/';
-//$downloadServer = 'http://localhost/divers/extgallery/';
-$extentionFileName = 'extgallery-extention-hook.tar.gz';
-
-switch($step) {
-
- case 'download':
-
- xoops_cp_header();
-
- if(!$handle = @fopen($downloadServer.$extentionFileName, 'r')) {
- printf(_AM_EXTGALLERY_EXT_FILE_DONT_EXIST, $downloadServer, $extentionFileName);
- xoops_cp_footer();
- break;
- }
- $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$extentionFileName, 'w+');
-
- // Downlad module archive
- if ($handle) {
- while (!feof($handle)) {
- $buffer = fread($handle, 8192);
- fwrite($localHandle, $buffer);
- }
- fclose($localHandle);
- fclose($handle);
- }
-
- xoops_confirm(array('step' => 'install'), 'install-extention.php', _AM_EXTGALLERY_DOWN_DONE, _AM_EXTGALLERY_INSTALL);
-
- xoops_cp_footer();
-
- break;
-
- case 'install':
-
- if(!file_exists(XOOPS_ROOT_PATH."/uploads/".$extentionFileName)) {
-
- xoops_cp_header();
- echo _AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT;
- xoops_cp_footer();
-
- break;
- }
-
- $g_pcltar_lib_dir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class';
- include "../class/pcltar.lib.php";
-
- // Extract extention files
- PclTarExtract(XOOPS_ROOT_PATH."/uploads/".$extentionFileName,XOOPS_ROOT_PATH."/class/textsanitizer/","class/textsanitizer/");
- // Delete downloaded extention's files
- unlink(XOOPS_ROOT_PATH."/uploads/".$extentionFileName);
-
- // Delete folder created by a small issu in PclTar lib
- if(is_dir(XOOPS_ROOT_PATH."/class/textsanitizer/class")) {
- rmdir(XOOPS_ROOT_PATH."/class/textsanitizer/class");
- }
-
- // Activate extention
- $conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.php';
- $conf['extensions']['gallery'] = 1;
- file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
-
- redirect_header("extention.php", 3, _AM_EXTGALLERY_EXTENTION_INSTALLED);
-
- break;
-
- default:
- case 'default':
-
- redirect_header("extention.php", 3, "");
-
- break;
-}
-
-?>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -50,9 +50,9 @@
$adminmenu[$i]['link'] = "admin/slideshow.php";
$adminmenu[$i]['icon'] = "images/icons/slideshow.png";
$i++;
-$adminmenu[$i]['title'] = _MI_EXTGALLERY_EXTENTION;
-$adminmenu[$i]['link'] = "admin/extention.php";
-$adminmenu[$i]['icon'] = "images/icons/extention.png";
+$adminmenu[$i]['title'] = _MI_EXTGALLERY_EXTENSION;
+$adminmenu[$i]['link'] = "admin/extension.php";
+$adminmenu[$i]['icon'] = "images/icons/extension.png";
$i++;
$adminmenu[$i]['title'] = _MI_EXTGALLERY_ALBUM;
$adminmenu[$i]['link'] = "admin/album.php";
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -887,8 +887,8 @@
$form = new XoopsThemeForm(_AM_EXTGALLERY_GVIEW_CONF, 'galleryview_conf', 'slideshow.php', 'post', true);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELWIDE, 'galleryview_panelwidth', '5', '5', $xoopsModuleConfig['galleryview_panelwidth']),false);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELHEIGHT, 'galleryview_panelheight', '5', '5', $xoopsModuleConfig['galleryview_panelheight']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_FARMEWIDTH, 'galleryview_framewidth', '5', '5', $xoopsModuleConfig['galleryview_framewidth']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_FARMEHEIGHT, 'galleryview_frameheight', '5', '5', $xoopsModuleConfig['galleryview_frameheight']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEWIDTH, 'galleryview_framewidth', '5', '5', $xoopsModuleConfig['galleryview_framewidth']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEHEIGHT, 'galleryview_frameheight', '5', '5', $xoopsModuleConfig['galleryview_frameheight']),false);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_TSPEED, 'galleryview_tspeed', '5', '5', $xoopsModuleConfig['galleryview_tspeed']),false);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_TTERVAL, 'galleryview_tterval', '5', '5', $xoopsModuleConfig['galleryview_tterval']),false);
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_GVIEW_OPACITY, 'galleryview_opacity', '5', '5', $xoopsModuleConfig['galleryview_opacity']),false);
@@ -967,7 +967,7 @@
$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
$xoopsTpl->assign('gallerifficform', $form->render());
- // Call template file
+ // Call template file
$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_slideshow.html');
xoops_cp_footer();
Modified: XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php 2012-12-18 23:30:09 UTC (rev 10466)
+++ XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php 2012-12-19 02:04:40 UTC (rev 10467)
@@ -89,26 +89,26 @@
}
$param['cat'] = $categories;
- switch ($photoHandlertype) {
- case "RandomPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
- break;
-
- case "LastPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
- break;
-
- case "TopViewPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ switch ($photoHandlertype) {
+ case "RandomPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
break;
+
+ case "LastPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
+ break;
+
+ case "TopViewPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ break;
- case "TopRatedPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
+ case "TopRatedPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
break;
- case "TopEcardPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
- break;
+ case "TopEcardPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
+ break;
}
if($jquery == 'true' && $ajaxeffect != 'none'){
@@ -293,26 +293,26 @@
$param['cat'] = $categories;
- switch ($photoHandlertype) {
- case "RandomPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
- break;
-
- case "LastPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
- break;
-
- case "TopViewPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ switch ($photoHandlertype) {
+ case "RandomPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
break;
+
+ case "LastPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
+ break;
+
+ case "TopViewPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ break;
- case "TopRatedPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
+ case "TopRatedPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
break;
- case "TopEcardPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
- break;
+ case "TopEcardPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
+ break;
}
if($jquery == 'true'){
@@ -431,14 +431,14 @@
//for overlay
$form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_AJAX_OVERLAY."</legend>";
$form .= _MB_EXTGALLERY_OVERLAY_BG." : <input name=\"options[]\" size=\"7\" maxlength=\"7\" value=\"".$options[6]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_OVERLAY_WIDHT." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[7]."\" type=\"text\" /><br />";
+ $form .= _MB_EXTGALLERY_OVERLAY_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[7]."\" type=\"text\" /><br />";
$form .= _MB_EXTGALLERY_OVERLAY_HEIGHT." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[8]."\" type=\"text\" /><br />";
$form .="</fieldset><br />";
//for tooltip
$form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_AJAX_TOOLTIP."</legend>";
- $form .= _MB_EXTGALLERY_TOOLTIP_WIDHT." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[9]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_TOOLTIP_BORDER_WIDHT." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[10]."\" type=\"text\" /><br />";
+ $form .= _MB_EXTGALLERY_TOOLTIP_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[9]."\" type=\"text\" /><br />";
+ $form .= _MB_EXTGALLERY_TOOLTIP_BORDER_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[10]."\" type=\"text\" /><br />";
$form .= _MB_EXTGALLERY_TOOLTIP_BORDERCOLOR." : <input name=\"options[]\" size=\"7\" maxlength=\"7\" value=\"".$options[11]."\" type=\"text\" /><br />";
$form .="</fieldset><br />";
@@ -702,26 +702,26 @@
}
$param['cat'] = $categories;
- switch ($photoHandlertype) {
- case "RandomPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
- break;
-
- case "LastPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
- break;
-
- case "TopViewPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ switch ($photoHandlertype) {
+ case "RandomPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
break;
+
+ case "LastPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
+ break;
+
+ case "TopViewPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ break;
- case "TopRatedPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
+ case "TopRatedPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
break;
- case "TopEcardPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
- break;
+ case "TopEcardPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
+ break;
}
if(count($photos) == 0) {
@@ -729,8 +729,8 @@
}
foreach (array_keys($photos) as $i) {
- if(isset($photos[$i]['photo_date'])){
- $photos[$i]['photo_date'] = date(_SHORTDATESTRING, $photos[$i]['photo_date']);
+ if(isset($photos[$i]['photo_date'])){
+ $photos[$i]['photo_date'] = date(_SHORTDATESTRING, $photos[$i]['photo_date']);
}
}
Modified: XoopsModules/extgallery/trunk/modules/extgallery/changel...
[truncated message content] |
|
From: <be...@us...> - 2013-01-23 06:07:21
|
Revision: 10870
http://sourceforge.net/p/xoops/svn/10870
Author: beckmi
Date: 2013-01-23 06:07:16 +0000 (Wed, 23 Jan 2013)
Log Message:
-----------
Removing hard coded English text (Cesag)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/french/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/german/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/italian/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/persian/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/admin.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -219,8 +219,8 @@
$index_admin->addInfoBoxLine(_AM_EXTGALLERY_SERVER_CONF, _AM_EXTGALLERY_PNG_SUPPORT. ' '. $imSupport['PNG Support']);
}
-$index_admin->addInfoBoxLine(_AM_EXTGALLERY_SERVER_CONF, 'Upload max filesize '. get_cfg_var('upload_max_filesize'));
- $index_admin->addInfoBoxLine(_AM_EXTGALLERY_SERVER_CONF, 'Post max size '. get_cfg_var('post_max_size'));
+$index_admin->addInfoBoxLine(_AM_EXTGALLERY_SERVER_CONF, _AM_EXTGALLERY_UPLOAD_MAX_FILESIZE. get_cfg_var('upload_max_filesize'));
+ $index_admin->addInfoBoxLine(_AM_EXTGALLERY_SERVER_CONF, _AM_EXTGALLERY_POST_MAX_SIZE. get_cfg_var('post_max_size'));
foreach (array_keys( $folder) as $i) {
$index_admin->addConfigBoxLine($folder[$i], 'folder');
@@ -231,8 +231,8 @@
}
-// Call template file
-$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_index.html');
+// Call template file
+$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_index.html');
xoops_cp_footer();
?>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -334,4 +334,7 @@
// text in admin footer
define("_AM_EXTGALLERY_ADMIN_FOOTER", "<div class='right smallsmall italic pad5'>XOOPS Tag is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
define('_EXTGALLERY_ADMIN_'," "); //
-?>
\ No newline at end of file
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/french/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/french/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/french/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -312,4 +312,7 @@
define("_AM_EXTGALLERY_ADMIN_FOOTER", "<div class='right smallsmall italic pad5'>extGallery est maintenu par la <a class='tooltip' rel='external' href='http://xoops.org/' title='Visitez la communauté Xoops'>Communauté Xoops</a></div>");
define('_EXTGALLERY_ADMIN_'," "); //
// Traduction par Cesag pour frxoops.org le 11 Août 2012.
-?>
\ No newline at end of file
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Taille maximum des fichiers de téléchargement : ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Taille maximum des envois : ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/german/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/german/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/german/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -326,5 +326,7 @@
// text in admin footer
define("_AM_EXTGALLERY_ADMIN_FOOTER", "<div class='right smallsmall italic pad5'>XOOPS Tag erhalten Sie bei der <a class='tooltip' rel='external' href='http://xoops.org/' title='Visitez XOOPS Community'>XOOPS Community</a></div>");
-define('_EXTGALLERY_ADMIN_'," "); //
-?>
\ No newline at end of file
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/italian/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/italian/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/italian/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -208,4 +208,7 @@
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST',"Il file Estensione non esiste nel repository :<br /><b>Server : </b>%s<br /><b>File : </b>%s");
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT',"Il file Estensione non esiste");
define('_AM_EXTGALLERY_EXTENSION_INSTALLED',"Estensione Installata");
-?>
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/nederlands/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -209,4 +209,6 @@
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT',"Extentie bestand bestaat niet");
define('_AM_EXTGALLERY_EXTENSION_INSTALLED',"Extentie geinstalleerd");
-?>
\ No newline at end of file
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/persian/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/persian/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/persian/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -334,4 +334,7 @@
// text in admin footer
define("_AM_EXTGALLERY_ADMIN_FOOTER", "<div class='right smallsmall italic pad5'>XOOPS eXtGallery is maintened by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visitez XOOPS Community'>XOOPS Community</a></div>");
define('_EXTGALLERY_ADMIN_'," "); //
-?>
\ No newline at end of file
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/spanish/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -260,4 +260,7 @@
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST','Archivo de extensi\xF3n no existe en el repositorio:<br/><b>Servidor : </b>%s<br /><b>Archivo : </b>%s');
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT','Archivo de extensi\xF3n inexistente');
define('_AM_EXTGALLERY_EXTENSION_INSTALLED','Extensi\xF3n instalada');
-?>
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/admin.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/admin.php 2013-01-23 03:45:39 UTC (rev 10869)
+++ XoopsModules/extgallery/trunk/modules/extgallery/language/spanishutf8/admin.php 2013-01-23 06:07:16 UTC (rev 10870)
@@ -260,4 +260,7 @@
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST','Archivo de extensión no existe en el repositorio:<br/><b>Servidor : </b>%s<br /><b>Archivo : </b>%s');
define('_AM_EXTGALLERY_EXT_FILE_DONT_EXIST_SHORT','Archivo de extensión inexistente');
define('_AM_EXTGALLERY_EXTENSION_INSTALLED','Extensión instalada');
-?>
+
+// Add File size define (Cesag)
+define('_AM_EXTGALLERY_UPLOAD_MAX_FILESIZE',"Maximum file size to upload: ");
+define('_AM_EXTGALLERY_POST_MAX_SIZE',"Maximum size to send: ");
\ No newline at end of file
|
|
From: <be...@us...> - 2013-01-23 17:23:07
|
Revision: 10874
http://sourceforge.net/p/xoops/svn/10874
Author: beckmi
Date: 2013-01-23 17:23:02 +0000 (Wed, 23 Jan 2013)
Log Message:
-----------
Adding missed $attributes['rel'] (Cesag/Mamba)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/public-album.php
XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php
XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php
XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php
XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php
XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-album.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-album.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-album.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -35,36 +35,36 @@
$start = intval($_GET['start']);
}
-// HACK BLUETEEN TO SORT PHOTO BY USERS
-//photo_date - photo_title - photo_hits - photo_rating
-if((isset($_GET['sortby']) && ($_GET['sortby']=="photo_date" || $_GET['sortby']=="photo_title" || $_GET['sortby']=="photo_hits" || $_GET['sortby']=="photo_rating") )) {
- $sortby = $_GET['sortby'];
-} else {
- $sortby = "photo_date";
-}
-
-//ASC ou DESC
-if((isset($_GET['orderby']) && ($_GET['orderby']=="DESC" || $_GET['orderby']=="ASC") )) {
- $orderby = $_GET['orderby'];
-} else {
- $orderby = $GLOBALS['xoopsModuleConfig']['display_set_order'];
-}
-
-$SortbyOrderby = $sortby." ".$orderby;
-
+// HACK BLUETEEN TO SORT PHOTO BY USERS
+//photo_date - photo_title - photo_hits - photo_rating
+if((isset($_GET['sortby']) && ($_GET['sortby']=="photo_date" || $_GET['sortby']=="photo_title" || $_GET['sortby']=="photo_hits" || $_GET['sortby']=="photo_rating") )) {
+ $sortby = $_GET['sortby'];
+} else {
+ $sortby = "photo_date";
+}
+
+//ASC ou DESC
+if((isset($_GET['orderby']) && ($_GET['orderby']=="DESC" || $_GET['orderby']=="ASC") )) {
+ $orderby = $_GET['orderby'];
+} else {
+ $orderby = $GLOBALS['xoopsModuleConfig']['display_set_order'];
+}
+
+$SortbyOrderby = $sortby." ".$orderby;
+
function convertorderbytrans($SortbyOrderby) {
- $orderbyTrans = array();
- if ($SortbyOrderby == "photo_date DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
- if ($SortbyOrderby == "photo_date ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEDESC;
- if ($SortbyOrderby == "photo_title ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_TITREASC;
- if ($SortbyOrderby == "photo_title DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_TITREDESC;
- if ($SortbyOrderby == "uid ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DESIGNERASC;
- if ($SortbyOrderby == "uid DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DESIGNERDESC;
- if ($SortbyOrderby == "photo_hits DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_HITSASC;
- if ($SortbyOrderby == "photo_hits ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_HITSDESC;
- if ($SortbyOrderby == "photo_rating DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_NOTEASC;
- if ($SortbyOrderby == "photo_rating ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_NOTEDESC;
- return $orderbyTrans;
+ $orderbyTrans = array();
+ if ($SortbyOrderby == "photo_date DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
+ if ($SortbyOrderby == "photo_date ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEDESC;
+ if ($SortbyOrderby == "photo_title ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_TITREASC;
+ if ($SortbyOrderby == "photo_title DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_TITREDESC;
+ if ($SortbyOrderby == "uid ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DESIGNERASC;
+ if ($SortbyOrderby == "uid DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DESIGNERDESC;
+ if ($SortbyOrderby == "photo_hits DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_HITSASC;
+ if ($SortbyOrderby == "photo_hits ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_HITSDESC;
+ if ($SortbyOrderby == "photo_rating DESC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_NOTEASC;
+ if ($SortbyOrderby == "photo_rating ASC") $orderbyTrans = _MD_EXTGALLERY_ORDERBY_NOTEDESC;
+ return $orderbyTrans;
}
// Check the access permission
@@ -93,7 +93,7 @@
$catPath = $photoHandler->objectToArray($catHandler->getPath($catId));
$xoopsTpl->assign('catPath', $catPath);
-$photos = $photoHandler->objectToArray($photoHandler->getAlbumPhotoPage($catId, $start, $sortby, $orderby),array('uid')); //xoops - blueteen - tri de l'affichage
+$photos = $photoHandler->objectToArray($photoHandler->getAlbumPhotoPage($catId, $start, $sortby, $orderby),array('uid')); //xoops - blueteen - tri de l'affichage
// Plugin traitement
$plugin = xoops_getmodulehandler('plugin', 'extgallery');
@@ -113,10 +113,10 @@
// HACK DATE BY MAGE : DISPLAY PUBLICATION DATE
foreach (array_keys($photos) as $i) {
- if(isset($photos[$i]['photo_date'])){
- $photos[$i]['photo_date'] = date(_SHORTDATESTRING, $photos[$i]['photo_date']);
+ if(isset($photos[$i]['photo_date'])){
+ $photos[$i]['photo_date'] = date(_SHORTDATESTRING, $photos[$i]['photo_date']);
}
-}
+}
// END HACK DATE BY MAGE : DISPLAY PUBLICATION DATE
$xoopsTpl->assign('photos', $photos);
@@ -163,6 +163,7 @@
}
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
@@ -178,8 +179,8 @@
$xoopsTpl->assign('extgalleryName', $xoopsModule->getVar('name'));
$xoopsTpl->assign('disp_ph_title', $xoopsModuleConfig['disp_ph_title']);
-$xoopsTpl->assign('extgalleryID', $catId); //xoops - blueteen - tri de l'affichage
-$xoopsTpl->assign('extgalleryStart', $start); //xoops -blueteen - tri de l'affichage
+$xoopsTpl->assign('extgalleryID', $catId); //xoops - blueteen - tri de l'affichage
+$xoopsTpl->assign('extgalleryStart', $start); //xoops -blueteen - tri de l'affichage
$xoopsTpl->assign('extgallerySortbyOrderby', _MD_EXTGALLERY_ORDERBY.convertorderbytrans($SortbyOrderby)); //xoops - blueteen - tri de l'affichage
//DNPROSSI - VOLTAN - added preferences option
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -53,6 +53,7 @@
}
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -98,6 +98,7 @@
$xoTheme->addMeta('meta','description',$photo['photo_title']." - ".$cat['cat_desc']);
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
@@ -171,7 +172,7 @@
// For xoops tag
if (($xoopsModuleConfig['usetag'] == 1) and (is_dir('../tag'))){
- include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
+ include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
$xoopsTpl->assign('tagbar', tagBar($photo['photo_id'], $catid = 0));
$xoopsTpl->assign('tags', true);
} else {
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -122,6 +122,7 @@
$xoTheme->addMeta('meta','description',$photo->getVar('photo_desc'));
$rel = "alternate";
+ $attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -62,6 +62,7 @@
$xoopsTpl->assign('extgalleryName', $xoopsModule->getVar('name'));
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -86,6 +86,7 @@
$xoTheme->addMeta('meta','description', $photo['photo_title']." - ".$albumName);
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
@@ -159,7 +160,7 @@
// For xoops tag
if (($xoopsModuleConfig['usetag'] == 1) and (is_dir('../tag'))){
- include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
+ include_once XOOPS_ROOT_PATH."/modules/tag/include/tagbar.php";
$xoopsTpl->assign('tagbar', tagBar($photo['photo_id'], $catid = 0));
$xoopsTpl->assign('tags', true);
} else {
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php 2013-01-23 11:51:16 UTC (rev 10873)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php 2013-01-23 17:23:02 UTC (rev 10874)
@@ -51,6 +51,7 @@
$xoopsTpl->assign('ecard', $ecard);
$rel = "alternate";
+$attributes['rel'] = $rel;
$attributes['type'] = "application/rss+xml";
$attributes['title'] = _MD_EXTGALLERY_RSS;
$attributes['href'] = XOOPS_URL."/modules/extgallery/public-rss.php";
|
|
From: <ce...@us...> - 2013-02-26 06:31:09
|
Revision: 11106
http://sourceforge.net/p/xoops/svn/11106
Author: cesag
Date: 2013-02-26 06:31:04 +0000 (Tue, 26 Feb 2013)
Log Message:
-----------
bug fixed : MD5 checksum error (Kavok fr)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-02-26 00:59:34 UTC (rev 11105)
+++ XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-02-26 06:31:04 UTC (rev 11106)
@@ -1,9 +1,10 @@
-============================
+============================
2012-12-18: Version 1.11
============================
- Updated PEAR
- updated Google Buzz to Google Plus
- updated English and French translations (Cesag)
+- bug fixed : MD5 checksum error (Kavok fr)
============================
2011/--/--: Version 1.1.0
Modified: XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php 2013-02-26 00:59:34 UTC (rev 11105)
+++ XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php 2013-02-26 06:31:04 UTC (rev 11106)
@@ -544,7 +544,7 @@
4 : File rejected
5 : File chunk receive
*/
- function postPhotoTraitement($file, $checkMd5 = true) {
+ function postPhotoTraitement($file, $checkMd5 = false) {
include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/photoUploader.php';
|
|
From: <be...@us...> - 2013-07-10 11:23:03
|
Revision: 11824
http://sourceforge.net/p/xoops/svn/11824
Author: beckmi
Date: 2013-07-10 11:23:00 +0000 (Wed, 10 Jul 2013)
Log Message:
-----------
Adjustments for PHP 5.4, and adding index.html files
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/PEAR.php
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Added Paths:
-----------
XoopsModules/extgallery/trunk/modules/extgallery/batch/index.html
XoopsModules/extgallery/trunk/modules/extgallery/fonts/index.html
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/conf/index.html
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/images/index.html
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/context/index.html
Added: XoopsModules/extgallery/trunk/modules/extgallery/batch/index.html
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/batch/index.html (rev 0)
+++ XoopsModules/extgallery/trunk/modules/extgallery/batch/index.html 2013-07-10 11:23:00 UTC (rev 11824)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php 2013-07-10 06:36:20 UTC (rev 11823)
+++ XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php 2013-07-10 11:23:00 UTC (rev 11824)
@@ -1,650 +1,650 @@
-<?php
-/**
- * ExtGallery Class Manager
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @author Zoullou (http://www.zoullou.net)
- * @package ExtGallery
- * @version $Id$
- */
-
-
-/**
-* Persistable Object Handler class.
-* This class is responsible for providing data access mechanisms to the data source
-* of derived class objects.
-*
-* @author Jan Keller Pedersen <mit...@xo...> - IDG Danmark A/S <www.idg.dk>
-* @copyright copyright (c) 2000-2004 XOOPS.org
-* @package Kernel
-*/
-
-class ExtgalleryPersistableObjectHandler extends XoopsObjectHandler {
-
- /**#@+
- * Information about the class, the handler is managing
- *
- * @var string
- */
- var $table;
- var $keyName;
- var $className;
- var $identifierName;
- /**#@-*/
-
- /**
- * Constructor - called from child classes
- * @param object $db {@link XoopsDatabase} object
- * @param string $tablename Name of database table
- * @param string $classname Name of Class, this handler is managing
- * @param string $keyname Name of the property, holding the key
- *
- * @return void
- */
- function ExtgalleryPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) {
- $this->XoopsObjectHandler($db);
- $this->table = $db->prefix($tablename);
- $this->keyName = $keyname;
- $this->className = $classname;
- if ($idenfierName != false) {
- $this->identifierName = $idenfierName;
- }
- }
-
- /**
- * create a new user
- *
- * @param bool $isNew Flag the new objects as "new"?
- *
- * @return object
- */
- /* function &create($isNew = true) {
- //DNPROSSI - 5.3.0 Assigning the return value of new by reference is deprecated PHP 5.3
- //Kept for backward compatability
- if (version_compare(PHP_VERSION, '5.3.0', '<'))
- {
- $obj =& new $this->className();
- }
- else
- {
- $obj = new $this->className();
- }
- if ($isNew === true) {
- $obj->setNew();
- }
- return $obj;
- } */
-
- function &create($isNew = true)
- {
- $obj = new $this->className();
- if ($isNew === true) {
- $obj->setNew();
- }
- return $obj;
- }
-
- /**
- * retrieve an object
- *
- * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
- * @param bool $as_object whether to return an object or an array
- * @return mixed reference to the object, FALSE if failed
- */
- function &get($id, $as_object = true) {
- if (is_array($this->keyName)) {
- $criteria = new CriteriaCompo();
- for ($i = 0; $i < count($this->keyName); $i++) {
- $criteria->add(new Criteria($this->keyName[$i], intval($id[$i])));
- }
- } else {
- $criteria = new Criteria($this->keyName, intval($id));
- }
- $criteria->setLimit(1);
- $obj_array = $this->getObjects($criteria, false, $as_object);
- if (count($obj_array) != 1) {
- return $this->create();
- }
- return $obj_array[0];
- }
-
- /**
- * retrieve objects from the database
- *
- * @param object $criteria {@link CriteriaElement} conditions to be met
- * @param bool $id_as_key use the ID as key for the array?
- * @param bool $as_object return an array of objects?
- *
- * @return array
- */
- function &getObjects($criteria = null, $id_as_key = false, $as_object = true)
- {
- $ret = array();
- $limit = $start = 0;
- $sql = 'SELECT * FROM '.$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- if ($criteria->getSort() != '') {
- $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
- }
- $limit = $criteria->getLimit();
- $start = $criteria->getStart();
- }
- $result = $this->db->query($sql, $limit, $start);
- if (!$result) {
- return $ret;
- }
-
- $ret = $this->convertResultSet($result, $id_as_key, $as_object);
- return $ret;
- }
-
- /**
- * Convert a database resultset to a returnable array
- *
- * @param object $result database resultset
- * @param bool $id_as_key - should NOT be used with joint keys
- * @param bool $as_object
- *
- * @return array
- */
- function convertResultSet($result, $id_as_key = false, $as_object = true) {
- $ret = array();
- while ($myrow = $this->db->fetchArray($result)) {
- $obj =& $this->create(false);
- $obj->assignVars($myrow);
- if (!$id_as_key) {
- if ($as_object) {
- $ret[] =& $obj;
- }
- else {
- $row = array();
- $vars = $obj->getVars();
- foreach (array_keys($vars) as $i) {
- $row[$i] = $obj->getVar($i);
- }
- $ret[] = $row;
- }
- } else {
- if ($as_object) {
- $ret[$myrow[$this->keyName]] =& $obj;
- }
- else {
- $row = array();
- $vars = $obj->getVars();
- foreach (array_keys($vars) as $i) {
- $row[$i] = $obj->getVar($i);
- }
- $ret[$myrow[$this->keyName]] = $row;
- }
- }
- unset($obj);
- }
-
- return $ret;
- }
-
- /**
- * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS
- *
- * @param object $criteria {@link CriteriaElement} conditions to be met
- * @param int $limit Max number of objects to fetch
- * @param int $start Which record to start at
- *
- * @return array
- */
- function getList($criteria = null, $limit = 0, $start = 0) {
- $ret = array();
- if ($criteria == null) {
- $criteria = new CriteriaCompo();
- }
-
- if ($criteria->getSort() == '') {
- $criteria->setSort($this->identifierName);
- }
-
- $sql = 'SELECT '.$this->keyName;
- if(!empty($this->identifierName)){
- $sql .= ', '.$this->identifierName;
- }
- $sql .= ' FROM '.$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- if ($criteria->getSort() != '') {
- $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
- }
- $limit = $criteria->getLimit();
- $start = $criteria->getStart();
- }
- $result = $this->db->query($sql, $limit, $start);
- if (!$result) {
- return $ret;
- }
-
- $myts =& MyTextSanitizer::getInstance();
- while ($myrow = $this->db->fetchArray($result)) {
- //identifiers should be textboxes, so sanitize them like that
- $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]);
- }
- return $ret;
- }
-
- /**
-
- * count objects matching a condition
- *
- * @param object $criteria {@link CriteriaElement} to match
- * @return int count of objects
- */
- function getCount($criteria = null)
- {
- $field = "";
- $groupby = false;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- if ($criteria->groupby != "") {
- $groupby = true;
- $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
- }
- }
- $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- if ($criteria->groupby != "") {
- $sql .= $criteria->getGroupby();
- }
- }
- $result = $this->db->query($sql);
- if (!$result) {
- return 0;
- }
- if ($groupby == false) {
- list($count) = $this->db->fetchRow($result);
- return $count;
- }
- else {
- $ret = array();
- while (list($id, $count) = $this->db->fetchRow($result)) {
- $ret[$id] = $count;
- }
- return $ret;
- }
- }
-
- /**
- * delete an object from the database
- *
- * @param mixed $id id of the object to delete
- * @param bool $force
- * @return bool FALSE if failed.
- */
- function delete($id, $force = false)
- {
- if (is_array($this->keyName)) {
- $clause = array();
- for ($i = 0; $i < count($this->keyName); $i++) {
- $clause[] = $this->keyName[$i]." = ".$id[$i];
- }
- $whereclause = implode(" AND ", $clause);
- }
- else {
- $whereclause = $this->keyName." = ".$id;
- }
- $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause;
- if (false != $force) {
- $result = $this->db->queryF($sql);
- } else {
- $result = $this->db->query($sql);
- }
- if (!$result) {
- return false;
- }
- return true;
- }
-
- /**
- * insert a new object in the database
- *
- * @param object $obj reference to the object
- * @param bool $force whether to force the query execution despite security settings
- * @param bool $checkObject check if the object is dirty and clean the attributes
- * @return bool FALSE if failed, TRUE if already present and unchanged or successful
- */
-
- function insert(&$obj, $force = false, $checkObject = true)
- {
- if ($checkObject != false) {
- if (!is_object($obj)) {
- var_dump($obj);
- return false;
- }
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
- */
- if (!is_a($obj, $this->className)) {
- $obj->setErrors(get_class($obj)." Differs from ".$this->className);
- return false;
- }
- }
- if (!$obj->cleanVars()) {
- return false;
- }
-
- foreach ($obj->cleanVars as $k => $v) {
- if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
- $cleanvars[$k] = intval($v);
- } elseif ( is_array( $v ) ) {
- $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) );
- } else {
- $cleanvars[$k] = $this->db->quoteString($v);
- }
- }
- if ($obj->isNew()) {
- if (!is_array($this->keyName)) {
- if ($cleanvars[$this->keyName] < 1) {
- $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
- }
- }
- $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")";
- } else {
- $sql = "UPDATE ".$this->table." SET";
- foreach ($cleanvars as $key => $value) {
- if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) {
- continue;
- }
- if (isset($notfirst) ) {
- $sql .= ",";
- }
- $sql .= " ".$key." = ".$value;
- $notfirst = true;
- }
- if (is_array($this->keyName)) {
- $whereclause = "";
- for ($i = 0; $i < count($this->keyName); $i++) {
- if ($i > 0) {
- $whereclause .= " AND ";
- }
- $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]);
- }
- }
- else {
- $whereclause = $this->keyName." = ".$obj->getVar($this->keyName);
- }
- $sql .= " WHERE ".$whereclause;
- }
- if (false != $force) {
- $result = $this->db->queryF($sql);
- } else {
- $result = $this->db->query($sql);
- }
- if (!$result) {
- return false;
- }
- if ($obj->isNew() && !is_array($this->keyName)) {
- $obj->assignVar($this->keyName, $this->db->getInsertId());
- }
- return true;
- }
-
- /**
- * Change a value for objects with a certain criteria
- *
- * @param string $fieldname Name of the field
- * @param string $fieldvalue Value to write
- * @param object $criteria {@link CriteriaElement}
- *
- * @return bool
- **/
- function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false)
- {
- $set_clause = $fieldname . ' = ';
- if ( is_numeric( $fieldvalue ) ) {
- $set_clause .= $fieldvalue;
- } elseif ( is_array( $fieldvalue ) ) {
- $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) );
- } else {
- $set_clause .= $this->db->quoteString( $fieldvalue );
- }
- $sql = 'UPDATE '.$this->table.' SET '.$set_clause;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- }
- if (false != $force) {
- $result = $this->db->queryF($sql);
- } else {
- $result = $this->db->query($sql);
- }
- if (!$result) {
- return false;
- }
- return true;
- }
-
- function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
- {
- $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- }
- if (false != $force) {
- $result = $this->db->queryF($sql);
- } else {
- $result = $this->db->query($sql);
- }
- if (!$result) {
- return false;
- }
- return true;
- }
-
- /**
- * delete all objects meeting the conditions
- *
- * @param object $criteria {@link CriteriaElement} with conditions to meet
- * @return bool
- */
-
- function deleteAll($criteria = null)
- {
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql = 'DELETE FROM '.$this->table;
- $sql .= ' '.$criteria->renderWhere();
- if (!$this->db->query($sql)) {
- return false;
- }
- $rows = $this->db->getAffectedRows();
- return $rows > 0 ? $rows : true;
- }
- return false;
- }
-
- function _toObject($data) {
- if(is_array($data)) {
- $ret = array();
- foreach($data as $v) {
- $object = new $this->className();
- $object->assignVars($v);
- $ret[] = $object;
- }
- return $ret;
- } else {
- $object = new $this->className();
- $object->assignVars($v);
- return $object;
- }
- }
-
- function objectToArray($objects, $externalKeys = array(), $format = 's') {
- static $cache;
-
- $ret = array();
- if(is_array($objects)) {
- $i = 0;
- foreach($objects as $object) {
- $vars = $object->getVars();
- foreach ($vars as $k => $v) {
- $ret[$i][$k] = $object->getVar($k,$format);
- }
- foreach($externalKeys as $key) {
- // Replace external key by corresponding object
- $externalKey = $object->getExternalKey($key);
- if($ret[$i][$key] != 0) {
- // Retriving data if isn't cached
- if(!isset($cached[$externalKey['keyName']][$ret[$i][$key]])) {
- if($externalKey['core']) {
- $handler = xoops_gethandler($externalKey['className']);
- } else {
- $handler = xoops_getmodulehandler($externalKey['className'], 'extgallery');
- }
- $cached[$externalKey['keyName']][$ret[$i][$key]] = $this->objectToArrayWithoutExternalKey($handler->$externalKey['getMethodeName']($ret[$i][$key]),$format);
- }
- $ret[$i][$externalKey['keyName']] = $cached[$externalKey['keyName']][$ret[$i][$key]];
- }
- unset($ret[$i][$key]);
- }
- $i++;
- }
- } else {
- $vars = $objects->getVars();
- foreach ($vars as $k => $v) {
- $ret[$k] = $objects->getVar($k,$format);
- }
- foreach($externalKeys as $key) {
- // Replace external key by corresponding object
- $externalKey = $objects->getExternalKey($key);
- if($ret[$key] != 0) {
- // Retriving data if isn't cached
- if(!isset($cached[$externalKey['keyName']][$ret[$key]])) {
- if($externalKey['core']) {
- $handler = xoops_gethandler($externalKey['className']);
- } else {
- $handler = xoops_getmodulehandler($externalKey['className'], 'extgallery');
- }
- $cached[$externalKey['keyName']][$ret[$key]] = $this->objectToArrayWithoutExternalKey($handler->$externalKey['getMethodeName']($ret[$key]),$format);
- }
- $ret[$externalKey['keyName']] = $cached[$externalKey['keyName']][$ret[$key]];
- }
- unset($ret[$key]);
- }
- }
- return $ret;
- }
-
- function objectToArrayWithoutExternalKey($object,$format = 's') {
- $ret = array();
- if($object != null) {
- $vars = $object->getVars();
- foreach ($vars as $k => $v) {
- $ret[$k] = $object->getVar($k,$format);
- }
- }
- return $ret;
- }
-
- function updateCounter($fieldname,$criteria,$op='+') {
- $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
- $sql .= ' '.$criteria->renderWhere();
- $result = $this->db->queryF($sql);
- if (!$result) {
- return false;
- }
- return true;
- }
-
- function getSum($criteria = null,$sum = '*')
- {
- $field = "";
- $groupby = false;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- if ($criteria->groupby != "") {
- $groupby = true;
- $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
- }
- }
- $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- if ($criteria->groupby != "") {
- $sql .= $criteria->getGroupby();
- }
- }
- $result = $this->db->query($sql);
- if (!$result) {
- return 0;
- }
- if ($groupby == false) {
- list($sum) = $this->db->fetchRow($result);
- return $sum;
- }
- else {
- $ret = array();
- while (list($id, $sum) = $this->db->fetchRow($result)) {
- $ret[$id] = $sum;
- }
- return $ret;
- }
- }
-
- function getMax($criteria = null,$max = '*')
- {
- $field = "";
- $groupby = false;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- if ($criteria->groupby != "") {
- $groupby = true;
- $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
- }
- }
- $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- if ($criteria->groupby != "") {
- $sql .= $criteria->getGroupby();
- }
- }
- $result = $this->db->query($sql);
- if (!$result) {
- return 0;
- }
- if ($groupby == false) {
- list($max) = $this->db->fetchRow($result);
- return $max;
- } else {
- $ret = array();
- while (list($id, $max) = $this->db->fetchRow($result)) {
- $ret[$id] = $max;
- }
- return $ret;
- }
- }
-
- function getAvg($criteria = null,$avg = '*')
- {
- $field = "";
-
- $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' '.$criteria->renderWhere();
- }
- $result = $this->db->query($sql);
- if (!$result) {
- return 0;
- }
- list($sum) = $this->db->fetchRow($result);
- return $sum;
- }
-
- function getInsertId() {
- return $this->db->getInsertId();
- }
-
-}
-
+<?php
+/**
+ * ExtGallery Class Manager
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Zoullou (http://www.zoullou.net)
+ * @package ExtGallery
+ * @version $Id$
+ */
+
+
+/**
+* Persistable Object Handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of derived class objects.
+*
+* @author Jan Keller Pedersen <mit...@xo...> - IDG Danmark A/S <www.idg.dk>
+* @copyright copyright (c) 2000-2004 XOOPS.org
+* @package Kernel
+*/
+
+class ExtgalleryPersistableObjectHandler extends XoopsObjectHandler {
+
+ /**#@+
+ * Information about the class, the handler is managing
+ *
+ * @var string
+ */
+ var $table;
+ var $keyName;
+ var $className;
+ var $identifierName;
+ /**#@-*/
+
+ /**
+ * Constructor - called from child classes
+ * @param object $db {@link XoopsDatabase} object
+ * @param string $tablename Name of database table
+ * @param string $classname Name of Class, this handler is managing
+ * @param string $keyname Name of the property, holding the key
+ *
+ * @return void
+ */
+ function ExtgalleryPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) {
+ $this->XoopsObjectHandler($db);
+ $this->table = $db->prefix($tablename);
+ $this->keyName = $keyname;
+ $this->className = $classname;
+ if ($idenfierName != false) {
+ $this->identifierName = $idenfierName;
+ }
+ }
+
+ /**
+ * create a new user
+ *
+ * @param bool $isNew Flag the new objects as "new"?
+ *
+ * @return object
+ */
+ /* function &create($isNew = true) {
+ //DNPROSSI - 5.3.0 Assigning the return value of new by reference is deprecated PHP 5.3
+ //Kept for backward compatability
+ if (version_compare(PHP_VERSION, '5.3.0', '<'))
+ {
+ $obj = new $this->className();
+ }
+ else
+ {
+ $obj = new $this->className();
+ }
+ if ($isNew === true) {
+ $obj->setNew();
+ }
+ return $obj;
+ } */
+
+ function &create($isNew = true)
+ {
+ $obj = new $this->className();
+ if ($isNew === true) {
+ $obj->setNew();
+ }
+ return $obj;
+ }
+
+ /**
+ * retrieve an object
+ *
+ * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
+ * @param bool $as_object whether to return an object or an array
+ * @return mixed reference to the object, FALSE if failed
+ */
+ function &get($id, $as_object = true) {
+ if (is_array($this->keyName)) {
+ $criteria = new CriteriaCompo();
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ $criteria->add(new Criteria($this->keyName[$i], intval($id[$i])));
+ }
+ } else {
+ $criteria = new Criteria($this->keyName, intval($id));
+ }
+ $criteria->setLimit(1);
+ $obj_array = $this->getObjects($criteria, false, $as_object);
+ if (count($obj_array) != 1) {
+ return $this->create();
+ }
+ return $obj_array[0];
+ }
+
+ /**
+ * retrieve objects from the database
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param bool $id_as_key use the ID as key for the array?
+ * @param bool $as_object return an array of objects?
+ *
+ * @return array
+ */
+ function &getObjects($criteria = null, $id_as_key = false, $as_object = true)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+
+ $ret = $this->convertResultSet($result, $id_as_key, $as_object);
+ return $ret;
+ }
+
+ /**
+ * Convert a database resultset to a returnable array
+ *
+ * @param object $result database resultset
+ * @param bool $id_as_key - should NOT be used with joint keys
+ * @param bool $as_object
+ *
+ * @return array
+ */
+ function convertResultSet($result, $id_as_key = false, $as_object = true) {
+ $ret = array();
+ while ($myrow = $this->db->fetchArray($result)) {
+ $obj =& $this->create(false);
+ $obj->assignVars($myrow);
+ if (!$id_as_key) {
+ if ($as_object) {
+ $ret[] =& $obj;
+ }
+ else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[] = $row;
+ }
+ } else {
+ if ($as_object) {
+ $ret[$myrow[$this->keyName]] =& $obj;
+ }
+ else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[$myrow[$this->keyName]] = $row;
+ }
+ }
+ unset($obj);
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Retrieve a list of objects as arrays - DON'T USE WITH JOINT K...
[truncated message content] |
|
From: <be...@us...> - 2013-08-12 23:08:09
|
Revision: 11900
http://sourceforge.net/p/xoops/svn/11900
Author: beckmi
Date: 2013-08-12 23:08:07 +0000 (Mon, 12 Aug 2013)
Log Message:
-----------
added .jpeg extension, update to 1.12 Beta 1
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/public-download.php
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php 2013-08-11 23:49:58 UTC (rev 11899)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php 2013-08-12 23:08:07 UTC (rev 11900)
@@ -96,7 +96,7 @@
$dir = opendir($batchRep);
while ($f = readdir($dir)) {
if(is_file($batchRep.$f)) {
- if(preg_match("/.*gif/",strtolower($f)) || preg_match("/.*jpg/",strtolower($f)) || preg_match("/.*png/",strtolower($f))) {
+ if(preg_match("/.*gif/",strtolower($f)) || preg_match("/.*jpg/",strtolower($f)) || preg_match("/.*jpeg/",strtolower($f)) ||preg_match("/.*png/",strtolower($f))) {
$photos[] = $f;
}
}
@@ -583,7 +583,7 @@
}
// For xoops tag
if (($xoopsModuleConfig['usetag'] == 1) and (is_dir('../../tag'))){
- require_once XOOPS_ROOT_PATH.'/modules/tag/include/formtag.php';
+ require_once XOOPS_ROOT_PATH.'/modules/tag/include/formtag.php';
$form->addElement(new XoopsFormTag('tag', 60, 255, '', 0));
}
$form->addElement(new XoopsFormHidden("op", 'add_photo'));
@@ -598,7 +598,7 @@
$dir = opendir($rep);
while ($f = readdir($dir)) {
if(is_file($rep.$f)) {
- if(preg_match("/.*gif/",strtolower($f)) || preg_match("/.*jpg/",strtolower($f)) || preg_match("/.*png/",strtolower($f))) {
+ if(preg_match("/.*gif/",strtolower($f)) || preg_match("/.*jpg/",strtolower($f)) || preg_match("/.*jpeg/",strtolower($f)) ||preg_match("/.*png/",strtolower($f))) {
$nbPhotos++;
}
}
Modified: XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-08-11 23:49:58 UTC (rev 11899)
+++ XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-08-12 23:08:07 UTC (rev 11900)
@@ -1,4 +1,9 @@
============================
+2013-08-12: Version 1.12 Beta 1
+============================
+- added .jpeg extension
+
+============================
2012-12-18: Version 1.11
============================
- Updated PEAR
Modified: XoopsModules/extgallery/trunk/modules/extgallery/public-download.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/public-download.php 2013-08-11 23:49:58 UTC (rev 11899)
+++ XoopsModules/extgallery/trunk/modules/extgallery/public-download.php 2013-08-12 23:08:07 UTC (rev 11900)
@@ -1,66 +1,67 @@
-<?php
-/**
- * ExtGallery User area
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @author Zoullou (http://www.zoullou.net)
- * @package ExtGallery
- * @version $Id$
- */
-
-
-require '../../mainfile.php';
-include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/publicPerm.php';
-
-if(!isset($_GET['id'])) {
- $photoId = 0;
-} else {
- $photoId = intval($_GET['id']);
-}
-
-$photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
-$photo = $photoHandler->get($photoId);
-
-$permHandler = ExtgalleryPublicPermHandler::getHandler();
-if(!$permHandler->isAllowed($xoopsUser, 'public_download', $photo->getVar('cat_id'))) {
- redirect_header("index.php");
- exit;
-}
-
-switch(strtolower(strrchr($photo->getVar('photo_name'), "."))) {
- case ".png": $type = "image/png"; break;
- case ".gif": $type = "image/gif"; break;
- case ".jpg": $type = "image/jpeg"; break;
- default: $type = "application/octet-stream"; break;
-}
-
-header("Content-Type: ".$type."");
-header("Content-Disposition: attachment; filename=\"".$photo->getVar('photo_name')."\"");
-
-if($photo->getVar('photo_havelarge')) {
- if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") {
- $photoName = "original/".$photo->getVar('photo_orig_name');
- } else {
- $photoName = "large/large_".$photo->getVar('photo_name');
- }
-} else {
- $photoName = "medium/".$photo->getVar('photo_name');
-}
-
-$photoHandler->updateDownload($photoId);
-
-if($photo->getVar('photo_serveur') == "") {
- readfile(XOOPS_ROOT_PATH."/uploads/extgallery/public-photo/".$photoName);
-} else {
- readfile($photo->getVar('photo_serveur').$photoName);
-}
-
+<?php
+/**
+ * ExtGallery User area
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Zoullou (http://www.zoullou.net)
+ * @package ExtGallery
+ * @version $Id$
+ */
+
+
+require '../../mainfile.php';
+include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/publicPerm.php';
+
+if(!isset($_GET['id'])) {
+ $photoId = 0;
+} else {
+ $photoId = intval($_GET['id']);
+}
+
+$photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
+$photo = $photoHandler->get($photoId);
+
+$permHandler = ExtgalleryPublicPermHandler::getHandler();
+if(!$permHandler->isAllowed($xoopsUser, 'public_download', $photo->getVar('cat_id'))) {
+ redirect_header("index.php");
+ exit;
+}
+
+switch(strtolower(strrchr($photo->getVar('photo_name'), "."))) {
+ case ".png": $type = "image/png"; break;
+ case ".gif": $type = "image/gif"; break;
+ case ".jpg": $type = "image/jpeg"; break;
+ case ".jpeg": $type = "image/jpeg"; break;
+ default: $type = "application/octet-stream"; break;
+}
+
+header("Content-Type: ".$type."");
+header("Content-Disposition: attachment; filename=\"".$photo->getVar('photo_name')."\"");
+
+if($photo->getVar('photo_havelarge')) {
+ if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") {
+ $photoName = "original/".$photo->getVar('photo_orig_name');
+ } else {
+ $photoName = "large/large_".$photo->getVar('photo_name');
+ }
+} else {
+ $photoName = "medium/".$photo->getVar('photo_name');
+}
+
+$photoHandler->updateDownload($photoId);
+
+if($photo->getVar('photo_serveur') == "") {
+ readfile(XOOPS_ROOT_PATH."/uploads/extgallery/public-photo/".$photoName);
+} else {
+ readfile($photo->getVar('photo_serveur').$photoName);
+}
+
?>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php 2013-08-11 23:49:58 UTC (rev 11899)
+++ XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php 2013-08-12 23:08:07 UTC (rev 11900)
@@ -17,7 +17,7 @@
*/
$modversion['name'] = _MI_EXTGAL_NAME;
-$modversion['version'] = 1.11;
+$modversion['version'] = 1.12;
$modversion['description'] = _MI_EXTGAL_DESC;
$modversion['credits'] = "http://www.zoullou.net/";
$modversion['author'] = "Zoullou";
@@ -25,7 +25,7 @@
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "images/extgallery_logo.png";
-$modversion['dirname'] = "extgallery";
+$modversion['dirname'] = basename(dirname(__FILE__));
$modversion['onInstall'] = 'include/install_function.php';
$modversion['onUpdate'] = 'include/update_function.php';
$modversion['min_php'] = '5.2';
@@ -33,7 +33,7 @@
$modversion['min_admin']='1.1';
$modversion['min_db']= array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
-$modversion["module_status"] = "Final";
+$modversion["module_status"] = "Beta 1";
// Admin menu
// Set to 1 if you want to display menu generated by system module
|
|
From: <be...@us...> - 2013-08-19 18:29:42
|
Revision: 11938
http://sourceforge.net/p/xoops/svn/11938
Author: beckmi
Date: 2013-08-19 18:29:38 +0000 (Mon, 19 Aug 2013)
Log Message:
-----------
replaced ExtgalleryPhotoUploader with standard XoopsMediaUploader
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php 2013-08-18 02:25:16 UTC (rev 11937)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php 2013-08-19 18:29:38 UTC (rev 11938)
@@ -52,7 +52,7 @@
redirect_header("photo.php", 3, _AM_EXTGALLERY_NOT_AN_ALBUM);
exit;
} elseif($result == 4 || $result == 5) {
- redirect_header("photo.php", 3, _AM_EXTGALLERY_UPLOAD_ERROR.' :<br />'.$photoHandler->photoUploader->getError());
+ redirect_header("photo.php", 3, _AM_EXTGALLERY_UPLOAD_ERROR.' :<br />'.$photoHandler->photoUploader->getErrors());
exit;
} elseif($result == 0) {
redirect_header("photo.php", 3, _AM_EXTGALLERY_PHOTO_UPLOADED);
@@ -719,6 +719,3 @@
break;
}
-
-
-?>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-08-18 02:25:16 UTC (rev 11937)
+++ XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-08-19 18:29:38 UTC (rev 11938)
@@ -1,7 +1,8 @@
============================
2013-08-12: Version 1.12 Beta 1
============================
-- added .jpeg extension
+- added .jpeg extension (mamba)
+- replaced ExtgalleryPhotoUploader with standard XoopsMediaUploader (mamba)
============================
2012-12-18: Version 1.11
Modified: XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php 2013-08-18 02:25:16 UTC (rev 11937)
+++ XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php 2013-08-19 18:29:38 UTC (rev 11938)
@@ -121,17 +121,17 @@
return $this->getCount($criteria);
}
- function getAlbumPhotoPage($catId, $start, $sortby, $orderby) {
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('cat_id',$catId));
- $criteria->add(new Criteria('photo_approved',1));
- $criteria->setStart($start);
- $criteria->setLimit($GLOBALS['xoopsModuleConfig']['nb_column']*$GLOBALS['xoopsModuleConfig']['nb_line']);
- if ($criteria->getSort() == '') {
- $criteria->setSort($sortby);
- $criteria->setOrder($orderby);
- }
- return $this->getObjects($criteria);
+ function getAlbumPhotoPage($catId, $start, $sortby, $orderby) {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('cat_id',$catId));
+ $criteria->add(new Criteria('photo_approved',1));
+ $criteria->setStart($start);
+ $criteria->setLimit($GLOBALS['xoopsModuleConfig']['nb_column']*$GLOBALS['xoopsModuleConfig']['nb_line']);
+ if ($criteria->getSort() == '') {
+ $criteria->setSort($sortby);
+ $criteria->setOrder($orderby);
+ }
+ return $this->getObjects($criteria);
}
function getAlbumPhotoAdminPage($catId, $start) {
@@ -546,7 +546,7 @@
*/
function postPhotoTraitement($file, $checkMd5 = false) {
- include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/photoUploader.php';
+// include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/photoUploader.php';
$catHandler = xoops_getmodulehandler('publiccat', 'extgallery');
@@ -558,23 +558,50 @@
return 2;
}
- $allowedMimeTypes = array('image/jpeg','image/gif','image/png');
+ $allowedMimeTypes = array('image/jpeg','image/jpg','image/pjpeg','image/gif','image/png','image/x-png');
+// $allowedMimeTypes = array('jpg/jpeg', 'image/bmp', 'image/gif', 'image/jpeg', 'image/jpg', 'image/x-png', 'image/png');
+
$uploadDir = XOOPS_ROOT_PATH."/uploads/extgallery/public-photo/";
- $this->photoUploader = new ExtgalleryPhotoUploader($uploadDir, 50000000, 5000, 5000);
- $this->photoUploader->checkMd5 = $checkMd5;
- $this->photoUploader->fetchPhoto($_FILES[$file]);
+// $this->photoUploader = new ExtgalleryPhotoUploader($uploadDir, 50000000, 5000, 5000);
+// $this->photoUploader->checkMd5 = $checkMd5;
+// $this->photoUploader->fetchPhoto($_FILES[$file]);
+
+ //------------------------
+ include_once(XOOPS_ROOT_PATH . "/class/uploader.php");
+ $this->photoUploader = new XoopsMediaUploader($uploadDir, $allowedMimeTypes, 50000000, 5000, 5000);
+
$jupart = (isset($_POST['jupart'])) ? (int)$_POST['jupart'] : 0;
$jufinal = (isset($_POST['jufinal'])) ? (int)$_POST['jufinal'] : 1;
+
+ if ($this->photoUploader->fetchMedia($file) && $this->photoUploader->upload()) {
+ } else {
+ // We got a chunk, so we don't add photo to database
+ if ($jupart && !$jufinal) {
+ return 5;
+ } else {
+ return 4;
+ }
+ }
+
+ //---------------------------
+
+/*
+
+ $jupart = (isset($_POST['jupart'])) ? (int)$_POST['jupart'] : 0;
+ $jufinal = (isset($_POST['jufinal'])) ? (int)$_POST['jufinal'] : 1;
+
if($this->photoUploader->isError()) {
return 4;
// We got a chunk, so we don't add photo to database
} elseif($jupart && !$jufinal) {
return 5;
}
+*/
+
//DNPROSSI - add missing title and description on upload
$photoTitle = '';
$photoDesc = '';
@@ -684,7 +711,7 @@
if ($xoopsModuleConfig['usetag'] == 1|| (is_dir('../tag') or is_dir('../../tag'))){
$newid = $this->db->getInsertId();
- $tag_handler = xoops_getmodulehandler('tag', 'tag');
+ $tag_handler = xoops_getmodulehandler('tag', 'tag');
$tag_handler->updateByItem($photoTag, $newid , 'extgallery', 0);
}
Modified: XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php 2013-08-18 02:25:16 UTC (rev 11937)
+++ XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php 2013-08-19 18:29:38 UTC (rev 11938)
@@ -1,294 +1,300 @@
-<?php
-/**
- * ExtGallery Class Manager
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @author Zoullou (http://www.zoullou.net)
- * @package ExtGallery
- * @version $Id$
- */
-
-class ExtgalleryPhotoUploader {
-
- var $uploadDir;
- var $savedDestination;
- var $savedFilename;
- var $maxFileSize;
- var $maxWidth;
- var $maxHeight;
- var $isError;
- var $error;
- var $checkMd5;
-
- function ExtgalleryPhotoUploader($uploadDir, $maxFileSize=0, $maxWidth=null, $maxHeight=null) {
-
- $this->uploadDir = $uploadDir;
- $this->maxFileSize = intval($maxFileSize);
- if (isset($maxWidth)) {
- $this->maxWidth = intval($maxWidth);
- }
- if (isset($maxHeight)) {
- $this->maxHeight = intval($maxHeight);
- }
-
- $this->isError = false;
- $this->error = '';
- $this->checkMd5 = true;
-
- }
-
- function fetchPhoto($file) {
-
- $jupart = (isset($_POST['jupart'])) ? (int)$_POST['jupart'] : 0;
- $jufinal = (isset($_POST['jufinal'])) ? (int)$_POST['jufinal'] : 1;
- $md5sums = (isset($_POST['md5sum'][0])) ? $_POST['md5sum'][0] : null;
-
- if($this->uploadDir == '') {
- $this->abort('upload dir not defined');
- return false;
- }
-
- if(!is_dir($this->uploadDir)) {
- $this->abort('fail to open upload dir');
- return false;
- }
-
- if(!is_writeable($this->uploadDir)) {
- $this->abort('upload dir not writable');
- return false;
- }
-
- if($this->checkMd5 && !isset($md5sums)) {
- $this->abort('Expecting an MD5 checksum');
- return false;
- }
-
- $dstdir = $this->uploadDir;
- $dstname = $dstdir.'/juvar.'.session_id();
- $tmpname = $dstdir.'/juvar.tmp'.session_id();
-
- if (!move_uploaded_file($file['tmp_name'], $tmpname)) {
- $this->abort('Unable to move uploaded file');
- return false;
- }
-
- if($jupart) {
- // got a chunk of a multi-part upload
- $len = filesize($tmpname);
- $_SESSION['juvar.tmpsize'] += $len;
- if($len > 0) {
- $src = fopen($tmpname, 'rb');
- $dst = fopen($dstname, ($jupart == 1) ? 'wb' : 'ab');
- while($len > 0) {
- $rlen = ($len > 8192) ? 8192 : $len;
- $buf = fread($src, $rlen);
- if(!$buf) {
- fclose($src);
- fclose($dst);
- unlink($dstname);
- $this->abort('read IO error');
- return false;
- }
- if(!fwrite($dst, $buf, $rlen)) {
- fclose($src);
- fclose($dst);
- unlink($dstname);
- $this->abort('write IO error');
- return false;
- }
- $len -= $rlen;
- }
- fclose($src);
- fclose($dst);
- unlink($tmpname);
- }
- if($jufinal) {
- // This is the last chunk. Check total lenght and rename it to it's final name.
- $dlen = filesize($dstname);
- if($dlen != $_SESSION['juvar.tmpsize']) {
- $this->abort('file size mismatch');
- return false;
- }
- if($this->checkMd5 && ($md5sums != md5_file($dstname))) {
- $this->abort('MD5 checksum mismatch');
- return false;
- }
- // remove zero sized files
- if($dlen > 0) {
- if(!$this->_saveFile($dstname, $file['name'])) {
- return false;
- }
- } else {
- $this->abort('0 file size');
- return false;
- }
- // reset session var
- $_SESSION['juvar.tmpsize'] = 0;
- }
- } else {
- // Got a single file upload. Trivial.
- if($this->checkMd5 && $md5sums != md5_file($tmpname)) {
- $this->abort('MD5 checksum mismatch');
- return false;
- }
- if(!$this->_saveFile($tmpname, $file['name'])) {
- return false;
- }
- }
-
- return true;
-
- }
-
- function _saveFile($tmpDestination, $fileName) {
-
- $this->savedFilename = $fileName;
- $this->savedDestination = $this->uploadDir.$fileName;
-
- if(!$this->_checkFile($tmpDestination)) {
- return false;
- }
-
- if (!rename($tmpDestination, $this->savedDestination)) {
- $this->abort('error renaming file');
- return false;
- }
-
- @chmod($this->savedDestination, 0644);
- return true;
-
- }
-
- function _checkFile($tmpDestination) {
-
- $imageExtensions = array(IMAGETYPE_GIF => 'gif', IMAGETYPE_JPEG => 'jpg', IMAGETYPE_PNG => 'png');
-
- // Check IE XSS before returning success
- $ext = strtolower( substr( strrchr( $this->savedDestination , '.' ) , 1 ) ) ;
- $photoInfo = getimagesize($tmpDestination);
- if( $photoInfo === false || $imageExtensions[ (int)$photoInfo[2] ] != $ext ) {
- $this->abort('Suspicious image upload refused');
- return false;
- }
-
- if(!$this->checkMaxFileSize($tmpDestination)) {
- $this->abort('Max file size error');
- return false;
- }
-
- if(!$this->checkMaxWidth($photoInfo)) {
- $this->abort('Max width error');
- return false;
- }
-
- if(!$this->checkMaxHeight($photoInfo)) {
- $this->abort('Max height error');
- return false;
- }
-
- if(!$this->checkImageType($photoInfo)) {
- $this->abort('File type not allowed');
- return false;
- }
-
- return true;
-
- }
-
- function checkMaxFileSize($file) {
-
- if (!isset($this->maxFileSize)) {
- return true;
- }
-
- if(filesize($file) > $this->maxFileSize) {
- return false;
- }
- return true;
-
- }
-
- function checkMaxWidth($photoInfo) {
-
- if(!isset($this->maxWidth)) {
- return true;
- }
-
- if($photoInfo[0] > $this->maxWidth) {
- return false;
- }
-
- return true;
-
- }
-
- function checkMaxHeight($photoInfo) {
-
- if(!isset($this->maxHeight)) {
- return true;
- }
-
- if($photoInfo[1] > $this->maxHeight) {
- return false;
- }
-
- return true;
- }
-
- function checkImageType($photoInfo) {
-
- $allowedMimeTypes = array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG);
- if (!in_array($photoInfo[2], $allowedMimeTypes)) {
- return false;
- }
-
- return true;
-
- }
-
- function abort($msg = '') {
- // remove all uploaded files of *this* request
- if (isset($_FILES)) {
- foreach ($_FILES as $key => $val) {
- //@unlink($val['tmp_name']);
- }
- }
-
- // remove accumulated file, if any.
- //@unlink($this->uploadDir .'/juvar.'.session_id());
- //@unlink($this->uploadDir .'/juvar.tmp'.session_id());
-
- // reset session var
- $_SESSION['juvar.tmpsize'] = 0;
-
- $this->isError = true;
- $this->error = $msg;
-
- }
-
- function isError() {
- return $this->isError;
- }
-
- function getError() {
- return $this->error;
- }
-
- function getSavedDestination() {
- return $this->savedDestination;
- }
-
- function getSavedFilename() {
- return $this->savedFilename;
- }
-
-}
+<?php
+/**
+ * ExtGallery Class Manager
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @author Zoullou (http://www.zoullou.net)
+ * @package ExtGallery
+ * @version $Id$
+ */
+
+class ExtgalleryPhotoUploader {
+
+ var $uploadDir;
+ var $savedDestination;
+ var $savedFilename;
+ var $maxFileSize;
+ var $maxWidth;
+ var $maxHeight;
+ var $isError;
+ var $error;
+ var $checkMd5;
+
+ function ExtgalleryPhotoUploader($uploadDir, $maxFileSize=0, $maxWidth=null, $maxHeight=null) {
+
+ $this->uploadDir = $uploadDir;
+ $this->maxFileSize = intval($maxFileSize);
+ if (isset($maxWidth)) {
+ $this->maxWidth = intval($maxWidth);
+ }
+ if (isset($maxHeight)) {
+ $this->maxHeight = intval($maxHeight);
+ }
+
+ $this->isError = false;
+ $this->error = '';
+ $this->checkMd5 = true;
+
+ }
+
+ function fetchPhoto($file) {
+
+ $jupart = (isset($_POST['jupart'])) ? (int)$_POST['jupart'] : 0;
+ $jufinal = (isset($_POST['jufinal'])) ? (int)$_POST['jufinal'] : 1;
+ $md5sums = (isset($_POST['md5sum'][0])) ? $_POST['md5sum'][0] : null;
+
+ if($this->uploadDir == '') {
+ $this->abort('upload dir not defined');
+ return false;
+ }
+
+ if(!is_dir($this->uploadDir)) {
+ $this->abort('fail to open upload dir');
+ return false;
+ }
+
+ if(!is_writeable($this->uploadDir)) {
+ $this->abort('upload dir not writable');
+ return false;
+ }
+
+ if($this->checkMd5 && !isset($md5sums)) {
+ $this->abort('Expecting an MD5 checksum');
+ return false;
+ }
+
+ $dstdir = $this->uploadDir;
+ $dstname = $dstdir.'/juvar.'.session_id();
+ $tmpname = $dstdir.'/juvar.tmp'.session_id();
+
+ if (!move_uploaded_file($file['tmp_name'], $tmpname)) {
+ $this->abort('Unable to move uploaded file');
+ return false;
+ }
+
+ if($jupart) {
+ // got a chunk of a multi-part upload
+ $len = filesize($tmpname);
+ $_SESSION['juvar.tmpsize'] += $len;
+ if($len > 0) {
+ $src = fopen($tmpname, 'rb');
+ $dst = fopen($dstname, ($jupart == 1) ? 'wb' : 'ab');
+ while($len > 0) {
+ $rlen = ($len > 8192) ? 8192 : $len;
+ $buf = fread($src, $rlen);
+ if(!$buf) {
+ fclose($src);
+ fclose($dst);
+ unlink($dstname);
+ $this->abort('read IO error');
+ return false;
+ }
+ if(!fwrite($dst, $buf, $rlen)) {
+ fclose($src);
+ fclose($dst);
+ unlink($dstname);
+ $this->abort('write IO error');
+ return false;
+ }
+ $len -= $rlen;
+ }
+ fclose($src);
+ fclose($dst);
+ unlink($tmpname);
+ }
+ if($jufinal) {
+ // This is the last chunk. Check total lenght and rename it to it's final name.
+ $dlen = filesize($dstname);
+ if($dlen != $_SESSION['juvar.tmpsize']) {
+ $this->abort('file size mismatch');
+ return false;
+ }
+ if($this->checkMd5 && ($md5sums != md5_file($dstname))) {
+ $this->abort('MD5 checksum mismatch');
+ return false;
+ }
+ // remove zero sized files
+ if($dlen > 0) {
+ if(!$this->_saveFile($dstname, $file['name'])) {
+ return false;
+ }
+ } else {
+ $this->abort('0 file size');
+ return false;
+ }
+ // reset session var
+ $_SESSION['juvar.tmpsize'] = 0;
+ }
+ } else {
+ // Got a single file upload. Trivial.
+ if($this->checkMd5 && $md5sums != md5_file($tmpname)) {
+ $this->abort('MD5 checksum mismatch');
+ return false;
+ }
+ if(!$this->_saveFile($tmpname, $file['name'])) {
+ return false;
+ }
+ }
+
+ return true;
+
+ }
+
+ function _saveFile($tmpDestination, $fileName) {
+
+ $this->savedFilename = $fileName;
+ $this->savedDestination = $this->uploadDir.$fileName;
+
+ if(!$this->_checkFile($tmpDestination)) {
+ return false;
+ }
+
+ if (!rename($tmpDestination, $this->savedDestination)) {
+ $this->abort('error renaming file');
+ return false;
+ }
+
+ @chmod($this->savedDestination, 0644);
+ return true;
+
+ }
+
+ function _checkFile($tmpDestination) {
+
+// $imageExtensions = array(IMAGETYPE_GIF => 'gif', IMAGETYPE_JPEG => 'jpeg', IMAGETYPE_JPG => 'jpg', IMAGETYPE_PNG => 'png');
+
+ $valid_types = array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP);
+
+
+ $imageExtensions = array('gif', 'jpg', 'jpeg', 'png');
+
+ // Check IE XSS before returning success
+ $ext = strtolower( substr( strrchr( $this->savedDestination , '.' ) , 1 ) ) ;
+ $photoInfo = getimagesize($tmpDestination);
+ if( $photoInfo === false || $imageExtensions[ (int)$photoInfo[2] ] != $ext ) {
+ $this->abort('Suspicious image upload refused');
+ return false;
+ }
+
+ if(!$this->checkMaxFileSize($tmpDestination)) {
+ $this->abort('Max file size error');
+ return false;
+ }
+
+ if(!$this->checkMaxWidth($photoInfo)) {
+ $this->abort('Max width error');
+ return false;
+ }
+
+ if(!$this->checkMaxHeight($photoInfo)) {
+ $this->abort('Max height error');
+ return false;
+ }
+
+ if(!$this->checkImageType($photoInfo)) {
+ $this->abort('File type not allowed');
+ return false;
+ }
+
+ return true;
+
+ }
+
+ function checkMaxFileSize($file) {
+
+ if (!isset($this->maxFileSize)) {
+ return true;
+ }
+
+ if(filesize($file) > $this->maxFileSize) {
+ return false;
+ }
+ return true;
+
+ }
+
+ function checkMaxWidth($photoInfo) {
+
+ if(!isset($this->maxWidth)) {
+ return true;
+ }
+
+ if($photoInfo[0] > $this->maxWidth) {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ function checkMaxHeight($photoInfo) {
+
+ if(!isset($this->maxHeight)) {
+ return true;
+ }
+
+ if($photoInfo[1] > $this->maxHeight) {
+ return false;
+ }
+
+ return true;
+ }
+
+ function checkImageType($photoInfo) {
+
+// $allowedMimeTypes = array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_JPG, IMAGETYPE_PNG);
+ $allowedMimeTypes = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png');
+ if (!in_array($photoInfo['mime'], $allowedMimeTypes)) {
+ return false;
+ }
+
+ return true;
+
+ }
+
+ function abort($msg = '') {
+ // remove all uploaded files of *this* request
+ if (isset($_FILES)) {
+ foreach ($_FILES as $key => $val) {
+ //@unlink($val['tmp_name']);
+ }
+ }
+
+ // remove accumulated file, if any.
+ //@unlink($this->uploadDir .'/juvar.'.session_id());
+ //@unlink($this->uploadDir .'/juvar.tmp'.session_id());
+
+ // reset session var
+ $_SESSION['juvar.tmpsize'] = 0;
+
+ $this->isError = true;
+ $this->error = $msg;
+
+ }
+
+ function isError() {
+ return $this->isError;
+ }
+
+ function getError() {
+ return $this->error;
+ }
+
+ function getSavedDestination() {
+ return $this->savedDestination;
+ }
+
+ function getSavedFilename() {
+ return $this->savedFilename;
+ }
+
+}
?>
\ No newline at end of file
|
|
From: <be...@us...> - 2013-09-15 13:46:30
|
Revision: 12054
http://sourceforge.net/p/xoops/svn/12054
Author: beckmi
Date: 2013-09-15 13:46:27 +0000 (Sun, 15 Sep 2013)
Log Message:
-----------
Fixing template (Cifug)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/templates/extgallery_index.html
Modified: XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-09-15 02:32:35 UTC (rev 12053)
+++ XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt 2013-09-15 13:46:27 UTC (rev 12054)
@@ -3,6 +3,7 @@
============================
- added .jpeg extension (mamba)
- replaced ExtgalleryPhotoUploader with standard XoopsMediaUploader (mamba)
+- fix for index template (Cifug)
============================
2012-12-18: Version 1.11
Modified: XoopsModules/extgallery/trunk/modules/extgallery/templates/extgallery_index.html
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/templates/extgallery_index.html 2013-09-15 02:32:35 UTC (rev 12053)
+++ XoopsModules/extgallery/trunk/modules/extgallery/templates/extgallery_index.html 2013-09-15 13:46:27 UTC (rev 12054)
@@ -1,76 +1,76 @@
-<div class="extgallery">
- <a title="<{$extgalleryName}>" href="<{xoAppUrl modules/extgallery/}>"><{$extgalleryName}></a>
-
- <table class="outer">
- <tr>
- <th><{$lang.categoriesAlbums}></th>
- <th class="txtcenter"><{$lang.nbAlbums}></th>
- <th class="txtcenter"><{$lang.nbPhotos}></th>
- </tr>
- <{foreachq item=child from=$cats}>
- <tr class="<{cycle values="even,odd"}>">
- <{if $child.cat_nb_album == 0}>
- <td colspan="2">
- <{else}>
- <td>
- <{/if}>
-
- <!-- Category/album image -->
- <{if $disp_cat_img == 1 }>
- <{if $child.cat_imgurl != "" }>
- <div class="catThumb">
- <{if $child.cat_isalbum}>
- <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$child.cat_imgurl}>" alt="<{$child.cat_name}>" title="<{$child.cat_name}>" /></a>
- <{else}>
- <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><img src="<{$child.cat_imgurl}>" alt="<{$child.cat_name}>" title="<{$child.cat_name}>" /></a>
- <{/if}>
- </div>
- <{else}>
- <{if $child.photo}>
- <div class="catThumb">
- <{if $child.cat_isalbum}>
- <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
- <{else}>
- <a title="<{$child.cat_name}>" href="pu<{$extgalleryName}>blic-categories.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
- <{/if}>
- </div>
- <{/if}>
- <{/if}>
- <{else}>
- <{if $child.photo}>
- <div class="catThumb">
- <{if $child.cat_isalbum}>
- <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
- <{else}>
- <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
- <{/if}>
- </div>
- <{/if}>
- <{/if}>
-
- <{if $child.cat_isalbum}>
- <h2><a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><{$child.cat_name}></a></h2><br /><h3><{$child.cat_desc}></h3></td>
- <{else}>
- <h2><a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><{$child.cat_name}></a></h2><br /><h3><{$child.cat_desc}></h3></td>
- <{/if}>
- <{if $child.cat_nb_album != 0}>
- <td class="txtcenter"><{$child.cat_nb_album}></td>
- <{/if}>
- <td class="txtcenter"><{$child.cat_nb_photo}></td>
- </tr>
- <{/foreach}>
- <!--<tr class="even">
- <td><a href="user-categories.php">User categories</a><br />You can find here all user categories</td>
- </tr>-->
- </table>
-
- <{if $show_rss}>
- <div id="rss">
- <a href="<{xoAppUrl modules/extgallery/public-rss.php}>" title="<{$smarty.const._MD_EXTGALLERY_RSS}>">
- <img src="<{xoAppUrl modules/extgallery/images/feed.png}>" alt="<{$smarty.const._MD_EXTGALLERY_RSS}>" />
- </a>
- </div>
- <{/if}>
-
- <{include file='db:system_notification_select.html'}>
-</div>
+<div class="extgallery">
+ <a title="<{$extgalleryName}>" href="<{xoAppUrl modules/extgallery/}>"><{$extgalleryName}></a>
+
+ <table class="outer">
+ <tr>
+ <th><{$lang.categoriesAlbums}></th>
+ <th class="txtcenter"><{$lang.nbAlbums}></th>
+ <th class="txtcenter"><{$lang.nbPhotos}></th>
+ </tr>
+ <{foreachq item=child from=$cats}>
+ <tr class="<{cycle values="even,odd"}>">
+ <{if $child.cat_nb_album == 0}>
+ <td colspan="2">
+ <{else}>
+ <td>
+ <{/if}>
+
+ <!-- Category/album image -->
+ <{if $disp_cat_img == 1 }>
+ <{if $child.cat_imgurl != "" }>
+ <div class="catThumb">
+ <{if $child.cat_isalbum}>
+ <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$child.cat_imgurl}>" alt="<{$child.cat_name}>" title="<{$child.cat_name}>" /></a>
+ <{else}>
+ <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><img src="<{$child.cat_imgurl}>" alt="<{$child.cat_name}>" title="<{$child.cat_name}>" /></a>
+ <{/if}>
+ </div>
+ <{else}>
+ <{if $child.photo}>
+ <div class="catThumb">
+ <{if $child.cat_isalbum}>
+ <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
+ <{else}>
+ <a title="<{$child.cat_name}>" href="<{$extgalleryName}>public-categories.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
+ <{/if}>
+ </div>
+ <{/if}>
+ <{/if}>
+ <{else}>
+ <{if $child.photo}>
+ <div class="catThumb">
+ <{if $child.cat_isalbum}>
+ <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
+ <{else}>
+ <a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><img src="<{$xoops_url}>/uploads/extgallery/public-photo/thumb/thumb_<{$child.photo.photo_name}>" alt="<{$child.photo.photo_title}>" title="<{$child.photo.photo_title}>" /></a>
+ <{/if}>
+ </div>
+ <{/if}>
+ <{/if}>
+
+ <{if $child.cat_isalbum}>
+ <h2><a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-<{$display_type}>.php?id=<{$child.cat_id}>"><{$child.cat_name}></a></h2><br /><h3><{$child.cat_desc}></h3></td>
+ <{else}>
+ <h2><a title="<{$child.cat_name}>" href="<{xoAppUrl modules/extgallery/}>public-categories.php?id=<{$child.cat_id}>"><{$child.cat_name}></a></h2><br /><h3><{$child.cat_desc}></h3></td>
+ <{/if}>
+ <{if $child.cat_nb_album != 0}>
+ <td class="txtcenter"><{$child.cat_nb_album}></td>
+ <{/if}>
+ <td class="txtcenter"><{$child.cat_nb_photo}></td>
+ </tr>
+ <{/foreach}>
+ <!--<tr class="even">
+ <td><a href="user-categories.php">User categories</a><br />You can find here all user categories</td>
+ </tr>-->
+ </table>
+
+ <{if $show_rss}>
+ <div id="rss">
+ <a href="<{xoAppUrl modules/extgallery/public-rss.php}>" title="<{$smarty.const._MD_EXTGALLERY_RSS}>">
+ <img src="<{xoAppUrl modules/extgallery/images/feed.png}>" alt="<{$smarty.const._MD_EXTGALLERY_RSS}>" />
+ </a>
+ </div>
+ <{/if}>
+
+ <{include file='db:system_notification_select.html'}>
+</div>
|
|
From: <luc...@us...> - 2014-02-11 23:56:38
|
Revision: 12304
http://sourceforge.net/p/xoops/svn/12304
Author: luciorota
Date: 2014-02-11 23:56:32 +0000 (Tue, 11 Feb 2014)
Log Message:
-----------
added Ajax effects for slideshow block : jQuery Touch Optimized Sliders "R"Us
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/language/english/blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/templates/blocks/extgallery_block.html
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Added Paths:
-----------
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/lib/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/lib/FlameViewportScale.js
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/lib/jquery.hammer.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/css/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/css/jquery.tosrus.css
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-close-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-close.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-next-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-next.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-play-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-play.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-preloader-black-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-preloader-black.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-preloader-white-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-preloader-white.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-prev-retina.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-prev.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/img/tos-zoom.png
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/js/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/js/jquery.tosrus.js
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/js/jquery.tosrus.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/scss/
XoopsModules/extgallery/trunk/modules/extgallery/include/TosRUs/src/scss/jquery.tosrus.scss
Modified: XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php 2014-02-10 12:38:48 UTC (rev 12303)
+++ XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php 2014-02-11 23:56:32 UTC (rev 12304)
@@ -20,173 +20,171 @@
// Manage photo blocks
function extgalleryPhotoShow($options) {
- global $xoopsConfig;
-
- $photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
+ global $xoopsConfig;
- $param = array('limit'=>$options[0]);
- $direction = $options[1];
- $title = $options[2];
- $photoHandlertype = $options[3];
- $jquery = $options[4];
- $ajaxeffect = $options[5];
- $overlyabg = $options[6];
- $overlyaw = $options[7];
- $overlyah = $options[8];
- $tooltipw = $options[9];
- $tooltipbw = $options[10];
- $tooltipbbg = $options[11];
- $fancyboxbg = $options[12];
- $fancyboxop = $options[13];
- $fancyboxtin = $options[14];
- $fancyboxtout = $options[15];
- $fancyboxtp = $options[16];
- $fancyboxshow = $options[17];
- $prettyphotospeed = $options[18];
- $prettyphototheme = $options[19];
- $prettyphotoslidspeed = $options[20];
- $prettyphotoautoplay = $options[21];
- $jcarouselhwidth = $options[22];
- $jcarouselvwidth = $options[23];
- $jcarouselvheight = $options[24];
- $column = $options[25];
-
-
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
+ $photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
- $categories = array();
- foreach($options as $cat) {
- if($cat == 0) {
- $categories = array();
- break;
- }
- $categories[] = $cat;
- }
- $param['cat'] = $categories;
-
- switch ($photoHandlertype) {
- case "RandomPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
- break;
-
- case "LastPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
- break;
-
- case "TopViewPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
- break;
-
- case "TopRatedPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
- break;
-
- case "TopEcardPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
- break;
- }
+ $param = array('limit'=>$options[0]);
+ $direction = $options[1];
+ $title = $options[2];
+ $photoHandlertype = $options[3];
+ $jquery = $options[4];
+ $ajaxeffect = $options[5];
+ $overlyabg = $options[6];
+ $overlyaw = $options[7];
+ $overlyah = $options[8];
+ $tooltipw = $options[9];
+ $tooltipbw = $options[10];
+ $tooltipbbg = $options[11];
+ $fancyboxbg = $options[12];
+ $fancyboxop = $options[13];
+ $fancyboxtin = $options[14];
+ $fancyboxtout = $options[15];
+ $fancyboxtp = $options[16];
+ $fancyboxshow = $options[17];
+ $prettyphotospeed = $options[18];
+ $prettyphototheme = $options[19];
+ $prettyphotoslidspeed = $options[20];
+ $prettyphotoautoplay = $options[21];
+ $jcarouselhwidth = $options[22];
+ $jcarouselvwidth = $options[23];
+ $jcarouselvheight = $options[24];
+ $column = $options[25];
- if($jquery == 'true' && $ajaxeffect != 'none'){
- global $xoTheme;
- $xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
- switch($ajaxeffect) {
- case 'lightbox':
- $xoTheme->addScript("browse.php?Frameworks/jquery/plugins/jquery.lightbox.js");
- $xoTheme->addStylesheet('browse.php?modules/system/css/lightbox.css');
- break;
-
- case 'tooltip':
- $xoTheme->addScript("browse.php?modules/extgallery/include/tooltip/image.tooltip.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/tooltip/image.tooltip.css');
- break;
-
- case 'overlay':
- $xoTheme->addScript("browse.php?modules/extgallery/include/overlay/overlay.jquery.tools.min.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/overlay/overlay.css');
- break;
-
- case 'fancybox':
- $xoTheme->addScript("browse.php?modules/extgallery/include/fancybox/mousewheel.js");
- $xoTheme->addScript("browse.php?modules/extgallery/include/fancybox/fancybox.pack.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/fancybox/fancybox.css');
- break;
-
- case 'prettyphoto':
- $xoTheme->addScript("browse.php?modules/extgallery/include/prettyphoto/jquery.prettyPhoto.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/prettyphoto/prettyPhoto.css');
- break;
-
- case 'jcarousel':
- $xoTheme->addScript("browse.php?modules/extgallery/include/jcarousel/jquery.jcarousel.min.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/jcarousel/skin.css');
- break;
- }
- }
+ $categories = array();
+ foreach($options as $cat) {
+ if($cat == 0) {
+ $categories = array();
+ break;
+ }
+ $categories[] = $cat;
+ }
+ $param['cat'] = $categories;
- if(count($photos) == 0) {
- return array();
- }
+ switch ($photoHandlertype) {
+ case "RandomPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
+ break;
- $ret = array(
- 'photos'=>$photos,
- 'column'=>$column,
- 'direction'=>$direction,
- 'title'=>$title,
- 'jquery'=>$jquery,
- 'ajaxeffect'=>$ajaxeffect,
- 'overlyabg'=>$overlyabg,
- 'overlyaw'=>$overlyaw,
- 'overlyah'=>$overlyah,
- 'tooltipw'=>$tooltipw,
- 'tooltipbw'=>$tooltipbw,
- 'tooltipbbg'=>$tooltipbbg,
- 'fancyboxbg'=>$fancyboxbg,
- 'fancyboxop'=>$fancyboxop,
- 'fancyboxtin'=>$fancyboxtin,
- 'fancyboxtout'=>$fancyboxtout,
- 'fancyboxtp'=>$fancyboxtp,
- 'fancyboxshow'=>$fancyboxshow,
- 'prettyphotospeed'=>$prettyphotospeed,
- 'prettyphototheme'=>$prettyphototheme,
- 'prettyphotoslidspeed'=>$prettyphotoslidspeed,
- 'prettyphotoautoplay'=>$prettyphotoautoplay,
- 'jcarouselhwidth'=>$jcarouselhwidth,
- 'jcarouselvwidth'=>$jcarouselvwidth,
- 'jcarouselvheight'=>$jcarouselvheight
-
- );
- return $ret;
+ case "LastPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
+ break;
+
+ case "TopViewPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ break;
+
+ case "TopRatedPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
+ break;
+
+ case "TopEcardPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
+ break;
+ }
+
+ if ($jquery == 'true' && $ajaxeffect != 'none'){
+ global $xoTheme;
+ $xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
+
+ switch($ajaxeffect) {
+ case 'lightbox':
+ $xoTheme->addScript("browse.php?Frameworks/jquery/plugins/jquery.lightbox.js");
+ $xoTheme->addStylesheet('browse.php?modules/system/css/lightbox.css');
+ break;
+ case 'tooltip':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/tooltip/image.tooltip.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/tooltip/image.tooltip.css');
+ break;
+ case 'overlay':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/overlay/overlay.jquery.tools.min.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/overlay/overlay.css');
+ break;
+ case 'fancybox':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/fancybox/mousewheel.js");
+ $xoTheme->addScript("browse.php?modules/extgallery/include/fancybox/fancybox.pack.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/fancybox/fancybox.css');
+ break;
+ case 'prettyphoto':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/prettyphoto/jquery.prettyPhoto.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/prettyphoto/prettyPhoto.css');
+ break;
+ case 'jcarousel':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/jcarousel/jquery.jcarousel.min.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/jcarousel/skin.css');
+ break;
+ case 'TosRUs':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/TosRUs/src/js/jquery.tosrus.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/TosRUs/src/css/jquery.tosrus.css');
+ $xoTheme->addScript("browse.php?modules/extgallery/include/TosRUs/lib/jquery.hammer.min.js");
+ $xoTheme->addScript("browse.php?modules/extgallery/include/TosRUs/lib/FlameViewportScale.js");
+ break;
+ }
+ }
+
+ if(count($photos) == 0) {
+ return array();
+ }
+
+ $ret = array(
+ 'photos'=>$photos,
+ 'column'=>$column,
+ 'direction'=>$direction,
+ 'title'=>$title,
+ 'jquery'=>$jquery,
+ 'ajaxeffect'=>$ajaxeffect,
+ 'overlyabg'=>$overlyabg,
+ 'overlyaw'=>$overlyaw,
+ 'overlyah'=>$overlyah,
+ 'tooltipw'=>$tooltipw,
+ 'tooltipbw'=>$tooltipbw,
+ 'tooltipbbg'=>$tooltipbbg,
+ 'fancyboxbg'=>$fancyboxbg,
+ 'fancyboxop'=>$fancyboxop,
+ 'fancyboxtin'=>$fancyboxtin,
+ 'fancyboxtout'=>$fancyboxtout,
+ 'fancyboxtp'=>$fancyboxtp,
+ 'fancyboxshow'=>$fancyboxshow,
+ 'prettyphotospeed'=>$prettyphotospeed,
+ 'prettyphototheme'=>$prettyphototheme,
+ 'prettyphotoslidspeed'=>$prettyphotoslidspeed,
+ 'prettyphotoautoplay'=>$prettyphotoautoplay,
+ 'jcarouselhwidth'=>$jcarouselhwidth,
+ 'jcarouselvwidth'=>$jcarouselvwidth,
+ 'jcarouselvheight'=>$jcarouselvheight
+ );
+ return $ret;
}
// Manage Top Submitter blocks
function extgalleryTopSubmitterShow($options) {
-
global $xoopsDB, $xoopsConfig;
if ($options[1] != 0) {
$cat = array_slice($options, 1); //Get information about categories to display
@@ -212,585 +210,570 @@
$block['designers'][] = array('uid' => $uid, 'uname' => $uname, 'countphoto' => $countphoto);
}
return $block;
-
}
// Manage Ajax photos
function extgalleryAjax($options) {
-
- $photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
- $param = array('limit'=>$options[0]);
- $photoHandlertype = $options[1];
- $jquery = $options[2];
- $ajaxeffect = $options[3];
- $panel_width = $options[4];
- $panel_height = $options[5];
- $frame_width = $options[6];
- $frame_height = $options[7];
- $background_color = $options[8];
- $transition_speed = $options[9];
- $ransition_interval = $options[10];
- $overlay_height = $options[11];
- $overlay_color = $options[12];
- $overlay_text_color = $options[13];
- $caption_text_color = $options[14];
- $border = $options[15];
- $overlay_opacity = $options[16];
- $overlay_font_size = $options[17];
- $nav_theme = $options[18];
- $position = $options[19];
- $easing = $options[20];
- $gria_panelwidth = $options[21];
- $gria_height = $options[22];
- $gria_bgcolor = $options[23];
- $gria_bcolor = $options[24];
- $gria_bgimg = $options[25];
- $gria_autoplay = $options[26];
- $gria_transition = $options[27];
- $gria_tspeed = $options[28];
- $micro_size = $options[29];
-
+ $photoHandler = xoops_getmodulehandler('publicphoto', 'extgallery');
+ $param = array('limit'=>$options[0]);
+ $photoHandlertype = $options[1];
+ $jquery = $options[2];
+ $ajaxeffect = $options[3];
+ $panel_width = $options[4];
+ $panel_height = $options[5];
+ $frame_width = $options[6];
+ $frame_height = $options[7];
+ $background_color = $options[8];
+ $transition_speed = $options[9];
+ $ransition_interval = $options[10];
+ $overlay_height = $options[11];
+ $overlay_color = $options[12];
+ $overlay_text_color = $options[13];
+ $caption_text_color = $options[14];
+ $border = $options[15];
+ $overlay_opacity = $options[16];
+ $overlay_font_size = $options[17];
+ $nav_theme = $options[18];
+ $position = $options[19];
+ $easing = $options[20];
+ $gria_panelwidth = $options[21];
+ $gria_height = $options[22];
+ $gria_bgcolor = $options[23];
+ $gria_bcolor = $options[24];
+ $gria_bgimg = $options[25];
+ $gria_autoplay = $options[26];
+ $gria_transition = $options[27];
+ $gria_tspeed = $options[28];
+ $micro_size = $options[29];
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
- array_shift($options);
-
- $categories = array();
- foreach($options as $cat) {
- if($cat == 0) {
- $categories = array();
- break;
- }
- $categories[] = $cat;
- }
-
- $param['cat'] = $categories;
-
- switch ($photoHandlertype) {
- case "RandomPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
- break;
-
- case "LastPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
- break;
-
- case "TopViewPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
- break;
-
- case "TopRatedPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
- break;
-
- case "TopEcardPhoto":
- $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
- break;
- }
-
- if($jquery == 'true'){
- global $xoTheme;
- $xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
-
- switch($ajaxeffect) {
- case 'galleryview':
- $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/galleryview.js");
- $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/timers.js");
- $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/easing.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/galleryview/galleryview.css');
- break;
-
- case 'galleria':
- $xoTheme->addScript("browse.php?modules/extgallery/include/galleria/galleria.js");
- break;
-
- case 'microgallery':
- $xoTheme->addScript("browse.php?modules/extgallery/include/microgallery/jquery.microgallery.js");
- $xoTheme->addStylesheet('browse.php?modules/extgallery/include/microgallery/style.css');
- break;
- }
- }
-
- if(count($photos) == 0) {
- return array();
- }
-
- $ret = array(
- 'photos'=>$photos,
- 'jquery'=>$jquery,
- 'ajaxeffect'=>$ajaxeffect,
- 'panel_width'=>$panel_width,
- 'panel_height'=>$panel_height,
- 'frame_width'=>$frame_width,
- 'frame_height'=>$frame_height,
- 'background_color'=>$background_color,
- 'transition_speed'=>$transition_speed,
- 'transition_interval'=>$ransition_interval,
- 'overlay_height'=>$overlay_height,
- 'overlay_color'=>$overlay_color,
- 'overlay_text_color'=>$overlay_text_color,
- 'caption_text_color'=>$caption_text_color,
- 'border'=>$border,
- 'overlay_opacity'=>$overlay_opacity,
- 'overlay_font_size'=>$overlay_font_size,
- 'nav_theme'=>$nav_theme,
- 'position'=>$position,
- 'easing'=>$easing,
- 'galleria_panelwidth'=>$gria_panelwidth,
- 'galleria_height'=>$gria_height,
- 'galleria_bgcolor'=>$gria_bgcolor,
- 'galleria_bcolor'=>$gria_bcolor,
- 'galleria_bgimg'=>$gria_bgimg,
- 'galleria_autoplay'=>$gria_autoplay,
- 'galleria_transition'=>$gria_transition,
- 'galleria_tspeed'=>$gria_tspeed,
- 'micro_size'=>$micro_size
- );
- return $ret;
-
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+
+ $categories = array();
+ foreach($options as $cat) {
+ if($cat == 0) {
+ $categories = array();
+ break;
+ }
+ $categories[] = $cat;
+ }
+
+ $param['cat'] = $categories;
+
+ switch ($photoHandlertype) {
+ case "RandomPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getRandomPhoto($param));
+ break;
+ case "LastPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
+ break;
+ case "TopViewPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopViewPhoto($param));
+ break;
+ case "TopRatedPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopRatedPhoto($param));
+ break;
+ case "TopEcardPhoto":
+ $photos = $photoHandler->objectToArray($photoHandler->getTopEcardPhoto($param));
+ break;
+ }
+
+ if($jquery == 'true'){
+ global $xoTheme;
+ $xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
+
+ switch($ajaxeffect) {
+ case 'galleryview':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/galleryview.js");
+ $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/timers.js");
+ $xoTheme->addScript("browse.php?modules/extgallery/include/galleryview/easing.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/galleryview/galleryview.css');
+ break;
+ case 'galleria':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/galleria/galleria.js");
+ break;
+ case 'microgallery':
+ $xoTheme->addScript("browse.php?modules/extgallery/include/microgallery/jquery.microgallery.js");
+ $xoTheme->addStylesheet('browse.php?modules/extgallery/include/microgallery/style.css');
+ break;
+ }
+ }
+
+ if(count($photos) == 0) {
+ return array();
+ }
+
+ $ret = array(
+ 'photos'=>$photos,
+ 'jquery'=>$jquery,
+ 'ajaxeffect'=>$ajaxeffect,
+ 'panel_width'=>$panel_width,
+ 'panel_height'=>$panel_height,
+ 'frame_width'=>$frame_width,
+ 'frame_height'=>$frame_height,
+ 'background_color'=>$background_color,
+ 'transition_speed'=>$transition_speed,
+ 'transition_interval'=>$ransition_interval,
+ 'overlay_height'=>$overlay_height,
+ 'overlay_color'=>$overlay_color,
+ 'overlay_text_color'=>$overlay_text_color,
+ 'caption_text_color'=>$caption_text_color,
+ 'border'=>$border,
+ 'overlay_opacity'=>$overlay_opacity,
+ 'overlay_font_size'=>$overlay_font_size,
+ 'nav_theme'=>$nav_theme,
+ 'position'=>$position,
+ 'easing'=>$easing,
+ 'galleria_panelwidth'=>$gria_panelwidth,
+ 'galleria_height'=>$gria_height,
+ 'galleria_bgcolor'=>$gria_bgcolor,
+ 'galleria_bcolor'=>$gria_bcolor,
+ 'galleria_bgimg'=>$gria_bgimg,
+ 'galleria_autoplay'=>$gria_autoplay,
+ 'galleria_transition'=>$gria_transition,
+ 'galleria_tspeed'=>$gria_tspeed,
+ 'micro_size'=>$micro_size
+ );
+ return $ret;
+
}
// Options photo blocks
function extgalleryBlockEdit($options) {
+ global $xoopsUser;
- global $xoopsUser;
+ $catHandler = xoops_getmodulehandler('publiccat', 'extgallery');
- $catHandler = xoops_getmodulehandler('publiccat', 'extgallery');
+ $form = _MB_EXTGALLERY_PHOTO_NUMBER." : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"" . $options[0] . "\" type=\"text\" /><br />";
- $form = _MB_EXTGALLERY_PHOTO_NUMBER." : <input name=\"options[]\" size=\"5\" maxlength=\"255\" value=\"".$options[0]."\" type=\"text\" /><br />";
-
- $Selected = new XoopsFormSelect(_MB_EXTGALLERY_DIRECTION, 'options[]',$options[1]);
- $Selected->addOption("0", _MB_EXTGALLERY_HORIZONTALLY);
- $Selected->addOption("1", _MB_EXTGALLERY_VERTICALLY);
- $Selected->addOption("2", _MB_EXTGALLERY_TABLE);
- $form .= _MB_EXTGALLERY_DIRECTION." : ".$Selected->render().'<br />';
+ $Selected = new XoopsFormSelect(_MB_EXTGALLERY_DIRECTION, 'options[]', $options[1]);
+ $Selected->addOption("0", _MB_EXTGALLERY_HORIZONTALLY);
+ $Selected->addOption("1", _MB_EXTGALLERY_VERTICALLY);
+ $Selected->addOption("2", _MB_EXTGALLERY_TABLE);
+ $form .= _MB_EXTGALLERY_DIRECTION." : " . $Selected->render() . '<br />';
- $yChecked = "";
- $nChecked = "";
- if($options[2] == 1) {
- $yChecked = ' checked="checked"';
- } else {
- $nChecked = ' checked="checked"';
- }
-
- $form .= _MB_EXTGALLERY_DISPLAY_TITLE.' : <input type="radio" name="options[]" value="1"'.$yChecked.' /> '._YES.' <input type="radio" name="options[]" value="0"'.$nChecked.' />'._NO.'<br />';
-
- $effectTypeSelect = new XoopsFormSelect(_MB_EXTGALLERY_SHOW_TYPE, 'options[]',$options[3]);
- $effectTypeSelect->addOption("RandomPhoto", _MB_EXTGALLERY_TYPE_OP1);
- $effectTypeSelect->addOption("LastPhoto", _MB_EXTGALLERY_TYPE_OP2);
- $effectTypeSelect->addOption("TopViewPhoto", _MB_EXTGALLERY_TYPE_OP3);
- $effectTypeSelect->addOption("TopRatedPhoto", _MB_EXTGALLERY_TYPE_OP4);
- $effectTypeSelect->addOption("TopEcardPhoto", _MB_EXTGALLERY_TYPE_OP5);
- $form .= _MB_EXTGALLERY_SHOW_TYPE." : ".$effectTypeSelect->render().'<br />';
-
- $jqSelect = new XoopsFormSelect(_MB_EXTGALLERY_JQUERY, 'options[]',$options[4]);
- $jqSelect->addOption("true", _MB_EXTGALLERY_TRUE);
- $jqSelect->addOption("false", _MB_EXTGALLERY_FALSE);
- $form .= _MB_EXTGALLERY_JQUERY." : ".$jqSelect->render().'<br />';
-
- //select option
- $form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_USE_AJAX_EFFECTS."</legend>";
- $ajaxeffectSelect = new XoopsFormSelect(_MB_EXTGALLERY_USE_AJAX_EFFECTS, 'options[]',$options[5]);
- $ajaxeffectSelect->addOption("none", _MB_EXTGALLERY_AJAX_NONE);
- $ajaxeffectSelect->addOption("lightbox", _MB_EXTGALLERY_AJAX_LIGHTBOX);
- $ajaxeffectSelect->addOption("overlay", _MB_EXTGALLERY_AJAX_OVERLAY);
- $ajaxeffectSelect->addOption("tooltip", _MB_EXTGALLERY_AJAX_TOOLTIP);
- $ajaxeffectSelect->addOption("fancybox", _MB_EXTGALLERY_AJAX_FANCYBOX);
- $ajaxeffectSelect->addOption("prettyphoto", _MB_EXTGALLERY_AJAX_PRETTPHOTO);
- $ajaxeffectSelect->addOption("jcarousel", _MB_EXTGALLERY_AJAX_JCAROUSEL);
- $form .= _MB_EXTGALLERY_USE_AJAX_EFFECTS." : ".$ajaxeffectSelect->render().'<br />';
- $form .="</fieldset><br />";
-
- //for overlay
- $form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_AJAX_OVERLAY."</legend>";
- $form .= _MB_EXTGALLERY_OVERLAY_BG." : <input name=\"options[]\" size=\"7\" maxlength=\"7\" value=\"".$options[6]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_OVERLAY_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[7]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_OVERLAY_HEIGHT." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[8]."\" type=\"text\" /><br />";
- $form .="</fieldset><br />";
-
- //for tooltip
- $form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_AJAX_TOOLTIP."</legend>";
- $form .= _MB_EXTGALLERY_TOOLTIP_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[9]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_TOOLTIP_BORDER_WIDTH." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[10]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_TOOLTIP_BORDERCOLOR." : <input name=\"options[]\" size=\"7\" maxlength=\"7\" value=\"".$options[11]."\" type=\"text\" /><br />";
- $form .="</fieldset><br />";
-
- //for fancybox
- $form .= "<fieldset><legend style='font-weight:bold; color:#990000;'>"._MB_EXTGALLERY_AJAX_FANCYBOX."</legend>";
- $form .= _MB_EXTGALLERY_FANCYBOX_BGCOLOR." : <input name=\"options[]\" size=\"7\" maxlength=\"7\" value=\"".$options[12]."\" type=\"text\" /><br />";
- $form .= _MB_EXTGALLERY_FANCYBOX_OPACITY." : <input name=\"options[]\" size=\"5\" maxlength=\"5\" value=\"".$options[13]."\" type=\"text\" /><br />";
- $fancyboxtinSelect = new XoopsFormSelect(_MB_EXTGALLERY_FANCYBOX_TIN, 'options[]',$options[14]);
- $fancybo...
[truncated message content] |
|
From: <be...@us...> - 2014-02-19 12:38:24
|
Revision: 12326
http://sourceforge.net/p/xoops/svn/12326
Author: beckmi
Date: 2014-02-19 12:38:18 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
fixed bug in public download (tomodea), few PSR-2 changes, updates to JS libraries (work in progress)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/function.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/moduleUpdateFunction.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/perm-quota.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/public-category.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/upgrade.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/watermark-border.php
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_block_tag.php
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/NestedTree.php
XoopsModules/extgallery/trunk/modules/extgallery/class/catHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/extgalleryMailer.php
XoopsModules/extgallery/trunk/modules/extgallery/class/grouppermform.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pclerror.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltar.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltrace.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Console/Getopt.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/ColorsDefs.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/GD.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/GD1.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/IM.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/IMAGETYPE.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick/ImageTypes.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick2.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imlib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/NetPBM.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/image_type_to_mime_type.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/PEAR.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/PEAR5.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/System.php
XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php
XoopsModules/extgallery/trunk/modules/extgallery/class/php-captcha.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/class/plugin.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicPerm.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publiccat.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicecard.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicphoto.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicrating.php
XoopsModules/extgallery/trunk/modules/extgallery/class/quota.php
XoopsModules/extgallery/trunk/modules/extgallery/class/readIterator.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_delete.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_edit.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_new.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_post.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_reply.php
XoopsModules/extgallery/trunk/modules/extgallery/hook-photo.php
XoopsModules/extgallery/trunk/modules/extgallery/hook-thumb.php
XoopsModules/extgallery/trunk/modules/extgallery/images/captcha.php
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/conf/svn.properties
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/lang/lang_fr.properties
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/JUploadApplet.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/JUploadDaemon.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/context/DefaultJUploadContext.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/context/JUploadContextApplet.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/DefaultFileData.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/PictureFileData.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/helper/ImageFileConversionInfo.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/DialogUploadRetry.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/JUploadPanelImpl.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/filepanel/FilePanelDataModel2.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/DefaultUploadPolicy$1.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/DefaultUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/PictureUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/SilverpeasUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/DefaultFileUploadThread.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadManagerThreadImpl.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadThreadFTP.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadThreadHTTP.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/PacketConstructionThread.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/helper/HTTPConnectionHelper.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/helper/HttpConnect.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk.jupload.jar
XoopsModules/extgallery/trunk/modules/extgallery/include/comment_function.php
XoopsModules/extgallery/trunk/modules/extgallery/include/fancybox/fancybox.css
XoopsModules/extgallery/trunk/modules/extgallery/include/functions.php
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.classic.css
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.classic.js
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.js
XoopsModules/extgallery/trunk/modules/extgallery/include/install_function.php
XoopsModules/extgallery/trunk/modules/extgallery/include/jcarousel/jquery.jcarousel.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/microgallery/style.css
XoopsModules/extgallery/trunk/modules/extgallery/include/notification.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/include/overlay/overlay.jquery.tools.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/perm.php
XoopsModules/extgallery/trunk/modules/extgallery/include/plugin.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/include/prettyphoto/jquery.prettyPhoto.js
XoopsModules/extgallery/trunk/modules/extgallery/include/prettyphoto/prettyPhoto.css
XoopsModules/extgallery/trunk/modules/extgallery/include/search.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/include/style.css
XoopsModules/extgallery/trunk/modules/extgallery/include/update_function.php
XoopsModules/extgallery/trunk/modules/extgallery/index.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/mail_template/ecard_html.tpl
XoopsModules/extgallery/trunk/modules/extgallery/language/english/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/list.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/notification_update.php
XoopsModules/extgallery/trunk/modules/extgallery/plugin/plugin.php
XoopsModules/extgallery/trunk/modules/extgallery/public-album.php
XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php
XoopsModules/extgallery/trunk/modules/extgallery/public-download.php
XoopsModules/extgallery/trunk/modules/extgallery/public-modify.php
XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php
XoopsModules/extgallery/trunk/modules/extgallery/public-post-applet.php
XoopsModules/extgallery/trunk/modules/extgallery/public-rating.php
XoopsModules/extgallery/trunk/modules/extgallery/public-rss.php
XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php
XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/public-upload-extended.php
XoopsModules/extgallery/trunk/modules/extgallery/public-upload.php
XoopsModules/extgallery/trunk/modules/extgallery/public-useralbum.php
XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php
XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php
XoopsModules/extgallery/trunk/modules/extgallery/view.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php 2014-02-19 00:38:15 UTC (rev 12325)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php 2014-02-19 12:38:18 UTC (rev 12326)
@@ -15,40 +15,40 @@
* @author Zoullou (http://www.zoullou.net)
* @package ExtGallery
* @version $Id$
- */
-
+ */
+
include '../../../include/cp_header.php';
-include 'function.php';
+include 'function.php';
xoops_cp_header();
-
-$module_info =& $module_handler->get( $xoopsModule->getVar("mid") );
-
-$xoopsTpl->assign("module_name", $xoopsModule->getVar("name") );
-$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") );
-$xoopsTpl->assign("module_image", $module_info->getInfo("image") );
-$xoopsTpl->assign("module_version", $module_info->getInfo("version") );
-$xoopsTpl->assign("module_description", $module_info->getInfo("description") );
-$xoopsTpl->assign("module_author", $module_info->getInfo("author") );
-$xoopsTpl->assign("module_credits", $module_info->getInfo("credits") );
-$xoopsTpl->assign("module_license_url", $module_info->getInfo("license_url") );
-$xoopsTpl->assign("module_license", $module_info->getInfo("license") );
-$xoopsTpl->assign("module_status", $module_info->getInfo("module_status") );
-$xoopsTpl->assign("module_website_url", $module_info->getInfo("module_website_url") );
-$xoopsTpl->assign("module_website_name", $module_info->getInfo("module_website_name") );
-$xoopsTpl->assign("author_website_url", $module_info->getInfo("author_website_url") );
-$xoopsTpl->assign("author_website_name", $module_info->getInfo("author_website_name") );
-
-global $xoopsModule;
-$xoopsTpl->assign("module_update_date", formatTimestamp($xoopsModule->getVar("last_update"),"m") );
-
-if ( is_readable( $changelog = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/changelog.txt" ) ){
- $xoopsTpl->assign("changelog", implode("<br />", file( $changelog ) ) );
-}
-$xoTheme->addStylesheet('modules/extgallery/include/admin.css');
+$module_info =& $module_handler->get( $xoopsModule->getVar("mid") );
-// Call template file
-$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_about.html');
-
-xoops_cp_footer();
\ No newline at end of file
+$xoopsTpl->assign("module_name", $xoopsModule->getVar("name") );
+$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") );
+$xoopsTpl->assign("module_image", $module_info->getInfo("image") );
+$xoopsTpl->assign("module_version", $module_info->getInfo("version") );
+$xoopsTpl->assign("module_description", $module_info->getInfo("description") );
+$xoopsTpl->assign("module_author", $module_info->getInfo("author") );
+$xoopsTpl->assign("module_credits", $module_info->getInfo("credits") );
+$xoopsTpl->assign("module_license_url", $module_info->getInfo("license_url") );
+$xoopsTpl->assign("module_license", $module_info->getInfo("license") );
+$xoopsTpl->assign("module_status", $module_info->getInfo("module_status") );
+$xoopsTpl->assign("module_website_url", $module_info->getInfo("module_website_url") );
+$xoopsTpl->assign("module_website_name", $module_info->getInfo("module_website_name") );
+$xoopsTpl->assign("author_website_url", $module_info->getInfo("author_website_url") );
+$xoopsTpl->assign("author_website_name", $module_info->getInfo("author_website_name") );
+
+global $xoopsModule;
+$xoopsTpl->assign("module_update_date", formatTimestamp($xoopsModule->getVar("last_update"),"m") );
+
+if ( is_readable( $changelog = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/changelog.txt" ) ) {
+ $xoopsTpl->assign("changelog", implode("<br />", file( $changelog ) ) );
+}
+
+$xoTheme->addStylesheet('modules/extgallery/include/admin.css');
+
+// Call template file
+$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_about.html');
+
+xoops_cp_footer();
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2014-02-19 00:38:15 UTC (rev 12325)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2014-02-19 12:38:18 UTC (rev 12326)
@@ -23,453 +23,451 @@
//$GLOBALS['xoopsOption']['template_main'] = 'extgallery_admin_album.html';
-if(isset($_POST['op'])) {
- $op = $_POST['op'];
+if (isset($_POST['op'])) {
+ $op = $_POST['op'];
} else {
- $op = 'default';
+ $op = 'default';
}
-switch($op) {
-
+switch ($op) {
+
case 'overlay':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_overlay_bg'])) {
- if($xoopsModuleConfig['album_overlay_bg'] != $_POST['album_overlay_bg']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_bg'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_bg',
- 'conf_value'=>$_POST['album_overlay_bg'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_overlay_width'])) {
- if($xoopsModuleConfig['album_overlay_width'] != $_POST['album_overlay_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_width',
- 'conf_value'=>$_POST['album_overlay_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_overlay_height'])) {
- if($xoopsModuleConfig['album_overlay_height'] != $_POST['album_overlay_height']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_height'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_height',
- 'conf_value'=>$_POST['album_overlay_height'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_overlay_bg'])) {
+ if ($xoopsModuleConfig['album_overlay_bg'] != $_POST['album_overlay_bg']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_bg'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_bg',
+ 'conf_value'=>$_POST['album_overlay_bg'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_overlay_width'])) {
+ if ($xoopsModuleConfig['album_overlay_width'] != $_POST['album_overlay_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_width',
+ 'conf_value'=>$_POST['album_overlay_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_overlay_height'])) {
+ if ($xoopsModuleConfig['album_overlay_height'] != $_POST['album_overlay_height']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_height'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_height',
+ 'conf_value'=>$_POST['album_overlay_height'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
+
case 'tooltip':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_tooltip_width'])) {
- if($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_width',
- 'conf_value'=>$_POST['album_tooltip_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- if(isset($_POST['album_tooltip_width'])) {
- if($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_width',
- 'conf_value'=>$_POST['album_tooltip_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- } $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_tooltip_borderwidth'])) {
- if($xoopsModuleConfig['album_tooltip_borderwidth'] != $_POST['album_tooltip_borderwidth']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_borderwidth'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_borderwidth',
- 'conf_value'=>$_POST['album_tooltip_borderwidth'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_tooltip_bordercolor'])) {
- if($xoopsModuleConfig['album_tooltip_bordercolor'] != $_POST['album_tooltip_bordercolor']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_bordercolor'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_bordercolor',
- 'conf_value'=>$_POST['album_tooltip_bordercolor'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_tooltip_width'])) {
+ if ($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_width',
+ 'conf_value'=>$_POST['album_tooltip_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ if (isset($_POST['album_tooltip_width'])) {
+ if ($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_width',
+ 'conf_value'=>$_POST['album_tooltip_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ } $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_tooltip_borderwidth'])) {
+ if ($xoopsModuleConfig['album_tooltip_borderwidth'] != $_POST['album_tooltip_borderwidth']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_borderwidth'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_borderwidth',
+ 'conf_value'=>$_POST['album_tooltip_borderwidth'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_tooltip_bordercolor'])) {
+ if ($xoopsModuleConfig['album_tooltip_bordercolor'] != $_POST['album_tooltip_bordercolor']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_bordercolor'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_bordercolor',
+ 'conf_value'=>$_POST['album_tooltip_bordercolor'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
+
case 'fancybox':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_fancybox_color'])) {
- if($xoopsModuleConfig['album_fancybox_color'] != $_POST['album_fancybox_color']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_color'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_color',
- 'conf_value'=>$_POST['album_fancybox_color'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_opacity'])) {
- if($xoopsModuleConfig['album_fancybox_opacity'] != $_POST['album_fancybox_opacity']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_opacity'));
- $config = $config...
[truncated message content] |