I don't really know if this post should go in theme or module forum so I thought I could start here with my general question.

So far I have a heavily restyled, zen-based theme which uses two main color to style the CCK-ed node/contents. I want users to be able to choose their own colors for the nodes they create. I imagine using a pulldown with a number of preset color combinations.

So I need something like color.module but much more limited in the available selections. Also, it needs to be available in the node creation page, not (just) in the theme settings page.

Does anyone know what is the best way to achieve this?
Or maybe some module or theme that would point me in the right direction?

I am not afraid to dig into the code to achieve this. It's just that I dont really know where to start digging and what is most 'drupally way to go about it.

Thanks for taking the time.

Comments

mysty’s picture

This is not really going to answer the question... heh . .. BUT there is some nice automagic that I havent dug into really in the multiflex3 theme that does automatic alternate block colouring - aadd a new block, and you get a new colour. Then it rotates back. Example here.

Anyway, small chance it may be of use/interest.

firfin’s picture

Thank you for your reply. Looking good. But not quite what I am looking for it seems. Will definitely look at it tomorrow though. Getting too late now.

However I want to be able to let the Users choose their own color. Not just alternate the colors for blocks (which is also quite a different thing than a node i believe) But thanks for you suggestion will definitely look at it tomorrow, can't hurt to look :-D

mysty’s picture

I did say I wasnt going answer your q.

Still, if you wanted to automagically style node different colours then the multiflex3 theme's automatic block colours might have been a starting point.

A crude way might be to have different node template files, e.g. node-1.tpl.php, node-2.tpl.php, node-3.tpl.php,

then you have to specify which one of course..

nevets’s picture

You could make a field using CCK as a select element with value pairs that represent the colors and then using theming apply that color to the node.

firfin’s picture

I had thought of something along those lines. That way the selection made would get stored for future display (and also for the pdf output I use later on) . I am still a bit hazy on how to use theming to apply the color though. Any tips?

Will just have to see how far I get with this approach tomorrow.
Thanks so far.