[eluser]kaejiavo[/eluser]
[quote author="altrano" date="1287952819"]
Thanks what is the different between 2.0 1.7.2 for this modifications?
Not anyone have this do with 1.7.2 ??[/quote]
In 1.7.2 you have to overwrite the run() function like this:
Code:
class MY_Profiler extends CI_Profiler {
/**
* Adds mysection data to the profiler
*/
public function _compile_mysection() {
$output = ...
return $output;
}
/**
* Adds session data to the profiler
*/
function _compile_session() {
// same code as in example above
$output = ...
return $output;
}
// overwrite run()
function run() {
$output = "<div id='codeigniter_profiler' style='clear:both;background-color:#fff;padding:10px;'>";
$output .= $this->_compile_uri_string();
$output .= $this->_compile_controller_info();
$output .= $this->_compile_memory_usage();
$output .= $this->_compile_benchmarks();
$output .= $this->_compile_get();
$output .= $this->_compile_post();
$output .= $this->_compile_queries();
// add your sections here
$output .= $this->_compile_mysection();
$output .= $this->_compile_session();
$output .= '</div>';
return $output;
}
Marco