Skip to content

Commit

Permalink
v1.0.0-pl
Browse files Browse the repository at this point in the history
  • Loading branch information
oo12 committed Apr 21, 2013
1 parent 0374796 commit b5fe2fd
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 129 deletions.
8 changes: 6 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
imageSlim 1.0 (beta)
imageSlim 1.0
===============

The Image Slenderizer, for MODX.
Expand Down Expand Up @@ -77,8 +77,12 @@ Properties
<td>Yes</td>
</tr><tr>
<td>&amp;remoteImages</td>
<td>Allow imageSlim to work with images from other servers.<br>Requires proper settings for allow_url_fopen in PHP and phpthumb_nohotlink_enabled and phpthumb_nohotlink_valid_domains in the MODX system settings (core > phpthumb)<br>Remote images take longer to process than local ones, obviously.</td>
<td>Allow imageSlim to work with images from other servers.<br>Requires cURL and proper settings for phpthumb_nohotlink_enabled and phpthumb_nohotlink_valid_domains in the MODX system settings (core > phpthumb)<br>Remote images take longer to process than local ones obviously, but imageSlim does cache them locally in assets/components/imageslim/cache/, so it's only a one-time performance hit.</td>
<td>No</td>
</tr><tr>
<td>&amp;remoteTimeout</td>
<td>Maximum amount of time to allow for a remote image download.<br>Units: seconds</td>
<td>5</td>
</tr><tr>
<td>&amp;q</td>
<td>JPEG quality: 1 (worst) &ndash; 95 (best)</td>
Expand Down
4 changes: 2 additions & 2 deletions _build/build.transport.php
Expand Up @@ -30,13 +30,13 @@
define('PKG_NAME','imageSlim');
define('PKG_NAME_LOWER','imageslim');
define('PKG_VERSION','1.0.0');
define('PKG_RELEASE','beta1');
define('PKG_RELEASE','pl');
define('PKG_CATEGORY','imageSlim');

/* Set package options - you can turn these on one-by-one
* as you create the transport package
* */
$hasAssets = false; /* Transfer the files in the assets dir. */
$hasAssets = true; /* Transfer the files in the assets dir. */
$hasCore = true; /* Transfer the files in the core dir. */
$hasSnippets = true;
$hasChunks = false;
Expand Down
159 changes: 86 additions & 73 deletions _build/data/properties/properties.imageslim.php
Expand Up @@ -3,85 +3,98 @@
/**
* Default properties for the imageSlim snippet
* @author Jason Grant
* 02/22/13
*
* @package imageslim
* @subpackage build
*/

$properties = array(
array(
'name' => 'convertThreshold',
'desc' => 'prop_is.convertThreshold_desc',
'type' => 'textfield',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'fixAspect',
'desc' => 'prop_is.fixAspect_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '1',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'maxHeight',
'desc' => 'prop_is.maxHeight_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'maxWidth',
'desc' => 'prop_is.maxWidth_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'phpthumbof',
'desc' => 'prop_is.phpthumbof_desc',
'type' => 'textfield',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'q',
'desc' => 'prop_is.q_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'remoteImages',
'desc' => 'prop_is.remoteImages_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '0',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'scale',
'desc' => 'prop_is.scale_desc',
'type' => 'textfield',
'options' => '',
'value' => '1',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'debug',
'desc' => 'prop_is.debug_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '0',
'lexicon' => 'imageslim:default'
)
array(
'name' => 'fixAspect',
'desc' => 'prop_is.fixAspect_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '1',
'area' => 'Dimensions',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'maxHeight',
'desc' => 'prop_is.maxHeight_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'area' => 'Dimensions',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'maxWidth',
'desc' => 'prop_is.maxWidth_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'area' => 'Dimensions',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'scale',
'desc' => 'prop_is.scale_desc',
'type' => 'textfield',
'options' => '',
'value' => '1',
'area' => 'Dimensions',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'remoteImages',
'desc' => 'prop_is.remoteImages_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '0',
'area' => 'Remote Images',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'remoteTimeout',
'desc' => 'prop_is.remoteTimeout_desc',
'type' => 'integer',
'options' => '',
'value' => '5',
'area' => 'Remote Images',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'convertThreshold',
'desc' => 'prop_is.convertThreshold_desc',
'type' => 'textfield',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'phpthumbof',
'desc' => 'prop_is.phpthumbof_desc',
'type' => 'textfield',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'q',
'desc' => 'prop_is.q_desc',
'type' => 'integer',
'options' => '',
'value' => '',
'lexicon' => 'imageslim:default'
),
array(
'name' => 'debug',
'desc' => 'prop_is.debug_desc',
'type' => 'combo-boolean',
'options' => '',
'value' => '0',
'lexicon' => 'imageslim:default'
)
);

return $properties;
7 changes: 3 additions & 4 deletions _build/validators/preinstall.script.php
Expand Up @@ -4,7 +4,6 @@
*
* Copyright 2013 Jason Grant <dadima@gmail.com>
* @author Jason Grant <dadima@gmail.com>
* 2/22/13
*
* imageSlim is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down Expand Up @@ -60,11 +59,11 @@
$modx->log(xPDO::LOG_LEVEL_ERROR,'imageSlim requires the PHP DOM extension [ http://www.php.net/manual/en/book.dom.php ]');
$success = false;
}
if (ini_get('allow_url_fopen')) {
$modx->log(xPDO::LOG_LEVEL_INFO,'PHP: allow_url_fopen: yes | imageSlim can work with remote images');
if (function_exists('curl_init')) {
$modx->log(xPDO::LOG_LEVEL_INFO,'cURL - OK');
}
else {
$modx->log(xPDO::LOG_LEVEL_INFO,'PHP: allow_url_fopen: NO | Change this setting for imageSlim to work with remote images');
$modx->log(xPDO::LOG_LEVEL_INFO,'cURL - NOT FOUND | imageSlim will skip any remote images');
}

break;
Expand Down
Empty file.
Empty file.
7 changes: 6 additions & 1 deletion core/components/imageslim/docs/changelog.txt
@@ -1,6 +1,11 @@
Changelog for imageSlim

imageSlim 1.0.0-pl
---------------------
* uses cURL for remote images
* adds caching of remote images and a max download time threshold


imageSlim 1.0.0-beta1
------------------------
---------------------
Initial Version

0 comments on commit b5fe2fd

Please sign in to comment.