| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- <?php return array (
- '1cc383388ac3c8cc4eedbce2aa261012' =>
- array (
- 'criteria' =>
- array (
- 'name' => 'ace',
- ),
- 'object' =>
- array (
- 'name' => 'ace',
- 'path' => '{core_path}components/ace/',
- 'assets_path' => '',
- ),
- ),
- '3c16fe99c74968afb67f73442fcc8b37' =>
- array (
- 'criteria' =>
- array (
- 'name' => 'Ace',
- ),
- 'object' =>
- array (
- 'id' => 1,
- 'source' => 0,
- 'property_preprocess' => 0,
- 'name' => 'Ace',
- 'description' => 'Ace code editor plugin for MODx Revolution',
- 'editor_type' => 0,
- 'category' => 0,
- 'cache_type' => 0,
- 'plugincode' => '/**
- * Ace Source Editor Plugin
- *
- * Events: OnManagerPageBeforeRender, OnRichTextEditorRegister, OnSnipFormPrerender,
- * OnTempFormPrerender, OnChunkFormPrerender, OnPluginFormPrerender,
- * OnFileCreateFormPrerender, OnFileEditFormPrerender, OnDocFormPrerender
- *
- * @author Danil Kostin <danya.postfactum(at)gmail.com>
- *
- * @package ace
- *
- * @var array $scriptProperties
- * @var Ace $ace
- */
- if ($modx->event->name == \'OnRichTextEditorRegister\') {
- $modx->event->output(\'Ace\');
- return;
- }
- if ($modx->getOption(\'which_element_editor\', null, \'Ace\') !== \'Ace\') {
- return;
- }
- $ace = $modx->getService(\'ace\', \'Ace\', $modx->getOption(\'ace.core_path\', null, $modx->getOption(\'core_path\').\'components/ace/\').\'model/ace/\');
- $ace->initialize();
- $extensionMap = array(
- \'tpl\' => \'text/x-smarty\',
- \'htm\' => \'text/html\',
- \'html\' => \'text/html\',
- \'css\' => \'text/css\',
- \'scss\' => \'text/x-scss\',
- \'less\' => \'text/x-less\',
- \'svg\' => \'image/svg+xml\',
- \'xml\' => \'application/xml\',
- \'xsl\' => \'application/xml\',
- \'js\' => \'application/javascript\',
- \'json\' => \'application/json\',
- \'php\' => \'application/x-php\',
- \'sql\' => \'text/x-sql\',
- \'md\' => \'text/x-markdown\',
- \'txt\' => \'text/plain\',
- \'twig\' => \'text/x-twig\'
- );
- // Defines wether we should highlight modx tags
- $modxTags = false;
- switch ($modx->event->name) {
- case \'OnSnipFormPrerender\':
- $field = \'modx-snippet-snippet\';
- $mimeType = \'application/x-php\';
- break;
- case \'OnTempFormPrerender\':
- $field = \'modx-template-content\';
- $modxTags = true;
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_parser\'):
- $mimeType = \'text/x-smarty\';
- break;
- default:
- $mimeType = \'text/html\';
- break;
- }
- break;
- case \'OnChunkFormPrerender\':
- $field = \'modx-chunk-snippet\';
- if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {
- $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);
- $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';
- } else {
- $mimeType = \'text/html\';
- }
- $modxTags = true;
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_default\'):
- $mimeType = \'text/x-smarty\';
- break;
- default:
- $mimeType = \'text/html\';
- break;
- }
- break;
- case \'OnPluginFormPrerender\':
- $field = \'modx-plugin-plugincode\';
- $mimeType = \'application/x-php\';
- break;
- case \'OnFileCreateFormPrerender\':
- $field = \'modx-file-content\';
- $mimeType = \'text/plain\';
- break;
- case \'OnFileEditFormPrerender\':
- $field = \'modx-file-content\';
- $extension = pathinfo($scriptProperties[\'file\'], PATHINFO_EXTENSION);
- $mimeType = isset($extensionMap[$extension])
- ? $extensionMap[$extension]
- : \'text/plain\';
- $modxTags = $extension == \'tpl\';
- break;
- case \'OnDocFormPrerender\':
- if (!$modx->controller->resourceArray) {
- return;
- }
- $field = \'ta\';
- $mimeType = $modx->getObject(\'modContentType\', $modx->controller->resourceArray[\'content_type\'])->get(\'mime_type\');
- switch (true) {
- case $mimeType == \'text/html\' && $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $mimeType == \'text/html\' && $modx->getOption(\'pdotools_fenom_parser\'):
- $mimeType = \'text/x-smarty\';
- break;
- }
- if ($modx->getOption(\'use_editor\')){
- $richText = $modx->controller->resourceArray[\'richtext\'];
- $classKey = $modx->controller->resourceArray[\'class_key\'];
- if ($richText || in_array($classKey, array(\'modStaticResource\',\'modSymLink\',\'modWebLink\',\'modXMLRPCResource\'))) {
- $field = false;
- }
- }
- $modxTags = true;
- break;
- default:
- return;
- }
- $modxTags = (int) $modxTags;
- $script = \'\';
- if ($field) {
- $script .= "MODx.ux.Ace.replaceComponent(\'$field\', \'$mimeType\', $modxTags);";
- }
- if ($modx->event->name == \'OnDocFormPrerender\' && !$modx->getOption(\'use_editor\')) {
- $script .= "MODx.ux.Ace.replaceTextAreas(Ext.query(\'.modx-richtext\'));";
- }
- if ($script) {
- $modx->controller->addHtml(\'<script>Ext.onReady(function() {\' . $script . \'});</script>\');
- }',
- 'locked' => 0,
- 'properties' => NULL,
- 'disabled' => 0,
- 'moduleguid' => '',
- 'static' => 0,
- 'static_file' => 'ace/elements/plugins/ace.plugin.php',
- 'content' => '/**
- * Ace Source Editor Plugin
- *
- * Events: OnManagerPageBeforeRender, OnRichTextEditorRegister, OnSnipFormPrerender,
- * OnTempFormPrerender, OnChunkFormPrerender, OnPluginFormPrerender,
- * OnFileCreateFormPrerender, OnFileEditFormPrerender, OnDocFormPrerender
- *
- * @author Danil Kostin <danya.postfactum(at)gmail.com>
- *
- * @package ace
- *
- * @var array $scriptProperties
- * @var Ace $ace
- */
- if ($modx->event->name == \'OnRichTextEditorRegister\') {
- $modx->event->output(\'Ace\');
- return;
- }
- if ($modx->getOption(\'which_element_editor\', null, \'Ace\') !== \'Ace\') {
- return;
- }
- $ace = $modx->getService(\'ace\', \'Ace\', $modx->getOption(\'ace.core_path\', null, $modx->getOption(\'core_path\').\'components/ace/\').\'model/ace/\');
- $ace->initialize();
- $extensionMap = array(
- \'tpl\' => \'text/x-smarty\',
- \'htm\' => \'text/html\',
- \'html\' => \'text/html\',
- \'css\' => \'text/css\',
- \'scss\' => \'text/x-scss\',
- \'less\' => \'text/x-less\',
- \'svg\' => \'image/svg+xml\',
- \'xml\' => \'application/xml\',
- \'xsl\' => \'application/xml\',
- \'js\' => \'application/javascript\',
- \'json\' => \'application/json\',
- \'php\' => \'application/x-php\',
- \'sql\' => \'text/x-sql\',
- \'md\' => \'text/x-markdown\',
- \'txt\' => \'text/plain\',
- \'twig\' => \'text/x-twig\'
- );
- // Defines wether we should highlight modx tags
- $modxTags = false;
- switch ($modx->event->name) {
- case \'OnSnipFormPrerender\':
- $field = \'modx-snippet-snippet\';
- $mimeType = \'application/x-php\';
- break;
- case \'OnTempFormPrerender\':
- $field = \'modx-template-content\';
- $modxTags = true;
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_parser\'):
- $mimeType = \'text/x-smarty\';
- break;
- default:
- $mimeType = \'text/html\';
- break;
- }
- break;
- case \'OnChunkFormPrerender\':
- $field = \'modx-chunk-snippet\';
- if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {
- $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);
- $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';
- } else {
- $mimeType = \'text/html\';
- }
- $modxTags = true;
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_default\'):
- $mimeType = \'text/x-smarty\';
- break;
- default:
- $mimeType = \'text/html\';
- break;
- }
- break;
- case \'OnPluginFormPrerender\':
- $field = \'modx-plugin-plugincode\';
- $mimeType = \'application/x-php\';
- break;
- case \'OnFileCreateFormPrerender\':
- $field = \'modx-file-content\';
- $mimeType = \'text/plain\';
- break;
- case \'OnFileEditFormPrerender\':
- $field = \'modx-file-content\';
- $extension = pathinfo($scriptProperties[\'file\'], PATHINFO_EXTENSION);
- $mimeType = isset($extensionMap[$extension])
- ? $extensionMap[$extension]
- : \'text/plain\';
- $modxTags = $extension == \'tpl\';
- break;
- case \'OnDocFormPrerender\':
- if (!$modx->controller->resourceArray) {
- return;
- }
- $field = \'ta\';
- $mimeType = $modx->getObject(\'modContentType\', $modx->controller->resourceArray[\'content_type\'])->get(\'mime_type\');
- switch (true) {
- case $mimeType == \'text/html\' && $modx->getOption(\'twiggy_class\'):
- $mimeType = \'text/x-twig\';
- break;
- case $mimeType == \'text/html\' && $modx->getOption(\'pdotools_fenom_parser\'):
- $mimeType = \'text/x-smarty\';
- break;
- }
- if ($modx->getOption(\'use_editor\')){
- $richText = $modx->controller->resourceArray[\'richtext\'];
- $classKey = $modx->controller->resourceArray[\'class_key\'];
- if ($richText || in_array($classKey, array(\'modStaticResource\',\'modSymLink\',\'modWebLink\',\'modXMLRPCResource\'))) {
- $field = false;
- }
- }
- $modxTags = true;
- break;
- default:
- return;
- }
- $modxTags = (int) $modxTags;
- $script = \'\';
- if ($field) {
- $script .= "MODx.ux.Ace.replaceComponent(\'$field\', \'$mimeType\', $modxTags);";
- }
- if ($modx->event->name == \'OnDocFormPrerender\' && !$modx->getOption(\'use_editor\')) {
- $script .= "MODx.ux.Ace.replaceTextAreas(Ext.query(\'.modx-richtext\'));";
- }
- if ($script) {
- $modx->controller->addHtml(\'<script>Ext.onReady(function() {\' . $script . \'});</script>\');
- }',
- ),
- ),
- '5ba400450fc3608124cffc5f71d86c7d' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnChunkFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnChunkFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'cdefa5dc7e8417de6e93a0a3f9b0c204' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnPluginFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnPluginFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'b9f60f578220b135bac50fd9d3a2ad67' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnSnipFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnSnipFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'aa4fb89064629bad2dac8717e22cd5fc' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnTempFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnTempFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'f433f3166c096da221cbd83cdb63c2f8' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileEditFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileEditFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '97bc1dc5244259ec5dd1fbc8c00ba4cb' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileCreateFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileCreateFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '6814073b8475cc101fabcaaaeca82349' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnDocFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnDocFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '32e753cbc838cd20e6d1ba3a0b7d6e8c' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnRichTextEditorRegister',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnRichTextEditorRegister',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'e5a11b4aca6bf5c55b25423b2ce1a27a' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnManagerPageBeforeRender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnManagerPageBeforeRender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '4caa3057b8a121589f8b929563ba3ad8' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.theme',
- ),
- 'object' =>
- array (
- 'key' => 'ace.theme',
- 'value' => 'chrome',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '820b9ab31f5a24a4017343e4c54816ec' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.font_size',
- ),
- 'object' =>
- array (
- 'key' => 'ace.font_size',
- 'value' => '13px',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '5b382ba04d48093371fabb11e9ff5717' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.word_wrap',
- ),
- 'object' =>
- array (
- 'key' => 'ace.word_wrap',
- 'value' => '',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'b1665b4f7f8889c7a7a5de9eb8be0750' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.soft_tabs',
- ),
- 'object' =>
- array (
- 'key' => 'ace.soft_tabs',
- 'value' => '1',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '4ce41aa75062da3b3e6460593f90530c' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.tab_size',
- ),
- 'object' =>
- array (
- 'key' => 'ace.tab_size',
- 'value' => '4',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '112036b86062743fe850666aa81cafb4' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.fold_widgets',
- ),
- 'object' =>
- array (
- 'key' => 'ace.fold_widgets',
- 'value' => '1',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'effacef9a05e646790059c40e9353161' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.show_invisibles',
- ),
- 'object' =>
- array (
- 'key' => 'ace.show_invisibles',
- 'value' => '0',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'a84c9fe49d5fa47b85604498f96ce309' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.snippets',
- ),
- 'object' =>
- array (
- 'key' => 'ace.snippets',
- 'value' => '',
- 'xtype' => 'textarea',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '71886e43c858dc3381effb9d9e3f82fa' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.height',
- ),
- 'object' =>
- array (
- 'key' => 'ace.height',
- 'value' => '',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- );
|