Gizzmo wrote:how would i go about adding lists, like this
The people who wrote that page wrote:
The proper syntax should be:
- - - - - - - - - - - - - - - - - - - - - - - -
shinko_metsuo wrote:instead of adding BBcode to your DB you could have it in a TXT (probly easyer)
In a PHP instead so I can include() it in the parser.php file and it will get parsed by PHP. And maybe an admin plugin to edit said PHP file in an easier manner?
- - - - - - - - - - - - - - - - - - - - - - - -
Another BBCode suggestion: An [hr /] to add the <hr /> element ([hr /] to follow the rules of XHTML, maybe also a [hr])
- - - - - - - - - - - - - - - - - - - - - - - -
Ataxy wrote:ok well i got it to work
so any way just a stupid error in the code of my previous code
the line to be added are the following it only gives two table but one may easly mod it to have more then two
'#\[table\](.*?),(.*?)\[/table\]#',
and
'<table><tr><td>$1</td><td>$2</td></tr></table>',
as i understood since xhtml is strict i had forgoten to close the <table> tag to </table>
and the result is the following
http://d-vault.peerforces.com/table2.png
EDIT:
ok to get 3 table just add this
'#\[table3\](.*?),(.*?),(.*?)\[/table3\]#',
and this
'<table><tr><td>$1</td><td>$2</td><td>$3</td></tr></table>',
Maybe a better way of making tables?
Eg.
[table][tr]Hi![/tr][tr]Hello, world![/tr][tr]Bye![/tr][/table]
Outputs:
<table><tr><td>Hi!</td></tr><tr><td>Hello, world!</td></tr><tr><td>Bye!</td></tr></table>
Allows users to have more than 3 or less than 2 rows.