This file contains hidden or 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 | |
// Подключение файла JS | |
JHtml::script(JUri::base().'templates/'.$this->template.'/js/js.js', false); | |
$document = JFactory::getDocument(); | |
// Add Javascript | |
$document->addScriptDeclaration(' | |
window.event("domready", function() { |
This file contains hidden or 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 | |
$text = strip_tags($curr->name); | |
if (!function_exists('truncate_words')) { | |
function truncate_words($text, $limit=30) { | |
$text=mb_substr($text,0,$limit); | |
/*если не пустая обрезаем до последнего пробела*/ | |
if(mb_substr($text,mb_strlen($text)-1,1) && mb_strlen($text)==$limit) { | |
$textret=mb_substr($text,0,mb_strlen($text)-mb_strlen(strrchr($text,' '))); | |
if(!empty($textret)) { | |
return $textret."..."; |
NewerOlder