Firefox PHP

Module: BBcode Tables

Posted by Joe Curia 
All files from this thread

File Name File Size   Posted by Date  
bbcode_tables.php 5.6 KB open | download Joe Curia 05/27/2010 Read message
Module: BBcode Tables
May 26, 2010 09:33PM
This is a rudimentary BBcode table implementation module. It is a single file module, so simply place it in your mods folder and enable it from the Admin modules page. I have set up some basic formatting options (ie. table width, borders, cell padding/spacing) which you can change by editing the settings section in the bbcode_tables.php file itself. I have placed some comments there to make it a little easier.

Please note that this module simply replaces [table][tr][th][/th][td][/td][/tr][/table] with <table><tr><th></th><td></td></tr></table>. There are no checks for proper formatting so you and your users will be responsible for stringing it all together correctly.

Thanks go to Maurice for making quick additions to his BBcode module so easy.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Attachments:
open | download - bbcode_tables.php (5.6 KB)
Re: Module: BBcode Tables
May 26, 2010 10:46PM
Thank you again for this great addition!
Is there a way to avoid the <br> tags which will be inserted by the BBcode module unless you mark up the entire table within one line?
Module: BBcode Tables v5.2.1.01 - removed line breaks between [table] and [tr] tags
May 27, 2010 05:53AM
I have released a still rudimentary v5.2.1.01 of this module which addresses your issue:

- Fixed a bug which would cause line breaks in the editor between [table] and [tr] tags to become <br /> tags in the posted message, stacking up above the table itself. Thanks go to Phorum user korsakov for pointing out this bug.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 05/27/2010 05:55AM by Joe Curia.
It works great! Thanks for addressing this issue so quickly!!
Re: Module: BBcode Tables v5.2.1.01 + Indent/Outdent?
May 30, 2010 03:48PM
MOVED



Edited 2 time(s). Last edit at 05/31/2010 02:07PM by korsakov.
Re: Module: BBcode Tables v5.2.1.01 + Indent/Outdent?
May 30, 2010 11:00PM
I think that you totally misplaced your message, since this thread is about the bbcode tables module. Now you are hijacking this thread, trying to push a feature that does not belong in this module at all.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: BBcode Tables
June 27, 2014 01:21AM
There is a little issue with this mod.
When $settings["cell_borders"] is used, the value applies to all header (th) cells of all tables used in the phorum software, not just to those of the tables the posters put in their messages.

The problem can easily be fixed by changing
Language: PHP
if (!empty($settings["cell_borders"])) { $style .= " table.bbcode_table td, th { border: " . $settings["cell_borders"] . "; }"; }
to
Language: PHP
if (!empty($settings["cell_borders"])) { $style .= " table.bbcode_table th { border: " . $settings["cell_borders"] . "; }"; $style .= " table.bbcode_table td { border: " . $settings["cell_borders"] . "; }"; }
Re: Module: BBcode Tables
January 28, 2016 01:42PM
Please help install this module! From the admin panel it is not installed correctly. Version Phorum 5.2.20. bbcode-2.0.7
Thank you



Edited 1 time(s). Last edit at 01/28/2016 01:46PM by Jing.
Sorry, only registered users may post in this forum.

Click here to login