miniBB Support Forums | 15 years on The Web
miniBB ®


 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

HTML Tables in posts

Author PeKa
#1 | Posted: 7 Aug 2002 12:51 

$pattern[6] = "/\[lrtable\](.+?)::(.+?)\[\/lrtable\]/s";
$replacement[6] = '<table><tr><td valign="top">\\1</td><td valign="top">\\2</td></tr></table>';

to bb_codes.php

Use it this way:
[lrtable]Left side::Right side[/lrtable]
Of course you can make "Left side" or "Right side" another lrtable ;-)

That may be not the most comfortable way for users, but maybe moderators want to give their postings a little extra flavour :-)

Author 4days
#2 | Posted: 7 Aug 2002 16:24 
nice one :)

Author PeKa
#3 | Posted: 8 Aug 2002 13:12 | Edited by: Admin 
3 Oct 2006 06:16 - Attached on mergeing:
Tables BB code

You can even add width=xx to the first <td> tag for better formatting with

$pattern[7] = "/\[lrtable(=)?(\d{1,3})?\](.+?)::(.+?)\[\/lrtable\]/s";
$replacement[7] = '<table><tr><td valign="top" width=\\2>\\3</td><td valign="top">\\4</td></tr></table>';

[lrtable=60]Left side::Right side[/lrtable]
will produce a 60 pixels wide left column, while the other uses what it needs.

Maybe I'll rewrite this some day to support real tables, not only for left-right

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 HTML Tables in posts
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.