Reformatted t3editor sysext
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Sun, 25 Nov 2007 18:18:20 +0000 (18:18 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Sun, 25 Nov 2007 18:18:20 +0000 (18:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2770 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/class.tx_t3editor.php
typo3/sysext/t3editor/ext_emconf.php
typo3/sysext/t3editor/ext_tables.php [deleted file]

index 6dfe18c..8868d45 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-25  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Reformatted t3editor sysext
+
 2007-11-25  Ingmar Schlecht  <ingmar@typo3.org>
 
        * Fixed Bug #6828: Using outpug buffering for debug() to prevent "Headers already sent" errors
index 415d121..d67cbf7 100755 (executable)
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
+/**
+ * [CLASS/FUNCTION INDEX of SCRIPT]
+ *
+ *
+ *
+ *   47: class tx_t3editor
+ *   85:     public function __construct()
+ *  117:     public function getJavascriptCode()
+ *  162:     public function getCodeEditor($name, $class='', $content='', $additionalParams='', $alt='')
+ *
+ * TOTAL FUNCTIONS: 3
+ * (This index is automatically created/updated by the extension "extdeveval")
+ *
+ */
 
 /**
  * Provides a javascript-driven code editor with syntax highlighting for TS, HTML, CSS and more
@@ -38,7 +52,7 @@ class tx_t3editor {
         * @var string
         */
        private $filepathEditorlib;
-       
+
        /**
         * path to the main stylesheet
         *
@@ -54,7 +68,7 @@ class tx_t3editor {
         * @var int
         */
        private $editorCounter;
-       
+
        /**
         * flag to enable the t3editor
         *
@@ -64,7 +78,7 @@ class tx_t3editor {
 
 
        /**
-        * constructor
+        * Creates a new instance of the class
         *
         * @return      void
         */
@@ -82,9 +96,9 @@ class tx_t3editor {
        }
 
        /**
-        * Enter description here...
+        * Sets editor enabled/disabled state
         *
-        * @param       boolean         $state
+        * @param       boolean         $state  <code>true</code> if editor is disabled
         * @return      void
         */
        public function setBEUCdisableT3Editor($state) { //TODO better descriptive name for $state
@@ -96,14 +110,14 @@ class tx_t3editor {
        }
 
        /**
-        * Enter description here...
+        * Retrieves JavaScript code for editor
         *
-        * @return      string          DESCRIPTION GOES HERE
+        * @return      string          JavaScript code
         */
        public function getJavascriptCode()     {
-               $code = ''; //TODO find a more descriptive name (low prio)
+               $code = ''; // TODO find a more descriptive name (low prio)
 
-               if($this->isEnabled) {
+               if ($this->isEnabled) {
                                // disable the obsolete tab.js to avoid conflicts
                        $GLOBALS['BE_USER']->uc['disableTabInTextarea'] = '1';
 
@@ -136,14 +150,14 @@ class tx_t3editor {
        }
 
        /**
-        * Enter description here...
+        * Generates HTML with code editor
         *
-        * @param       unknown_type            $name
-        * @param       unknown_type            $class
-        * @param       unknown_type            $content
-        * @param       unknown_type            $additionalParams
-        * @param       unknown_type            $alt
-        * @return      string          DESCRIPTION GOES HERE
+        * @param       string          $name   Name attribute of HTML tag
+        * @param       string          $class  Class attribute of HTML tag
+        * @param       string          $content        Content of the editor
+        * @param       string          $additionalParams       Any additional editor parameters
+        * @param       string          $alt    Alt attribute
+        * @return      string          Generated HTML code for editor
         */
        public function getCodeEditor($name, $class='', $content='', $additionalParams='', $alt='') {
                $code = '';
@@ -169,11 +183,11 @@ class tx_t3editor {
 
                } else {
                                // fallback
-                       if(!empty($class)) {
+                       if (!empty($class)) {
                                $class = 'class="'.$class.'" ';
                        }
 
-                       $code.= '<textarea name="'.$name.'" '.$class.$additionalParams.'>'.$content.'</textarea>';
+                       $code .= '<textarea name="'.$name.'" '.$class.$additionalParams.'>'.$content.'</textarea>';
                }
 
                return $code;
@@ -183,9 +197,8 @@ class tx_t3editor {
 
 
        // Include extension?
-if(defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['sysext/t3editor/class.tx_t3editor.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['sysext/t3editor/class.tx_t3editor.php']);
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/t3editor/class.tx_t3editor.php']) {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/t3editor/class.tx_t3editor.php']);
 }
 
-
 ?>
\ No newline at end of file
index 37084bc..c9ca185 100755 (executable)
@@ -1,50 +1,52 @@
-<?php\r
-\r
-########################################################################\r
-# Extension Manager/Repository config file for ext: "t3editor"\r
-#\r
-#\r
-# Manual updates:\r
-# Only the data in the array - anything else is removed by next write.\r
-# "version" and "dependencies" must not be touched!\r
-########################################################################\r
-\r
-$EM_CONF[$_EXTKEY] = array(\r
-        'title' => 'Codeeditor t3editor',\r
-        'description' => 'javascript-driven codeeditor with syntax highlighting for TS, HTML, CSS and more',\r
-        'category' => 'be',\r
-        'shy' => 0,\r
-        'dependencies' => '',\r
-        'conflicts' => 'pmktextarea',\r
-        'priority' => '',\r
-        'loadOrder' => '',\r
-        'module' => '',\r
-        'state' => 'alpha',\r
-        'internal' => 0,\r
-        'uploadfolder' => 1,\r
-        'createDirs' => '',\r
-        'modify_tables' => '',\r
-        'clearCacheOnLoad' => 1,\r
-        'lockType' => '',\r
-        'author' => 'Tobias Liebig',\r
-        'author_email' => 'mail_typo3@etobi.de',\r
-        'author_company' => '',\r
-        'CGLcompliance' => '',\r
-        'CGLcompliance_note' => '',\r
-        'version' => '0.0.5',\r
-               '_md5_values_when_last_written' => '',\r
-        'constraints' => array(\r
-                'depends' => array(\r
-                        'php' => '4.1.0-',\r
-                        'typo3' => '4.1-',\r
-                ),\r
-                'conflicts' => array(\r
-                        'pmktextarea' => '',\r
-                ),\r
-                'suggests' => array(\r
-                ),\r
-        ),\r
-        'suggests' => array(\r
-        ),\r
-);\r
-?>
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "t3editor"
+#
+# Auto generated 23-11-2007 12:20
+#
+# Manual updates:
+# Only the data in the array - anything else is removed by next write.
+# "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Editor with syntax highlighting',
+       'description' => 'JavaScript-driven editor with syntax highlighting for TS, HTML, CSS and more. Based on CodeEditor.',
+       'category' => 'be',
+       'shy' => 0,
+       'dependencies' => '',
+       'conflicts' => 'pmktextarea',
+       'priority' => '',
+       'loadOrder' => '',
+       'module' => '',
+       'state' => 'alpha',
+       'internal' => 0,
+       'uploadfolder' => 0,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 0,
+       'lockType' => '',
+       'author' => 'Tobias Liebig',
+       'author_email' => 'mail_typo3@etobi.de',
+       'author_company' => '',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'version' => '0.0.5',
+       '_md5_values_when_last_written' => 'a:14:{s:21:"class.tx_t3editor.php";s:4:"bb07";s:12:"ext_icon.gif";s:4:"4cef";s:16:"css/t3editor.css";s:4:"d4f1";s:23:"icons/loader_eeeeee.gif";s:4:"83a4";s:13:"jslib/LICENSE";s:4:"d835";s:14:"jslib/Mochi.js";s:4:"872d";s:24:"jslib/parsejavascript.js";s:4:"5377";s:24:"jslib/parsetyposcript.js";s:4:"7815";s:15:"jslib/select.js";s:4:"6725";s:21:"jslib/stringstream.js";s:4:"e6a5";s:17:"jslib/t3editor.js";s:4:"656c";s:27:"jslib/tokenizejavascript.js";s:4:"1c7a";s:27:"jslib/tokenizetyposcript.js";s:4:"c232";s:13:"jslib/util.js";s:4:"7620";}',
+       'constraints' => array(
+               'depends' => array(
+                       'php' => '4.1.0-0.0.0',
+                       'typo3' => '4.1-0.0.0',
+               ),
+               'conflicts' => array(
+                       'pmktextarea' => '',
+               ),
+               'suggests' => array(
+               ),
+       ),
+       'suggests' => array(
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/t3editor/ext_tables.php b/typo3/sysext/t3editor/ext_tables.php
deleted file mode 100755 (executable)
index cfae921..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php\r
-\r
-if (!defined ("TYPO3_MODE"))   die ('Access denied.');\r
-\r
-?>
\ No newline at end of file