|
From: <txm...@us...> - 2013-01-09 17:53:16
|
Revision: 10721
http://sourceforge.net/p/xoops/svn/10721
Author: txmodxoops
Date: 2013-01-09 17:53:13 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
Added maxwidth and maxheight in preferences
Added Paths:
-----------
XoopsModules26/images/
XoopsModules26/images/branches/
XoopsModules26/images/branches/timgno/
XoopsModules26/images/branches/timgno/images/
XoopsModules26/images/branches/timgno/images/class/
XoopsModules26/images/branches/timgno/images/class/form/
XoopsModules26/images/branches/timgno/images/class/form/imagecat.php
XoopsModules26/images/branches/timgno/images/language/
XoopsModules26/images/branches/timgno/images/language/english/
XoopsModules26/images/branches/timgno/images/language/english/modinfo.php
XoopsModules26/images/branches/timgno/images/xoops_version.php
XoopsModules26/images/releases/
XoopsModules26/images/trunk/
Added: XoopsModules26/images/branches/timgno/images/class/form/imagecat.php
===================================================================
--- XoopsModules26/images/branches/timgno/images/class/form/imagecat.php (rev 0)
+++ XoopsModules26/images/branches/timgno/images/class/form/imagecat.php 2013-01-09 17:53:13 UTC (rev 10721)
@@ -0,0 +1,79 @@
+<?php
+/*
+ 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.
+*/
+
+/**
+ * images module
+ *
+ * @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 Andricq Nicolas (AKA MusS)
+ * @version $Id: imagecat.php 10625 2013-01-01 22:11:44Z mageg $
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class ImagesImagecatForm extends XoopsThemeForm
+{
+ /**
+ * @param XoopsImagecategory $obj
+ */
+ public function __construct(XoopsImagecategory &$obj)
+ {
+ $xoops = Xoops::getInstance();
+
+ $perm_handler = $xoops->getHandlerGroupperm();
+
+ if ($obj->isNew()) {
+ $op = 'addcat';
+ $title = _AM_IMAGES_ADDCAT;
+ $id = 0;
+ $read = XOOPS_GROUP_ADMIN;
+ $write = XOOPS_GROUP_ADMIN;
+ $maxsize = 50000;
+ $maxwidth = $xoops->getModuleConfig('maxwidth');
+ $maxheight = $xoops->getModuleConfig('maxheight');
+ $weight = 0;
+ $display = 1;
+ } else {
+ $op = 'updatecat';
+ $title = _AM_IMAGES_EDITCAT;
+ $id = $obj->getVar('imgcat_id');
+ $read = $perm_handler->getGroupIds('imgcat_read', $obj->getVar('imgcat_id'));
+ $write = $perm_handler->getGroupIds('imgcat_write', $obj->getVar('imgcat_id'));
+ $maxsize = $obj->getVar('imgcat_maxsize');
+ $maxwidth = $obj->getVar('imgcat_maxwidth');
+ $maxheight = $obj->getVar('imgcat_maxheight');
+ $weight = $obj->getVar('imgcat_weight');
+ $display = $obj->getVar('imgcat_display');
+ }
+
+ parent::__construct($title, 'imagecat_form', 'images.php', 'post', true);
+ $this->addElement(new XoopsFormText(_AM_IMAGES_IMGCATNAME, 'imgcat_name', 50, 255, $obj->getVar('imgcat_name')), true);
+ $this->addElement(new XoopsFormSelectGroup(_AM_IMAGES_IMGCATRGRP, 'readgroup', true, $read, 5, true));
+ $this->addElement(new XoopsFormSelectGroup(_AM_IMAGES_IMGCATWGRP, 'writegroup', true, $write, 5, true));
+ $this->addElement(new XoopsFormText(_IMGMAXSIZE, 'imgcat_maxsize', 10, 10, $maxsize));
+ $this->addElement(new XoopsFormText(_IMGMAXWIDTH, 'imgcat_maxwidth', 3, 4, $maxwidth));
+ $this->addElement(new XoopsFormText(_IMGMAXHEIGHT, 'imgcat_maxheight', 3, 4, $maxheight));
+ $this->addElement(new XoopsFormText(_AM_IMAGES_IMGCATWEIGHT, 'imgcat_weight', 3, 4, $weight));
+ $this->addElement(new XoopsFormRadioYN(_AM_IMAGES_IMGCATDISPLAY, 'imgcat_display', $display, _YES, _NO));
+ if ($obj->isNew()) {
+ $store = new XoopsFormRadio(_MD_IMGCATSTRTYPE . '<div class="red">' . _MD_STRTYOPENG . '</div>', 'imgcat_storetype', 'file');
+ $store->addOptionArray(array('file' => _MD_ASFILE, 'db' => _MD_INDB));
+ $this->addElement($store);
+ } else {
+ $store = array('db' => _AM_IMAGES_INDB, 'file' => _AM_IMAGES_ASFILE);
+ $this->addElement(new XoopsFormLabel(_AM_IMAGES_IMGCATSTRTYPE, $store[$obj->getVar('imgcat_storetype')]));
+ }
+ $this->addElement(new XoopsFormHidden('imgcat_id', $id));
+ $this->addElement(new XoopsFormHidden('op', $op));
+ $this->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit'));
+ }
+}
Added: XoopsModules26/images/branches/timgno/images/language/english/modinfo.php
===================================================================
--- XoopsModules26/images/branches/timgno/images/language/english/modinfo.php (rev 0)
+++ XoopsModules26/images/branches/timgno/images/language/english/modinfo.php 2013-01-09 17:53:13 UTC (rev 10721)
@@ -0,0 +1,31 @@
+<?php
+/*
+ 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.
+*/
+
+/**
+ * images module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @since 2.6.0
+ * @author Mage Grégory (AKA Mage)
+ * @version $Id: modinfo.php 10628 2013-01-01 22:59:11Z mageg $
+ */
+// Info module
+define("_MI_IMAGES_NAME", "Images");
+define("_MI_IMAGES_DESC", "Module for managing images");
+// Menu
+define("_MI_IMAGES_INDEX", "Home");
+define("_MI_IMAGES_IMAGES", "Images manager");
+define("_MI_IMAGES_ABOUT", "About");
+// Preferences
+define("_MI_IMAGES_PAGER", "Number of images to display per page");
+define("_MI_IMAGES_MAXWIDTH", "Max Width");
+define("_MI_IMAGES_MAXHEIGHT", "Max Height");
\ No newline at end of file
Added: XoopsModules26/images/branches/timgno/images/xoops_version.php
===================================================================
--- XoopsModules26/images/branches/timgno/images/xoops_version.php (rev 0)
+++ XoopsModules26/images/branches/timgno/images/xoops_version.php 2013-01-09 17:53:13 UTC (rev 10721)
@@ -0,0 +1,111 @@
+<?php
+/*
+ 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.
+*/
+
+/**
+ * images module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @since 2.6.0
+ * @author Mage Grégory (AKA Mage)
+ * @version $Id: xoops_version.php 10630 2013-01-02 08:46:20Z dugris $
+ */
+
+/*
+ General settings
+ */
+$modversion = array();
+$modversion['name'] = _MI_IMAGES_NAME;
+$modversion['description'] = _MI_IMAGES_DESC;
+$modversion['version'] = 0.1;
+$modversion['author'] = 'Mage Gregory,Andricq Nicolas';
+$modversion['nickname'] = 'Mage,MusS';
+$modversion['credits'] = 'The XOOPS Project';
+$modversion['license'] = 'GNU GPL 2.0';
+$modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html/';
+$modversion['official'] = 1;
+$modversion['help'] = 'page=help';
+$modversion['image'] = 'images/logo.png';
+$modversion['dirname'] = 'images';
+
+/*
+ Settings for configs
+*/
+$modversion['release_date'] = '2012/01/15';
+$modversion['module_website_url'] = 'http://www.xoops.org/';
+$modversion['module_website_name'] = 'XOOPS';
+$modversion['module_status'] = 'ALPHA';
+$modversion['min_php'] = '5.2';
+$modversion['min_xoops'] = '2.6.0';
+$modversion['min_db'] = array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
+
+// paypal
+$modversion['paypal'] = array();
+$modversion['paypal']['business'] = 'xoo...@gm...';
+$modversion['paypal']['item_name'] = 'Donation : ' . _MI_IMAGES_DESC;
+$modversion['paypal']['amount'] = 0;
+$modversion['paypal']['currency_code'] = 'USD';
+
+/*
+ Admin menu
+ Set to 1 if you want to display menu generated by system module
+*/
+$modversion['system_menu'] = 1;
+
+/*
+ Manage extension
+ */
+$modversion['extension'] = 1;
+$modversion['extension_module'][] = 'system';
+
+/*
+ Admin things
+*/
+$modversion['hasAdmin'] = 1;
+$modversion['adminindex'] = 'admin/index.php';
+$modversion['adminmenu'] = 'admin/menu.php';
+
+// Mysql file
+$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
+
+// Tables created by sql file (without prefix!)
+$modversion['tables'][1] = "image";
+$modversion['tables'][2] = "imagebody";
+$modversion['tables'][3] = "imagecategory";
+
+/*
+ JQuery
+ Setting for load jquery library and library
+*/
+$modversion['jquery'] = 1;
+
+$i = 0;
+$modversion['config'][$i]['name'] = 'images_pager';
+$modversion['config'][$i]['title'] = '_MI_IMAGES_PAGER';
+$modversion['config'][$i]['description'] = '';
+$modversion['config'][$i]['formtype'] = 'textbox';
+$modversion['config'][$i]['valuetype'] = 'int';
+$modversion['config'][$i]['default'] = 15;
+$i++;
+$modversion['config'][$i]['name'] = 'images_maxwidth';
+$modversion['config'][$i]['title'] = '_MI_IMAGES_MAXWIDTH';
+$modversion['config'][$i]['description'] = '';
+$modversion['config'][$i]['formtype'] = 'textbox';
+$modversion['config'][$i]['valuetype'] = 'int';
+$modversion['config'][$i]['default'] = 120;
+$i++;
+$modversion['config'][$i]['name'] = 'images_maxheight';
+$modversion['config'][$i]['title'] = '_MI_IMAGES_MAXHEIGHT';
+$modversion['config'][$i]['description'] = '';
+$modversion['config'][$i]['formtype'] = 'textbox';
+$modversion['config'][$i]['valuetype'] = 'int';
+$modversion['config'][$i]['default'] = 120;
+unset($i);
\ No newline at end of file
|