Chaos Dragon Posted September 17, 2009 Share Posted September 17, 2009 Hello everyone, I am trying to add a function to an SMF mod. What I would like it to do is have it change the bg color of a table cell...And I see that php freaks already does it..It is to have the bg change color when topic is solved just like on here..... I have gotten this far... $row['first_subject'] = $row['is_solved'] ? '<span style="color: #00FF00;">[sOLVED]</span> ' . $row['first_subject'] : $row['first_subject']; Which will add [sOLVED]. I just can't seem to figure out how to change the back ground also. I have tried this, but to no avail... $row['first_subject'] = $row['is_solved'] ? '<td class="subject" style="background-color: green"><span style="color: #00FF00;">[sOLVED]</span></td> ' . $row['first_subject'] : $row['first_subject']; So what am I missing or doing wrong? Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/ Share on other sites More sharing options...
Garethp Posted September 17, 2009 Share Posted September 17, 2009 http://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_cellbackground Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-919903 Share on other sites More sharing options...
Chaos Dragon Posted September 17, 2009 Author Share Posted September 17, 2009 http://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_cellbackground Thank You for the help, but as far as HTML I understand very well. I am wanting to learn PHP and MySQL...What I am trying to accomplish is the same thing that that PHPFreaks has when a topic is marked solved...It will show [sLOVED] and the background will turn green. So Far with this $row['first_subject'] = $row['is_solved'] ? '<span style="color: #00FF00;">[sOLVED]</span> ' . $row['first_subject'] : $row['first_subject']; I have accomplished this...See first attachment... So now I am trying to make the background also change colors... See attachment 2.... Once it is marked solved it showes the [sLOVED] plus change the BG [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-919910 Share on other sites More sharing options...
Garethp Posted September 17, 2009 Share Posted September 17, 2009 Show me your whole code, and I can help you better Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-919912 Share on other sites More sharing options...
Chaos Dragon Posted September 17, 2009 Author Share Posted September 17, 2009 Show me your whole code, and I can help you better Well I can do that. But it really only contains that...the rest is in other files. This is a mod for SMF I can send attach that zip if you like. Other wise here is the file I am trying to work with to do that. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-919916 Share on other sites More sharing options...
Chaos Dragon Posted September 17, 2009 Author Share Posted September 17, 2009 If any of this is not making sense please let me know and i will be glad to clarify it.... Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-919933 Share on other sites More sharing options...
Chaos Dragon Posted September 17, 2009 Author Share Posted September 17, 2009 Any Way I solved it......Thanks to those that tried.... Link to comment https://forums.phpfreaks.com/topic/174541-solved-trying-to-add-a-function-that-will-change-bg-color/#findComment-920003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.