Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - nascoli

1
Questions / how to treat milliseconds
Hi,

I've the following situation: I'm working on a system for a karting track. I need the user to register time that each driver did in a lap.

In database, the field is in TIME(3) format since I need three positions for the milliseconds. When I edit the inline field in the List Page, I see that it's possible to type the milliseconds, however, I' cant format it so that the same happens in the Add Page and Edit Page.

Tks!
2
Issues / Re: I intend to buy, but some issues?
Thank you!


I'm Brazilian, sorry for my English.

Problem solved for those who don't need Cyrillic characters.

In Functions.php add this:

Code: [Select]
function fixWrongUTF8Encoding($String) {
 $fix_accent_list = array(
     ''     => ' ',
     '>'    => '>',
     '<'    => '&lt;',
     '&'    => '&amp;',
     '"'    => '&quot;'
 );
 
 
 //we get our accent characters and its utf-8 equivalent characters
 $error_chars = array_keys($fix_accent_list);
 $real_chars  = array_values($fix_accent_list);
 

 return str_replace($error_chars, $real_chars, $String);
}

In BaseView.php replace this

Code: [Select]
private function setInnerHTML($element, $html)
 {
 $html = htmlentities($html);
 $fragment = $element->ownerDocument->createDocumentFragment();
 $fragment->appendXML($html);
 $clone = $element->cloneNode(); // Get element copy without children
 $clone->appendChild($fragment);
 $element->parentNode->replaceChild($clone, $element);
 }

with this

Code: [Select]
private function setInnerHTML($element, $html)
     {
        
         $html = fixWrongUTF8Encoding($html);
         $html = html_entity_decode($html);
         $fragment = $element->ownerDocument->createDocumentFragment();
         $fragment->appendXML($html);
         $clone = $element->cloneNode(); // Get element copy without children
         $clone->appendChild($fragment);
         $element->parentNode->replaceChild($clone, $element);
     }

You don't need to change anything in the report_layout.php file.

I hope it helped you.