diff --git a/.gitignore b/.gitignore index 8795695..b4a96bc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ _build/build.config.php config.core.php .idea nbproject +_packages/*.* +!_packages/.gitignore +!_packages/*.zip \ No newline at end of file diff --git a/_build/build.config.sample.php b/_build/build.config.sample.php deleted file mode 100644 index a15fff5..0000000 --- a/_build/build.config.sample.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Define the MODX path constants necessary for installation - * - * @package gallery - * @subpackage build - */ -define('MODX_BASE_PATH','/path/to/modx/'); -define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/'); -define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/'); -define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/'); -define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/'); - -define('MODX_BASE_URL','/modx/'); -define('MODX_CORE_URL', MODX_BASE_URL . 'core/'); -define('MODX_MANAGER_URL', MODX_BASE_URL . 'manager/'); -define('MODX_CONNECTORS_URL', MODX_BASE_URL . 'connectors/'); -define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/'); \ No newline at end of file diff --git a/_build/build.transport.php b/_build/build.transport.php deleted file mode 100644 index 90b1168..0000000 --- a/_build/build.transport.php +++ /dev/null @@ -1,266 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Gallery build script - * - * @package gallery - * @subpackage build - */ -$mtime = microtime(); -$mtime = explode(' ', $mtime); -$mtime = $mtime[1] + $mtime[0]; -$tstart = $mtime; -set_time_limit(0); - -/* define package */ -define('PKG_NAME','Gallery'); -define('PKG_NAME_LOWER','gallery'); -define('PKG_VERSION','1.5.3'); -define('PKG_RELEASE','a2'); - -/* define sources */ -$root = dirname(dirname(__FILE__)).'/'; -$sources = array( - 'root' => $root, - 'build' => $root . '_build/', - 'data' => $root . '_build/data/', - 'resolvers' => $root . '_build/resolvers/', - 'chunks' => $root.'core/components/'.PKG_NAME_LOWER.'/elements/chunks/', - 'snippets' => $root.'core/components/'.PKG_NAME_LOWER.'/elements/snippets/', - 'plugins' => $root.'core/components/'.PKG_NAME_LOWER.'/elements/plugins/', - 'lexicon' => $root . 'core/components/'.PKG_NAME_LOWER.'/lexicon/', - 'docs' => $root.'core/components/'.PKG_NAME_LOWER.'/docs/', - 'pages' => $root.'core/components/'.PKG_NAME_LOWER.'/elements/pages/', - 'source_assets' => $root.'assets/components/'.PKG_NAME_LOWER, - 'source_core' => $root.'core/components/'.PKG_NAME_LOWER, -); -unset($root); - -/* override with your own defines here (see build.config.sample.php) */ -require_once $sources['build'] . '/build.config.php'; -require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; -require_once $sources['build'] . '/includes/functions.php'; - -$modx= new modX(); -$modx->initialize('mgr'); -echo '
'; /* used for nice formatting of log messages */
-$modx->setLogLevel(modX::LOG_LEVEL_INFO);
-$modx->setLogTarget('ECHO');
-
-$modx->loadClass('transport.modPackageBuilder','',false, true);
-$builder = new modPackageBuilder($modx);
-$builder->createPackage(PKG_NAME_LOWER,PKG_VERSION,PKG_RELEASE);
-$builder->registerNamespace(PKG_NAME_LOWER,false,true,'{core_path}components/'.PKG_NAME_LOWER.'/');
-$modx->log(modX::LOG_LEVEL_INFO,'Created Transport Package and Namespace.');
-
-/* create category */
-$category= $modx->newObject('modCategory');
-$category->set('id',1);
-$category->set('category',PKG_NAME);
-
-/* add snippets */
-$snippets = include $sources['data'].'transport.snippets.php';
-if (!is_array($snippets)) {
-    $modx->log(modX::LOG_LEVEL_ERROR,'Could not package in snippets.');
-} else {
-    $category->addMany($snippets);
-    $modx->log(modX::LOG_LEVEL_INFO,'Packaged in '.count($snippets).' snippets.');
-}
-
-/* add chunks */
-$chunks = include $sources['data'].'transport.chunks.php';
-if (!is_array($chunks)) {
-    $modx->log(modX::LOG_LEVEL_ERROR,'Could not package in chunks.');
-} else {
-    $category->addMany($chunks);
-    $modx->log(modX::LOG_LEVEL_INFO,'Packaged in '.count($chunks).' chunks.');
-}
-
-/* add tv plugin */
-$plugin= $modx->newObject('modPlugin');
-$plugin->fromArray(array(
-    'id' => 1,
-    'name' => 'GalleryCustomTV',
-    'description' => '',
-    'plugincode' => getSnippetContent($sources['plugins'] . 'gallerycustomtv.plugin.php'),
-),'',true,true);
-$events = include $sources['data'].'events/events.gallerycustomtv.php';
-if (is_array($events) && !empty($events)) {
-    $modx->log(modX::LOG_LEVEL_INFO,'Added '.count($events).' events to GalleryCustomTV plugin.');
-    $plugin->addMany($events);
-}
-unset($events);
-$attributes = array (
-    xPDOTransport::PRESERVE_KEYS => false,
-    xPDOTransport::UPDATE_OBJECT => true,
-    xPDOTransport::UNIQUE_KEY => 'name',
-    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);
-$builder->putVehicle($vehicle);
-unset($vehicle,$attributes,$plugin);
-
-/* create category vehicle */
-$attr = array(
-    xPDOTransport::UNIQUE_KEY => 'category',
-    xPDOTransport::PRESERVE_KEYS => false,
-    xPDOTransport::UPDATE_OBJECT => true,
-    xPDOTransport::RELATED_OBJECTS => true,
-    xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array (
-        'Children' => array(
-            xPDOTransport::PRESERVE_KEYS => false,
-            xPDOTransport::UPDATE_OBJECT => true,
-            xPDOTransport::UNIQUE_KEY => 'category',
-            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',
-                ),
-            ),
-        ),
-        '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',
-        ),
-    ),
-);
-$vehicle = $builder->createVehicle($category,$attr);
-
-$modx->log(modX::LOG_LEVEL_INFO,'Adding file resolvers to category...');
-$vehicle->resolve('file',array(
-    'source' => $sources['source_assets'],
-    'target' => "return MODX_ASSETS_PATH . 'components/';",
-));
-$vehicle->resolve('file',array(
-    'source' => $sources['source_core'],
-    'target' => "return MODX_CORE_PATH . 'components/';",
-));
-$builder->putVehicle($vehicle);
-
-/* load system settings */
-$settings = include $sources['data'].'transport.settings.php';
-if (!is_array($settings)) {
-    $modx->log(modX::LOG_LEVEL_ERROR,'Could not package in settings.');
-} else {
-    $attributes= array(
-        xPDOTransport::UNIQUE_KEY => 'key',
-        xPDOTransport::PRESERVE_KEYS => true,
-        xPDOTransport::UPDATE_OBJECT => false,
-    );
-    foreach ($settings as $setting) {
-        $vehicle = $builder->createVehicle($setting,$attributes);
-        $builder->putVehicle($vehicle);
-    }
-    $modx->log(modX::LOG_LEVEL_INFO,'Packaged in '.count($settings).' System Settings.');
-}
-unset($settings,$setting,$attributes);
-
-/* load menu */
-$menu = include $sources['data'].'transport.menu.php';
-if (empty($menu)) {
-    $modx->log(modX::LOG_LEVEL_ERROR,'Could not package in menu.');
-} else {
-    $vehicle= $builder->createVehicle($menu,array (
-        xPDOTransport::PRESERVE_KEYS => true,
-        xPDOTransport::UPDATE_OBJECT => true,
-        xPDOTransport::UNIQUE_KEY => 'text',
-        xPDOTransport::RELATED_OBJECTS => true,
-        xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array (
-            'Action' => array (
-                xPDOTransport::PRESERVE_KEYS => false,
-                xPDOTransport::UPDATE_OBJECT => true,
-                xPDOTransport::UNIQUE_KEY => array ('namespace','controller'),
-            ),
-        ),
-    ));
-    $modx->log(modX::LOG_LEVEL_INFO,'Adding in PHP resolvers...');
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.tables.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.phpthumb.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.paths.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.dbchanges.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.spaces.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.albumfiles.php',
-    ));
-    $vehicle->resolve('php',array(
-        'source' => $sources['resolvers'] . 'resolve.extpack.php',
-    ));
-    $builder->putVehicle($vehicle);
-    $modx->log(modX::LOG_LEVEL_INFO,'Packaged in menu.');
-}
-unset($vehicle,$menu);
-
-/* now pack in the license file, readme and setup options */
-$builder->setPackageAttributes(array(
-    'license' => file_get_contents($sources['docs'] . 'license.txt'),
-    'readme' => file_get_contents($sources['docs'] . 'readme.txt'),
-    'changelog' => file_get_contents($sources['docs'] . 'changelog.txt'),
-    'setup-options' => array(
-        'source' => $sources['build'].'setup.options.php',
-    ),
-));
-$modx->log(modX::LOG_LEVEL_INFO,'Added package attributes and setup options.');
-
-/* zip up package */
-$modx->log(modX::LOG_LEVEL_INFO,'Packing up transport package zip...');
-$builder->pack();
-
-$mtime= microtime();
-$mtime= explode(" ", $mtime);
-$mtime= $mtime[1] + $mtime[0];
-$tend= $mtime;
-$totalTime= ($tend - $tstart);
-$totalTime= sprintf("%2.4f s", $totalTime);
-
-$modx->log(modX::LOG_LEVEL_INFO,"\n
Package Built.
\nExecution time: {$totalTime}\n"); - -exit (); \ No newline at end of file diff --git a/_build/config.json b/_build/config.json new file mode 100644 index 0000000..a0070cf --- /dev/null +++ b/_build/config.json @@ -0,0 +1,497 @@ +{ + "name": "Gallery", + "lowCaseName": "gallery", + "description": "Gallery", + "author": "Shaun McCormick", + "version": "2.0.0", + "package":{ + "menus": [{ + "text": "gallery", + "description": "gallery.menu_desc", + "action": "home", + "parent": "components" + }] + ,"elements": { + "snippets": [{ + "name": "Gallery", + "file": "snippet.gallery.php", + "properties": [ + { + "name": "album", + "description": "gallery.album_desc", + "value": "" + },{ + "name": "tag", + "description": "gallery.tag_desc", + "value": "" + },{ + "name": "plugin", + "description": "gallery.plugin_desc", + "value": "" + },{ + "name": "pluginPath", + "description": "gallery.pluginpath_desc", + "value": "" + },{ + "name": "thumbTpl", + "description": "gallery.thumbtpl_desc", + "value": "galItemThumb" + },{ + "name": "containerTpl", + "description": "gallery.containertpl_desc", + "value": "" + },{ + "name": "itemCls", + "description": "gallery.itemcls_desc", + "value": "gal-item" + },{ + "name": "activeCls", + "description": "gallery.activecls_desc", + "value": "gal-item-active" + },{ + "name": "toPlaceholder", + "description": "gallery.toplaceholder_desc", + "value": "" + },{ + "name": "thumbWidth", + "description": "gallery.thumbwidth_desc", + "value": "100" + },{ + "name": "thumbHeight", + "description": "gallery.thumbheight_desc", + "value": "100" + },{ + "name": "thumbZoomCrop", + "description": "gallery.thumbzoomcrop_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "thumbFar", + "description": "gallery.thumbfar_desc", + "value": "C" + },{ + "name": "thumbQuality", + "description": "gallery.thumbquality_desc", + "value": 90 + },{ + "name": "thumbProperties", + "description": "gallery.thumbproperties_desc", + "value": "" + },{ + "name": "linkToImage", + "description": "gallery.linktoimage_desc", + "type": "combo-boolean", + "value": "" + },{ + "name": "imageGetParam", + "description": "gallery.imagegetparam_desc", + "value": "galItem" + },{ + "name": "imageWidth", + "description": "gallery.imagewidth_desc", + "value": 500 + },{ + "name": "imageHeight", + "description": "gallery.imageheight_desc", + "value": 500 + },{ + "name": "imageZoomCrop", + "description": "gallery.imagezoomcrop_desc", + "type": "combo-boolean", + "value": false + },{ + "name": "imageFar", + "description": "gallery.imagefar_desc", + "value": "" + },{ + "name": "imageQuality", + "description": "gallery.imagequality_desc", + "value": 90 + },{ + "name": "imageProperties", + "description": "gallery.imageproperties_desc", + "value": "" + },{ + "name": "sort", + "description": "gallery.sort_desc", + "value": "rank" + },{ + "name": "dir", + "description": "gallery.dir_desc", + "value": "ASC" + },{ + "name": "limit", + "description": "gallery.limit_desc", + "value": 0 + },{ + "name": "start", + "description": "gallery.start_desc", + "value": 0 + },{ + "name": "showInactive", + "description": "gallery.showinactive_desc", + "type": "combo-boolean", + "value": false + },{ + "name": "checkForRequestAlbumVar", + "description": "gallery.checkforrequestalbumvar_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "albumRequestVar", + "description": "gallery.albumrequestvar_desc", + "value": "galAlbum" + },{ + "name": "checkForRequestTagVar", + "description": "gallery.checkforrequesttagvar_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "tagRequestVar", + "description": "gallery.tagrequestvar_desc", + "value": "galTag" + },{ + "name": "useCss", + "description": "gallery.usecss_desc", + "type": "combo-boolean", + "value": true + } + ] + },{ + "name": "GalleryAlbums", + "file": "snippet.galleryalbums.php", + "properties": [ + { + "name": "rowTpl", + "description": "galleryalbums.rowtpl_desc", + "value": "galAlbumRowTpl" + },{ + "name": "rowCls", + "description": "galleryalbums.rowcls_desc", + "value": "" + },{ + "name": "sort", + "description": "galleryalbums.sort_desc", + "value": "rank" + },{ + "name": "dir", + "description": "galleryalbums.dir_desc", + "value": "DESC" + },{ + "name": "limit", + "description": "galleryalbums.limit_desc", + "value": "10" + },{ + "name": "start", + "description": "galleryalbums.start_desc", + "value": "0" + },{ + "name": "toPlaceholder", + "description": "galleryalbums.toplaceholder_desc", + "value": "" + },{ + "name": "showInactive", + "description": "galleryalbums.showinactive_desc", + "type": "combo-boolean", + "value": false + },{ + "name": "prominentOnly", + "description": "galleryalbums.prominentonly_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "parent", + "description": "galleryalbums.parent_desc", + "value": "0" + },{ + "name": "showAll", + "description": "galleryalbums.showall_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "showName", + "description": "galleryalbums.showname_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "albumRequestVar", + "description": "galleryalbums.albumrequestvar_desc", + "value": "galAlbum" + },{ + "name": "albumCoverSort", + "description": "galleryalbums.albumcoversort_desc", + "value": "rank" + },{ + "name": "albumCoverSortDir", + "description": "galleryalbums.albumcoversortdir_desc", + "value": "ASC" + },{ + "name": "thumbWidth", + "description": "galleryalbums.thumbwidth_desc", + "value": "100" + },{ + "name": "thumbHeight", + "description": "galleryalbums.thumbheight_desc", + "value": "100" + },{ + "name": "thumbZoomCrop", + "description": "galleryalbums.thumbzoomcrop_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "thumbFar", + "description": "galleryalbums.thumbfar_desc", + "value": "C" + },{ + "name": "thumbQuality", + "description": "galleryalbums.thumbquality_desc", + "value": 90 + },{ + "name": "thumbProperties", + "description": "galleryalbums.thumbproperties_desc", + "value": "" + } + ] + },{ + "name": "GalleryItem", + "file": "snippet.galleryitem.php", + "properties": [ + { + "name": "id", + "description": "galleryitem.id_desc", + "value": "" + },{ + "name": "toPlaceholders", + "description": "galleryitem.toplaceholders_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "toPlaceholdersPrefix", + "description": "galleryitem.toplaceholdersprefix_desc", + "value": "galitem" + },{ + "name": "tpl", + "description": "galleryitem.tpl_desc", + "value": "galItem" + },{ + "name": "albumTpl", + "description": "galleryitem.albumtpl_desc", + "value": "galItemAlbum" + },{ + "name": "albumSeparator", + "description": "galleryitem.albumseparator_desc", + "value": ", " + },{ + "name": "albumRequestVar", + "description": "galleryitem.albumrequestvar_desc", + "value": "galAlbum" + },{ + "name": "tagTpl", + "description": "galleryitem.tagtpl_desc", + "value": "galItemTag" + },{ + "name": "tagSeparator", + "description": "galleryitem.tagseparator_desc", + "value": ", " + },{ + "name": "tagSortDir", + "description": "galleryitem.tagsortdir_desc", + "value": "DESC" + },{ + "name": "tagRequestVar", + "description": "galleryitem.tagrequestvar_desc", + "value": "galTag" + },{ + "name": "thumbWidth", + "description": "galleryitem.thumbwidth_desc", + "value": "100" + },{ + "name": "thumbHeight", + "description": "galleryitem.thumbheight_desc", + "value": "100" + },{ + "name": "thumbZoomCrop", + "description": "galleryitem.thumbzoomcrop_desc", + "type": "combo-boolean", + "value": true + },{ + "name": "thumbFar", + "description": "galleryitem.thumbfar_desc", + "value": "C" + },{ + "name": "thumbQuality", + "description": "galleryitem.thumbquality_desc", + "value": 90 + },{ + "name": "thumbProperties", + "description": "galleryitem.thumbproperties_desc", + "value": "" + },{ + "name": "imageWidth", + "description": "galleryitem.imagewidth_desc", + "value": "" + },{ + "name": "imageHeight", + "description": "galleryitem.imageheight_desc", + "value": "" + },{ + "name": "imageZoomCrop", + "description": "galleryitem.imagezoomcrop_desc", + "type": "combo-boolean", + "value": 0 + },{ + "name": "imageFar", + "description": "galleryitem.imagefar_desc", + "value": "" + },{ + "name": "imageQuality", + "description": "galleryitem.imagequality_desc", + "value": 90 + },{ + "name": "imageProperties", + "description": "galleryitem.imageproperties_desc", + "value": "" + } + ] + }] + ,"chunks": [{ + "name": "galAlbumRowTpl" + },{ + "name": "galAlbumRowWithCoverTpl" + },{ + "name": "galItem" + },{ + "name": "galItemAlbum" + },{ + "name": "galItemTag" + },{ + "name": "galItemThumb" + }], + "plugins": [{ + "name": "GalleryCustomTV", + "file": "gallerycustomtv.plugin.php", + "events": [ + "OnTVInputRenderList", + "OnTVInputPropertiesList", + "OnTVOutputRenderList", + "OnTVOutputRenderPropertiesList", + "OnDocFormPrerender", + "OnManagerPageBeforeRender" + ] + }] + } + ,"systemSettings": [{ + "key": "backend_thumb_far", + "type": "textfield", + "area": "backend", + "value": "C" + },{ + "key": "backend_thumb_height", + "type": "textfield", + "area": "backend", + "value": "100" + },{ + "key": "backend_thumb_width", + "type": "textfield", + "area": "backend", + "value": "100" + },{ + "key": "backend_thumb_zoomcrop", + "type": "combo-boolean", + "area": "backend", + "value": 1 + },{ + "key": "default_batch_upload_path", + "type": "textfield", + "area": "backend", + "value": "{assets_path}images/" + },{ + "key": "thumbs_prepend_site_url", + "type": "combo-boolean", + "area": "backend", + "value": 0 + },{ + "key": "mediaSource", + "type": "modx-combo-source", + "area": "backend", + "value": 1 + },{ + "key": "use_richtext", + "type": "combo-boolean", + "area": "TinyMCE", + "value": 0 + },{ + "key": "tiny.width", + "type": "textfield", + "area": "TinyMCE", + "value": "95%" + },{ + "key": "tiny.height", + "type": "textfield", + "area": "TinyMCE", + "value": "200" + },{ + "key": "tiny.buttons1", + "type": "textfield", + "area": "TinyMCE", + "value": "undo,redo,selectall,pastetext,pasteword,charmap,separator,image,modxlink,unlink,media,separator,code,help" + },{ + "key": "tiny.buttons2", + "type": "textfield", + "area": "TinyMCE", + "value": "bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull" + },{ + "key": "tiny.buttons3", + "type": "textfield", + "area": "TinyMCE", + "value": "styleselect,formatselect,separator,styleprops" + },{ + "key": "tiny.buttons4", + "type": "textfield", + "area": "TinyMCE", + "value": "" + },{ + "key": "tiny.buttons5", + "type": "textfield", + "area": "TinyMCE", + "value": "" + },{ + "key": "tiny.custom_plugins", + "type": "textfield", + "area": "TinyMCE", + "value": "" + },{ + "key": "tiny.theme", + "type": "textfield", + "area": "TinyMCE", + "value": "" + },{ + "key": "tiny.theme_advanced_blockformats", + "type": "textfield", + "area": "TinyMCE", + "value": "" + },{ + "key": "tiny.theme_advanced_css_selectors", + "type": "textfield", + "area": "TinyMCE", + "value": "" + }] + } + ,"database": { + "tables": ["galItem", "galAlbum", "galAlbumItem", "galAlbumContext", "galTag"] + } + ,"build": { + "setupOptions": { + "source": "setup.options.php" + }, + "resolver": { + "before": [ + "resolve.paths.php" + ], + "after": [ + "resolve.albumfiles.php", + "resolve.spaces.php" + ] + } + } +} diff --git a/_build/data/events/events.gallerycustomtv.php b/_build/data/events/events.gallerycustomtv.php deleted file mode 100644 index 76abcf6..0000000 --- a/_build/data/events/events.gallerycustomtv.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Events for GalleryCustomTV plugin - * - * @var modX $modx - * @package gallery - * @subpackage build - */ -$events = array(); - -$evs = array( - 'OnTVInputRenderList', - 'OnTVInputPropertiesList', - 'OnTVOutputRenderList', - 'OnTVOutputRenderPropertiesList', - 'OnDocFormPrerender', - 'OnManagerPageBeforeRender', -); - -foreach ($evs as $ev) { - $events[(string)$ev] = $modx->newObject('modPluginEvent'); - $events[(string)$ev]->fromArray(array( - 'event' => (string)$ev, - 'priority' => 0, - 'propertyset' => 0, - ),'',true,true); -} - -return $events; \ No newline at end of file diff --git a/_build/data/transport.chunks.php b/_build/data/transport.chunks.php deleted file mode 100644 index 62e083d..0000000 --- a/_build/data/transport.chunks.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * @package gallery - * @subpackage build - */ -$chunks = array(); - -$chunks[0]= $modx->newObject('modChunk'); -$chunks[0]->fromArray(array( - 'id' => 0, - 'name' => 'galAlbumRowTpl', - 'description' => '', - 'snippet' => file_get_contents($sources['source_core'].'/elements/chunks/galalbumrowtpl.chunk.tpl'), - 'properties' => '', -),'',true,true); - -$chunks[1]= $modx->newObject('modChunk'); -$chunks[1]->fromArray(array( - 'id' => 1, - 'name' => 'galItemThumb', - 'description' => '', - 'snippet' => file_get_contents($sources['source_core'].'/elements/chunks/galitemthumb.chunk.tpl'), - 'properties' => '', -),'',true,true); - - -/* -$chunks[0]= $modx->newObject('modChunk'); -$chunks[0]->fromArray(array( - 'id' => 0, - 'name' => 'gal', - 'description' => '', - 'snippet' => file_get_contents($sources['source_core'].'/elements/chunks/gal.chunk.tpl'), - 'properties' => '', -),'',true,true); - */ - -return $chunks; \ No newline at end of file diff --git a/_build/data/transport.menu.php b/_build/data/transport.menu.php deleted file mode 100644 index 25f3c66..0000000 --- a/_build/data/transport.menu.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Adds modActions and modMenus into package - * - * @package gallery - * @subpackage build - */ -$action= $modx->newObject('modAction'); -$action->fromArray(array( - 'id' => 1, - 'namespace' => 'gallery', - 'parent' => 0, - 'controller' => 'index', - 'haslayout' => 1, - 'lang_topics' => 'gallery:default', - 'assets' => '', -),'',true,true); - -/* load action into menu */ -$menu= $modx->newObject('modMenu'); -$menu->fromArray(array( - 'text' => 'gallery', - 'parent' => 'components', - 'description' => 'gallery.menu_desc', - 'icon' => 'images/icons/plugin.gif', - 'menuindex' => 0, - 'params' => '', - 'handler' => '', -),'',true,true); -$menu->addOne($action); -unset($action); - -return $menu; \ No newline at end of file diff --git a/_build/data/transport.plugins.php b/_build/data/transport.plugins.php deleted file mode 100644 index 7a2681c..0000000 --- a/_build/data/transport.plugins.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * @package gallery - * @subpackage build - */ -$plugins = array(); - -return $plugins; \ No newline at end of file diff --git a/_build/data/transport.settings.php b/_build/data/transport.settings.php deleted file mode 100644 index 261372d..0000000 --- a/_build/data/transport.settings.php +++ /dev/null @@ -1,213 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Loads system settings - * - * @package gallery - * @subpackage build - */ -$settings = array(); - -$settings['gallery.backend_thumb_far']= $modx->newObject('modSystemSetting'); -$settings['gallery.backend_thumb_far']->fromArray(array( - 'key' => 'gallery.backend_thumb_far', - 'value' => 'C', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'backend', -),'',true,true); - -$settings['gallery.backend_thumb_height']= $modx->newObject('modSystemSetting'); -$settings['gallery.backend_thumb_height']->fromArray(array( - 'key' => 'gallery.backend_thumb_height', - 'value' => '100', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'backend', -),'',true,true); - -$settings['gallery.backend_thumb_width']= $modx->newObject('modSystemSetting'); -$settings['gallery.backend_thumb_width']->fromArray(array( - 'key' => 'gallery.backend_thumb_width', - 'value' => '100', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'backend', -),'',true,true); - -$settings['gallery.backend_thumb_zoomcrop']= $modx->newObject('modSystemSetting'); -$settings['gallery.backend_thumb_zoomcrop']->fromArray(array( - 'key' => 'gallery.backend_thumb_zoomcrop', - 'value' => 1, - 'xtype' => 'combo-boolean', - 'namespace' => 'gallery', - 'area' => 'backend', -),'',true,true); - -$settings['gallery.default_batch_upload_path']= $modx->newObject('modSystemSetting'); -$settings['gallery.default_batch_upload_path']->fromArray(array( - 'key' => 'gallery.default_batch_upload_path', - 'value' => '{assets_path}images/', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'backend', -),'',true,true); - -$settings['xhtml_urls']= $modx->newObject('modSystemSetting'); -$settings['xhtml_urls']->fromArray(array( - 'key' => 'xhtml_urls', - 'value' => 0, - 'xtype' => 'combo-boolean', - 'namespace' => 'core', - 'area' => 'furls', -),'',true,true); - -$settings['gallery.thumbs_prepend_site_url']= $modx->newObject('modSystemSetting'); -$settings['gallery.thumbs_prepend_site_url']->fromArray(array( - 'key' => 'gallery.thumbs_prepend_site_url', - 'value' => false, - 'xtype' => 'combo-boolean', - 'namespace' => 'gallery', - 'area' => '', -),'',true,true); - -/* -$settings['gallery.']= $modx->newObject('modSystemSetting'); -$settings['gallery.']->fromArray(array( - 'key' => 'gallery.', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => '', -),'',true,true); -*/ - -/* Settings for the TinyMCE integration */ -$settings['gallery.use_richtext']= $modx->newObject('modSystemSetting'); -$settings['gallery.use_richtext']->fromArray(array( - 'key' => 'gallery.use_richtext', - 'value' => false, - 'xtype' => 'combo-boolean', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.width']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.width']->fromArray(array( - 'key' => 'gallery.tiny.width', - 'value' => '95%', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.height']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.height']->fromArray(array( - 'key' => 'gallery.tiny.height', - 'value' => 200, - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.buttons1']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.buttons1']->fromArray(array( - 'key' => 'gallery.tiny.buttons1', - 'value' => 'undo,redo,selectall,pastetext,pasteword,charmap,separator,image,modxlink,unlink,media,separator,code,help', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.buttons2']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.buttons2']->fromArray(array( - 'key' => 'gallery.tiny.buttons2', - 'value' => 'bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.buttons3']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.buttons3']->fromArray(array( - 'key' => 'gallery.tiny.buttons3', - 'value' => 'styleselect,formatselect,separator,styleprops', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.buttons4']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.buttons4']->fromArray(array( - 'key' => 'gallery.tiny.buttons4', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.buttons5']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.buttons5']->fromArray(array( - 'key' => 'gallery.tiny.buttons5', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.custom_plugins']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.custom_plugins']->fromArray(array( - 'key' => 'gallery.tiny.custom_plugins', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.theme']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.theme']->fromArray(array( - 'key' => 'gallery.tiny.theme', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.theme_advanced_blockformats']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.theme_advanced_blockformats']->fromArray(array( - 'key' => 'gallery.tiny.theme_advanced_blockformats', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -$settings['gallery.tiny.theme_advanced_css_selectors']= $modx->newObject('modSystemSetting'); -$settings['gallery.tiny.theme_advanced_css_selectors']->fromArray(array( - 'key' => 'gallery.tiny.theme_advanced_css_selectors', - 'value' => '', - 'xtype' => 'textfield', - 'namespace' => 'gallery', - 'area' => 'TinyMCE', -),'',true,true); - -return $settings; \ No newline at end of file diff --git a/_build/data/transport.snippets.php b/_build/data/transport.snippets.php deleted file mode 100644 index 9afe83f..0000000 --- a/_build/data/transport.snippets.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * @package gallery - * @subpackage build - */ -$snippets = array(); - -$snippets[0]= $modx->newObject('modSnippet'); -$snippets[0]->fromArray(array( - 'id' => 0, - 'name' => 'Gallery', - 'description' => '', - 'snippet' => getSnippetContent($sources['source_core'].'/elements/snippets/snippet.gallery.php'), -),'',true,true); -$properties = include $sources['build'].'properties/properties.gallery.php'; -$snippets[0]->setProperties($properties); -unset($properties); - -$snippets[1]= $modx->newObject('modSnippet'); -$snippets[1]->fromArray(array( - 'id' => 1, - 'name' => 'GalleryAlbums', - 'description' => '', - 'snippet' => getSnippetContent($sources['source_core'].'/elements/snippets/snippet.galleryalbums.php'), -),'',true,true); -$properties = include $sources['build'].'properties/properties.galleryalbums.php'; -$snippets[1]->setProperties($properties); -unset($properties); - -$snippets[2]= $modx->newObject('modSnippet'); -$snippets[2]->fromArray(array( - 'id' => 2, - 'name' => 'GalleryItem', - 'description' => '', - 'snippet' => getSnippetContent($sources['source_core'].'/elements/snippets/snippet.galleryitem.php'), -),'',true,true); -$properties = include $sources['build'].'properties/properties.galleryitem.php'; -$snippets[2]->setProperties($properties); -unset($properties); - -return $snippets; \ No newline at end of file diff --git a/_build/properties/properties.gallery.php b/_build/properties/properties.gallery.php deleted file mode 100644 index 000686f..0000000 --- a/_build/properties/properties.gallery.php +++ /dev/null @@ -1,303 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Properties for the Gallery snippet. - * - * @package gallery - * @subpackage build - */ -$properties = array( - array( - 'name' => 'album', - 'desc' => 'gallery.album_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tag', - 'desc' => 'gallery.tag_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'plugin', - 'desc' => 'gallery.plugin_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'pluginPath', - 'desc' => 'gallery.pluginpath_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbTpl', - 'desc' => 'gallery.thumbtpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galItemThumb', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'containerTpl', - 'desc' => 'gallery.containertpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'itemCls', - 'desc' => 'gallery.itemcls_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'gal-item', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'activeCls', - 'desc' => 'gallery.activecls_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'gal-item-active', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'toPlaceholder', - 'desc' => 'gallery.toplaceholder_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbWidth', - 'desc' => 'gallery.thumbwidth_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbHeight', - 'desc' => 'gallery.thumbheight_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbZoomCrop', - 'desc' => 'gallery.thumbzoomcrop_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbFar', - 'desc' => 'gallery.thumbfar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'C', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbQuality', - 'desc' => 'gallery.thumbquality_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 90, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbProperties', - 'desc' => 'gallery.thumbproperties_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'linkToImage', - 'desc' => 'gallery.linktoimage_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageGetParam', - 'desc' => 'gallery.imagegetparam_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galItem', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageWidth', - 'desc' => 'gallery.imagewidth_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 500, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageHeight', - 'desc' => 'gallery.imageheight_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 500, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageZoomCrop', - 'desc' => 'gallery.imagezoomcrop_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => false, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageFar', - 'desc' => 'gallery.imagefar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageQuality', - 'desc' => 'gallery.imagequality_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 90, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageProperties', - 'desc' => 'gallery.imageproperties_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'sort', - 'desc' => 'gallery.sort_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'rank', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'dir', - 'desc' => 'gallery.dir_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'ASC', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'limit', - 'desc' => 'gallery.limit_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 0, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'start', - 'desc' => 'gallery.start_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 0, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'showInactive', - 'desc' => 'gallery.showinactive_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => false, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'checkForRequestAlbumVar', - 'desc' => 'gallery.checkforrequestalbumvar_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumRequestVar', - 'desc' => 'gallery.albumrequestvar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galAlbum', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'checkForRequestTagVar', - 'desc' => 'gallery.checkforrequesttagvar_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tagRequestVar', - 'desc' => 'gallery.tagrequestvar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galTag', - ), - array( - 'name' => 'useCss', - 'desc' => 'gallery.usecss_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), -/* - array( - 'name' => '', - 'desc' => '', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - ), - */ -); - -return $properties; \ No newline at end of file diff --git a/_build/properties/properties.galleryalbums.php b/_build/properties/properties.galleryalbums.php deleted file mode 100644 index d8be563..0000000 --- a/_build/properties/properties.galleryalbums.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Properties for the GalleryAlbums snippet. - * - * @package gallery - * @subpackage build - */ -$properties = array( - array( - 'name' => 'rowTpl', - 'desc' => 'galleryalbums.rowtpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galAlbumRowTpl', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'rowCls', - 'desc' => 'galleryalbums.rowcls_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'sort', - 'desc' => 'galleryalbums.sort_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'rank', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'dir', - 'desc' => 'galleryalbums.dir_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'DESC', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'limit', - 'desc' => 'galleryalbums.limit_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '10', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'start', - 'desc' => 'galleryalbums.start_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '0', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'toPlaceholder', - 'desc' => 'galleryalbums.toplaceholder_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'showInactive', - 'desc' => 'galleryalbums.showinactive_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => false, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'prominentOnly', - 'desc' => 'galleryalbums.prominentonly_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'parent', - 'desc' => 'galleryalbums.parent_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '0', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'showAll', - 'desc' => 'galleryalbums.showall_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'showName', - 'desc' => 'galleryalbums.showname_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumRequestVar', - 'desc' => 'galleryalbums.albumrequestvar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galAlbum', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumCoverSort', - 'desc' => 'galleryalbums.albumcoversort_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'rank', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumCoverSortDir', - 'desc' => 'galleryalbums.albumcoversortdir_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'ASC', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbWidth', - 'desc' => 'galleryalbums.thumbwidth_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbHeight', - 'desc' => 'galleryalbums.thumbheight_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbZoomCrop', - 'desc' => 'galleryalbums.thumbzoomcrop_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbFar', - 'desc' => 'galleryalbums.thumbfar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'C', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbQuality', - 'desc' => 'galleryalbums.thumbquality_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 90, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbProperties', - 'desc' => 'galleryalbums.thumbproperties_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), -/* - array( - 'name' => '', - 'desc' => '', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - ), - */ -); - -return $properties; \ No newline at end of file diff --git a/_build/properties/properties.galleryitem.php b/_build/properties/properties.galleryitem.php deleted file mode 100644 index 6f0183e..0000000 --- a/_build/properties/properties.galleryitem.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Properties for the GalleryItem snippet. - * - * @package gallery - * @subpackage build - */ -$properties = array( - array( - 'name' => 'id', - 'desc' => 'galleryitem.id_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'toPlaceholders', - 'desc' => 'galleryitem.toplaceholders_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'toPlaceholdersPrefix', - 'desc' => 'galleryitem.toplaceholdersprefix_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galitem', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tpl', - 'desc' => 'galleryitem.tpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galItem', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumTpl', - 'desc' => 'galleryitem.albumtpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galItemAlbum', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumSeparator', - 'desc' => 'galleryitem.albumseparator_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => ', ', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'albumRequestVar', - 'desc' => 'galleryitem.albumrequestvar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galAlbum', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tagTpl', - 'desc' => 'galleryitem.tagtpl_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galItemTag', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tagSeparator', - 'desc' => 'galleryitem.tagseparator_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => ', ', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tagSortDir', - 'desc' => 'galleryitem.tagsortdir_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'DESC', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'tagRequestVar', - 'desc' => 'galleryitem.tagrequestvar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'galTag', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbWidth', - 'desc' => 'galleryitem.thumbwidth_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbHeight', - 'desc' => 'galleryitem.thumbheight_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '100', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbZoomCrop', - 'desc' => 'galleryitem.thumbzoomcrop_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => true, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbFar', - 'desc' => 'galleryitem.thumbfar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 'C', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbQuality', - 'desc' => 'galleryitem.thumbquality_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 90, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'thumbProperties', - 'desc' => 'galleryitem.thumbproperties_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageWidth', - 'desc' => 'galleryitem.imagewidth_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageHeight', - 'desc' => 'galleryitem.imageheight_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageZoomCrop', - 'desc' => 'galleryitem.imagezoomcrop_desc', - 'type' => 'combo-boolean', - 'options' => '', - 'value' => 0, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageFar', - 'desc' => 'galleryitem.imagefar_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageQuality', - 'desc' => 'galleryitem.imagequality_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => 90, - 'lexicon' => 'gallery:properties', - ), - array( - 'name' => 'imageProperties', - 'desc' => 'galleryitem.imageproperties_desc', - 'type' => 'textfield', - 'options' => '', - 'value' => '', - 'lexicon' => 'gallery:properties', - ), -); - -return $properties; \ No newline at end of file diff --git a/_build/resolvers/resolve.dbchanges.php b/_build/resolvers/resolve.dbchanges.php deleted file mode 100644 index f64f292..0000000 --- a/_build/resolvers/resolve.dbchanges.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Resolve changes to db model - * - * @var xPDOObject $object - * @var array $options - * - * @package gallery - * @subpackage build - */ -if ($object->xpdo) { - switch ($options[xPDOTransport::PACKAGE_ACTION]) { - case xPDOTransport::ACTION_INSTALL: - case xPDOTransport::ACTION_UPGRADE: - $modx =& $object->xpdo; - $modelPath = $modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/'; - $modx->addPackage('gallery',$modelPath); - $manager = $modx->getManager(); - $oldLogLevel = $modx->getLogLevel(); - $modx->setLogLevel(0); - - $manager->addField('galAlbum','parent',array('after' => 'id')); - $manager->addIndex('galAlbum','parent'); - $manager->addField('galItem','url',array('after' => 'mediatype')); - - /* 1.6.0+ */ - $manager->addField('galItem','slug',array('after' => 'mediatype')); - $manager->addIndex('galItem','slug'); - $manager->addIndex('galItem','name'); - $manager->addIndex('galItem','active'); - $manager->addIndex('galItem','mediatype'); - - $manager->addIndex('galAlbum','rank'); - $manager->addIndex('galAlbum','active'); - $manager->addIndex('galAlbum','prominent'); - - $manager->addIndex('galAlbumItem','rank'); - - /* 1.5.3+ */ - $manager->addField('galAlbum','cover_filename'); - - - $modx->setLogLevel($oldLogLevel); - break; - } -} -return true; \ No newline at end of file diff --git a/_build/resolvers/resolve.extpack.php b/_build/resolvers/resolve.extpack.php deleted file mode 100644 index 94d4c9b..0000000 --- a/_build/resolvers/resolve.extpack.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Handles adding Gallery to Extension Packages - * - * @var xPDOObject $object - * @var array $options - * @package gallery - * @subpackage build - */ -if ($object->xpdo) { - switch ($options[xPDOTransport::PACKAGE_ACTION]) { - case xPDOTransport::ACTION_INSTALL: - case xPDOTransport::ACTION_UPGRADE: - /** @var modX $modx */ - $modx =& $object->xpdo; - $modelPath = $modx->getOption('gallery.core_path'); - if (empty($modelPath)) { - $modelPath = '[[++core_path]]components/gallery/'; - } - $modelPath = rtrim($modelPath,'/').'/model/'; - if ($modx instanceof modX) { - $modx->addExtensionPackage('gallery',$modelPath); - } - break; - case xPDOTransport::ACTION_UNINSTALL: - $modx =& $object->xpdo; - if ($modx instanceof modX) { - $modx->removeExtensionPackage('gallery'); - } - break; - } -} -return true; \ No newline at end of file diff --git a/_build/resolvers/resolve.paths.php b/_build/resolvers/resolve.paths.php index 34c8ffb..8392878 100644 --- a/_build/resolvers/resolve.paths.php +++ b/_build/resolvers/resolve.paths.php @@ -53,7 +53,9 @@ function createSetting(&$modx,$key,$value) { /* setup paths */ createSetting($modx,'files_path','[[++assets_path]]gallery/'); - @mkdir($modx->getOption('assets_path').'gallery/',0775); + if (!mkdir($concurrentDirectory = $modx->getOption('assets_path') . 'gallery/', 0775) && !is_dir($concurrentDirectory)) { + throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory)); + } /* setup urls */ createSetting($modx,'files_url','[[++assets_url]]gallery/'); @@ -62,4 +64,4 @@ function createSetting(&$modx,$key,$value) { break; } } -return true; \ No newline at end of file +return true; diff --git a/_build/resolvers/resolve.tables.php b/_build/resolvers/resolve.tables.php deleted file mode 100644 index 7be9bd5..0000000 --- a/_build/resolvers/resolve.tables.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * Gallery 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 Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Gallery 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. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * Gallery; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package gallery - */ -/** - * Resolve creating db tables - * - * @package gallery - * @subpackage build - */ -if ($object->xpdo) { - switch ($options[xPDOTransport::PACKAGE_ACTION]) { - case xPDOTransport::ACTION_INSTALL: - $modx =& $object->xpdo; - $modelPath = $modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/'; - $modx->addPackage('gallery',$modelPath); - - $manager = $modx->getManager(); - - $manager->createObjectContainer('galItem'); - $manager->createObjectContainer('galAlbum'); - $manager->createObjectContainer('galAlbumItem'); - $manager->createObjectContainer('galAlbumContext'); - $manager->createObjectContainer('galTag'); - - break; - case xPDOTransport::ACTION_UPGRADE: - break; - } -} -return true; \ No newline at end of file diff --git a/_packages/gallery-1.7.1-pl.transport.zip b/_packages/gallery-1.7.1-pl.transport.zip new file mode 100644 index 0000000..39c45d6 Binary files /dev/null and b/_packages/gallery-1.7.1-pl.transport.zip differ diff --git a/assets/components/gallery/connector.php b/assets/components/gallery/connector.php index 8086d71..70715d9 100644 --- a/assets/components/gallery/connector.php +++ b/assets/components/gallery/connector.php @@ -31,7 +31,7 @@ @session_cache_limiter('public'); define('MODX_REQP',false); } -require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php'; +require_once dirname(__FILE__, 4) .'/config.core.php'; require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php'; require_once MODX_CONNECTORS_PATH.'index.php'; @@ -47,8 +47,7 @@ if ($modx->user->hasSessionContext($modx->context->get('key'))) { $_SERVER['HTTP_MODAUTH'] = $_SESSION["modx.{$modx->context->get('key')}.user.token"]; } else { - $_SESSION["modx.{$modx->context->get('key')}.user.token"] = 0; - $_SERVER['HTTP_MODAUTH'] = 0; + $_SERVER['HTTP_MODAUTH'] = ''; } } else { $_SERVER['HTTP_MODAUTH'] = $modx->site_id; @@ -61,4 +60,4 @@ $modx->request->handleRequest(array( 'processors_path' => $path, 'location' => '', -)); \ No newline at end of file +)); diff --git a/assets/components/gallery/css/fileuploader.css b/assets/components/gallery/css/fileuploader.css index 0625faf..0bae5d2 100644 --- a/assets/components/gallery/css/fileuploader.css +++ b/assets/components/gallery/css/fileuploader.css @@ -1,5 +1,11 @@ .qq-uploader { position:relative; width: 100%;} +.qq-uploader a { + display: inline-block; + margin-top: 10px; + text-decoration: none; +} + .qq-upload-button { display:block; /* or inline-block */ padding: 7px 0; @@ -11,6 +17,12 @@ margin-top: 10px; font-weight: bold; } +/* 2.3 style fixes */ +.qq-upload-button.x-btn { + border: 0; + padding: 10px 15px; + text-shadow: none; +} .qq-upload-button-hover {background:#5C7F17;} .qq-upload-button-focus {outline:1px dotted black;} diff --git a/assets/components/gallery/css/mgr.css b/assets/components/gallery/css/mgr.css index ac91c7d..892f230 100644 --- a/assets/components/gallery/css/mgr.css +++ b/assets/components/gallery/css/mgr.css @@ -6,25 +6,38 @@ .gal-item-inactive { opacity: 0.5; } -.green { color: green; } -.red { color: red; } +/* unnecessary as defined in default styles */ +/*.green { color: green; } +.red { color: red; }*/ .gal-detail-active { float: right; } .gal-view-item-albums { overflow:auto; - border-top: 1px solid #d4d4d4; - margin-top: 4px; + border-top: 1px solid #E4E4E4; + margin-top: 7px; } .gal-item-thumb { border: 1px solid #ddd; - padding: 5px 5px 3px; + padding: 5px; } .gal-item-update-preview { margin: 0 auto; text-align: center; padding: 2px; +} + +#gal-album-items-detail { + border-left: 1px solid #E4E4E4; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-left: 0 !important; /* override default modx theme styles for .x-column */ +} + +.modx-browser-thumb-wrap .gal-item-thumb { + height: 100px; } \ No newline at end of file diff --git a/assets/components/gallery/js/mgr/gallery.js b/assets/components/gallery/js/mgr/gallery.js index fba4de3..99753f7 100755 --- a/assets/components/gallery/js/mgr/gallery.js +++ b/assets/components/gallery/js/mgr/gallery.js @@ -16,8 +16,8 @@ GAL.window.CreateAlbum = function(config) { Ext.applyIf(config,{ title: _('gallery.album_create') ,id: this.ident - ,height: 150 - ,width: 650 + // ,height: 150 + ,width: 600 ,url: GAL.config.connector_url ,action: 'mgr/album/create' ,fields: [{ @@ -57,6 +57,12 @@ GAL.window.CreateAlbum = function(config) { },{ columnWidth: .5 ,items: [{ + xtype: 'textfield' + ,fieldLabel: _('gallery.year') + ,name: 'year' + ,anchor: '100%' + ,allowBlank: true + },{ xtype: 'checkbox' ,boxLabel: _('gallery.active') ,description: MODx.expandHelp ? '' : _('gallery.active_desc') @@ -104,8 +110,9 @@ GAL.window.UpdateItem = function(config) { title: _('gallery.item_update') ,id: this.ident ,closeAction: 'close' - ,height: 150 - ,width: '55%' + // ,height: 150 + // ,width: '55%' + ,width: 600 ,url: GAL.config.connector_url ,action: 'mgr/item/update' ,fileUpload: true @@ -177,6 +184,7 @@ GAL.window.UpdateItem = function(config) { ,name: 'id' ,fieldLabel: _('id') ,submitValue: true + ,anchor: '100%' },{ xtype: 'checkbox' ,boxLabel: _('gallery.active') @@ -218,9 +226,10 @@ GAL.window.UploadItem = function(config) { Ext.applyIf(config,{ title: _('gallery.item_upload') ,id: this.ident - ,height: 150 - ,width: '55%' - ,minWidth: 650 + // ,height: 150 + // ,width: '55%' + ,width: 600 + // ,minWidth: 650 ,url: GAL.config.connector_url ,action: 'mgr/item/upload' ,fileUpload: true @@ -235,7 +244,7 @@ GAL.window.UploadItem = function(config) { ,labelAlign: 'top' ,anchor: '100%' ,border: false - ,cls:'main-wrapper' + ,cls: (MODx.config.connector_url) ? '' : 'main-wrapper' // check for 2.3 ,labelSeparator: '' } ,items: [{ @@ -268,8 +277,8 @@ GAL.window.UploadItem = function(config) { },{ columnWidth: .5 ,items: [{ - xtype: 'textfield' - ,inputType: 'file' + xtype: (MODx.config.connector_url) ? 'fileuploadfield' : 'textfield' // check for 2.3 + ,inputType: (MODx.config.connector_url) ? 'text' : 'file' // check for 2.3 ,fieldLabel: _('gallery.file') ,description: MODx.expandHelp ? '' : _('gallery.item_upload_file_desc') ,name: 'file' @@ -327,9 +336,10 @@ GAL.window.UploadCover = function(config) { Ext.applyIf(config,{ title: _('gallery.cover_upload') ,id: this.ident - ,height: 150 - ,width: 350 - ,minWidth: 350 + // ,height: 150 + ,height: 300 // account for the preview thumbnail that is rendered after the window is opened + // ,width: 350 + // ,minWidth: 350 ,saveBtnText:_('gallery.upload_cover') ,url: GAL.config.connector_url ,action: 'mgr/album/uploadcover' @@ -344,7 +354,7 @@ GAL.window.UploadCover = function(config) { layout: 'form' ,labelAlign: 'top' ,border: false - ,cls:'main-wrapper' + ,cls: (MODx.config.connector_url) ? '' : 'main-wrapper' // check for 2.3 ,labelSeparator: '' } ,items: [{ @@ -353,8 +363,8 @@ GAL.window.UploadCover = function(config) { xtype:'hidden' ,name:'id' },{ - xtype: 'textfield' - ,inputType: 'file' + xtype: (MODx.config.connector_url) ? 'fileuploadfield' : 'textfield' // check for 2.3 + ,inputType: (MODx.config.connector_url) ? 'text' : 'file' // check for 2.3 ,fieldLabel: _('gallery.file') ,description: MODx.expandHelp ? '' : _('gallery.item_upload_file_desc') ,name: 'file' @@ -382,7 +392,7 @@ GAL.window.UploadMultiItems = function(config) { title: _('gallery.multi_item_upload') ,id: this.ident ,height: 350 - ,width: 475 + // ,width: 475 ,fields: [{ xtype: 'hidden' ,name: 'album' @@ -483,8 +493,8 @@ GAL.window.BatchUpload = function(config) { Ext.applyIf(config,{ title: _('gallery.batch_upload') ,id: this.ident - ,height: 150 - ,width: 500 + // ,height: 150 + // ,width: 600 ,url: GAL.config.connector_url ,action: 'mgr/item/batchupload' ,fileUpload: true @@ -547,8 +557,8 @@ GAL.window.ZipUpload = function(config) { Ext.applyIf(config,{ title: _('gallery.zip_upload') ,id: this.ident - ,height: 150 - ,width: 500 + // ,height: 150 + // ,width: 600 ,url: GAL.config.connector_url ,action: 'mgr/item/zipupload' ,fileUpload: true @@ -556,8 +566,8 @@ GAL.window.ZipUpload = function(config) { xtype: 'hidden' ,name: 'album' },{ - xtype: 'textfield' - ,inputType: 'file' + xtype: (MODx.config.connector_url) ? 'fileuploadfield' : 'textfield' // check for 2.3 + ,inputType: (MODx.config.connector_url) ? 'text' : 'file' // check for 2.3 ,fieldLabel: _('gallery.zip_file') ,description: MODx.expandHelp ? '' : _('gallery.zip_upload_intro') ,name: 'zip' diff --git a/assets/components/gallery/js/mgr/sections/album/update.js b/assets/components/gallery/js/mgr/sections/album/update.js index 82708ea..5b3282f 100644 --- a/assets/components/gallery/js/mgr/sections/album/update.js +++ b/assets/components/gallery/js/mgr/sections/album/update.js @@ -1,7 +1,3 @@ -Ext.onReady(function() { - MODx.load({ xtype: 'gal-page-album-update'}); -}); - GAL.page.UpdateAlbum = function(config) { config = config || {}; Ext.applyIf(config,{ @@ -9,6 +5,7 @@ GAL.page.UpdateAlbum = function(config) { ,buttons: [{ text: _('save') ,id: 'gal-btn-save' + ,cls: 'primary-button' ,process: 'mgr/album/update' ,method: 'remote' ,keys: [{ @@ -20,7 +17,7 @@ GAL.page.UpdateAlbum = function(config) { text: _('gallery.back') ,id: 'gal-btn-back' ,handler: function() { - location.href = '?a='+MODx.request.a+'&view=index'; + MODx.loadPage('home', 'namespace=gallery'); } ,scope: this }] diff --git a/assets/components/gallery/js/mgr/sections/home.js b/assets/components/gallery/js/mgr/sections/home.js index 27c29c6..ba2c5b7 100644 --- a/assets/components/gallery/js/mgr/sections/home.js +++ b/assets/components/gallery/js/mgr/sections/home.js @@ -1,7 +1,3 @@ -Ext.onReady(function() { - MODx.load({ xtype: 'gal-page-home'}); -}); - GAL.page.Home = function(config) { config = config || {}; Ext.applyIf(config,{ diff --git a/assets/components/gallery/js/mgr/tree.js b/assets/components/gallery/js/mgr/tree.js index 0a910e0..029062c 100644 --- a/assets/components/gallery/js/mgr/tree.js +++ b/assets/components/gallery/js/mgr/tree.js @@ -112,7 +112,7 @@ Ext.extend(galTreeHandlerClass,Ext.Component,{ } ,updateAlbum: function(btn,e) { var id = this.data.id ? this.data.id : 0; - location.href = '?a='+MODx.action['gallery:index']+'&album='+id+'&action=album/update'; + MODx.loadPage('album/update', 'namespace=gallery&album='+id); } ,removeAlbum: function(btn,e) { MODx.msg.confirm({ diff --git a/assets/components/gallery/js/mgr/utils/fileuploader.js b/assets/components/gallery/js/mgr/utils/fileuploader.js index 19f4264..6be9f92 100644 --- a/assets/components/gallery/js/mgr/utils/fileuploader.js +++ b/assets/components/gallery/js/mgr/utils/fileuploader.js @@ -495,7 +495,7 @@ qq.FileUploader = function(o){ template: '
' + '
' + _('gallery.dropfileshere') + '
' + - '
' + _('file_upload') + '
' + + '
' + _('file_upload') + '
' + '

' + _('gallery.clearsuccessful') + ' | ' + '' + _('gallery.clearfailure') + '

' + '' + diff --git a/assets/components/gallery/js/mgr/widgets/album/album.items.view.js b/assets/components/gallery/js/mgr/widgets/album/album.items.view.js index e9331b7..93a3fce 100644 --- a/assets/components/gallery/js/mgr/widgets/album/album.items.view.js +++ b/assets/components/gallery/js/mgr/widgets/album/album.items.view.js @@ -8,14 +8,18 @@ GAL.view.AlbumItems = function(config) { ,ident: 'galbit' ,id: 'gal-album-items-view' ,baseParams: { - action: 'mgr/item/getList' + action: 'mgr/item/getlist' ,album: config.album } ,loadingText: _('loading') ,tpl: this.templates.thumb ,enableDD: true ,multiSelect: true - ,listeners: {} + ,itemSelector: 'div.modx-browser-thumb-wrap' + ,listeners: { + 'selectionchange': {fn:this.showDetails, scope:this, buffer:100} + ,'dblclick': config.onSelect || {fn:Ext.emptyFn,scope:this} + } ,prepareData: this.formatData.createDelegate(this) }); GAL.view.AlbumItems.superclass.constructor.call(this,config); @@ -37,6 +41,10 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ ,source: o.source.id ,target: o.target.id } + ,listeners: { + 'success': {fn:function(r) { + },scope:this} + } }); } @@ -78,7 +86,7 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ MODx.Ajax.request({ url: this.config.url ,params: { - action: 'mgr/album/setCoverItem' + action: 'mgr/album/setcoveritem' ,id: data.id ,albumid: data.album } @@ -122,7 +130,7 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ text: _('gallery.item_delete_multiple_confirm') ,url: this.config.url ,params: { - action: 'mgr/item/removeMultiple' + action: 'mgr/item/removemultiple' ,ids: ids.substr(1) } ,listeners: { @@ -186,8 +194,8 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ ,_initTemplates: function() { this.templates.thumb = new Ext.XTemplate( '' - ,'
gal-item-inactive" id="gal-item-{id}">' - ,'
' + ,'
gal-item-inactive" id="gal-item-{id}">' + ,'
' ,'' ,'
' ,'{shortName}' @@ -200,8 +208,8 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ this.templates.details = new Ext.XTemplate( '
' ,'' - ,'
{shortName}
' - ,'
' + ,'
{shortName}
' + ,'
' ,'' ,''+_('gallery.active')+'' ,''+_('gallery.inactive')+'' @@ -232,7 +240,7 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ ,plain: true ,items: [{ id: 'gal-item-ss' - ,html: '' + ,html: '' }] ,buttons: [{ text: _('close') @@ -286,4 +294,3 @@ Ext.extend(GAL.view.AlbumItems,MODx.DataView,{ }); Ext.reg('gal-view-album-items',GAL.view.AlbumItems); - diff --git a/assets/components/gallery/js/mgr/widgets/album/album.panel.js b/assets/components/gallery/js/mgr/widgets/album/album.panel.js index d9c0e0a..f10ef9a 100644 --- a/assets/components/gallery/js/mgr/widgets/album/album.panel.js +++ b/assets/components/gallery/js/mgr/widgets/album/album.panel.js @@ -70,17 +70,18 @@ GAL.panel.Album = function(config) { ,columnWidth: .6 },{ xtype:'hidden' - ,'name':'cover_filename_url' + ,name:'cover_filename_url' ,id:'cover_filename_url' },{ xtype:'button' ,text: _('gallery.upload_cover') - ,height: 39 + ,cls: 'primary-button' + // ,height: 39 ,handler: this.updateCover },{ xtype:'button' ,text: _('gallery.delete_cover') - ,height: 39 + // ,height: 39 ,handler:function() { var panel=Ext.getCmp('gal-panel-album').getForm(); panel.findField('cover_filename').setValue(''); @@ -318,9 +319,9 @@ GAL.panel.AlbumItems = function(config) { ,region: 'east' ,split: true ,autoScroll: true - ,width: '20%' + ,width: '25%' ,minWidth: 150 - ,maxWidth: 250 + // ,maxWidth: 250 ,height: 450 ,border: false }] diff --git a/assets/components/gallery/js/mgr/widgets/album/album.tree.js b/assets/components/gallery/js/mgr/widgets/album/album.tree.js index 0cdb245..1246ba0 100644 --- a/assets/components/gallery/js/mgr/widgets/album/album.tree.js +++ b/assets/components/gallery/js/mgr/widgets/album/album.tree.js @@ -4,9 +4,10 @@ GAL.tree.Album = function(config) { Ext.applyIf(config,{ id: 'gal-tree-album' ,url: GAL.config.connector_url - ,action: 'mgr/album/getNodes' + ,action: 'mgr/album/getnodes' ,tbar: [{ text: _('gallery.album_create') + ,cls: 'primary-button' ,handler: function(btn,e) { this.createAlbum(btn,e,true); } ,scope: this },'-',{ @@ -51,7 +52,7 @@ Ext.extend(GAL.tree.Album,MODx.tree.Tree,{ ,updateAlbum: function(btn,e) { var id = this.cm.activeNode ? this.cm.activeNode.attributes.pk : 0; - location.href = '?a='+GAL.action+'&album='+id+'&action=album/update'; + MODx.loadPage('album/update', 'namespace=gallery&album='+id); } ,removeAlbum: function(btn,e) { diff --git a/assets/components/gallery/js/mgr/widgets/album/albums.grid.js b/assets/components/gallery/js/mgr/widgets/album/albums.grid.js index d71a942..0f8bd38 100644 --- a/assets/components/gallery/js/mgr/widgets/album/albums.grid.js +++ b/assets/components/gallery/js/mgr/widgets/album/albums.grid.js @@ -30,6 +30,7 @@ GAL.grid.Albums = function(config) { }] ,tbar: [{ text: _('gallery.album_create') + ,cls: 'primary-button' ,handler: this.createAlbum ,scope: this }] @@ -54,7 +55,7 @@ Ext.extend(GAL.grid.Albums,MODx.grid.Grid,{ ,updateAlbum: function(btn,e) { if (!this.menu.record || !this.menu.record.id) return false; - location.href = '?a='+MODx.request.a+'&action=album/update'+'&album='+this.menu.record.id; + MODx.loadPage('album/update', 'namespace=gallery&album='+this.menu.record.id); } ,removeAlbum: function(btn,e) { @@ -85,8 +86,8 @@ GAL.window.CreateAlbum = function(config) { Ext.applyIf(config,{ title: _('gallery.album_create') ,id: this.ident - ,height: 150 - ,width: 475 + // ,height: 150 + // ,width: 475 ,url: GAL.config.connector_url ,action: 'mgr/album/create' ,fields: [{ @@ -101,6 +102,12 @@ GAL.window.CreateAlbum = function(config) { ,name: 'description' ,id: 'gal-'+this.ident+'-description' ,width: 300 + },{ + xtype: 'textfield' + ,fieldLabel: _('gallery.year') + ,name: 'year' + ,anchor: '100%' + ,allowBlank: true },{ xtype: 'checkbox' ,fieldLabel: _('gallery.active') diff --git a/core/components/gallery/bootstrap.php b/core/components/gallery/bootstrap.php new file mode 100644 index 0000000..0f28442 --- /dev/null +++ b/core/components/gallery/bootstrap.php @@ -0,0 +1,17 @@ +addPackage('Gallery\Model', $namespace['path'] . 'src/', null, 'Gallery\\'); +} +catch (Exception $e) { + $modx->log(xPDO::LOG_LEVEL_ERROR, $e->getMessage()); +} diff --git a/core/components/gallery/controllers/album/update.class.php b/core/components/gallery/controllers/album/update.class.php index ffa23bc..d6cc29f 100644 --- a/core/components/gallery/controllers/album/update.class.php +++ b/core/components/gallery/controllers/album/update.class.php @@ -27,6 +27,8 @@ * @var modX $this->modx * @var Gallery $gallery */ +require_once dirname(__FILE__,3) . '/index.class.php'; + class GalleryAlbumUpdateManagerController extends GalleryManagerController { public function getPageTitle() { return $this->modx->lexicon('gallery.album_update'); } public function loadCustomCssJs() { @@ -37,9 +39,9 @@ public function loadCustomCssJs() { $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/album/album.panel.js'); $this->addLastJavascript($this->gallery->config['jsUrl'].'mgr/sections/album/update.js'); $this->addCss($this->gallery->config['cssUrl'].'fileuploader.css'); - + $this->addHtml(""); + $this->checkForTinyMCE(); - } public function getTemplateFile() { return $this->gallery->config['templatesPath'].'album/update.tpl'; } @@ -62,7 +64,11 @@ public function checkForTinyMCE() { $css = $this->modx->getOption('gallery.tiny.theme_advanced_css_selectors',null,''); /** @var modAction $browserAction */ - $browserAction = $this->modx->getObject('modAction',array('controller' => 'browser')); + $browserAction = null; + if ($this->modx->getVersionData()['version'] < 3){ + //V2 + $browserAction = $this->modx->getObject('modAction',array('controller' => 'browser')); + } /* If the settings are empty, override them with the generic tinymce settings. */ $tinyProperties = array( diff --git a/core/components/gallery/controllers/home.class.php b/core/components/gallery/controllers/home.class.php index afe16ff..102b109 100644 --- a/core/components/gallery/controllers/home.class.php +++ b/core/components/gallery/controllers/home.class.php @@ -25,12 +25,15 @@ * @package gallery * @subpackage controllers */ +require_once dirname(__FILE__,2) . '/index.class.php'; + class GalleryHomeManagerController extends GalleryManagerController { public function getPageTitle() { return $this->modx->lexicon('gallery'); } public function loadCustomCssJs() { $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/album/album.tree.js'); $this->addJavascript($this->gallery->config['jsUrl'].'mgr/widgets/home.panel.js'); $this->addLastJavascript($this->gallery->config['jsUrl'].'mgr/sections/home.js'); + $this->addHtml(""); } public function getTemplateFile() { return $this->gallery->config['templatesPath'].'home.tpl'; } } \ No newline at end of file diff --git a/core/components/gallery/docs/changelog.txt b/core/components/gallery/docs/changelog.txt index b4d704e..ef219b4 100755 --- a/core/components/gallery/docs/changelog.txt +++ b/core/components/gallery/docs/changelog.txt @@ -1,5 +1,54 @@ Changelog for Gallery. +Gallery 2.0.0 +==================================== +- Fixed to work with MODX 3 +- Fixed image upload error in log +- Fix missing images in the manager +- Fix nonaggregated images in the manager + +Gallery 1.7.1 +==================================== +- Fixed critical vulnerability in phpthumb processor +- Fixed namespace paths + +Gallery 1.7.0 +==================================== +- Fixed showAll parameter in galAlbum +- Fixed album tree icon +- Fixed undefined index: Year +- Updated phpthumb-processor +- Add browser caching support to phpthumb processor +- Move Ext.onReady into controllers +- Add support for &thumbTpl_N tpl in Gallery snippet +- More 2.3 Fixes +- Modx 2.3 Compatibility Fixes + +Gallery 1.6.1 +==================================== + - [#13][#12] Backwards Compatibility Fix + +Gallery 1.6.0 +==================================== +- [#271] [GalleryAlbums] Added image_absolute placeholder +- [#270] [GalleryAlbums] Added containerTpl (with navigation placeholders) and totalVar placeholder +- [#266] Add support for selection of album cover. +- [#259] Do not cache in getList() when $sort = RAND() +- [#252] Database Optimization +- [#248] Fix getPage support in Gallery snippet +- [#246] Batch import sorts by filename. +- [#235] show all childs and subchilds of selected parent album by new TV option +- [#233] Fix property itemCls from being assigned activeCls's value +- [#226] German localization +- [#151] Needed to show links to next/prev albums +- [#91] Allow false boolean +- [#258] Bug fix with random sorting when cached +- Bug fixes + +Gallery 1.5.3 +==================================== +- [#9] Fixes Access Denied issue when using Manager / Gallery + Gallery 1.5.2 ==================================== - [#219] Ensure that GalleryAlbums custom TV marks resource edit form dirty and enables save button @@ -158,4 +207,4 @@ Gallery 0.1.0 - i18ned the code, filled out mgr UI functionality - Added check when removing album to delete items not in any other albums - Lots of dev work, got basics mostly functional -- Initial commit \ No newline at end of file +- Initial commit diff --git a/core/components/gallery/elements/plugins/gallerycustomtv.plugin.php b/core/components/gallery/elements/plugins/gallerycustomtv.plugin.php index ba7f63e..d1eecdd 100644 --- a/core/components/gallery/elements/plugins/gallerycustomtv.plugin.php +++ b/core/components/gallery/elements/plugins/gallerycustomtv.plugin.php @@ -1,9 +1,10 @@ getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/'); switch ($modx->event->name) { case 'OnTVInputRenderList': @@ -19,6 +20,7 @@ $modx->event->output($corePath.'elements/tv/properties/'); break; case 'OnManagerPageBeforeRender': + /** @noinspection PhpUndefinedVariableInspection */ $gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties); if (!($gallery instanceof Gallery)) return ''; @@ -44,6 +46,7 @@ '); break; case 'OnDocFormPrerender': + /** @noinspection PhpUndefinedVariableInspection */ $gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties); if (!($gallery instanceof Gallery)) return ''; @@ -51,10 +54,15 @@ $modx->controller->addLexiconTopic('gallery:tv'); /* @var modAction $action */ - $action = $modx->getObject('modAction',array( - 'namespace' => 'gallery', - 'controller' => 'index', - )); + $action = null; + if ($modx->getVersionData()['version'] < 3){ + //V2 + $action = $modx->getObject('modAction',array( + 'namespace' => 'gallery', + 'controller' => 'index', + )); + } + $modx->controller->addHtml('