diff --git a/_build/build.config.php b/_build/build.config.php index fa151bb9..29f4e21a 100644 --- a/_build/build.config.php +++ b/_build/build.config.php @@ -2,7 +2,7 @@ define('PKG_NAME',"ImagePlus"); define('PKG_NAMESPACE',"tvimageplus"); -define('PKG_VERSION',"3.0.0"); +define('PKG_VERSION',"3.0.1"); define('PKG_RELEASE',"beta"); diff --git a/_build/build.transport.php b/_build/build.transport.php index 4849e509..895ddb0a 100644 --- a/_build/build.transport.php +++ b/_build/build.transport.php @@ -38,10 +38,30 @@ $builder->registerNamespace(PKG_NAMESPACE, false, true, '{core_path}components/' . PKG_NAMESPACE . '/'); +// Create the element category -------------------------------------------------------------------- +include PKG_BUILD . 'data/transport.category.php'; +/** @var modCategory $category */ +/** @var array $category_attr */ // Create the plugin object ----------------------------------------------------------------------- include PKG_BUILD . 'data/transport.plugin.ImagePlus.php'; +/** @var array $plugins */ +$category->addMany($plugins); +// Create snippet elements ------------------------------------------------------------------------ +include PKG_BUILD . 'data/transport.snippets.php'; +/** @var array $snippets */ +$category->addMany($snippets); + +// Create snippet elements ------------------------------------------------------------------------ +include PKG_BUILD . 'data/transport.chunks.php'; +/** @var array $chunks */ +$category->addMany($chunks); + + + +// Create transport vehicle ----------------------------------------------------------------------- +$vehicle = $builder->createVehicle($category, $category_attr); // Package core and assets directories ------------------------------------------------------------ diff --git a/_build/data/transport.category.php b/_build/data/transport.category.php new file mode 100644 index 00000000..4012db96 --- /dev/null +++ b/_build/data/transport.category.php @@ -0,0 +1,41 @@ +newObject('modCategory'); +$category->set('id',1); +$category->set('category',PKG_NAME); + + +$category_attr = array( + xPDOTransport::UNIQUE_KEY => 'category', + xPDOTransport::PRESERVE_KEYS => false, + xPDOTransport::UPDATE_OBJECT => true, + xPDOTransport::RELATED_OBJECTS => true, + xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array ( + 'Snippets' => array( + xPDOTransport::PRESERVE_KEYS => false, + xPDOTransport::UPDATE_OBJECT => true, + xPDOTransport::UNIQUE_KEY => 'name', + ), + 'Chunks' => array( + xPDOTransport::PRESERVE_KEYS => false, + xPDOTransport::UPDATE_OBJECT => true, + xPDOTransport::UNIQUE_KEY => 'name', + ), + 'Plugins' => array( + xPDOTransport::UNIQUE_KEY => 'name', + xPDOTransport::PRESERVE_KEYS => false, + xPDOTransport::UPDATE_OBJECT => true, + xPDOTransport::RELATED_OBJECTS => true, + xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array ( + 'PluginEvents' => array( + xPDOTransport::PRESERVE_KEYS => true, + xPDOTransport::UPDATE_OBJECT => false, + xPDOTransport::UNIQUE_KEY => array('pluginid','event'), + ), + ), + ), + ), +); + +$modx->log(modX::LOG_LEVEL_INFO,'Added ImagePlus Category'); diff --git a/_build/data/transport.chunks.php b/_build/data/transport.chunks.php new file mode 100644 index 00000000..f7a0f953 --- /dev/null +++ b/_build/data/transport.chunks.php @@ -0,0 +1,19 @@ +newObject('modChunk'); +$s->fromArray(array( + 'name' => 'ImagePlus.demo', + 'description' => 'Demo output chunk for Image+', + 'snippet' => getChunkContent(PKG_CORE.'elements/chunks/ImagePlus.demo.html'), + )); +$chunks[] = $s; +$modx->log(xPDO::LOG_LEVEL_INFO,"Added chunk 'ImagePlus.demo' to package"); diff --git a/_build/data/transport.plugin.ImagePlus.php b/_build/data/transport.plugin.ImagePlus.php index fdef0637..bdfaab63 100644 --- a/_build/data/transport.plugin.ImagePlus.php +++ b/_build/data/transport.plugin.ImagePlus.php @@ -55,19 +55,7 @@ function getPluginContent($filename) { $plugin->addMany($events); unset($events); -/* create vehicle for plugin */ -$attributes= array( - xPDOTransport::UNIQUE_KEY => 'name', - xPDOTransport::PRESERVE_KEYS => false, - xPDOTransport::UPDATE_OBJECT => true, - xPDOTransport::RELATED_OBJECTS => true, - xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array ( - 'PluginEvents' => array( - xPDOTransport::PRESERVE_KEYS => true, - xPDOTransport::UPDATE_OBJECT => false, - xPDOTransport::UNIQUE_KEY => array('pluginid','event'), - ), - ), -); -$vehicle = $builder->createVehicle($plugin, $attributes); $modx->log(modX::LOG_LEVEL_INFO,'Added ImagePlus plugin'); + + +$plugins = array($plugin); \ No newline at end of file diff --git a/_build/data/transport.snippets.php b/_build/data/transport.snippets.php new file mode 100644 index 00000000..bae3d24a --- /dev/null +++ b/_build/data/transport.snippets.php @@ -0,0 +1,32 @@ +'),'',$o)); + return $o; +} +$snippets = array(); + +/** + * Demo Output Snippet + */ +$s = $modx->newObject('modSnippet'); +$s->fromArray(array( + 'name' => 'ImagePlus.demo', + 'description' => 'Demo output snippet for Image+', + 'snippet' => getSnippetContent(PKG_CORE.'elements/snippets/ImagePlus.demo.php'), + )); +$snippets[] = $s; +$modx->log(xPDO::LOG_LEVEL_INFO,"Added snippet 'ImagePlus.demo' to package"); + +/** + * Image renderer snippet + */ +$s = $modx->newObject('modSnippet'); +$s->fromArray(array( + 'name' => 'image', + 'description' => 'Dynamic output renderer for Image+', + 'snippet' => getSnippetContent(PKG_CORE.'elements/snippets/image.php'), + )); +$snippets[] = $s; +$modx->log(xPDO::LOG_LEVEL_INFO,"Added snippet 'image' to package"); diff --git a/core/components/tvimageplus/docs/CHANGELOG b/core/components/tvimageplus/docs/CHANGELOG index 5abe5fa0..7641e77c 100644 --- a/core/components/tvimageplus/docs/CHANGELOG +++ b/core/components/tvimageplus/docs/CHANGELOG @@ -1,6 +1,12 @@ ------------------------- Image+ TV type changelog ------------------------- +# v3.0.1-beta +-------- + :: NOT CURRENTLY COMPATIBLE WITH v2.x - Upgrade script coming soon + :: Added image snippet to allow multiple output types per TV + :: Now allows users to select undersized crop areas (with a warning) + :: Add mtime to image url for cachebusting # v2.2.1 --------