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 class=["\']?expandable["\']? title=["\']?(.+?)["\']?(.+?<\\/table.*?>)/s',
 
     '<table class=expandable-heading><tr><td>$1</td><td align=right>
 
     '<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>

Revision as of 21:58, 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
   );

?>