This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
---------- | |
Rendertime | |
---------- | |
This pluging is disabled by default, use this in your config.php file of your | |
develoment enviroment and set the 'rendertime' property to true as follow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'title' => 'Widget Title', | |
'html' => function() { | |
// any data for the template | |
$data = array(); | |
return tpl::load(__DIR__ . DS . 'template.php', $data); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function truncate($input, $numwords, $padding="") | |
{ | |
$output = strtok($input, " \n"); | |
while(--$numwords > 0) $output .= " " . strtok(" \n"); | |
if($output != $input) $output .= $padding; | |
// Original PHP code by Chirp Internet: www.chirp.com.au | |
// Please acknowledge use of this code by including this header. | |
$opened = array(); |