assign("ModulesInstalation", Configuration::getInstance("ModulesInstalation")->config); if (($_GET['id']>0) || !empty($_GET['seourl'])) { try { // #ArticlesCommentary action block if ($tpl->ModulesInstalation->Articles->Commentaries==1) { $conf=new ArticlesCommentaryConfig(); $c = new CommentaryList($conf); $action=false; if (is_array($_POST['action']) && array_key_exists("insertCommentary", $_POST['action'])) $action=true; elseif (($_GET['action']=="deleteCommentary") || ($_GET['action']=="rebuildTopic")) $action=true; if ($action) $c->checkAction(); } // --end #ArticlesCommentary action block $a = new Article(array("ID"=>$_GET['id'], "seourl"=>$_GET['seourl'])); if ($_GET['id']>0) $a->fetchItemObject(null, "DetailQuery"); elseif (!empty($_GET['seourl'])) $a->fetchItemObject(null, "BySEOURLQuery"); if ($a->isPublished()) { $a->fetchDropDown(); if ($a->metaKeywords) $tpl->metaKeywords = $a->metaKeywords.", ".$tpl->metaKeywords; if ($a->metaDescription) $tpl->metaDescription = $a->metaDescription; if ($tpl->ModulesInstalation->Articles->CodeExamples==1) $a->getCodeExamples(); $tpl->assign("item", $a); $tpl->assign("otherImages", $a->getImagesObjects("OtherImagesQuery")); $tpl->assign("dropDownPath", $a->dropdownMain->getPath()); $tpl->assign("dataDropDownList", $a->dropdownList); $a->updateHits(); $tpl->TITLEbody = $a->name; // #ArticlesCommentary fetch block if ($tpl->ModulesInstalation->Articles->Commentaries==1) { $c->getTopicTree(array($a->ID), array('queryType'=>"AllQueryUser", 'selectType'=>'AllSelect')); $ic=new Commentary($_POST, $conf); $ic->IDtopic=$a->ID; $ic->IDparent=$_GET['idcommentaryp']; $tpl->assign("commentaryAction", "insertCommentary"); $tpl->assign("itemCommentary", $ic); $tpl->assign("dataCommentaryList", $c->topicTreeList); $tpl->assign("dataCommentaryItemList", $c->topicItemList); $tpl->assign("dataCommentaryRoot", $c->getTopicRoot($a->ID)->ID); if ($_GET['action']=="answerCommentary") $ic->name="Re: ".$tpl->dataCommentaryItemList[$ic->IDparent]->name; } // --end #ArticlesCommentary fetch block // #ArticlesFiles fetch block if ($tpl->ModulesInstalation->Articles->Files==1) $tpl->assign("dataFiles", $a->getFilesObjects()); // --end #ArticlesCommentary fetch block // #Similar Articles -- start if ($tpl->ModulesInstalation->Articles->SimilarArticles==1 && !$tpl->isValid('/_'.$tpl->aSName.'/SimilarArticles.tpl', 120)) { $tpl->assign("dataSimilarArticles", $a->getSimilarArticles()); } // #Similar Articles -- end } else { $tpl->TITLEbody = "Tento článek již není publikován."; } } catch (Exception $e) { $tpl->TITLEbody = $e->getMessage(); } } $tpl->TITLE = $tpl->TITLEbody." - ".$tpl->TITLE; include $_SERVER['DOCUMENT_ROOT']."/header.php"; // *******START********** breadCrumbsPath $bp=array(); if (is_object($tpl->item->dropdownMain)) { $a=$tpl->item->dropdownMain->getPath(); foreach($a as $i) { if ($i->isRoot()) continue; $bp[]=$i->getWebATag(); } $bp[]=$tpl->item->getWebATag(); } $tpl->assign("breadCrumbsPath", $bp); // *******END********** breadCrumbsPath $tpl->display('/_'.$tpl->aSName.'/header.tpl'); $tpl->display('/_'.$tpl->aSName.'/Article.tpl'); include $_SERVER['DOCUMENT_ROOT']."/footer.php"; ?>