'modDocument', 'resource' => array ( 'id' => 73, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Soil Balance', 'longtitle' => '', 'description' => 'Demo post 2 for the BlogIt extra.', 'alias' => 'post-2', 'alias_visible' => 1, 'link_attributes' => '', 'published' => 1, 'pub_date' => 0, 'unpub_date' => 0, 'parent' => 71, 'isfolder' => 0, 'introtext' => 'The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure', 'content' => '

The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure. Soil micro-organisms rely on good aeration and moisture regulation (field capacity) to function well. It is vital to maintaining a good balance between these cations, in turn assisting the soil biota and the availability of major and minor elements.

The physical structure of the ‘ideal’ soil is made up to 50% solids and 50% pore space. Minerals 45%, organic matter (humus) 5%, with air at 25% and moisture remaining 25%. These ideal levels can be brought into alignment by the use of Total Exchange Capacity and Base Saturation Percentages of a particular soil.

Base saturation percentages of major cations, which occupy space on the clay colloid from the ‘solids’ portion of the soil, determine whether or not there is enough pore space to accommodate the air and moisture percentages. Calcium and Magnesium have the greatest influence on those percentages.

A soil with a cation exchange of say 10-30 requires a base saturation of min. 68% Calcium and 12% Magnesium, whilst a soil with a C.E.C. of 7 or less requires min. 60% Calcium and max. 20% Magnesium to have the same amount of pore space. In most situations, we have found a calcium/magnesium ratio of between 5:1 and 7:1 is ideal.

A major factor which contributes to healthier vines and high-quality fruit is a fungal dominated soil. This can be achieved using materials like humic acid, fish, kelp, aloe vera, and the microbe cultures.

Given the various options using new ‘biological’ inputs, combined with ‘conventional’ methods, we have found what we believe to be a more substantial approach to soil balance and crop nutrition suited to high quality, high value produce in lieu of low value and quantity.

', 'richtext' => 1, 'template' => 12, 'menuindex' => 1, 'searchable' => 1, 'cacheable' => 1, 'createdby' => 1, 'createdon' => 1549403042, 'editedby' => 1, 'editedon' => 1549519286, 'deleted' => 0, 'deletedon' => 0, 'deletedby' => 0, 'publishedon' => 1549514820, 'publishedby' => 1, 'menutitle' => '', 'donthit' => 0, 'privateweb' => 0, 'privatemgr' => 0, 'content_dispo' => 0, 'hidemenu' => 0, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'uri' => 'post-2.html', 'uri_override' => 0, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, 'properties' => NULL, 'blogit.post_main_image' => array ( 0 => 'blogit.post_main_image', 1 => 'http://placehold.it/900x300', 2 => 'default', 3 => NULL, 4 => 'image', ), 'blogit.post_main_image_alt' => array ( 0 => 'blogit.post_main_image_alt', 1 => 'Soil Balance', 2 => 'default', 3 => NULL, 4 => 'text', ), '_content' => ' Soil Balance | Crop Monitor

Soil Balance

Created by: Benjamin Harris


Published on:


Soil Balance

The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure. Soil micro-organisms rely on good aeration and moisture regulation (field capacity) to function well. It is vital to maintaining a good balance between these cations, in turn assisting the soil biota and the availability of major and minor elements.

The physical structure of the ‘ideal’ soil is made up to 50% solids and 50% pore space. Minerals 45%, organic matter (humus) 5%, with air at 25% and moisture remaining 25%. These ideal levels can be brought into alignment by the use of Total Exchange Capacity and Base Saturation Percentages of a particular soil.

Base saturation percentages of major cations, which occupy space on the clay colloid from the ‘solids’ portion of the soil, determine whether or not there is enough pore space to accommodate the air and moisture percentages. Calcium and Magnesium have the greatest influence on those percentages.

A soil with a cation exchange of say 10-30 requires a base saturation of min. 68% Calcium and 12% Magnesium, whilst a soil with a C.E.C. of 7 or less requires min. 60% Calcium and max. 20% Magnesium to have the same amount of pore space. In most situations, we have found a calcium/magnesium ratio of between 5:1 and 7:1 is ideal.

A major factor which contributes to healthier vines and high-quality fruit is a fungal dominated soil. This can be achieved using materials like humic acid, fish, kelp, aloe vera, and the microbe cultures.

Given the various options using new ‘biological’ inputs, combined with ‘conventional’ methods, we have found what we believe to be a more substantial approach to soil balance and crop nutrition suited to high quality, high value produce in lieu of low value and quantity.


Portal Login
[[!Login? &loginTpl=`CM_bloglgnLoginTpl` &loginResourceId=`2` &loginViaEmail=`true` &errTpl=`lgnErrTpl` &logoutTpl=`CMlgnLogoutTpl` &logoutResourceId=`4` &tpl=`CMlgnForgotPassTpl` &resetResourceId=`3` ]]
Search
[[!SimpleSearchForm? &landing=`80` &tpl=`CMSearchForm` &method=`POST` ]]
Contact Us
[[!FormIt? &hooks=`spam,email` &submitVar=`enquiry-submit` &emailTpl=`CMenquiryEmailTpl` &emailTo=`enquiries@cropmonitor.info` &successMessage=`Thankyou for contacting us, we will be in touch soon.` &validationErrorMessage=`true` &validate=`nospam:blank, name:required, email:email:required, text:required:stripTags` ]] [[!+fi.successMessage:notempty=`
[[!+fi.successMessage]]
`]] [[!+fi.validation_error_message:notempty=`
[[+errors]] [[!+fi.validation_error_message]]
`]]
We\'ll never share your email.
', '_isForward' => true, ), 'contentType' => array ( 'id' => 1, 'name' => 'HTML', 'description' => 'HTML content', 'mime_type' => 'text/html', 'file_extensions' => '.html', 'headers' => NULL, 'binary' => 0, ), 'policyCache' => array ( ), 'elementCache' => array ( '[[*pagetitle:strip_tags]]' => 'Soil Balance', '[[*longtitle:strip_tags:empty=`Soil Balance`]]' => 'Soil Balance', '[[*description]]' => 'Demo post 2 for the BlogIt extra.', '[[*description:notempty=`Demo post 2 for the BlogIt extra.`:default=``]]' => 'Demo post 2 for the BlogIt extra.', '[[$dash-header]]' => ' ', '[[blogit.lexicon_load]]' => '', '[[%blogit.created_by]]' => 'Created by', '[[*createdby:userinfo=`fullname`]]' => 'Benjamin Harris', '[[%blogit.published_on]]' => 'Published on', '[[*publishedon:strtotime:date=`%y-%m-%d`]]' => '19-02-07', '[[*publishedon:strtotime:date=`%b %d %Y`]]' => 'Feb 07 2019', '[[*publishedon:strtotime:date=`%H:%M %p`]]' => '15:47 PM', '[[*blogit.post_main_image:phpthumbof=`w=900`]]' => '/assets/components/phpthumbof/cache/900x300.69398f367d8175b7e5e91b3bd10fa976.jpg', '[[*blogit.post_main_image_alt]]' => 'Soil Balance', '[[*blogit.post_main_image:isnot=``:then=`Soil Balance`]]' => 'Soil Balance', '[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]]' => '
  • Calcium
  • Magnesium
  • Nitrogen
  • Nutrition
  • Potassium
  • Sodium
  • Viticultural
  • ', '[[$blogit.taglist]]' => '
  • Calcium
  • Magnesium
  • Nitrogen
  • Nutrition
  • Potassium
  • Sodium
  • Viticultural
  • ', '[[*id]]' => 73, '[[~73]]' => 'post-2.html', '[[~80]]' => 'blog-search-results.html', '[[%simplesearch.search? &namespace=`simplesearch` &topic=`default`]]' => 'Search', ), 'sourceCache' => array ( 'modChunk' => array ( 'dash-header' => array ( 'fields' => array ( 'id' => 13, 'source' => 0, 'property_preprocess' => false, 'name' => 'dash-header', 'description' => '', 'editor_type' => 0, 'category' => 0, 'cache_type' => 0, 'snippet' => ' ', 'locked' => false, 'properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => ' ', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'blogit.taglist' => array ( 'fields' => array ( 'id' => 94, 'source' => 0, 'property_preprocess' => false, 'name' => 'blogit.taglist', 'description' => 'Blogit - Created by MPThemes http://mpthemes.com', 'editor_type' => 0, 'category' => 36, 'cache_type' => 0, 'snippet' => '[[++blogit.use_tags:isequalto=`1`:then=`[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]] `]]', 'locked' => false, 'properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => '[[++blogit.use_tags:isequalto=`1`:then=`[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]] `]]', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'blogit.tag_links_tpl' => array ( 'fields' => array ( 'id' => 91, 'source' => 0, 'property_preprocess' => false, 'name' => 'blogit.tag_links_tpl', 'description' => 'Blogit - Created by MPThemes http://mpthemes.com', 'editor_type' => 0, 'category' => 36, 'cache_type' => 0, 'snippet' => '
  • [[+tag]]
  • ', 'locked' => false, 'properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => '
  • [[+tag]]
  • ', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'CM_bloglgnLoginTpl' => array ( 'fields' => array ( 'id' => 110, 'source' => 0, 'property_preprocess' => false, 'name' => 'CM_bloglgnLoginTpl', 'description' => '', 'editor_type' => 0, 'category' => 21, 'cache_type' => 0, 'snippet' => '
    [[+login.recaptcha_html]]
    ', 'locked' => false, 'properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => '
    [[+login.recaptcha_html]]
    ', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), ), 'modSnippet' => array ( 'blogit.lexicon_load' => array ( 'fields' => array ( 'id' => 103, 'source' => 0, 'property_preprocess' => false, 'name' => 'blogit.lexicon_load', 'description' => 'Blogit - Created by MPThemes http://mpthemes.com', 'editor_type' => 0, 'category' => 36, 'cache_type' => 0, 'snippet' => '$modx->lexicon->load(\'blogit:default\'); return \'\';', 'locked' => false, 'properties' => array ( ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '$modx->lexicon->load(\'blogit:default\'); return \'\';', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'phpthumbof' => array ( 'fields' => array ( 'id' => 97, 'source' => 0, 'property_preprocess' => false, 'name' => 'phpthumbof', 'description' => 'Identical to pthumb. Retained for backwards compatibility. Documentation: https://github.com/oo12/phpThumbOf', 'editor_type' => 0, 'category' => 33, 'cache_type' => 0, 'snippet' => '/** * pThumb * Copyright 2013-2014 Jason Grant * * Please see the GitHub page for documentation or to report bugs: * https://github.com/oo12/phpThumbOf * * Forked from phpThumbOf 1.4.0 * Copyright 2009-2012 by Shaun McCormick * * pThumb 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. * * pThumb 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 * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * */ /** * * @var modX $modx * @var array $scriptProperties * @var string $input * @var string|array $options * */ if (empty($input)) { // Exit quietly if no file name given return; } $scriptProperties[\'debug\'] = isset($debug) ? $debug : false; static $pt_settings = array(); if (empty($pt_settings)) { if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) { $modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\'); return $input; } } $pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties); $result = $pThumb->createThumbnail($input, $options); if (!empty($toPlaceholder) || $result[\'outputDims\']) { if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) { $result[\'width\'] = $dims[0]; $result[\'height\'] = $dims[1]; } if (!empty($toPlaceholder)) { $modx->setPlaceholders(array( $toPlaceholder => $result[\'src\'], "$toPlaceholder.width" => $result[\'width\'], "$toPlaceholder.height" => $result[\'height\'] )); $output = \'\'; } if ($result[\'outputDims\']) { $output = "src=\\"{$result[\'src\']}\\"" . ($result[\'width\'] ? " width=\\"{$result[\'width\']}\\" height=\\"{$result[\'height\']}\\"" : \'\'); } } else { $output = $result[\'src\']; } if ($debug && $result[\'success\']) { // if debugging is on and createThumbnail was successful, log the debug info $pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : ":: Loaded from cache: {$result[\'src\']}", true); } return $output;', 'locked' => false, 'properties' => array ( 'debug' => array ( 'name' => 'debug', 'desc' => 'prop_pthumb.debug_desc', 'type' => 'combo-boolean', 'options' => array ( ), 'value' => false, 'lexicon' => 'phpthumbof:default', 'area' => '', 'desc_trans' => 'Write debug messages to the MODX error log.', 'area_trans' => '', ), ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '/** * pThumb * Copyright 2013-2014 Jason Grant * * Please see the GitHub page for documentation or to report bugs: * https://github.com/oo12/phpThumbOf * * Forked from phpThumbOf 1.4.0 * Copyright 2009-2012 by Shaun McCormick * * pThumb 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. * * pThumb 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 * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * */ /** * * @var modX $modx * @var array $scriptProperties * @var string $input * @var string|array $options * */ if (empty($input)) { // Exit quietly if no file name given return; } $scriptProperties[\'debug\'] = isset($debug) ? $debug : false; static $pt_settings = array(); if (empty($pt_settings)) { if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) { $modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\'); return $input; } } $pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties); $result = $pThumb->createThumbnail($input, $options); if (!empty($toPlaceholder) || $result[\'outputDims\']) { if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) { $result[\'width\'] = $dims[0]; $result[\'height\'] = $dims[1]; } if (!empty($toPlaceholder)) { $modx->setPlaceholders(array( $toPlaceholder => $result[\'src\'], "$toPlaceholder.width" => $result[\'width\'], "$toPlaceholder.height" => $result[\'height\'] )); $output = \'\'; } if ($result[\'outputDims\']) { $output = "src=\\"{$result[\'src\']}\\"" . ($result[\'width\'] ? " width=\\"{$result[\'width\']}\\" height=\\"{$result[\'height\']}\\"" : \'\'); } } else { $output = $result[\'src\']; } if ($debug && $result[\'success\']) { // if debugging is on and createThumbnail was successful, log the debug info $pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : ":: Loaded from cache: {$result[\'src\']}", true); } return $output;', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'TaggerGetTags' => array ( 'fields' => array ( 'id' => 99, 'source' => 0, 'property_preprocess' => false, 'name' => 'TaggerGetTags', 'description' => '', 'editor_type' => 0, 'category' => 35, 'cache_type' => 0, 'snippet' => '/** * TaggerGetTags * * DESCRIPTION * * This Snippet allows you to list tags for resource(s), group(s) and all tags * * PROPERTIES: * * &resources string optional Comma separated list of resources for which will be listed Tags * &parents string optional Comma separated list of parents for which will be listed Tags * &groups string optional Comma separated list of Tagger Groups for which will be listed Tags * &rowTpl string optional Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered * &outTpl string optional Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper * &separator string optional String separator, that will be used for separating Tags * &limit int optional Limit number of returned tag Tags * &offset int optional Offset the output by this number of Tags * &totalPh string optional Placeholder to output the total number of Tags regardless of &limit and &offset * &target int optional An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used * &showUnused int optional If 1 is set, Tags that are not assigned to any Resource will be included to the output as well * &showUnpublished int optional If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well * &showDeleted int optional If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well * &linkCurrentTags int optional If 1 is set, Current Tags will be included in generated URL, default behavior is to generate links to a single tag * &linkOneTagPerGroup int optional If 1 is set, Only one tag will be placed to a group (in the URI tags from same group will swap places); Only available for linkCurrentTags=1; Default: 0 * &contexts string optional If set, will display only tags for resources in given contexts. Contexts can be separated by a comma * &toPlaceholder string optional If set, output will return in placeholder with given name * &sort string optional Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"} * &friendlyURL int optional If set, will be used instead of friendly_urls system setting to generate URL * &linkTagScheme int|string optional Strategy to generate URLs, available values: -1, 0, 1, full, abs, http, https; Default: link_tag_scheme system setting * * USAGE: * * [[!TaggerGetTags? &showUnused=`1`]] * * * @package tagger */ /** @var Tagger $tagger */ $tagger = $modx->getService(\'tagger\',\'Tagger\',$modx->getOption(\'tagger.core_path\',null,$modx->getOption(\'core_path\').\'components/tagger/\').\'model/tagger/\',$scriptProperties); if (!($tagger instanceof Tagger)) return \'\'; $resources = $modx->getOption(\'resources\', $scriptProperties, \'\'); $parents = $modx->getOption(\'parents\', $scriptProperties, \'\'); $groups = $modx->getOption(\'groups\', $scriptProperties, \'\'); $target = (int) $modx->getOption(\'target\', $scriptProperties, $modx->resource->id, true); $showUnused = (int) $modx->getOption(\'showUnused\', $scriptProperties, \'0\'); $showUnpublished = (int) $modx->getOption(\'showUnpublished\', $scriptProperties, \'0\'); $showDeleted = (int) $modx->getOption(\'showDeleted\', $scriptProperties, \'0\'); $linkCurrentTags = (int) $modx->getOption(\'linkCurrentTags\', $scriptProperties, \'0\'); $linkOneTagPerGroup = (int) $modx->getOption(\'linkOneTagPerGroup\', $scriptProperties, \'0\'); $contexts = $modx->getOption(\'contexts\', $scriptProperties, \'\'); $translate = (int) $modx->getOption(\'translate\', $scriptProperties, \'0\'); $defaultRowTpl = $modx->getOption(\'rowTpl\', $scriptProperties, \'\'); $outTpl = $modx->getOption(\'outTpl\', $scriptProperties, \'\'); $wrapIfEmpty = $modx->getOption(\'wrapIfEmpty\', $scriptProperties, 1); $separator = $modx->getOption(\'separator\', $scriptProperties, \'\'); $limit = intval($modx->getOption(\'limit\', $scriptProperties, 0)); $offset = intval($modx->getOption(\'offset\', $scriptProperties, 0)); $totalPh = $modx->getOption(\'totalPh\', $scriptProperties, \'tags_total\'); $weight = (int) $modx->getOption(\'weight\', $scriptProperties, \'0\'); $friendlyURL = (int) $modx->getOption(\'friendlyURL\', $scriptProperties, $modx->getOption(\'friendly_urls\', null, 0)); $linkTagScheme = $modx->getOption(\'linkTagScheme\', $scriptProperties, $modx->getOption(\'link_tag_scheme\', null, -1)); $sort = $modx->getOption(\'sort\', $scriptProperties, \'{}\'); $sort = $modx->fromJSON($sort); if ($sort === null || $sort == \'\' || count($sort) == 0) { $sort = array( \'tag\' => \'ASC\' ); } $resources = $tagger->explodeAndClean($resources); $parents = $tagger->explodeAndClean($parents); $groups = $tagger->explodeAndClean($groups); $contexts = $tagger->explodeAndClean($contexts); $toPlaceholder = $modx->getOption(\'toPlaceholder\', $scriptProperties, \'\'); $c = $modx->newQuery(\'TaggerTag\'); $c->leftJoin(\'TaggerTagResource\', \'Resources\'); $c->leftJoin(\'TaggerGroup\', \'Group\'); $c->leftJoin(\'modResource\', \'Resource\', array(\'Resources.resource = Resource.id\')); if (!empty($parents)) { $c->where(array( \'Resource.parent:IN\' => $parents, )); } if (!empty($contexts)) { $c->where(array( \'Resource.context_key:IN\' => $contexts, )); } if ($showUnpublished == 0) { $c->where(array( \'Resource.published\' => 1, \'OR:Resource.published:IN\' => null, )); } if ($showDeleted == 0) { $c->where(array( \'Resource.deleted\' => 0, \'OR:Resource.deleted:IS\' => null, )); } if ($showUnused == 0) { $c->having(array( \'cnt > 0\', )); } if (!empty($resources)) { $c->where(array( \'Resources.resource:IN\' => $resources )); } if ($groups) { $c->where(array( \'Group.id:IN\' => $groups, \'OR:Group.name:IN\' => $groups, \'OR:Group.alias:IN\' => $groups, )); } $c->select($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\')); $c->select($modx->getSelectColumns(\'TaggerGroup\', \'Group\', \'group_\')); $c->select(array(\'cnt\' => \'COUNT(Resources.tag)\')); $c->groupby($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\') . \',\' . $modx->getSelectColumns(\'TaggerGroup\', \'Group\')); $c->prepare(); $countQuery = new xPDOCriteria($modx, "SELECT COUNT(*) as total, MAX(cnt) as max_cnt FROM ({$c->toSQL(false)}) cq", $c->bindings, $c->cacheFlag); $stmt = $countQuery->prepare(); if ($stmt && $stmt->execute()) { $fetchedData = $stmt->fetch(PDO::FETCH_ASSOC); $total = intval($fetchedData[\'total\']); $maxCnt = intval($fetchedData[\'max_cnt\']); } else { $total = 0; $maxCnt = 0; } $modx->setPlaceholder($totalPh, $total); foreach ($sort as $field => $dir) { $dir = (strtolower($dir) == \'asc\') ? \'asc\' : \'desc\'; $c->sortby($field, $dir); } $c->limit($limit, $offset); $tags = $modx->getIterator(\'TaggerTag\', $c); $out = array(); // prep for &tpl_N $keys = array_keys($scriptProperties); $nthTpls = array(); foreach($keys as $key) { $keyBits = $tagger->explodeAndClean($key, \'_\'); if (isset($keyBits[0]) && $keyBits[0] === \'tpl\') { if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key]; } } ksort($nthTpls); $idx = 1; $currentTags = $tagger->getCurrentTags(); $currentTagsLink = array(); if ($linkCurrentTags == 1) { foreach($currentTags as $currentTag) { $currentTagsLink[$currentTag[\'alias\']] = array_keys($currentTag[\'tags\']); } } foreach ($tags as $tag) { /** @var TaggerTag $tag */ $phs = $tag->toArray(); $group = $tag->Group; if (($linkOneTagPerGroup === 1) && $currentTagsLink[$group->alias]) { $linkData = $currentTagsLink; if (!in_array($tag->alias, $linkData[$group->alias])) { $linkData[$group->alias] = array($tag->alias); } else { $linkData[$group->alias] = array(); } } else { $linkData = array_merge_recursive($currentTagsLink, array( $group->alias => array($tag->alias) )); } $linkData = array_filter(array_map(function($data) { return array_filter($data, function($value) use ($data) { return !(array_count_values($data)[$value] > 1); }); }, $linkData)); if ($friendlyURL == 1) { $linkPath = array_reduce(array_keys($linkData), function($carry, $item) use ($linkData) { return $carry . $item . \'/\' . implode(\'/\', array_unique($linkData[$item])) . \'/\'; }, \'\'); $uri = rtrim($modx->makeUrl($target, \'\', \'\', $linkTagScheme), \'/\') . \'/\' . $linkPath; } else { $linkPath = http_build_query( array_map(function($values) { return is_array($values) ? implode(\',\', array_unique($values)) : $values; }, $linkData) ); $uri = $modx->makeUrl($target, \'\', $linkPath, $linkTagScheme); } $phs[\'uri\'] = $uri; $phs[\'idx\'] = $idx; $phs[\'target\'] = $target; $phs[\'max_cnt\'] = $maxCnt; if (isset($currentTags[$group->alias][\'tags\'][$tag->alias])) { $phs[\'active\'] = 1; } else { $phs[\'active\'] = 0; } if ($weight > 0) { $phs[\'weight\'] = intval(ceil($phs[\'cnt\'] / ($maxCnt / $weight))); } if ($translate == 1) { $groupNameTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\']); $groupDescriptionTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\'); $phs[\'group_name_translated\'] = ($groupNameTranslated == \'tagger.custom.\' . $phs[\'group_alias\']) ? $phs[\'group_name\'] : $groupNameTranslated; $phs[\'group_description_translated\'] = ($groupDescriptionTranslated == \'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\') ? $phs[\'group_description\'] : $groupDescriptionTranslated; } $rowTpl = $defaultRowTpl; $phs[\'sp\'] = $scriptProperties; if ($rowTpl == \'\') { $out[] = \'
    \' . print_r($phs, true) . \'
    \'; } else { if (isset($nthTpls[$idx])) { $rowTpl = $nthTpls[$idx]; } else { foreach ($nthTpls as $int => $tpl) { if ( ($idx % $int) === 0 ) $rowTpl = $tpl; } } $out[] = $tagger->getChunk($rowTpl, $phs); } $idx++; } $out = implode($separator, $out); if ($outTpl != \'\') { if (!empty($out) || $wrapIfEmpty) { $noActiveTags = (int)(count($currentTags) === 0); $out = $tagger->getChunk($outTpl, array(\'tags\' => $out, \'sp\' => $scriptProperties, \'noActiveTags\' => $noActiveTags)); } } if (!empty($toPlaceholder)) { $modx->setPlaceholder($toPlaceholder, $out); return \'\'; } return $out;', 'locked' => false, 'properties' => array ( 'resources' => array ( 'name' => 'resources', 'desc' => 'tagger.gettags.resources_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Comma separated list of resources for which will be listed Tags', 'area_trans' => '', ), 'groups' => array ( 'name' => 'groups', 'desc' => 'tagger.gettags.groups_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Comma separated list of Tagger Groups for which will be listed Tags', 'area_trans' => '', ), 'rowTpl' => array ( 'name' => 'rowTpl', 'desc' => 'tagger.gettags.rowTpl_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered', 'area_trans' => '', ), 'outTpl' => array ( 'name' => 'outTpl', 'desc' => 'tagger.gettags.outTpl_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper', 'area_trans' => '', ), 'separator' => array ( 'name' => 'separator', 'desc' => 'tagger.gettags.separator_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'String separator, that will be used for separating Tags', 'area_trans' => '', ), 'target' => array ( 'name' => 'target', 'desc' => 'tagger.gettags.target_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used', 'area_trans' => '', ), 'showUnused' => array ( 'name' => 'showUnused', 'desc' => 'tagger.gettags.showUnused_desc', 'type' => 'numberfield', 'options' => '', 'value' => '0', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'If 1 is set, Tags that are not assigned to any Resource will be included to the output as well', 'area_trans' => '', ), 'showUnpublished' => array ( 'name' => 'showUnpublished', 'desc' => 'tagger.gettags.showUnpublished_desc', 'type' => 'numberfield', 'options' => '', 'value' => '0', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well', 'area_trans' => '', ), 'showDeleted' => array ( 'name' => 'showDeleted', 'desc' => 'tagger.gettags.showDeleted_desc', 'type' => 'numberfield', 'options' => '', 'value' => '0', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well', 'area_trans' => '', ), 'contexts' => array ( 'name' => 'contexts', 'desc' => 'tagger.gettags.contexts_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'If set, will display only tags for resources in given contexts. Contexts can be separated by a comma', 'area_trans' => '', ), 'toPlaceholder' => array ( 'name' => 'toPlaceholder', 'desc' => 'tagger.gettags.toPlaceholder_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'If set, output will return in placeholder with given name', 'area_trans' => '', ), 'limit' => array ( 'name' => 'limit', 'desc' => 'tagger.gettags.limit_desc', 'type' => 'numberfield', 'options' => '', 'value' => '0', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Limit number of returned tag Tags', 'area_trans' => '', ), 'offset' => array ( 'name' => 'offset', 'desc' => 'tagger.gettags.offset_desc', 'type' => 'numberfield', 'options' => '', 'value' => '0', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Offset the output by this number of Tags', 'area_trans' => '', ), 'totalPh' => array ( 'name' => 'totalPh', 'desc' => 'tagger.gettags.totalPh_desc', 'type' => 'textfield', 'options' => '', 'value' => 'tags_total', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Placeholder to output the total number of Tags regardless of &limit and &offset', 'area_trans' => '', ), 'sort' => array ( 'name' => 'sort', 'desc' => 'tagger.gettags.sort_desc', 'type' => 'textfield', 'options' => '', 'value' => '{"tag": "asc"}', 'lexicon' => 'tagger:properties', 'area' => '', 'desc_trans' => 'Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"}', 'area_trans' => '', ), ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '/** * TaggerGetTags * * DESCRIPTION * * This Snippet allows you to list tags for resource(s), group(s) and all tags * * PROPERTIES: * * &resources string optional Comma separated list of resources for which will be listed Tags * &parents string optional Comma separated list of parents for which will be listed Tags * &groups string optional Comma separated list of Tagger Groups for which will be listed Tags * &rowTpl string optional Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered * &outTpl string optional Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper * &separator string optional String separator, that will be used for separating Tags * &limit int optional Limit number of returned tag Tags * &offset int optional Offset the output by this number of Tags * &totalPh string optional Placeholder to output the total number of Tags regardless of &limit and &offset * &target int optional An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used * &showUnused int optional If 1 is set, Tags that are not assigned to any Resource will be included to the output as well * &showUnpublished int optional If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well * &showDeleted int optional If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well * &linkCurrentTags int optional If 1 is set, Current Tags will be included in generated URL, default behavior is to generate links to a single tag * &linkOneTagPerGroup int optional If 1 is set, Only one tag will be placed to a group (in the URI tags from same group will swap places); Only available for linkCurrentTags=1; Default: 0 * &contexts string optional If set, will display only tags for resources in given contexts. Contexts can be separated by a comma * &toPlaceholder string optional If set, output will return in placeholder with given name * &sort string optional Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"} * &friendlyURL int optional If set, will be used instead of friendly_urls system setting to generate URL * &linkTagScheme int|string optional Strategy to generate URLs, available values: -1, 0, 1, full, abs, http, https; Default: link_tag_scheme system setting * * USAGE: * * [[!TaggerGetTags? &showUnused=`1`]] * * * @package tagger */ /** @var Tagger $tagger */ $tagger = $modx->getService(\'tagger\',\'Tagger\',$modx->getOption(\'tagger.core_path\',null,$modx->getOption(\'core_path\').\'components/tagger/\').\'model/tagger/\',$scriptProperties); if (!($tagger instanceof Tagger)) return \'\'; $resources = $modx->getOption(\'resources\', $scriptProperties, \'\'); $parents = $modx->getOption(\'parents\', $scriptProperties, \'\'); $groups = $modx->getOption(\'groups\', $scriptProperties, \'\'); $target = (int) $modx->getOption(\'target\', $scriptProperties, $modx->resource->id, true); $showUnused = (int) $modx->getOption(\'showUnused\', $scriptProperties, \'0\'); $showUnpublished = (int) $modx->getOption(\'showUnpublished\', $scriptProperties, \'0\'); $showDeleted = (int) $modx->getOption(\'showDeleted\', $scriptProperties, \'0\'); $linkCurrentTags = (int) $modx->getOption(\'linkCurrentTags\', $scriptProperties, \'0\'); $linkOneTagPerGroup = (int) $modx->getOption(\'linkOneTagPerGroup\', $scriptProperties, \'0\'); $contexts = $modx->getOption(\'contexts\', $scriptProperties, \'\'); $translate = (int) $modx->getOption(\'translate\', $scriptProperties, \'0\'); $defaultRowTpl = $modx->getOption(\'rowTpl\', $scriptProperties, \'\'); $outTpl = $modx->getOption(\'outTpl\', $scriptProperties, \'\'); $wrapIfEmpty = $modx->getOption(\'wrapIfEmpty\', $scriptProperties, 1); $separator = $modx->getOption(\'separator\', $scriptProperties, \'\'); $limit = intval($modx->getOption(\'limit\', $scriptProperties, 0)); $offset = intval($modx->getOption(\'offset\', $scriptProperties, 0)); $totalPh = $modx->getOption(\'totalPh\', $scriptProperties, \'tags_total\'); $weight = (int) $modx->getOption(\'weight\', $scriptProperties, \'0\'); $friendlyURL = (int) $modx->getOption(\'friendlyURL\', $scriptProperties, $modx->getOption(\'friendly_urls\', null, 0)); $linkTagScheme = $modx->getOption(\'linkTagScheme\', $scriptProperties, $modx->getOption(\'link_tag_scheme\', null, -1)); $sort = $modx->getOption(\'sort\', $scriptProperties, \'{}\'); $sort = $modx->fromJSON($sort); if ($sort === null || $sort == \'\' || count($sort) == 0) { $sort = array( \'tag\' => \'ASC\' ); } $resources = $tagger->explodeAndClean($resources); $parents = $tagger->explodeAndClean($parents); $groups = $tagger->explodeAndClean($groups); $contexts = $tagger->explodeAndClean($contexts); $toPlaceholder = $modx->getOption(\'toPlaceholder\', $scriptProperties, \'\'); $c = $modx->newQuery(\'TaggerTag\'); $c->leftJoin(\'TaggerTagResource\', \'Resources\'); $c->leftJoin(\'TaggerGroup\', \'Group\'); $c->leftJoin(\'modResource\', \'Resource\', array(\'Resources.resource = Resource.id\')); if (!empty($parents)) { $c->where(array( \'Resource.parent:IN\' => $parents, )); } if (!empty($contexts)) { $c->where(array( \'Resource.context_key:IN\' => $contexts, )); } if ($showUnpublished == 0) { $c->where(array( \'Resource.published\' => 1, \'OR:Resource.published:IN\' => null, )); } if ($showDeleted == 0) { $c->where(array( \'Resource.deleted\' => 0, \'OR:Resource.deleted:IS\' => null, )); } if ($showUnused == 0) { $c->having(array( \'cnt > 0\', )); } if (!empty($resources)) { $c->where(array( \'Resources.resource:IN\' => $resources )); } if ($groups) { $c->where(array( \'Group.id:IN\' => $groups, \'OR:Group.name:IN\' => $groups, \'OR:Group.alias:IN\' => $groups, )); } $c->select($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\')); $c->select($modx->getSelectColumns(\'TaggerGroup\', \'Group\', \'group_\')); $c->select(array(\'cnt\' => \'COUNT(Resources.tag)\')); $c->groupby($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\') . \',\' . $modx->getSelectColumns(\'TaggerGroup\', \'Group\')); $c->prepare(); $countQuery = new xPDOCriteria($modx, "SELECT COUNT(*) as total, MAX(cnt) as max_cnt FROM ({$c->toSQL(false)}) cq", $c->bindings, $c->cacheFlag); $stmt = $countQuery->prepare(); if ($stmt && $stmt->execute()) { $fetchedData = $stmt->fetch(PDO::FETCH_ASSOC); $total = intval($fetchedData[\'total\']); $maxCnt = intval($fetchedData[\'max_cnt\']); } else { $total = 0; $maxCnt = 0; } $modx->setPlaceholder($totalPh, $total); foreach ($sort as $field => $dir) { $dir = (strtolower($dir) == \'asc\') ? \'asc\' : \'desc\'; $c->sortby($field, $dir); } $c->limit($limit, $offset); $tags = $modx->getIterator(\'TaggerTag\', $c); $out = array(); // prep for &tpl_N $keys = array_keys($scriptProperties); $nthTpls = array(); foreach($keys as $key) { $keyBits = $tagger->explodeAndClean($key, \'_\'); if (isset($keyBits[0]) && $keyBits[0] === \'tpl\') { if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key]; } } ksort($nthTpls); $idx = 1; $currentTags = $tagger->getCurrentTags(); $currentTagsLink = array(); if ($linkCurrentTags == 1) { foreach($currentTags as $currentTag) { $currentTagsLink[$currentTag[\'alias\']] = array_keys($currentTag[\'tags\']); } } foreach ($tags as $tag) { /** @var TaggerTag $tag */ $phs = $tag->toArray(); $group = $tag->Group; if (($linkOneTagPerGroup === 1) && $currentTagsLink[$group->alias]) { $linkData = $currentTagsLink; if (!in_array($tag->alias, $linkData[$group->alias])) { $linkData[$group->alias] = array($tag->alias); } else { $linkData[$group->alias] = array(); } } else { $linkData = array_merge_recursive($currentTagsLink, array( $group->alias => array($tag->alias) )); } $linkData = array_filter(array_map(function($data) { return array_filter($data, function($value) use ($data) { return !(array_count_values($data)[$value] > 1); }); }, $linkData)); if ($friendlyURL == 1) { $linkPath = array_reduce(array_keys($linkData), function($carry, $item) use ($linkData) { return $carry . $item . \'/\' . implode(\'/\', array_unique($linkData[$item])) . \'/\'; }, \'\'); $uri = rtrim($modx->makeUrl($target, \'\', \'\', $linkTagScheme), \'/\') . \'/\' . $linkPath; } else { $linkPath = http_build_query( array_map(function($values) { return is_array($values) ? implode(\',\', array_unique($values)) : $values; }, $linkData) ); $uri = $modx->makeUrl($target, \'\', $linkPath, $linkTagScheme); } $phs[\'uri\'] = $uri; $phs[\'idx\'] = $idx; $phs[\'target\'] = $target; $phs[\'max_cnt\'] = $maxCnt; if (isset($currentTags[$group->alias][\'tags\'][$tag->alias])) { $phs[\'active\'] = 1; } else { $phs[\'active\'] = 0; } if ($weight > 0) { $phs[\'weight\'] = intval(ceil($phs[\'cnt\'] / ($maxCnt / $weight))); } if ($translate == 1) { $groupNameTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\']); $groupDescriptionTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\'); $phs[\'group_name_translated\'] = ($groupNameTranslated == \'tagger.custom.\' . $phs[\'group_alias\']) ? $phs[\'group_name\'] : $groupNameTranslated; $phs[\'group_description_translated\'] = ($groupDescriptionTranslated == \'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\') ? $phs[\'group_description\'] : $groupDescriptionTranslated; } $rowTpl = $defaultRowTpl; $phs[\'sp\'] = $scriptProperties; if ($rowTpl == \'\') { $out[] = \'
    \' . print_r($phs, true) . \'
    \'; } else { if (isset($nthTpls[$idx])) { $rowTpl = $nthTpls[$idx]; } else { foreach ($nthTpls as $int => $tpl) { if ( ($idx % $int) === 0 ) $rowTpl = $tpl; } } $out[] = $tagger->getChunk($rowTpl, $phs); } $idx++; } $out = implode($separator, $out); if ($outTpl != \'\') { if (!empty($out) || $wrapIfEmpty) { $noActiveTags = (int)(count($currentTags) === 0); $out = $tagger->getChunk($outTpl, array(\'tags\' => $out, \'sp\' => $scriptProperties, \'noActiveTags\' => $noActiveTags)); } } if (!empty($toPlaceholder)) { $modx->setPlaceholder($toPlaceholder, $out); return \'\'; } return $out;', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'Login' => array ( 'fields' => array ( 'id' => 57, 'source' => 0, 'property_preprocess' => false, 'name' => 'Login', 'description' => 'Displays a login and logout form.', 'editor_type' => 0, 'category' => 21, 'cache_type' => 0, 'snippet' => '/** * Login * * Copyright 2010 by Jason Coward and Shaun McCormick * * * Login 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. * * Login 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 * Login; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @package login */ /** * MODx Login Snippet * * This snippet handles login POSTs, sending the user back to where they came from or to a specific * location if specified in the POST. * * @package login * * @property textfield actionKey The REQUEST variable containing the action to take. * @property textfield loginKey The actionKey for login. * @property textfield logoutKey The actionKey for logout. * @property boolean loginViaEmail Enable login via username or email address (either one!) [default: false] * @property list tplType The type of template to expect for the views: * modChunk - name of chunk to use * file - full path to file to use as tpl * embedded - the tpl is embedded in the page content * inline - the tpl is inline content provided directly * @property textfield loginTpl The template for the login view (content based on tplType) * @property textfield logoutTpl The template for the logout view (content based on tplType) * @property textfield errTpl The template for any errors that occur when processing an view * @property list errTplType The type of template to expect for the error messages: * modChunk - name of chunk to use * file - full path to file to use as tpl * inline - the tpl is inline content provided directly * @property integer logoutResourceId An explicit resource id to redirect users to on logout * @property string loginMsg The string to use for the login action. Defaults to * the lexicon string "login". * @property string logoutMsg The string to use for the logout action. Defaults * to the lexicon string "login.logout" */ require_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\'; $login = new Login($modx,$scriptProperties); if (!is_object($login) || !($login instanceof Login)) return \'\'; $controller = $login->loadController(\'Login\'); $output = $controller->run($scriptProperties); return $output;', 'locked' => false, 'properties' => array ( 'actionKey' => array ( 'name' => 'actionKey', 'desc' => 'prop_login.actionkey_desc', 'type' => 'textfield', 'options' => '', 'value' => 'service', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The REQUEST variable that indicates what action to take.', 'area_trans' => '', ), 'loginKey' => array ( 'name' => 'loginKey', 'desc' => 'prop_login.loginkey_desc', 'type' => 'textfield', 'options' => '', 'value' => 'login', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The login action key.', 'area_trans' => '', ), 'logoutKey' => array ( 'name' => 'logoutKey', 'desc' => 'prop_login.logoutkey_desc', 'type' => 'textfield', 'options' => '', 'value' => 'logout', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The logout action key.', 'area_trans' => '', ), 'loginViaEmail' => array ( 'name' => 'loginViaEmail', 'desc' => 'prop_login.loginviaemail_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'Enable login via username or email address.', 'area_trans' => '', ), 'tplType' => array ( 'name' => 'tplType', 'desc' => 'prop_login.tpltype_desc', 'type' => 'list', 'options' => array ( 0 => array ( 'value' => 'modChunk', 'text' => 'opt_register.chunk', 'name' => 'Chunk', ), 1 => array ( 'value' => 'file', 'text' => 'opt_register.file', 'name' => 'File', ), 2 => array ( 'value' => 'inline', 'text' => 'opt_register.inline', 'name' => 'Inline', ), 3 => array ( 'value' => 'embedded', 'text' => 'opt_register.embedded', 'name' => 'Embedded', ), ), 'value' => 'modChunk', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The type of tpls being provided for the login and logout forms.', 'area_trans' => '', ), 'loginTpl' => array ( 'name' => 'loginTpl', 'desc' => 'prop_login.logintpl_desc', 'type' => 'textfield', 'options' => '', 'value' => 'lgnLoginTpl', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The login form tpl.', 'area_trans' => '', ), 'logoutTpl' => array ( 'name' => 'logoutTpl', 'desc' => 'prop_login.logouttpl_desc', 'type' => 'textfield', 'options' => '', 'value' => 'lgnLogoutTpl', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The logout tpl.', 'area_trans' => '', ), 'preHooks' => array ( 'name' => 'preHooks', 'desc' => 'prop_login.prehooks_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'What scripts to fire, if any, before the user is logged in or out. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.', 'area_trans' => '', ), 'postHooks' => array ( 'name' => 'postHooks', 'desc' => 'prop_login.posthooks_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'What scripts to fire, if any, after the user has been logged in or out. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.', 'area_trans' => '', ), 'errTpl' => array ( 'name' => 'errTpl', 'desc' => 'prop_login.errtpl_desc', 'type' => 'textfield', 'options' => '', 'value' => 'lgnErrTpl', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The error tpl.', 'area_trans' => '', ), 'errTplType' => array ( 'name' => 'errTplType', 'desc' => 'prop_login.errtpltype_desc', 'type' => 'list', 'options' => array ( 0 => array ( 'value' => 'modChunk', 'text' => 'opt_register.chunk', 'name' => 'Chunk', ), 1 => array ( 'value' => 'file', 'text' => 'opt_register.file', 'name' => 'File', ), 2 => array ( 'value' => 'inline', 'text' => 'opt_register.inline', 'name' => 'Inline', ), 3 => array ( 'value' => 'embedded', 'text' => 'opt_register.embedded', 'name' => 'Embedded', ), ), 'value' => 'modChunk', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The type of error tpl.', 'area_trans' => '', ), 'loginResourceId' => array ( 'name' => 'loginResourceId', 'desc' => 'prop_login.loginresourceid_desc', 'type' => 'textfield', 'options' => '', 'value' => '0', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'The resource to direct users to on successful login. 0 will redirect to self.', 'area_trans' => '', ), 'loginResourceParams' => array ( 'name' => 'loginResourceParams', 'desc' => 'prop_login.loginresourceparams_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'A JSON object of parameters to append to the login redirection URL. Ex: {"test":123}', 'area_trans' => '', ), 'logoutResourceId' => array ( 'name' => 'logoutResourceId', 'desc' => 'prop_login.logoutresourceid_desc', 'type' => 'textfield', 'options' => '', 'value' => '0', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'Resource ID to redirect to on successful logout. 0 will redirect to self.', 'area_trans' => '', ), 'logoutResourceParams' => array ( 'name' => 'logoutResourceParams', 'desc' => 'prop_login.logoutresourceparams_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'A JSON object of parameters to append to the logout redirection URL. Ex: {"test":123}', 'area_trans' => '', ), 'loginMsg' => array ( 'name' => 'loginMsg', 'desc' => 'prop_login.loginmsg_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'Optional label message for login action. If blank, will default to lexicon string for Login.', 'area_trans' => '', ), 'logoutMsg' => array ( 'name' => 'logoutMsg', 'desc' => 'prop_login.logoutmsg_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'Optional label message for logout action. If blank, will default to lexicon string for Logout.', 'area_trans' => '', ), 'redirectToPrior' => array ( 'name' => 'redirectToPrior', 'desc' => 'prop_login.redirecttoprior_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'If true, will redirect to the referring page (HTTP_REFERER) on successful login.', 'area_trans' => '', ), 'redirectToOnFailedAuth' => array ( 'name' => 'redirectToOnFailedAuth', 'desc' => 'prop_login.redirecttoonfailedauth_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'If set to a non-zero number, will redirect the user to this page if their attempt to login is unsuccessful.', 'area_trans' => '', ), 'rememberMeKey' => array ( 'name' => 'rememberMeKey', 'desc' => 'prop_login.remembermekey_desc', 'type' => 'textfield', 'options' => '', 'value' => 'rememberme', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'prop_login.remembermekey_desc', 'area_trans' => '', ), 'contexts' => array ( 'name' => 'contexts', 'desc' => 'prop_login.contexts_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => '(Experimental) A comma-separated list of contexts to log in to. Defaults to the current context if not explicitly set.', 'area_trans' => '', ), 'toPlaceholder' => array ( 'name' => 'toPlaceholder', 'desc' => 'prop_login.toplaceholder_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'If set, will set the output of the login snippet to a placeholder of this name rather than directly outputting the return contents.', 'area_trans' => '', ), 'recaptchaTheme' => array ( 'name' => 'recaptchaTheme', 'desc' => 'prop_register.recaptchatheme_desc', 'type' => 'list', 'options' => array ( 0 => array ( 'value' => 'red', 'text' => 'opt_register.red', 'name' => 'Red', ), 1 => array ( 'value' => 'white', 'text' => 'opt_register.white', 'name' => 'White', ), 2 => array ( 'value' => 'clean', 'text' => 'opt_register.clean', 'name' => 'Clean', ), 3 => array ( 'value' => 'blackglass', 'text' => 'opt_register.blackglass', 'name' => 'Black Glass', ), ), 'value' => 'clean', 'lexicon' => 'login:properties', 'area' => '', 'desc_trans' => 'If `recaptcha` is set as a preHook, this will select a theme for the reCaptcha widget.', 'area_trans' => '', ), ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '/** * Login * * Copyright 2010 by Jason Coward and Shaun McCormick * * * Login 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. * * Login 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 * Login; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @package login */ /** * MODx Login Snippet * * This snippet handles login POSTs, sending the user back to where they came from or to a specific * location if specified in the POST. * * @package login * * @property textfield actionKey The REQUEST variable containing the action to take. * @property textfield loginKey The actionKey for login. * @property textfield logoutKey The actionKey for logout. * @property boolean loginViaEmail Enable login via username or email address (either one!) [default: false] * @property list tplType The type of template to expect for the views: * modChunk - name of chunk to use * file - full path to file to use as tpl * embedded - the tpl is embedded in the page content * inline - the tpl is inline content provided directly * @property textfield loginTpl The template for the login view (content based on tplType) * @property textfield logoutTpl The template for the logout view (content based on tplType) * @property textfield errTpl The template for any errors that occur when processing an view * @property list errTplType The type of template to expect for the error messages: * modChunk - name of chunk to use * file - full path to file to use as tpl * inline - the tpl is inline content provided directly * @property integer logoutResourceId An explicit resource id to redirect users to on logout * @property string loginMsg The string to use for the login action. Defaults to * the lexicon string "login". * @property string logoutMsg The string to use for the logout action. Defaults * to the lexicon string "login.logout" */ require_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\'; $login = new Login($modx,$scriptProperties); if (!is_object($login) || !($login instanceof Login)) return \'\'; $controller = $login->loadController(\'Login\'); $output = $controller->run($scriptProperties); return $output;', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'SimpleSearchForm' => array ( 'fields' => array ( 'id' => 111, 'source' => 0, 'property_preprocess' => false, 'name' => 'SimpleSearchForm', 'description' => '', 'editor_type' => 0, 'category' => 40, 'cache_type' => 0, 'snippet' => '/** * Show the search form * * @var modX $modx * @var array $scriptProperties * @package simplesearch */ require_once $modx->getOption( \'simplesearch.core_path\', null, $modx->getOption(\'core_path\') . \'components/simplesearch/\' ) . \'model/simplesearch/simplesearch.class.php\'; $search = new SimpleSearch($modx, $scriptProperties); /* Setup default options. */ $scriptProperties = array_merge( array( \'tpl\' => \'SearchForm\', \'method\' => \'get\', \'searchIndex\' => \'search\', \'toPlaceholder\' => false, \'landing\' => $modx->resource->get(\'id\'), ), $scriptProperties); if (empty($scriptProperties[\'landing\'])) { $scriptProperties[\'landing\'] = $modx->resource->get(\'id\'); } /* If get value already exists, set it as default. */ $searchValue = isset($_REQUEST[$scriptProperties[\'searchIndex\']]) ? $_REQUEST[$scriptProperties[\'searchIndex\']] : \'\'; $searchValues = explode(\' \', $searchValue); array_map(array($modx, \'sanitizeString\'), $searchValues); $searchValue = implode(\' \', $searchValues); $placeholders = array( \'method\' => $scriptProperties[\'method\'], \'landing\' => $scriptProperties[\'landing\'], \'searchValue\' => strip_tags(htmlspecialchars($searchValue, ENT_QUOTES, \'UTF-8\')), \'searchIndex\' => $scriptProperties[\'searchIndex\'], ); $output = $search->getChunk($scriptProperties[\'tpl\'], $placeholders); return $search->output($output, $scriptProperties[\'toPlaceholder\']);', 'locked' => false, 'properties' => array ( 'tpl' => array ( 'name' => 'tpl', 'desc' => 'simplesearch.tpl_form_desc', 'type' => 'textfield', 'options' => '', 'value' => 'SearchForm', 'lexicon' => 'simplesearch:properties', 'area' => '', 'desc_trans' => 'The chunk that will be used to display the search form.', 'area_trans' => '', ), 'landing' => array ( 'name' => 'landing', 'desc' => 'simplesearch.landing_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'simplesearch:properties', 'area' => '', 'desc_trans' => 'The Resource that the SimpleSearch snippet is called on, that will display the results of the search.', 'area_trans' => '', ), 'searchIndex' => array ( 'name' => 'searchIndex', 'desc' => 'simplesearch.searchindex_desc', 'type' => 'textfield', 'options' => '', 'value' => 'search', 'lexicon' => 'simplesearch:properties', 'area' => '', 'desc_trans' => 'The name of the REQUEST parameter that the search will use.', 'area_trans' => '', ), 'method' => array ( 'name' => 'method', 'desc' => 'simplesearch.method_desc', 'type' => 'combo-boolean', 'options' => array ( 0 => array ( 'text' => 'simplesearch.get', 'value' => 'get', 'name' => 'get', ), 1 => array ( 'text' => 'simplesearch.post', 'value' => 'post', 'name' => 'post', ), ), 'value' => 'get', 'lexicon' => 'simplesearch:properties', 'area' => '', 'desc_trans' => 'Whether to send the search over POST or GET.', 'area_trans' => '', ), 'toPlaceholder' => array ( 'name' => 'toPlaceholder', 'desc' => 'simplesearch.toplaceholder_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'simplesearch:properties', 'area' => '', 'desc_trans' => 'Whether to set the output to directly return, or set to a placeholder with this propertys name.', 'area_trans' => '', ), ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '/** * Show the search form * * @var modX $modx * @var array $scriptProperties * @package simplesearch */ require_once $modx->getOption( \'simplesearch.core_path\', null, $modx->getOption(\'core_path\') . \'components/simplesearch/\' ) . \'model/simplesearch/simplesearch.class.php\'; $search = new SimpleSearch($modx, $scriptProperties); /* Setup default options. */ $scriptProperties = array_merge( array( \'tpl\' => \'SearchForm\', \'method\' => \'get\', \'searchIndex\' => \'search\', \'toPlaceholder\' => false, \'landing\' => $modx->resource->get(\'id\'), ), $scriptProperties); if (empty($scriptProperties[\'landing\'])) { $scriptProperties[\'landing\'] = $modx->resource->get(\'id\'); } /* If get value already exists, set it as default. */ $searchValue = isset($_REQUEST[$scriptProperties[\'searchIndex\']]) ? $_REQUEST[$scriptProperties[\'searchIndex\']] : \'\'; $searchValues = explode(\' \', $searchValue); array_map(array($modx, \'sanitizeString\'), $searchValues); $searchValue = implode(\' \', $searchValues); $placeholders = array( \'method\' => $scriptProperties[\'method\'], \'landing\' => $scriptProperties[\'landing\'], \'searchValue\' => strip_tags(htmlspecialchars($searchValue, ENT_QUOTES, \'UTF-8\')), \'searchIndex\' => $scriptProperties[\'searchIndex\'], ); $output = $search->getChunk($scriptProperties[\'tpl\'], $placeholders); return $search->output($output, $scriptProperties[\'toPlaceholder\']);', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'FormIt' => array ( 'fields' => array ( 'id' => 16, 'source' => 0, 'property_preprocess' => false, 'name' => 'FormIt', 'description' => 'A dynamic form processing snippet.', 'editor_type' => 0, 'category' => 8, 'cache_type' => 0, 'snippet' => '/** * FormIt * * Copyright 2009-2012 by Shaun McCormick * * FormIt 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. * * FormIt 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 * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place, * Suite 330, Boston, MA 02111-1307 USA * * @package formit */ /** * FormIt * * A dynamic form processing Snippet for MODx Revolution. * * @var modX $modx * @var array $scriptProperties * * @package formit */ $modelPath = $modx->getOption( \'formit.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/formit/\' ) . \'model/formit/\'; $modx->loadClass(\'FormIt\', $modelPath, true, true); $fi = new FormIt($modx, $scriptProperties); $fi->initialize($modx->context->get(\'key\')); $fi->loadRequest(); $fields = $fi->request->prepare(); return $fi->request->handle($fields);', 'locked' => false, 'properties' => array ( 'hooks' => array ( 'name' => 'hooks', 'desc' => 'prop_formit.hooks_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'What scripts to fire, if any, after the form passes validation. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.', 'area_trans' => '', ), 'preHooks' => array ( 'name' => 'preHooks', 'desc' => 'prop_formit.prehooks_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'What scripts to fire, if any, once the form loads. You can pre-set form fields via $scriptProperties[`hook`]->fields[`fieldname`]. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.', 'area_trans' => '', ), 'submitVar' => array ( 'name' => 'submitVar', 'desc' => 'prop_formit.submitvar_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If set, will not begin form processing if this POST variable is not passed.', 'area_trans' => '', ), 'validate' => array ( 'name' => 'validate', 'desc' => 'prop_formit.validate_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'A comma-separated list of fields to validate, with each field name as name:validator (eg: username:required,email:required). Validators can also be chained, like email:email:required. This property can be specified on multiple lines.', 'area_trans' => '', ), 'errTpl' => array ( 'name' => 'errTpl', 'desc' => 'prop_formit.errtpl_desc', 'type' => 'textfield', 'options' => '', 'value' => '[[+error]]', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'The wrapper template for error messages.', 'area_trans' => '', ), 'validationErrorMessage' => array ( 'name' => 'validationErrorMessage', 'desc' => 'prop_formit.validationerrormessage_desc', 'type' => 'textfield', 'options' => '', 'value' => '

    A form validation error occurred. Please check the values you have entered.

    ', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'A general error message to set to a placeholder if validation fails. Can contain [[+errors]] if you want to display a list of all errors at the top.', 'area_trans' => '', ), 'validationErrorBulkTpl' => array ( 'name' => 'validationErrorBulkTpl', 'desc' => 'prop_formit.validationerrorbulktpl_desc', 'type' => 'textfield', 'options' => '', 'value' => '
  • [[+error]]
  • ', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'HTML tpl that is used for each individual error in the generic validation error message value.', 'area_trans' => '', ), 'trimValuesBeforeValidation' => array ( 'name' => 'trimValuesBeforeValidation', 'desc' => 'prop_formit.trimvaluesdeforevalidation_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Whether or not to trim spaces from the beginning and end of values before attempting validation. Defaults to true.', 'area_trans' => '', ), 'customValidators' => array ( 'name' => 'customValidators', 'desc' => 'prop_formit.customvalidators_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'A comma-separated list of custom validator names (snippets) you plan to use in this form. They must be explicitly stated here, or they will not be run.', 'area_trans' => '', ), 'clearFieldsOnSuccess' => array ( 'name' => 'clearFieldsOnSuccess', 'desc' => 'prop_formit.clearfieldsonsuccess_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If true, will clear the fields on a successful form submission that does not redirect.', 'area_trans' => '', ), 'successMessage' => array ( 'name' => 'successMessage', 'desc' => 'prop_formit.successmessage_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If set, will set this a placeholder with the name of the value of the property &successMessagePlaceholder, which defaults to `fi.successMessage`.', 'area_trans' => '', ), 'successMessagePlaceholder' => array ( 'name' => 'successMessagePlaceholder', 'desc' => 'prop_formit.successmessageplaceholder_desc', 'type' => 'textfield', 'options' => '', 'value' => 'fi.successMessage', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'The placeholder to set the success message to.', 'area_trans' => '', ), 'store' => array ( 'name' => 'store', 'desc' => 'prop_formit.store_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If true, will store the data in the cache for retrieval using the FormItRetriever snippet.', 'area_trans' => '', ), 'placeholderPrefix' => array ( 'name' => 'placeholderPrefix', 'desc' => 'prop_formit.placeholderprefix_desc', 'type' => 'textfield', 'options' => '', 'value' => 'fi.', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'The prefix to use for all placeholders set by FormIt for fields. Defaults to `fi.`', 'area_trans' => '', ), 'storeTime' => array ( 'name' => 'storeTime', 'desc' => 'prop_formit.storetime_desc', 'type' => 'textfield', 'options' => '', 'value' => '300', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `store` is set to true, this specifies the number of seconds to store the data from the form submission. Defaults to five minutes.', 'area_trans' => '', ), 'storeLocation' => array ( 'name' => 'storeLocation', 'desc' => 'prop_formit.storelocation_desc', 'type' => 'list', 'options' => array ( 0 => array ( 'value' => 'cache', 'text' => 'formit.opt_cache', 'name' => 'MODX Cache', ), 1 => array ( 'value' => 'session', 'text' => 'formit.opt_session', 'name' => 'Session', ), ), 'value' => 'cache', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `store` is set to true, this specifies the cache location of the data from the form submission. Defaults to MODX cache.', 'area_trans' => '', ), 'allowFiles' => array ( 'name' => 'allowFiles', 'desc' => 'prop_formit.allowfiles_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If set to 0, will prevent files from being submitted on the form.', 'area_trans' => '', ), 'spamEmailFields' => array ( 'name' => 'spamEmailFields', 'desc' => 'prop_formit.spamemailfields_desc', 'type' => 'textfield', 'options' => '', 'value' => 'email', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `spam` is set as a hook, a comma-separated list of fields containing emails to check spam against.', 'area_trans' => '', ), 'spamCheckIp' => array ( 'name' => 'spamCheckIp', 'desc' => 'prop_formit.spamcheckip_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `spam` is set as a hook, and this is true, will check the IP as well.', 'area_trans' => '', ), 'recaptchaJs' => array ( 'name' => 'recaptchaJs', 'desc' => 'prop_formit.recaptchajs_desc', 'type' => 'textfield', 'options' => '', 'value' => '{}', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `recaptcha` is set as a hook, this can be a JSON object that will be set to the JS RecaptchaOptions variable, which configures options for reCaptcha.', 'area_trans' => '', ), 'recaptchaTheme' => array ( 'name' => 'recaptchaTheme', 'desc' => 'prop_formit.recaptchatheme_desc', 'type' => 'list', 'options' => array ( 0 => array ( 'value' => 'red', 'text' => 'formit.opt_red', 'name' => 'Red', ), 1 => array ( 'value' => 'white', 'text' => 'formit.opt_white', 'name' => 'White', ), 2 => array ( 'value' => 'clean', 'text' => 'formit.opt_clean', 'name' => 'Clean', ), 3 => array ( 'value' => 'blackglass', 'text' => 'formit.opt_blackglass', 'name' => 'Black Glass', ), ), 'value' => 'clean', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `recaptcha` is set as a hook, this will select a theme for the reCaptcha widget.', 'area_trans' => '', ), 'redirectTo' => array ( 'name' => 'redirectTo', 'desc' => 'prop_formit.redirectto_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `redirect` is set as a hook, this must specify the Resource ID to redirect to.', 'area_trans' => '', ), 'redirectParams' => array ( 'name' => 'redirectParams', 'desc' => 'prop_formit.redirectparams_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'A JSON array of parameters to pass to the redirect hook that will be passed when redirecting.', 'area_trans' => '', ), 'emailTo' => array ( 'name' => 'emailTo', 'desc' => 'prop_formit.emailto_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to. Can be a comma-separated list of email addresses.', 'area_trans' => '', ), 'emailToName' => array ( 'name' => 'emailToName', 'desc' => 'prop_formit.emailtoname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailTo` property.', 'area_trans' => '', ), 'emailFrom' => array ( 'name' => 'emailFrom', 'desc' => 'prop_formit.emailfrom_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the From: address for the email. If not set, will first look for an `email` form field. If none is found, will default to the `emailsender` system setting.', 'area_trans' => '', ), 'emailFromName' => array ( 'name' => 'emailFromName', 'desc' => 'prop_formit.emailfromname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the From: name for the email.', 'area_trans' => '', ), 'emailReplyTo' => array ( 'name' => 'emailReplyTo', 'desc' => 'prop_formit.emailreplyto_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Reply-To: address for the email.', 'area_trans' => '', ), 'emailReplyToName' => array ( 'name' => 'emailReplyToName', 'desc' => 'prop_formit.emailreplytoname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Reply-To: name for the email.', 'area_trans' => '', ), 'emailCC' => array ( 'name' => 'emailCC', 'desc' => 'prop_formit.emailcc_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to as a CC. Can be a comma-separated list of email addresses.', 'area_trans' => '', ), 'emailCCName' => array ( 'name' => 'emailCCName', 'desc' => 'prop_formit.emailccname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailCC` property.', 'area_trans' => '', ), 'emailBCC' => array ( 'name' => 'emailBCC', 'desc' => 'prop_formit.emailbcc_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to as a BCC. Can be a comma-separated list of email addresses.', 'area_trans' => '', ), 'emailBCCName' => array ( 'name' => 'emailBCCName', 'desc' => 'prop_formit.emailbccname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailBCC` property.', 'area_trans' => '', ), 'emailReturnPath' => array ( 'name' => 'emailReturnPath', 'desc' => 'prop_formit.emailreturnpath_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Return-path: address for the email. If not set, will take the value of `emailFrom` property.', 'area_trans' => '', ), 'emailSubject' => array ( 'name' => 'emailSubject', 'desc' => 'prop_formit.emailsubject_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If `email` is set as a hook, this is required as a subject line for the email.', 'area_trans' => '', ), 'emailUseFieldForSubject' => array ( 'name' => 'emailUseFieldForSubject', 'desc' => 'prop_formit.emailusefieldforsubject_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If the field `subject` is passed into the form, if this is true, it will use the field content for the subject line of the email.', 'area_trans' => '', ), 'emailHtml' => array ( 'name' => 'emailHtml', 'desc' => 'prop_formit.emailhtml_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `email` is set as a hook, this toggles HTML emails or not. Defaults to true.', 'area_trans' => '', ), 'emailConvertNewlines' => array ( 'name' => 'emailConvertNewlines', 'desc' => 'prop_formit.emailconvertnewlines_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If true and emailHtml is set to 1, will convert newlines to BR tags in the email.', 'area_trans' => '', ), 'emailMultiWrapper' => array ( 'name' => 'emailMultiWrapper', 'desc' => 'prop_formit.emailmultiwrapper_desc', 'type' => 'textfield', 'options' => '', 'value' => '[[+value]]', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Will wrap each item in a collection of fields sent via checkboxes/multi-selects. Defaults to just the value.', 'area_trans' => '', ), 'emailMultiSeparator' => array ( 'name' => 'emailMultiSeparator', 'desc' => 'prop_formit.emailmultiseparator_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'The default separator for collections of items sent through checkboxes/multi-selects. Defaults to a newline.', 'area_trans' => '', ), 'fiarTpl' => array ( 'name' => 'fiarTpl', 'desc' => 'prop_formit.fiartpl_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiartpl_desc', 'area_trans' => '', ), 'fiarToField' => array ( 'name' => 'fiarToField', 'desc' => 'prop_formit.fiartofield_desc', 'type' => 'textfield', 'options' => '', 'value' => 'email', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiartofield_desc', 'area_trans' => '', ), 'fiarSubject' => array ( 'name' => 'fiarSubject', 'desc' => 'prop_formit.fiarsubject_desc', 'type' => 'textfield', 'options' => '', 'value' => '[[++site_name]] Auto-Responder', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarsubject_desc', 'area_trans' => '', ), 'fiarFrom' => array ( 'name' => 'fiarFrom', 'desc' => 'prop_formit.fiarfrom_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarfrom_desc', 'area_trans' => '', ), 'fiarFromName' => array ( 'name' => 'fiarFromName', 'desc' => 'prop_formit.fiarfromname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarfromname_desc', 'area_trans' => '', ), 'fiarReplyTo' => array ( 'name' => 'fiarReplyTo', 'desc' => 'prop_formit.fiarreplyto_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarreplyto_desc', 'area_trans' => '', ), 'fiarReplyToName' => array ( 'name' => 'fiarReplyToName', 'desc' => 'prop_formit.fiarreplytoname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarreplytoname_desc', 'area_trans' => '', ), 'fiarCC' => array ( 'name' => 'fiarCC', 'desc' => 'prop_formit.fiarcc_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarcc_desc', 'area_trans' => '', ), 'fiarCCName' => array ( 'name' => 'fiarCCName', 'desc' => 'prop_fiar.fiarccname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'Optional. If `FormItAutoResponder` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailCC` property.', 'area_trans' => '', ), 'fiarBCC' => array ( 'name' => 'fiarBCC', 'desc' => 'prop_formit.fiarbcc_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarbcc_desc', 'area_trans' => '', ), 'fiarBCCName' => array ( 'name' => 'fiarBCCName', 'desc' => 'prop_formit.fiarbccname_desc', 'type' => 'textfield', 'options' => '', 'value' => '', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarbccname_desc', 'area_trans' => '', ), 'fiarHtml' => array ( 'name' => 'fiarHtml', 'desc' => 'prop_formit.fiarhtml_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.fiarhtml_desc', 'area_trans' => '', ), 'mathMinRange' => array ( 'name' => 'mathMinRange', 'desc' => 'prop_formit.mathminrange_desc', 'type' => 'textfield', 'options' => '', 'value' => '10', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathminrange_desc', 'area_trans' => '', ), 'mathMaxRange' => array ( 'name' => 'mathMaxRange', 'desc' => 'prop_formit.mathmaxrange_desc', 'type' => 'textfield', 'options' => '', 'value' => '100', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathmaxrange_desc', 'area_trans' => '', ), 'mathField' => array ( 'name' => 'mathField', 'desc' => 'prop_formit.mathfield_desc', 'type' => 'textfield', 'options' => '', 'value' => 'math', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathfield_desc', 'area_trans' => '', ), 'mathOp1Field' => array ( 'name' => 'mathOp1Field', 'desc' => 'prop_formit.mathop1field_desc', 'type' => 'textfield', 'options' => '', 'value' => 'op1', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathop1field_desc', 'area_trans' => '', ), 'mathOp2Field' => array ( 'name' => 'mathOp2Field', 'desc' => 'prop_formit.mathop2field_desc', 'type' => 'textfield', 'options' => '', 'value' => 'op2', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathop2field_desc', 'area_trans' => '', ), 'mathOperatorField' => array ( 'name' => 'mathOperatorField', 'desc' => 'prop_formit.mathoperatorfield_desc', 'type' => 'textfield', 'options' => '', 'value' => 'operator', 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.mathoperatorfield_desc', 'area_trans' => '', ), 'saveTmpFiles' => array ( 'name' => 'saveTmpFiles', 'desc' => 'prop_formit.savetmpfiles_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If set to 1, FormIt will store submitted files in a temporary folder.', 'area_trans' => '', ), 'attachFilesToEmail' => array ( 'name' => 'attachFilesToEmail', 'desc' => 'prop_formit.attachfiles_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => true, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'If true, FormIt will add all file fields as attachments in the email.', 'area_trans' => '', ), 'storeAttachments' => array ( 'name' => 'storeAttachments', 'desc' => 'prop_formit.store_attachments_desc', 'type' => 'combo-boolean', 'options' => '', 'value' => false, 'lexicon' => 'formit:properties', 'area' => '', 'desc_trans' => 'prop_formit.store_attachments_desc', 'area_trans' => '', ), ), 'moduleguid' => '', 'static' => false, 'static_file' => '', 'content' => '/** * FormIt * * Copyright 2009-2012 by Shaun McCormick * * FormIt 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. * * FormIt 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 * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place, * Suite 330, Boston, MA 02111-1307 USA * * @package formit */ /** * FormIt * * A dynamic form processing Snippet for MODx Revolution. * * @var modX $modx * @var array $scriptProperties * * @package formit */ $modelPath = $modx->getOption( \'formit.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/formit/\' ) . \'model/formit/\'; $modx->loadClass(\'FormIt\', $modelPath, true, true); $fi = new FormIt($modx, $scriptProperties); $fi->initialize($modx->context->get(\'key\')); $fi->loadRequest(); $fields = $fi->request->prepare(); return $fi->request->handle($fields);', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), ), 'modTemplateVar' => array ( 'blogit.post_main_image' => array ( 'fields' => array ( 'id' => 5, 'source' => 0, 'property_preprocess' => false, 'type' => 'image', 'name' => 'blogit.post_main_image', 'caption' => 'Main image', 'description' => 'Select the main image to show with this post, leave blank for no image, a re-sized verzion will be shown on the blog post overview.', 'editor_type' => 0, 'category' => 36, 'locked' => false, 'elements' => '', 'rank' => 1, 'display' => 'default', 'default_text' => '', 'properties' => array ( ), 'input_properties' => array ( ), 'output_properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => '', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), 'blogit.post_main_image_alt' => array ( 'fields' => array ( 'id' => 6, 'source' => 0, 'property_preprocess' => false, 'type' => 'text', 'name' => 'blogit.post_main_image_alt', 'caption' => 'Alt text for the main image', 'description' => 'Fill in a description of the image (used mostly for Google).', 'editor_type' => 0, 'category' => 36, 'locked' => false, 'elements' => '', 'rank' => 2, 'display' => 'default', 'default_text' => '', 'properties' => array ( ), 'input_properties' => array ( 'allowBlank' => 'true', 'maxLength' => '', 'minLength' => '', ), 'output_properties' => array ( ), 'static' => false, 'static_file' => '', 'content' => '', ), 'policies' => array ( 'web' => array ( ), ), 'source' => array ( ), ), ), ), );