Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
highlighting
jamesd116



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


Code
      if ($_ads['ad_feature'] == 'Yes') {
       'background-color:#008000';
} else {
 {
       'background-color:#FFFFFF';
}



_________________
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...
Back to top
Brian
Jamroom Team


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.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 11/03/09 20:53 
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

Code
.featured{
   background-color:#008800;
}


(you cant use php in your css file.)


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.