Skip to content

Commit

Permalink
v3.0.1-beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpich committed Oct 21, 2013
1 parent 941981b commit 64da6bd
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 16 deletions.
2 changes: 1 addition & 1 deletion _build/build.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");


Expand Down
20 changes: 20 additions & 0 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------------------------------------------------------
Expand Down
41 changes: 41 additions & 0 deletions _build/data/transport.category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/** @var modX $modx */

$category= $modx->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');
19 changes: 19 additions & 0 deletions _build/data/transport.chunks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

function getChunkContent($filename) {
$o = file_get_contents($filename);
return $o;
}
$chunks = array();

/**
* Demo Output Snippet
*/
$s = $modx->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");
18 changes: 3 additions & 15 deletions _build/data/transport.plugin.ImagePlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
32 changes: 32 additions & 0 deletions _build/data/transport.snippets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

function getSnippetContent($filename) {
$o = file_get_contents($filename);
$o = trim(str_replace(array('<?php','?>'),'',$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");
6 changes: 6 additions & 0 deletions core/components/tvimageplus/docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
--------
Expand Down

0 comments on commit 64da6bd

Please sign in to comment.