[pmwiki-users] did it myself

JB jbit at ev1.net
Wed Dec 28 01:52:02 CST 2005


Resolved?

   http://www.pmichaud.com/wiki/PITS/00535


I created the code to give Advanced Tables all the functionality it did
not have that Simple Tables do have. You can download the code by right
clicking and choosing save as from the url: 

  http://users3.ev1.net/~jbit/AdvancedTables.txt

It allows caption, cellhead, cellheadnr, and adds capability to zebra
tables exactly like you can do with Simple Tables.

You can put this code in your scripts/stdmarkup.php file. It replaces
the advanced table markup line which is located just below the "Cells()"
function. It adds a function "AdvancedTables()" which makes the
"Cells()" function obsolete, but you can leave it in in case there is a
discrepancy in behavior and need to revert.

Listed below is the replacement markup command.

Markup('table', '<block',

 
'/^\\(:(table|caption|cell|cellnr|cellhead|cellheadnr|tableend|div|divend)(\\s.*?)?:\\)/ie',
  "AdvancedTables('$1',PSS('$2'))");

I had some difficulty understanding what was going on with "div"'s in
the code so I tried to duplicate the behavior as best I could. I think
my code is easier to understand that the origianl "Cells()" function, at
least I have a few comments in the code. I also incorporated some simple
recurision so I would not have to duplicate some code and/or have to
create other functions.

--jb





More information about the pmwiki-users mailing list