Difference between revisions of "Expandable.php"
From Organic Design wiki
m |
m |
||
Line 1: | Line 1: | ||
<? | <? | ||
if ($GLOBALS['action'] == 'view') $article = preg_replace( | if ($GLOBALS['action'] == 'view') $article = preg_replace( | ||
− | '/ | + | '/<table class=["']?expandable["']? title=["']?(.+?)["']?(.+?<\\/table.*?>)/s', |
− | '<table | + | '<table class=expandable-heading><tr><td>$1</td><td align=right> |
− | |||
<script type="text/javascript">showTocToggle("show","hide")</script> | <script type="text/javascript">showTocToggle("show","hide")</script> | ||
</td></tr> | </td></tr> | ||
− | <tr id="tocinside"><td colspan=2>$2</td></tr></table>', | + | <tr id="tocinside"><td colspan=2> |
+ | <table class=expandable-content$2 | ||
+ | </td></tr></table>', | ||
$article | $article | ||
); | ); | ||
?> | ?> |
Revision as of 21:56, 1 October 2006
<? if ($GLOBALS['action'] == 'view') $article = preg_replace(
'/<table class=["']?expandable["']? title=["']?(.+?)["']?(.+?<\\/table.*?>)/s',
'
$1 |
<script type="text/javascript">showTocToggle("show","hide")</script> |
<table class=expandable-content$2 |
',
$article );
?>