Quote:
also, it only works if a hex color is entered.
|
Hex colors are the only way to go, you don't actually input "blue", "red", etc. do you..??
[high]* Velocd shrieks in horror
[/high]
Actually it doesn't really matter, and I guess for members who know nothing about HTML that would be easier..
Use this code to make it so that if no color is inputted, the thing doesn't glow.
PHP Code:
if ($post['posts'] > 10 && $post['fieldx']) {
$post['username'] = '<table style=filter:glow(color="' . $post[fieldx] . ', strength=2")>' . $post[username] . '</table>';
}
That wont check though if the inputted value in fieldX is something other than a hex code.
If you want it to work with color names, just put this right below the IF statement, inside:
PHP Code:
if($post[fieldx] == "white"){
$post[fieldx] = "#FFFFFF";
}
And just replicate that code changing the values for each different color you want to add.
Hope any of this helps