Jump to content

A way to get current background?


Valleriani

Recommended Posts

I have several websites running on a global script. Some pages, the backgrounds black, other, white. Sometimes people have the taste of posting black font on a black background, or white font on a white background.

 

What I wanted is to know if theres a way to 'check' the current background color? Because I can then add in the script to 'change' any incorrect colors before posting. I'm not sure if theres a way for PHP to tap into CSS and check, but it would be alot easier to change the global script since its *Checking* for the background color rather then me do it per site and change it manually.

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/78411-a-way-to-get-current-background/
Share on other sites

Basicily I have a script that runs real time and changes anything content before posting, like swearing, etc real time. So if I ever want to remove it, or anything, I can, and the original content is there.

 

Basicly in CSS theres this:

body {
background-image: url(images/whiteback.gif);
background-repeat: repeat-y;
        background-color: #999; /* #fafafa; */
padding: 0; margin: 0;
font-family: Helvetica, Arial, sans-serif;
text-decoration: none;
display: block;
overflow: visible;
}

Needing to get the background color 'called' somehow. Some way to access the css page, or via a PHP function perhaps that calls whatever color the background is currently?

phpBB does have styles, basically what it does is just load a different "coloring" style sheet.  Most professional layouts has 2-3 sytle sheets.  1 is  to global level declerations (fonts,  body  * etc) the others deal with structural css and the last is with colors and ascetics.

 

The last one could be stored in a database with a title, and a user picks which style they want basically.

phpBB does have styles, basically what it does is just load a different "coloring" style sheet.  Most professional layouts has 2-3 sytle sheets.  1 is  to global level declerations (fonts,  body  * etc) the others deal with structural css and the last is with colors and ascetics.

 

The last one could be stored in a database with a title, and a user picks which style they want basically.

 

Not using phpBB though sadly.. kinda confused here though haha.:P

 

The issue is though people dilbertly lets say use font color white or black on a background thats the same color as the font there using. What I want to do is stop this. since theres a global file attached to all the websites that changes the content (such as swearing) I generally want it so that it 'checks' the background there as well, and then searchs for any <font color=etc> of the same backgroud type/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.