From: <wis...@us...> - 2017-08-30 22:08:53
|
Revision: 13289 http://sourceforge.net/p/xoops/svn/13289 Author: wishcraft Date: 2017-08-30 22:08:50 +0000 (Wed, 30 Aug 2017) Log Message: ----------- Images module for releases.xoops.org -- still alpha1! Modified Paths: -------------- XoopsModules/images/trunk/modules/images/class/ascii/engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php XoopsModules/images/trunk/modules/images/class/images.php XoopsModules/images/trunk/modules/images/class/objects.php XoopsModules/images/trunk/modules/images/footer.php XoopsModules/images/trunk/modules/images/header.php XoopsModules/images/trunk/modules/images/include/functions.php XoopsModules/images/trunk/modules/images/language/english/admin.php XoopsModules/images/trunk/modules/images/language/english/forms.php XoopsModules/images/trunk/modules/images/language/english/main.php XoopsModules/images/trunk/modules/images/language/english/modinfo.php XoopsModules/images/trunk/modules/images/sql/mysql.sql XoopsModules/images/trunk/modules/images/xoops_version.php Added Paths: ----------- XoopsModules/images/trunk/modules/images/.htaccess XoopsModules/images/trunk/modules/images/class/errors.php XoopsModules/images/trunk/modules/images/class/fields.php XoopsModules/images/trunk/modules/images/image.php XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz XoopsModules/images/trunk/modules/images/include/htaccess.txt XoopsModules/images/trunk/modules/images/language/english/errors.php Added: XoopsModules/images/trunk/modules/images/.htaccess =================================================================== --- XoopsModules/images/trunk/modules/images/.htaccess (rev 0) +++ XoopsModules/images/trunk/modules/images/.htaccess 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,6 @@ +RewriteEngine On +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif|.txt)$ ./image.php?field=$1&type=$2&hash=$3&format=$4 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9]+)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif|.txt)$ ./image.php?field=$1&type=$2&width=$3&hash=$4&format=$5 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/([0-9]+)x([0-9]+)/([0-9a-zA-Z\-]{4-18})(.png|.jpg|.gif)$ ./image.php?field=$1&type=$2&width=$3&height=$4&hash=$5&format=$6 [L,NC,QSA] +RewriteRule ^([0-9a-zA-Z\-]{4-18})/(icons|logo|photo|avatar)/(small|medium|large)/([0-9a-zA-Z\-]{4-18})(.txt)$ ./image.php?field=$1&type=$2&scale=$3&hash=$4&format=$5 [L,NC,QSA] +RewriteRule ^(index|icons|logo|photo|avatar)(.html)$ ./index.php?typal=$1 [L,NC,QSA] \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/class/ascii/engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,5 +1,27 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + class AsciiEngine { Modified: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/ascii_engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,26 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ - $ascengine = array(); $ascengine['class']['file'] = basename(__DIR__).'.php'; $ascengine['class']['name'] = str_replace(" ", "", ucwords(str_replace(array('-','_','.', ' ', basename(__DIR__))))) . 'AsciiArtEngine'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/php7.0/php7.0.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,4 +1,25 @@ -<?php +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'engine.php'; require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'WideImage' . DIRECTORY_SEPARATOR . 'WideImage.php'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/ascii_engine.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,28 @@ <?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + $ascengine = array(); $ascengine['class']['file'] = basename(__DIR__).'.php'; $ascengine['class']['name'] = str_replace(" ", "", ucwords(str_replace(array('-','_','.', ' ', basename(__DIR__))))) . 'AsciiArtEngine'; Modified: XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/ascii/text-image.com/text-image.com.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,5 +1,27 @@ -<?php +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'engine.php'; class TextImageComAsciiArtEngine extends AsciiEngine Added: XoopsModules/images/trunk/modules/images/class/errors.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/errors.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/errors.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,87 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +require_once __DIR__ . DIRECTORY_SEPARATOR . 'objects.php'; + +class ImagesErrors extends ImagesXoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("id", XOBJ_DTYPE_INT, null, false); + $this->initVar("type", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'type')); + $this->initVar("uid", XOBJ_DTYPE_INT, null, false); + $this->initVar("imageid", XOBJ_DTYPE_INT, null, false); + $this->initVar("fieldid", XOBJ_DTYPE_INT, null, false); + $this->initVar("code", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("when", XOBJ_DTYPE_INT, null, false); + $this->initVar("message", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("emailed", XOBJ_DTYPE_INT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("deleted", XOBJ_DTYPE_INT, null, false); + } + +} + + +class ImagesErrorsHandler extends ImagesXoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "images_errors", "ImagesErrors", "id", "hash"); + } + + /** + * Inserts a ImagesErrors Object into the database + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::insert() + */ + function insert(ImagesErrors $object, $force = true) + { + global $imagesConfigList; + if ($object->isNew()) + { + $object->getVar('created', time()); + } + return parent::insert($object, true); + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/errors.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/class/fields.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/fields.php (rev 0) +++ XoopsModules/images/trunk/modules/images/class/fields.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,139 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined("XOOPS_ROOT_PATH")) { + exit(); +} + +require_once __DIR__ . DIRECTORY_SEPARATOR . 'objects.php'; + +class ImagesFields extends ImagesXoopsObject +{ + /** + * Constructor + * + * @param int $id ID of the tag, deprecated + */ + function __construct($id = null) + { + $this->initVar("id", XOBJ_DTYPE_INT, null, false); + $this->initVar("hash", XOBJ_DTYPE_TXTBOX, null, false, 16); + $this->initVar("field", XOBJ_DTYPE_TXTBOX, null, false, 64); + $this->initVar("typal", XOBJ_DTYPE_ENUM, 'unknown', false, false, false, imagesEnumeratorValues(basename(__FILE__), 'typal')); + $this->initVar("views", XOBJ_DTYPE_INT, null, false); + $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); + $this->initVar("images", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); + $this->initVar("created", XOBJ_DTYPE_INT, null, false); + $this->initVar("errored", XOBJ_DTYPE_INT, null, false); + } + + + /** + * gets Field Typal + * @return string|boolean + */ + public function getFieldTypal($options = NULL) + { + global $imagesConfigList; + if (is_null($options) || empty($options)) + { + $options = array('icons', 'logo', 'photo', 'avatar'); + shuffle($options); + shuffle($options); + shuffle($options); + shuffle($options); + } + foreach($options as $option) + if (in_array(self::getVar('field'), $imagesConfigList["$option_fields"])) + return $option; + return 'unknown'; + } +} + + +class ImagesFieldsHandler extends ImagesXoopsPersistableObjectHandler +{ + + + /** + * Constructor + * + * @param object $db reference to the {@link XoopsDatabase} object + **/ + function __construct(&$db) + { + parent::__construct($db, "images_fields", "ImagesFields", "id", "hash"); + } + + /** + * Inserts a ImagesFields Object into the database + * + * {@inheritDoc} + * @see XoopsPersistableObjectHandler::insert() + */ + function insert(ImagesFields $object, $force = true) + { + global $imagesConfigList; + if ($object->isNew()) + { + $object->getVar('created', time()); + $object->getVar('typal', $object->getFieldTypal()); + $criteria = new CriteriaCompo(new Criteria('field', $object->getVar('field'))); + $criteria->add(new Criteria('typal', $object->getVar('typal'))); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]->getVar('id'); + } + $crc = new xcp($data = $object->getVar('field').$object->getVar('created').microtime().$object->getVar('typal'), mt_rand(0,255), mt_rand(5,14)); + $object->setVar('hash', $crc->crc); + } + return parent::insert($object, true); + } + + /** + * gets ImagesFields object from hash info + * + * @param string $hash + * @param string $typal + * @return mixed|boolean + */ + function getByHash($hash = '', $typal = '') + { + $criteria = new CriteriaCompo(new Criteria('hash', $hash)); + $criteria->add(new Criteria('typal', $typal)); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]; + } + return false; + } + +} +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/class/fields.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/class/images.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/images.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,15 +12,16 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined("XOOPS_ROOT_PATH")) { exit(); @@ -53,6 +54,9 @@ $this->initVar("bytes", XOBJ_DTYPE_INT, null, false); $this->initVar("views", XOBJ_DTYPE_INT, null, false); $this->initVar("viewed", XOBJ_DTYPE_INT, null, false); + $this->initVar("updates", XOBJ_DTYPE_INT, null, false); + $this->initVar("errors", XOBJ_DTYPE_INT, null, false); + $this->initVar("megabytes", XOBJ_DTYPE_FLOAT, null, false); $this->initVar("updated", XOBJ_DTYPE_INT, null, false); $this->initVar("created", XOBJ_DTYPE_INT, null, false); $this->initVar("checked", XOBJ_DTYPE_INT, null, false); @@ -92,6 +96,10 @@ */ public function getTmpFileSource() { + static $tmp = ''; + if (!empty($tmp) && file_exists($tmp) && filesize($tmp) > 0) + return $tmp; + global $imagesConfigList; if (self::getVar('storage') == 'database') { @@ -123,14 +131,33 @@ public function addViews($number = 1) { $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); - return $GLOBALS['xoopsDB']->queryF($sql); + @$GLOBALS['xoopsDB']->queryF($sql); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `views` = `views` + $number, `viewed` = UNIX_TIMESTAMP() WHERE `field` = '" . self::getVar('field') . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); } + /** + * Adds megabyte count to object + * + * @param number $bytes + * @return unknown + */ + public function addMegabytes($bytes = 0) + { + $megabytes = $bytes / 1024 / 1024; + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_images") . "` SET `megabytes` = `megabytes` + '$megabytes', `updated` = UNIX_TIMESTAMP() WHERE `id` = " . self::getVar('id'); + @$GLOBALS['xoopsDB']->queryF($sql); + $sql = "UPDATE `" . $GLOBALS['xoopsDB']->prefix("images_fields") . "` SET `megabytes` = `megabytes` + '$megabytes' WHERE `field` = '" . self::getVar('field') . "'"; + @$GLOBALS['xoopsDB']->queryF($sql); + } + + /** * checks the URL for a new MD5 and updates it if it exists */ public function check() { + global $imagesConfigList; if (self::getVar('checked') > time()) return false; $data = self::getURLData(self::getVar('url')); @@ -370,9 +397,7 @@ $data = file($source); self::setVar('width', strlen($data[0]) - 1); self::setVar('height', count($data)); - } - break; case "database": @@ -382,7 +407,6 @@ $data = file($source); self::setVar('width', strlen($data[0]) - 1); self::setVar('height', count($data)); - break; } @@ -398,6 +422,222 @@ self::setVar('checked', time() + $imagesConfigsList['checking']); } + /** + * gets Field Typal + * @return string|boolean + */ + public function getFieldTypal($options = NULL) + { + global $imagesConfigList; + if (is_null($options) || empty($options)) + { + $options = array('icons', 'logo', 'photo', 'avatar'); + shuffle($options); + shuffle($options); + shuffle($options); + shuffle($options); + } + foreach($options as $option) + if (in_array(self::getVar('field'), $imagesConfigList["$option_fields"])) + return $option; + return false; + } + + /** + * get Default Width + * + * @return unknown|boolean + */ + function getWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["$typal_width"]; + return false; + } + + /** + * gets maximum width + * + * @return unknown|boolean + */ + function getMaximumWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["maximum_$typal_width"]; + return false; + } + + /* + * gets minimal width + */ + function getMinumumWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["minimum_$typal_width"]; + return false; + } + + + /* + * gets original master minimal width + */ + function getOriginalWidth() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["original_$typal_width"]; + return false; + } + /** + * gets default height + * + * @return unknown|boolean + */ + function getHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["$typal_height"]; + return false; + } + + /** + * gets maximum height + * + * @return unknown|boolean + */ + function getMaximumHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["maximum_$typal_height"]; + return false; + } + + /** + * gets minimal height + * + * @return unknown|boolean + */ + function getMinumumHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["minimum_$typal_height"]; + return false; + } + + + /** + * gets original master minimal height + * + * @return unknown|boolean + */ + function getOriginalHeight() + { + global $imagesConfigList; + if ($typal = self::getFieldTypal()) + return $imagesConfigList["original_$typal_height"]; + return false; + } + + /** + * gets the image data and mime type + * + * @param string $type + * @param number $width + */ + function getImageData($type = 'png', $width = 0, $height = 0) + { + global $imagesConfigList; + xoops_load("XoopsCache"); + if (!$result = XoopsCache::read($cachekey = basename(dirname(__DIR__)) . '-' . $type . '--' . $width . 'x' . $height . '--' . self::getVar('hash'))) + { + $result = array('mimetype' => "text/plane", 'data' => ''); + switch ($type) + { + case 'png': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/png', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'jpg': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/jpeg', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'gif': + if ($width <= 0 && $height <= 0) + { + $width = self::getWidth(); + $height = self::getHeight(); + } + if ($width > 0 && $height <= 0) + $height = self::getHeight(); + if ($width < self::getMinumumWidth()) + $width = self::getMinumumWidth(); + if ($width > self::getMaximumWidth()) + $width = self::getMaximumWidth(); + if ($height < self::getMinumumHeight()) + $height = self::getMinumumHeight(); + if ($height > self::getMaximumHeight()) + $height = self::getMaximumHeight(); + $img = WideImage::loadFromFile(self::getTmpFileSource()); + $result = array('mimetype' => 'image/gif', 'data' => $img->resize($width, $height)->asString($type)); + break; + case 'ascii': + $asciiHandler = new AsciiEngineHandler(); + if ($data = $asciiHandler->getAsciiArt(self::getTmpFileSource(), $width, $imagesConfigList['ascii_mode'], $imagesConfigList['ascii_engine'])) + { + $result = array('mimetype' => 'text/plane', 'data' => $data); + } + break; + } + } + XoopsCache::write($cachekey, $result, $wait = mt_rand($imagesConfigList['minimum_cache_wait'], $imagesConfigList['maximum_cache_wait'])); + if (!$caches = XoopsCache::read($sesskey = basename(dirname(__DIR__)) . '-sessions')) + { + $caches = array(); + $caches[$cachekey] = time() + $wait; + } else + $caches[$cachekey] = time() + $wait; + XoopsCache::write($sesskey, $caches, $imagesConfigList['maximum_cache_wait']); + self::addMegabytes(strlen($result['data'])); + return $result; + + } + /* function getURIData() * cURL Routine for passing $_POST Variable and retreiving URL * @@ -410,7 +650,7 @@ * * @return string */ - private function getURLData($uri = '', $timeout = 65, $connectout = 65, $posts = array()) + private function getURLData($uri = '', $timeout = 0, $connectout = 0, $posts = array()) { global $imagesModule, $imagesConfigsList, $imagesConfigs, $imagesConfigsOptions; @@ -426,8 +666,8 @@ curl_setopt($art, CURLOPT_POST, (count($posts)==0?false:true)); if (count($posts)!=0) curl_setopt($art, CURLOPT_POSTFIELDS, http_build_query($posts)); - curl_setopt($art, CURLOPT_CONNECTTIMEOUT, $connectout); - curl_setopt($art, CURLOPT_TIMEOUT, $timeout); + curl_setopt($art, CURLOPT_CONNECTTIMEOUT, ($connectout!=0?$connectout:$imagesConfigsList['curl_connections'])); + curl_setopt($art, CURLOPT_TIMEOUT, ($timeout!=0?$timeout:$imagesConfigsList['curl_timeout'])); curl_setopt($art, CURLOPT_RETURNTRANSFER, true); curl_setopt($art, CURLOPT_VERBOSE, false); curl_setopt($art, CURLOPT_SSL_VERIFYHOST, false); @@ -468,30 +708,82 @@ global $imagesConfigList; if ($object->isNew()) { - global $imagesConfigList; + if (strlen($object->getVar('field'))==0 || strlen($object->getVar('url'))== 0) + return false; if ($object->getVar('uid')==0 && is_object($GLOBALS['xoopsUser'])) $object->setVar('uid', $GLOBALS['xoopsUser']->getVar('uid')); $object->setVar('created', time()); $object->setVar('type', $imagesConfigList['format']); $object->setVar('storage', $imagesConfigList['storage']); - $crc = new xcp($data = $object->getVar('uid').$object->getVar('created').microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); + $crc = new xcp($data = $object->getVar('uid').$imagesConfigList['format'].microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); $object->setVar('hash', $crc->crc); - if (in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + $criteria = new CriteriaCompo(new Criteria('uid', $object->getVar('uid'))); + $criteria->add(new Criteria('field', $object->getVar('field'))); + if (!in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + $criteria->add(new Criteria('type', $object->getVar('type'))); + else + $criteria->add(new Criteria('type', "('" . $object->getVar('type') . "','ascii-small','ascii-medium','ascii-large')", "IN")); + if (self::getCount($criteria) > 0) { - $asciiobjs = array(); - $asciiobjs['small'] = $object; - $asciiobjs['small']->setVar('type', 'ascii-small'); - $asciiobjs['medium'] = $object; - $asciiobjs['medium']->setVar('type', 'ascii-medium'); - $asciiobjs['large'] = $object; - $asciiobjs['large']->setVar('type', 'ascii-large'); - @parent::insert($asciiobjs['small'], true); - @parent::insert($asciiobjs['medium'], true); - @parent::insert($asciiobjs['large'], true); - unset($asciiobjs); + foreach(self::getObjects($criteria) as $obj) + { + $obj->setVar('url', $object->getVar('url')); + $obj->setVar('checked', time() + mt_rand(320, 4800)); + if ($obj->getVar('type') == $object->getVar('type')) + $id = parent::insert($obj, true); + else + @parent::insert($obj, true); + } + return $id; + } else { + + if (in_array($object->getVar('field'), $imagesConfigList['ascii_fields'])) + { + $crc = new xcp($data = $object->getVar('uid').'ascii'.microtime().$object->getVar('url'), mt_rand(0,255), mt_rand(5,14)); + $asciiobjs = array(); + $asciiobjs['small'] = $object; + $asciiobjs['small']->setVar('type', 'ascii-small'); + $asciiobjs['small']->setVar('hash', $crc->crc); + $asciiobjs['medium'] = $object; + $asciiobjs['medium']->setVar('type', 'ascii-medium'); + $asciiobjs['medium']->setVar('hash', $crc->crc); + $asciiobjs['large'] = $object; + $asciiobjs['large']->setVar('type', 'ascii-large'); + $asciiobjs['large']->setVar('hash', $crc->crc); + @parent::insert($asciiobjs['small'], true); + @parent::insert($asciiobjs['medium'], true); + @parent::insert($asciiobjs['large'], true); + unset($asciiobjs); + } } } + $object->setVar('updated', time()); return parent::insert($object, true); } + + /** + * gets ImagesFields object from hash info + * + * @param string $hash + * @param string $field + * @param string $type + * @return mixed|boolean + */ + function getByHash($hash = '', $field = '', $type = '') + { + $criteria = new CriteriaCompo(new Criteria('hash', $hash)); + if (!empty($field)) + $criteria->add(new Criteria('field', $field)); + if (!empty($type)) + $criteria->add(new Criteria('type', $type)); + if (self::getCount($criteria) > 0) + { + $objs = self::getObjects($criteria); + if (isset($objs[0]) && !empty($objs[0])) + return $objs[0]; + } + return false; + } + } ?> \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/class/objects.php =================================================================== --- XoopsModules/images/trunk/modules/images/class/objects.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/class/objects.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * Legal Images is a module for obtain legal guardianship Images + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -9,15 +9,19 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * @copyright The XOOPS Project http://fonts2web.org.uk - * @license General Public License version 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html) - * @author Simon Roberts (wishcraft) <wis...@us...> - * @subpackage Images - * @description Legal Images is a module for obtain legal guardianship Images - * @version 1.0.1 + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('_MI_Images_MODULE_DIRNAME')) { return false; } Modified: XoopsModules/images/trunk/modules/images/footer.php =================================================================== --- XoopsModules/images/trunk/modules/images/footer.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/footer.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,16 +12,15 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage languages - * @description Module for fitting languages on xoops + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ - include_once XOOPS_ROOT_PATH . "/footer.php"; ?> \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/header.php =================================================================== --- XoopsModules/images/trunk/modules/images/header.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/header.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,12 +12,12 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage languages - * @description Module for fitting languages on xoops + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ Added: XoopsModules/images/trunk/modules/images/image.php =================================================================== --- XoopsModules/images/trunk/modules/images/image.php (rev 0) +++ XoopsModules/images/trunk/modules/images/image.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,91 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +include_once __DIR__ . "/header.php"; + +$GLOBALS['xoopsLogger']->activated = false; +if (function_exists('mb_http_output')) { + mb_http_output('pass'); +} + +$fieldsHandler = xoops_getModuleHandler('fields', basename(__DIR__)); +$imagesHandler = xoops_getModuleHandler('images', basename(__DIR__)); + +if ($field = $fieldsHandler->getByHash($_REQUEST['field'], $_REQUEST['typal'])) +{ + if ($image = $imagesHandler->getByHash($_REQUEST['hash'], $field->getVar('field'))) + { + if (isset($_REQUEST['width']) && !empty($_REQUEST['width'])) + $width = $_REQUEST['width']; + if (isset($_REQUEST['height']) && !empty($_REQUEST['height'])) + $height = $_REQUEST['height']; + else + $height = $width; + + switch((isset($_REQUEST['format']) && !empty($_REQUEST['format'])?$_REQUEST['format']:'default')) + { + default: + case $imagesConfigList['png']: + $result = $image->getImageData('png', $width, $height); + break; + case $imagesConfigList['jpg']: + $result = $image->getImageData('jpg', $width, $height); + break; + case $imagesConfigList['gif']: + $result = $image->getImageData('gif', $width, $height); + break; + case $imagesConfigList['txt']: + switch((isset($_REQUEST['scale']) && !empty($_REQUEST['scale'])?$_REQUEST['scale']:'default')) + { + default: + $result = $image->getImageData('ascii', ($width<=0?$imagesConfigList['ascii_medium_width']:$width)); + break; + case 'small': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_small_width']); + break; + case 'medium': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_medium_width']); + break; + case 'large': + $result = $image->getImageData('ascii', $imagesConfigList['ascii_large_width']); + break; + break; + } + } + if (!empty($result['data'])) + { + if(ini_get('zlib.output_compression')) { + ini_set('zlib.output_compression', 'Off'); + } + if (function_exists('http_response_code')) + http_response_code(201); + header('Content-Type: ' . $result['mimetype']); + die($result['data']); + } + } +} +if (function_exists('http_response_code')) + http_response_code(501); +die("No Resulting Images Found for Hash Keys!"); +?> \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/image.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz =================================================================== --- XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz (rev 0) +++ XoopsModules/images/trunk/modules/images/include/enumerators/typal__fields.diz 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,5 @@ +icons +logo +photo +avatar +unknown \ No newline at end of file Added: XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz =================================================================== --- XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz (rev 0) +++ XoopsModules/images/trunk/modules/images/include/enumerators/type__errors.diz 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,4 @@ +system +module +user +unknown \ No newline at end of file Modified: XoopsModules/images/trunk/modules/images/include/functions.php =================================================================== --- XoopsModules/images/trunk/modules/images/include/functions.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/include/functions.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Languages management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -13,15 +13,16 @@ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> * @subpackage images - * @description Module for cache url for images in profile and turning also into ASCII Art + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/languages - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/languages - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/languages + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + function images_load_config() { global $xoopsModuleConfig; Added: XoopsModules/images/trunk/modules/images/include/htaccess.txt =================================================================== --- XoopsModules/images/trunk/modules/images/include/htaccess.txt (rev 0) +++ XoopsModules/images/trunk/modules/images/include/htaccess.txt 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteRule ^%base%/([0-9]+)/([0-9]+)/index%html% ./modules/languages/index.php?start=$1&limit=$2 +RewriteRule ^%base%/requests%html% ./modules/languages/requests.php [L,NC,QSA] Modified: XoopsModules/images/trunk/modules/images/language/english/admin.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/admin.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/admin.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,12 +12,12 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ Added: XoopsModules/images/trunk/modules/images/language/english/errors.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/errors.php (rev 0) +++ XoopsModules/images/trunk/modules/images/language/english/errors.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -0,0 +1,32 @@ +<?php +/** + * XOOPS Remote Images URL Cache and Management in Profile Module + * + * 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 General Public License version 3 + * @author Simon Roberts <wis...@us...> + * @subpackage images + * @description Module for importing image URL listed in profile module + * @version 1.0.1 + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images + * @link http://internetfounder.wordpress.com + */ + + +if (!defined('XOOPS_ROOT_PATH')) { exit(); } + +define("IMAGES_ERRORS_ORIGINAL_WIDTH_CODE","100"); +define("IMAGES_ERRORS_ORIGINAL_WIDTH_MESSAGE","The original source URL minimal width has not been met it is %spx and a width of %spx is required!"); +define("IMAGES_ERRORS_ORIGINAL_HEIGHT_CODE","101"); +define("IMAGES_ERRORS_ORIGINAL_HEIGHT_MESSAGE","The original source URL minimal height has not been met it is %spx and a height of %spx is required!"); +define("IMAGES_ERRORS_EMAIL_NOT_SENDING_CODE","200"); +define("IMAGES_ERRORS_EMAIL_NOT_SENDING_MESSAGE","You need to check the setting for postfix and mailman, for some reason the mail isn't transmitting!"); \ No newline at end of file Property changes on: XoopsModules/images/trunk/modules/images/language/english/errors.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: XoopsModules/images/trunk/modules/images/language/english/forms.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/forms.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/forms.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,16 +12,17 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('XOOPS_ROOT_PATH')) { exit(); } define("LANGS_FORMS_REQUESTS_TITLE", "Request new language to be added to supported types!"); Modified: XoopsModules/images/trunk/modules/images/language/english/main.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/main.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/main.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,17 +12,18 @@ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license General Public License version 3 * @author Simon Roberts <wis...@us...> - * @subpackage webdav - * @description Module for controlling and propogating webdav resources for XOOPS Users + * @subpackage images + * @description Module for importing image URL listed in profile module * @version 1.0.1 - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/webdav - * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/webdav - * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/webdav + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.5/Modules/images + * @link https://sourceforge.net/projects/chronolabs/files/XOOPS%202.6/Modules/images + * @link https://sourceforge.net/p/xoops/svn/HEAD/tree/XoopsModules/images * @link http://internetfounder.wordpress.com */ + if (!defined('XOOPS_ROOT_PATH')) { exit(); } define("LANGS_MN_INDEX_TITLE", "Supported Languages: %s of %s"); Modified: XoopsModules/images/trunk/modules/images/language/english/modinfo.php =================================================================== --- XoopsModules/images/trunk/modules/images/language/english/modinfo.php 2017-08-30 18:15:02 UTC (rev 13288) +++ XoopsModules/images/trunk/modules/images/language/english/modinfo.php 2017-08-30 22:08:50 UTC (rev 13289) @@ -1,6 +1,6 @@ <?php /** - * XOOPS Webdav Propogating + Management module + * XOOPS Remote Images URL Cache and Management in Profile Module * * 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 @@ -12,17 +12,18 @@ * @copyright The XOOPS Proje... [truncated message content] |