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 * * @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(\'\'); }', '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 * * @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(\'\'); }', ), ), '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, ), ), );