Patch for help

"Heath S. Hendrickson" <[email protected]>
Newsgroups gmane.comp.horde.ansel
Message-ID <[email protected]>
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

-- 
ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
Help.php.patch_tableHandlers (text/plain, 2.2 KB)
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.
      *
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.