Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
My taxonomic color changes are working fine, but although the events show up with the right background color, the titles seem always to be in white--no way to make it match the settings in the "colors" module, which seems to sense the black/white choice automatically. How can I change the text color on my events to match what's showing in the colors modules?
Comments
Comment #1
tim.plunkettNot yet, there is code for it in the Colors API, but nothing in the UI.
If you could come up with screenshots of how that might look, I can implement it. I just couldn't figure out how to do it.
Comment #2
TwiiK CreditAttribution: TwiiK commentedPlace the below code in any module and replace MYMODULE with the module name and you'll get this:
http://i.imgur.com/kUNVi.png
Should be fairly easy to include into the module itself. It's just the module code copied with a few small changes here and there.
I've only done this for the user colors as those are the only colors I'm currently using in my project.
colors.admin.override.css:
Comment #3
scass CreditAttribution: scass commentedTwiiK
It's been a while since your post above. You do offer a nice fix for user colors. Unfortunately, I would like a similar fix for the event taxonomy colors.
I'm developing my second community site with Drupal. Unfortunately, I'm not a programmer, though I have a rudimentary idea (hmmm... learned a bit of Fortran using punched cards back in the late '70s!). I do seem prone to jumping in at the deep end...
I did make your code above work for users. I then tried replacing instances of 'users' with 'taxonomy', but that doesn't work. If you or anyone else could help extend the code to deal with taxonomy, I'd be very grateful.
Incidentally, although the above worked for me, I'm wondering if there's not an error in the code? On line 57:
$form['#submit'] = array('cal_colors_admin_users_settings_submit');
Should this not actually be:
$form['#submit'] = array('MYMODULE_admin_users_settings_submit');
(ie the actual custom module name was inadvertently left in place?)
Anyway, many thanks to anyone who can extend this fix for my case, which I would think would be a common requirement.
Cheers,
Steve