static function usage()
{
ob_start();
?>
** You must add the server and cache dir paths to the class variables in the plugin file! **
Example:
---------
// ADD PATHS TO YOUR WEB ROOT AND CACHE FOLDER HERE
private $server_path = '/this/is/my/website/root/folder'; // no trailing slash
private $cache_path = '/this/is/my/website/root/folder/and/image/cache/'; // with trailing slash
Paramaters:
----------
* image ~ the file to resize, will parse file dirs
* maxWidth ~ maximumm width of resized image
* maxHeight ~ maximumm height of resized image
* forceWidth ~ scale up if required accepts "yes" or "no"
* forceHeight ~ scale up if required accepts "yes" or "no"
* cropratio ~ eg: square is 1:1
* default ~ the default image to use if there is no actual image
* alt ~ alt text
* class ~ img tag class
* id ~ img tag id
* title ~ img tag title
* href_only ~ if yes just returns the path to the resized file, not the full image tag, useful for modal windows etc. accepts "yes" or "no"
* debug ~ defaults to no - yes for debug mode (creates error messages instead of quitting quietly) accepts "yes" or "no"
* grayscale ~ creates a grayscale version of the image accepts "yes" or "no"
Usage Example
----------
{exp:ed_imageresizer
image="{my_image_field}"
default=""/images/site/image_coming_soon.jpg"
maxWidth="300"
class="myimgclass"
alt="Image description"
grayscale="yes"
}
<?php
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}
* REQUIRES ExpressionEngine 2+ * * @package ED_ImageResizer * @version 1.0.4 * @author Glen Swinfield (Erskine Design) * @copyright Copyright (c) 2009 Erskine Design * @license http://creativecommons.org/licenses/by-sa/3.0/ Attribution-Share Alike 3.0 Unported * */ $plugin_info = array( 'pi_name' => 'EE2 ED Image Resizer', 'pi_version' => '1.0.4', 'pi_author' => 'Erskine Design', 'pi_author_url' => 'http://github.com/erskinedesign/', 'pi_description' => 'Resizes and caches images on the fly', 'pi_usage' => Ed_imageresizer::usage()); /** * Ed_imageresizer For EE2.0 * * @package ED_ImageResizer * @author Erskine Design * @version 1.0.3 * */ Class Ed_imageresizer { public $return_data = ''; // return data (from constructor) /**