Valleriani Posted November 22, 2007 Share Posted November 22, 2007 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? Quote Link to comment Share on other sites More sharing options...
Valleriani Posted November 22, 2007 Author Share Posted November 22, 2007 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? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted November 22, 2007 Share Posted November 22, 2007 So do some sites use a particular CSS file and other sites some other CSS file? Quote Link to comment Share on other sites More sharing options...
Valleriani Posted November 22, 2007 Author Share Posted November 22, 2007 So do some sites use a particular CSS file and other sites some other CSS file? Yeah, they use different layouts with different style sheets. Generally though, there technically all the same for the body part of the CSS though. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 22, 2007 Share Posted November 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
Valleriani Posted November 22, 2007 Author Share Posted November 22, 2007 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. 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/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.