<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<base href="../" />
<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - Help  /  Rich Table Plugin</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>Help  /  Rich Table Plugin</h1>
</div>
<div id="content">



<div class="wikitext"><h4>Synopsis</h4>
<p class="tightenable">The <a href="Help/RichTablePlugin" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />Help:</span><span class="wikipage">RichTablePlugin</span></a> is a plugin that takes off from the <a href="Help/OldStyleTablePlugin" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />Help:</span><span class="wikipage">OldStyleTablePlugin</span></a>. It allows a user to specify arbitrary properties of <tt>&lt;table&gt;</tt>, <tt>&lt;tr&gt;</tt> and <tt>&lt;td&gt;</tt> with a very simple markup.</p>
<p class="tightenable">NEW: The plugin is now fixed so that the contents of each cell are individually processed by the BlockParser. This means that if everything works correctly,  you can do interesting things like put <b>invoke plugins</b>, use <b>enumerated lists</b> etc within each cell!</p>
<ul><li class="tightenable bottom">A <tt>&quot;-&quot;</tt> (dash) at the start of a new line represents a new row in the table.</li>
<li class="tightenable top bottom">A <tt>&quot;|&quot;</tt> (vertical bar or pipe) at the start of a new line represents a cell.</li>
<li class="tightenable top bottom"><p class="tightenable top bottom">Attributes for the tags</p>
<blockquote class="tightenable top bottom"><p class="tightenable top bottom"><b>A line that starts with a <tt>&quot;*&quot;</tt> (star or asterisk) after a <tt>&quot;|&quot;</tt> is parsed for attributes for the corresponding cell.
*Attributes for the table are given on line that starts with a &lt;tt&gt;&quot;</b>&quot;&lt;/tt&gt;, only if the line appears before any other line except whitespace.</p>
<ul><li class="tightenable top bottom">A line that starts with a <tt>-</tt> is always parsed for attributes since it can't have any content, unlike a cell.</li>
</ul>
</blockquote>
</li>
<li class="tightenable top bottom"><p class="tightenable top bottom">Cell contents</p>
<ul><li class="tightenable top bottom">Cell contents are processed by the BlockParser.</li>
</ul>
<blockquote class="tightenable top bottom"><p class="tightenable top bottom"><b>Any line that starts with a &lt;tt&gt;&quot;</b>&quot;&lt;/tt&gt; anywhere other than the table attribute line is treated as normal content.</p>
<ul><li class="tightenable top bottom">Any line that starts with whitespace is also treated as content.</li>
</ul>
<p class="tightenable top bottom"><b>Any cell line that does not have a &lt;tt&gt;&quot;</b>&quot;&lt;/tt&gt; after the <tt>&quot;|&quot;</tt> is treated as normal content.</p>
<ul><li class="tightenable top bottom">All content lines that follow a cell line are added to that cell. They can contain arbitrary text except the above cases.</li>
<li class="tightenable top bottom">If there is no cell in the current row, content lines are dropped silently.</li>
</ul>
</blockquote>
</li>
<li class="tightenable top">The two special characters <tt>&quot;~&quot;</tt> and <tt>&quot;?&gt;&quot;</tt> should be escaped as <tt>&quot;\~&quot;</tt> and <tt>&quot;?\&gt;&quot;</tt>. I havn't discovered any other characters yet that might need to be escaped. This is required for the block parser to work.</li>
</ul>
<h4>Bugs</h4>
<ul><li class="tightenable top bottom">The source code sucks</li>
<li class="tightenable top">The plugin can't nest itself yet. Thus nested tables are currently not possible.</li>
</ul>
<h4>Example</h4>
<div class="plugin tightenable" id="RichTablePlugin"><table border="1" cellpadding="5" bgcolor="#f0f8f8" width="75%" align="center">
<tr>
<td colspan="3" align="center"><p class="tightenable top bottom"><a href="HomePage.html" class="wiki">HomePage</a></p>
</td>
</tr>
<tr>
<td colspan="2"><p class="tightenable top bottom"><img src="http://phpwiki.sourceforge.net/demo/themes/default/images/png.png" alt="png.png" title="png.png" class="inlineimage" /></p>
</td>
<td rowspan="2"><p class="tightenable top bottom">This cell actually has a plugin invocation inside it!</p>
<span class="plugin" id="BackLinksPlugin63"><p>No page links to <span><a href="Help.html" class="named-wiki" title="Help">Help</a><a href="Help/RichTablePlugin.html" class="named-wiki" title="Help/RichTablePlugin">/RichTablePlugin</a></span>.</p>
</span></td>
</tr>
<tr bgcolor="white">
<td><ol><li class="tightenable top bottom">One</li>
<li class="tightenable top bottom">Two</li>
</ol>
</td>
<td><ul><li class="tightenable top bottom">Foo</li>
<li class="tightenable top bottom">Bar</li>
</ul>
</td>
</tr>
<tr bgcolor="cyan">
<td bgcolor="#f0f0ff" align="center"><p class="tightenable top">One paragraph</p>
<p class="tightenable bottom">Another paragraph?</p>
</td>
<td align="left"><p class="tightenable top bottom">This cell uses the row color</p>
</td>
<td><blockquote class="tightenable top bottom">
<p class="tightenable top bottom">I wish this cell had a nested table inside it! :(</p>
</blockquote>
</td>
</tr>
</table>
</div>
<p class="tightenable">The above table is rendered from:</p>
<pre class="tightenable">
&lt;?plugin RichTable

*border=1, cellpadding=5, bgcolor=#f0f8f8, width=75%, align=center
-
|* colspan=3, align=center
HomePage
-
|* colspan=2
[http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]
|* rowspan=2
This cell actually has a plugin invocation inside it!
&lt;?plugin
BackLinks
?\&gt;
- bgcolor=white
|
#One
#Two
|
*Foo
*Bar
- bgcolor=cyan
This line gets dropped ... no cell to contain it!
|* bgcolor=#f0f0ff, align=center
One paragraph.

Another paragraph?
|* align=left
This cell uses the row color
| I wish this cell had a nested table inside it! :(
?&gt;</pre>
<dl><dt class="tightenable"><strong>Author</strong></dt>
<dd class="tightenable bottom">Sameer D. Sahasrabuddhe</dd>
<dt class="tightenable top"><strong>Url</strong></dt>
<dd class="tightenable"><a href="http://www.it.iitb.ac.in/sameerds/phpwiki/index.php/RichTablePlugin" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://www.it.iitb.ac.in/sameerds/phpwiki/index.php/RichTablePlugin</span></a></dd>
</dl>
<hr />
<p class="tightenable bottom"><a href="PhpWikiDocumentation.html" class="wiki">PhpWikiDocumentation</a> <a href="Help/WikiPlugin" class="interwiki"><span style="white-space: nowrap"><img src="images/interwiki.png" alt="" class="linkicon" border="0" />Help:</span><span class="wikipage">WikiPlugin</span></a></p>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;admin&quot;  Last edited on August 14, 2007  7:11 am by &quot;The PhpWiki programming team&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
