[ansel] Patch for help

Heath S. Hendrickson heath at outerspaceconsultants.com
Wed May 19 09:20:53 PDT 2004


While I realize that this list may not be the most appropriate for this 
patch, I did it in in the interests of Ansel so I'm posting it here... 
(that and I'm not subscribed to whatever list the framework falls under).

It's a patch to framework/Help/Help.php that adds three new handlers for 
handling tables in the help display.

h
-------------- next part --------------
Index: framework/Help/Help.php
===================================================================
RCS file: /usr/local/horde/cvs/framework/Help/Help.php,v
retrieving revision 1.57
diff -u -r1.57 Help.php
--- framework/Help/Help.php	7 Apr 2004 14:43:08 -0000	1.57
+++ framework/Help/Help.php	19 May 2004 16:18:41 -0000
@@ -112,6 +112,9 @@
         'href'     =>  '_hrefHandler',
         'b'        =>  '_bHandler',
         'i'        =>  '_iHandler',
+        'table'    =>  '_tableHandler',
+        'tr'       =>  '_trHandler',
+        'td'       =>  '_tdHandler',
     );
 
 
@@ -472,6 +475,54 @@
     }
 
     /**
+     * XML element handler for the <table> tag.
+     *
+     * @access private
+     *
+     * @param boolean $startTag      Boolean indicating whether this instance
+     *                               is a start tag.
+     * @param optional array $attrs  Additional element attributes (Not used).
+     */
+    function _tableHandler($startTag, $attrs = array())
+    {
+        if ($this->_inHelp && $this->_inBlock) {
+            $this->_output .= ($startTag) ? '<table>' : '</table>';
+        }
+    }
+
+    /**
+     * XML element handler for the <tr> tag.
+     *
+     * @access private
+     *
+     * @param boolean $startTag      Boolean indicating whether this instance
+     *                               is a start tag.
+     * @param optional array $attrs  Additional element attributes (Not used).
+     */
+    function _trHandler($startTag, $attrs = array())
+    {
+        if ($this->_inHelp && $this->_inBlock) {
+            $this->_output .= ($startTag) ? '<tr>' : '</tr>';
+        }
+    }
+
+    /**
+     * XML element handler for the <td> tag.
+     *
+     * @access private
+     *
+     * @param boolean $startTag      Boolean indicating whether this instance
+     *                               is a start tag.
+     * @param optional array $attrs  Additional element attributes (Not used).
+     */
+    function _tdHandler($startTag, $attrs = array())
+    {
+        if ($this->_inHelp && $this->_inBlock) {
+            $this->_output .= ($startTag) ? '<td>' : '</td>';
+        }
+    }
+
+    /**
      * Includes the JavaScript necessary to create a new pop-up help
      * window.
      *


More information about the ansel mailing list