The new feature in 4.0.7, Configurable CSS Class Whitelist for TABLE/DIV/SPAN, where can I find that setting?
Printable View
The new feature in 4.0.7, Configurable CSS Class Whitelist for TABLE/DIV/SPAN, where can I find that setting?
You will edit the custom BB-Code TABLE, DIV, or SPAN using the forum's BB-Code Manager. There will be a separate option on that page for the whitelist.
I am looking at the changelogs, however, and unfortunately it looks like this field will not save in 4.0.7 under vBulletin. If you use vBulletin and you find yourself unable to save changes to this field, then you will have to wait until the fix is released in 4.0.8 this coming week.
Is there anything else I have to do to get this working? I'm running XenForo, added tcat to the whitelist for the TABLE bbcode. I resaved the page I'm using that bbcode on, but it's still not adding the class to the table.
This is my code:
Code:[table]border="1"
|-
| class="tcat" | Class
| class="tcat" | Sub-Class
| class="tcat" | Example Weapons
|-
| rowspan="3" | Bladed Weapons
| Daggers
| Dagger, Stiletto, Hunting dagger, Knives
|-
[/table]
Oh, I understand. The way it was coded, it will only work for classes added to the main TABLE tag, not to individual cells. I will post a solution for you in a moment.
In vault/core/model/parser/handle/clean/vw.php, find:
After it, add:Code:$this->classes["$whitelistable"]["$className"] = 1;
Code:if ($whitelistable == 'table')
{
foreach (array(
'tr',
'td',
'th',
'caption'
) AS $tablecell)
{
$this->classes["$tablecell"]["$className"] = 1;
}
}
Great, it works now! Thanks!