Jaxel
Well-known member
Okay, so we all know how the COLOR bbcode works. Generally, you want to allow members to use the color bbcode, but it is often prone to abuse. It also creates an issue where some people post on a "light" skin, and others post on a "dark" skin... Here is an example:
Now, what I've done on my forum is change XenForo_BbCode_Formatter_Base... from:
to:
Now people can still personalize their posts with colors, but it still works in multiple skins. I'm suggesting there be an option in XenForo to replace the css of the color bbcode... "color", "text-shadow" or even "background-color".
Now, what I've done on my forum is change XenForo_BbCode_Formatter_Base... from:
Code:
'color' => array(
'hasOption' => true,
'optionRegex' => '/^(rgb\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*\)|#[a-f0-9]{6}|#[a-f0-9]{3}|[a-z]+)$/i',
'replace' => array('<span style="color: %s">', '</span>')
),
Code:
'color' => array(
'hasOption' => true,
'optionRegex' => '/^(rgb\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*\)|#[a-f0-9]{6}|#[a-f0-9]{3}|[a-z]+)$/i',
'replace' => array('<span style="text-shadow: 0 0 10px %s">', '</span>')
),
Now people can still personalize their posts with colors, but it still works in multiple skins. I'm suggesting there be an option in XenForo to replace the css of the color bbcode... "color", "text-shadow" or even "background-color".
Upvote
1