Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa
Posted: 11/03/09 09:49
I have tried to add the highlight code into the displaying of the ads I have tried about 8 different versions oif what i have below can someone tell me why its not highlighting the ad.... Steve this is different than the one you helped me with before if your wondering this is for the display area on the index page (if this is the wrong area let me know maybe it should be on my tpl file directly
Thanks also with the else par tof the bg color i actually do not want it to change from the current color is there a way to keep it the same without the color code or am I going to have to search for the color code in the css for this
_________________ One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 11/03/09 14:28
I'm not quite sure what you are doing - I'm not sure that what you have posted is even valid PHP code. To highlight something, you need to highlight the text - i.e.
Code
if ($_ads['ad_feature'] == 'Yes') {
echo '<span style="background-color:#008800;">';
}
In your code you simply have a value in single quotes - you're not assigning it to a variable, nor are you echoing it out.
just to add to this, if your wanting to select some of your ads as 'featured' and others as normal ads, a good way to do it would be to add an extra class.
the normal ad:
Code
<span class="ad">whatever ad in here</span>
then to the featured ones add an extra class
Code
<span class="ad featured">whatever ad in here</span>
then in you can keep all your css in a separate style sheet