Reci DA! Kulturi!

Kulturna baština

{source 0} setQuery($query); $row = $db->loadObjectList(); $n=0; $extraFields = array(); $titles = array(); $links = array(); $imgGen = array(); if(!function_exists ("LimitText")) { function LimitText($text , $limit) { $introText = strip_tags ($text); /*if (str_word_count($text, 0) > $limit) { $words = str_word_count($introText, 2); $pos = array_keys($words); $introText = substr($introText, 0, $pos[$limit]) . '...'; }*/ $introText = substr($introText,0,$limit) . " ..."; libxml_use_internal_errors(true); $dom = new DOMDocument; $dom->loadHTML(''.$introText); $mock = new DOMDocument; $body = $dom->getElementsByTagName('body')->item(0); foreach ($body->childNodes as $child) { $mock->appendChild($mock->importNode($child, true)); } $introText = trim($mock->saveHTML()); return $introText; } } ?>
$article) { ?>
"> extra_fields,true); $titles[$n] = $article->title; $links[$n] = K2HelperRoute::getItemRoute($article->id.':'.urlencode($article->alias),$article->catid.':'.urlencode($article->catalias)); if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$article->id).'_Generic.jpg')) { $imgGen[$n] = JURI::base(true).'/media/k2/items/cache/'.md5("Image".$article->id);//.'_Generic.jpg'; }else{ $imgGen[$n] = ""; } if($index % 2 == 1) { ?>

introtext,250);?>
SAZNAJTE VIŠE

introtext,250);?>
SAZNAJTE VIŠE
{/source}