Forum Moderators: coopster
<script type="text/javascript"><!--
google_ad_client = "pub-#*$!#*$!#*$!#*$!#*$!xx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_color_border = "<?php echo $theme['body_bgcolor'];?>";
google_color_bg = "<?php echo $theme['body_tr'];?>";
google_color_link = "<?php echo $theme['body_link'];?>";
google_color_url = "<?php echo $theme['body_text'];?>";
google_color_text = "<?php echo $theme['body_text'];?>";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<Files news.xml>
ForceType application/x-httpd-php
</Files>
What I'm driving at here is that it will also be possible to do the same for css files so that the attributes etc. can be variables.
Maybe there's a clue to solving your problem there?
//initailize some vars
$google_color_border = '';
$google_color_bg = '';
$google_color_link = '';
$google_color_url = '';
$google_color_text = '';
// check if the user changed the theme
if ($theme['body_bgcolor'] == 'some hex colour') {
$google_color_border = $theme['body_bgcolor'];
$google_color_bg = $theme['body_tr'];
$google_color_link = $theme['body_link'];
$google_color_url = $theme['body_text'];
$google_color_text = $theme['body_text'];
} else {
// set the above vars to the default colours in this chunk
}
then echo the new vars
google_color_border = "<?php echo $google_color_border;?>";
google_color_bg = "<?php echo $google_color_bg;?>";
google_color_link = "<?php echo $google_color_link;?>";
google_color_url = "<?php echo $google_color_url;?>";
google_color_text = "<?php echo $google_color_text;?>";
I obviously don't know what colours you want to use or test for but the theory here would work
You could try javascript (on page load) to check the value of color and play with it from there. It would be easy enough. Google "getElementById" and css properties in javascript and you'll be good to go.