Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Conditional formatting

phpMyEdit Configuration     Conditional formatting
Post new topic   Reply to topic    
 
jbarne     Joined: 19 Dec 2008   Posts: 3  
Post Posted: 2009-03-26 06:44
Back to top  Reply with quote     

Dear forum!

I have a table with a colour field and I want to colorize that cell with the colour itself.

On this forum this is discussed in similar threads before. Most of them suggest using the sql option. I am therefore trying something like:

Code:
'sql|L'   => 'CONCAT("<span style=color:", colour,">", colour, "</span>")'


However this does not work. Instead of the <span> tag I get &lt;span&gt; instead. I do not know how the sql option work in reality so I have no clue on how to solve the problem.

I also thought that the php option might work. However it seems impossible to retrieve the field value from the core class as in $this->fdd->colour->value or similar. Is that really correct?

Grateful for any help on this.

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2009-03-28 14:42
Back to top  Reply with quote     

Add to your field array:
Code:
'escape' => false


 
jbarne     Joined: 19 Dec 2008   Posts: 3  
Post Posted: 2009-03-28 16:57
Back to top  Reply with quote     

Thanks a lot Doug for helping me out, even though I can see that it is in the documentation. I just did not understand it. That solved it for me!

Out of interest for next time: Understanding the code in the phpMyEditSetup.php file is way over my head to understand, BUT when print_r(this) in a trigger file I do not see the field value anywhere.

So... is the actual field value available in the core class?

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2009-03-28 18:24
Back to top  Reply with quote     

Try the dBug script from http://dbug.ospinto.com/

See the "Trigger variables" heading at http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.triggers.html

 
jbarne     Joined: 19 Dec 2008   Posts: 3  
Post Posted: 2009-03-29 20:02
Back to top  Reply with quote     

Thanks Doug! I will try that!

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy