| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624 |
- <?php return array (
- 'c827cfcdcee42788644e3a4d0aaa259b' =>
- array (
- 'criteria' =>
- array (
- 'name' => 'ace',
- ),
- 'object' =>
- array (
- 'name' => 'ace',
- 'path' => '{core_path}components/ace/',
- 'assets_path' => '',
- ),
- ),
- 'e6928d5ac91d2b45d84b5a8c2e9c38d5' =>
- 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\'
- );
- // Define default mime for html elements(templates, chunks and html resources)
- $html_elements_mime=$modx->getOption(\'ace.html_elements_mime\',null,false);
- if(!$html_elements_mime){
- // this may deprecated in future because components may set ace.html_elements_mime option now
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $html_elements_mime = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_parser\'):
- $html_elements_mime = \'text/x-smarty\';
- break;
- default:
- $html_elements_mime = \'text/html\';
- }
- }
- // 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;
- $mimeType = $html_elements_mime;
- break;
- case \'OnChunkFormPrerender\':
- $field = \'modx-chunk-snippet\';
- if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {
- $extension = pathinfo($modx->controller->chunk->name, PATHINFO_EXTENSION);
- if(!$extension||!isset($extensionMap[$extension])){
- $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);
- }
- $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';
- } else {
- $mimeType = $html_elements_mime;
- }
- $modxTags = true;
- 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\');
- if($mimeType == \'text/html\')$mimeType = $html_elements_mime;
- 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' => 'a:0:{}',
- '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\'
- );
- // Define default mime for html elements(templates, chunks and html resources)
- $html_elements_mime=$modx->getOption(\'ace.html_elements_mime\',null,false);
- if(!$html_elements_mime){
- // this may deprecated in future because components may set ace.html_elements_mime option now
- switch (true) {
- case $modx->getOption(\'twiggy_class\'):
- $html_elements_mime = \'text/x-twig\';
- break;
- case $modx->getOption(\'pdotools_fenom_parser\'):
- $html_elements_mime = \'text/x-smarty\';
- break;
- default:
- $html_elements_mime = \'text/html\';
- }
- }
- // 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;
- $mimeType = $html_elements_mime;
- break;
- case \'OnChunkFormPrerender\':
- $field = \'modx-chunk-snippet\';
- if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {
- $extension = pathinfo($modx->controller->chunk->name, PATHINFO_EXTENSION);
- if(!$extension||!isset($extensionMap[$extension])){
- $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);
- }
- $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';
- } else {
- $mimeType = $html_elements_mime;
- }
- $modxTags = true;
- 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\');
- if($mimeType == \'text/html\')$mimeType = $html_elements_mime;
- 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>\');
- }',
- ),
- ),
- '5c9117f3f9306309f3b7257399a7240d' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnChunkFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnChunkFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '7c13e16a515f5f604eb27e99177e239e' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnPluginFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnPluginFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'b03fec404d327fd246a4a2825b63eb09' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnSnipFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnSnipFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'c666dc4fa3000e3cf992f2851fe92e61' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnTempFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnTempFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '7afec938180940ebc633035c7e5b3803' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileEditFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileEditFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'dc728cd5e1dc89df8fab87f31cded771' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileCreateFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnFileCreateFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'cb963f3e8877ce33ab7ff2f74557e9c0' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnDocFormPrerender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnDocFormPrerender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '1150f1d6f7e98e2bc6f78038c3e482ea' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnRichTextEditorRegister',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnRichTextEditorRegister',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- '54e156a19590fd651049eb44caab8a27' =>
- array (
- 'criteria' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnManagerPageBeforeRender',
- ),
- 'object' =>
- array (
- 'pluginid' => 1,
- 'event' => 'OnManagerPageBeforeRender',
- 'priority' => 0,
- 'propertyset' => 0,
- ),
- ),
- 'f2a8cc749346983f78d1716a4843a615' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.theme',
- ),
- 'object' =>
- array (
- 'key' => 'ace.theme',
- 'value' => 'chrome',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '7e6624fefc5c95edc6446219a43f6a1a' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.font_size',
- ),
- 'object' =>
- array (
- 'key' => 'ace.font_size',
- 'value' => '13px',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '059bfc2d6f982755f5cc0059a0f2a994' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.word_wrap',
- ),
- 'object' =>
- array (
- 'key' => 'ace.word_wrap',
- 'value' => '',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'f87ce470e103854f7c89ff2ff4803ec6' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.soft_tabs',
- ),
- 'object' =>
- array (
- 'key' => 'ace.soft_tabs',
- 'value' => '1',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'ed6e18d86100c10e94ba188dd66801b7' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.tab_size',
- ),
- 'object' =>
- array (
- 'key' => 'ace.tab_size',
- 'value' => '4',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'e21516b833cc4bff5523fafc67e4f2f1' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.fold_widgets',
- ),
- 'object' =>
- array (
- 'key' => 'ace.fold_widgets',
- 'value' => '1',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '92fcd340b1eb01c538e76d631929eb6e' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.show_invisibles',
- ),
- 'object' =>
- array (
- 'key' => 'ace.show_invisibles',
- 'value' => '0',
- 'xtype' => 'combo-boolean',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'c6f6044ec17c70946bd05f100c300aa0' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.snippets',
- ),
- 'object' =>
- array (
- 'key' => 'ace.snippets',
- 'value' => '',
- 'xtype' => 'textarea',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- 'b6883d4e5563fd25cef8eb588a626b0c' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.height',
- ),
- 'object' =>
- array (
- 'key' => 'ace.height',
- 'value' => '',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '7e5a4c3fbc78c106aedf46f2d7a02296' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.grow',
- ),
- 'object' =>
- array (
- 'key' => 'ace.grow',
- 'value' => '',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- '02f927efefecb4a3c309406a07bd4548' =>
- array (
- 'criteria' =>
- array (
- 'key' => 'ace.html_elements_mime',
- ),
- 'object' =>
- array (
- 'key' => 'ace.html_elements_mime',
- 'value' => '',
- 'xtype' => 'textfield',
- 'namespace' => 'ace',
- 'area' => 'general',
- 'editedon' => NULL,
- ),
- ),
- );
|