Background color

jeffchau

Joined: 2005-04-22
Posts: 18
Posted: Fri, 2005-04-22 10:03

Hi, I just got g2 beta 2 yesterday, and WOW, really a next-generation album system. :lol:

I'm now trying to write a simple module so that the user can change the background color and text color at album level, overriding the theme.

Although theme is a good stuff, many users might want to personalize their album..............

I have finished the ItemEdit plugin part already. The code for the background has been saved. But what should I do next? Do I need to register any event or create another view for that?

It's really hard to follow such a large system without any documentation...... :o

thx.....

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-04-22 13:36

Here's an alternate approach I whipped up a little while back....

 
almost

Joined: 2005-01-12
Posts: 103
Posted: Fri, 2005-04-22 15:11

Like the idea, and tried it. But color implied by Themes overrides color specified in Layouts. What am I missing?

(Oops! Here comes the color. was fooled by color not showing up during edit.)

Now, if I could only count on users knowing something about ascii color coding.

 
jeffchau

Joined: 2005-04-22
Posts: 18
Posted: Sat, 2005-04-23 03:21

Yes, it should be the right approach.

But, I face the same problem, the theme css seems overriding the layout. But it is strange. In CSS Definition, Inline style statement (generated by color.tpl) should override the external CSS. Right?

Almost : There are plenty of free "color chooser" which can generate an HTML color encoding by clicking on the color. You may try one.

 
jeffchau

Joined: 2005-04-22
Posts: 18
Posted: Sat, 2005-04-23 04:35

Oooops, it's not related to CSS inheritance. Instead, it works if I comment out

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Is it because the CSS tag does not follow xml strict definition?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-04-23 05:46

hm, with !important in color.tpl it works for me.
you could try adding #gallery in front of the selectors and see if that helps.

 
jeffchau

Joined: 2005-04-22
Posts: 18
Posted: Sat, 2005-04-23 14:27

Oh, it works now. Thx.....