PageRenderTime 38ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/system/cms/modules/wysiwyg/details.php

https://github.com/asalem/pyrocms
PHP | 75 lines | 61 code | 7 blank | 7 comment | 0 complexity | 5f1311fa0b60574c4e409afebe15d4db MD5 | raw file
Possible License(s): CC-BY-3.0, BSD-3-Clause, CC0-1.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, MIT
  1. <?php
  2. use Pyro\Module\Addons\AbstractModule;
  3. /**
  4. * Widgets Module
  5. *
  6. * @author PyroCMS Dev Team
  7. * @package PyroCMS\Core\Modules\Widgets
  8. */
  9. class Module_WYSIWYG extends AbstractModule
  10. {
  11. public $version = '1.0.0';
  12. public function info()
  13. {
  14. return array(
  15. 'name' => array(
  16. 'en' => 'WYSIWYG',
  17. 'fr' => 'WYSIWYG',
  18. 'pt' => 'WYSIWYG',
  19. 'se' => 'HTML-redigerare',
  20. 'tw' => 'WYSIWYG',
  21. 'cn' => 'WYSIWYG',
  22. 'ar' => 'المحرر الرسومي',
  23. 'it' => 'WYSIWYG',
  24. 'km' => 'WYSIWYG',
  25. ),
  26. 'description' => array(
  27. 'en' => 'Provides the WYSIWYG editor for PyroCMS powered by CKEditor.',
  28. 'fr' => 'Fournit un éditeur WYSIWYG pour PyroCMS propulsé par CKEditor',
  29. 'pt' => 'Fornece o editor WYSIWYG para o PyroCMS, powered by CKEditor.',
  30. 'el' => 'Παρέχει τον επεξεργαστή WYSIWYG για το PyroCMS, χρησιμοποιεί το CKEDitor.',
  31. 'se' => 'Redigeringsmodul för HTML, CKEditor.',
  32. 'tw' => '提供 PyroCMS 所見即所得(WYSIWYG)編輯器,由 CKEditor 技術提供。',
  33. 'cn' => '提供 PyroCMS 所见即所得(WYSIWYG)编辑器,由 CKEditor 技术提供。',
  34. 'ar' => 'توفر المُحرّر الرسومي لـPyroCMS من خلال CKEditor.',
  35. 'it' => 'Fornisce l\'editor WYSIWYG per PtroCMS creato con CKEditor',
  36. 'km' => 'ផ្តល់នូវកម្មវិធី WYSIWYG សម្រាប់ PyroCMS បំពាក់ដោយ CKEditor។',
  37. ),
  38. 'frontend' => false,
  39. 'backend' => false,
  40. );
  41. }
  42. public function install($pdb, $schema)
  43. {
  44. $pdb->table('settings')->insert(array(
  45. 'slug' => 'ckeditor_config',
  46. 'title' => 'CKEditor Config',
  47. 'description' => 'You can find a list of valid configuration items in <a target="_blank" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html">CKEditor\'s documentation.</a>',
  48. 'type' => 'textarea',
  49. 'default' => '',
  50. 'value' => "{{# this is a wysiwyg-simple editor customized for the blog module (it allows images to be inserted) #}}\n$('textarea.blog.wysiwyg-simple').ckeditor({\n toolbar: [\n ['pyroimages'],\n ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','Image']\n ],\n extraPlugins: 'pyroimages',\n width: '99%',\n height: 100,\n dialog_backgroundCoverColor: '#000',\n defaultLanguage: '{{ helper:config item=\"default_language\" }}',\n language: '{{ global:current_language }}'\n});\n\n{{# this is the config for all wysiwyg-simple textareas #}}\n$('textarea.wysiwyg-simple').ckeditor({\n toolbar: [\n ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink']\n ],\n width: '99%',\n height: 100,\n dialog_backgroundCoverColor: '#000',\n defaultLanguage: '{{ helper:config item=\"default_language\" }}',\n language: '{{ global:current_language }}'\n});\n\n{{# and this is the advanced editor #}}\n$('textarea.wysiwyg-advanced').ckeditor({\n toolbar: [\n ['Maximize'],\n ['pyroimages', 'pyrofiles'],\n ['Cut','Copy','Paste','PasteFromWord'],\n ['Undo','Redo','-','Find','Replace'],\n ['Link','Unlink','Image'],\n ['Table','HorizontalRule','SpecialChar'],\n ['Bold','Italic','StrikeThrough'],\n ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],\n ['Format', 'FontSize', 'Subscript','Superscript', 'NumberedList','BulletedList','Outdent','Indent','Blockquote'],\n ['ShowBlocks', 'RemoveFormat', 'Source']\n ],\n extraPlugins: 'pyroimages,pyrofiles',\n width: '99%',\n height: 400,\n dialog_backgroundCoverColor: '#000',\n removePlugins: 'elementspath',\n defaultLanguage: '{{ helper:config item=\"default_language\" }}',\n language: '{{ global:current_language }}'\n});",
  51. 'options' => '',
  52. 'is_required' => true,
  53. 'is_gui' => true,
  54. 'module' => 'wysiwyg',
  55. 'order' => 993,
  56. ));
  57. return true;
  58. }
  59. public function uninstall($pdb, $schema)
  60. {
  61. // This is a core module, lets keep it around.
  62. return false;
  63. }
  64. public function upgrade($old_version)
  65. {
  66. return true;
  67. }
  68. }