public function prepare($name = "", $value = NULL) { $discussionURLParams = $this->instance->getDiscussionURLParamsArray(); // zvolime spravny nazev konfiguracniho parametru pro titulek - podle toho co zobrazujeme za RSS switch ($discussionURLParams[0]) { // clanek case LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_article")->getContent(): $articles = new ArticlesRecords(array("url" => $discussionURLParams[1])); if ($articles->count() < 1) { LBoxFront::reloadHomePage(); } else { $this->articleHeading = $articles->current()->heading; } $this->configParamNamePageTitle = "page_rss_discussion_article_title_pattern"; break; // party /* case LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_party")->getContent(): $parties = new PartiesRecords(array("url" => $discussionURLParams[1])); if ($parties->count() < 1) LBoxFront::reloadHomePage(); else $this->articleHeading = $parties->current()->name ." ". $parties->current()->datetime; $this->configParamNamePageTitle = "page_rss_discussion_party_title_pattern"; break; */ // guestbook // party /* case LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_party")->getContent(): $parties = new PartiesRecords(array("url" => $discussionURLParams[1])); if ($parties->count() < 1) LBoxFront::reloadHomePage(); else $this->articleHeading = $parties->current()->name ." ". $parties->current()->datetime; $this->configParamNamePageTitle = "page_rss_discussion_party_title_pattern"; break; */ // guestbook case LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_guestbook")->getContent(): $this->configParamNamePageTitle = "page_rss_discussion_guestbook_title_pattern"; break; } return parent::prepare($name, $value); }
public function __construct($filter = false, $order = false, $limit = false, $whereAdd = "") { try { $itemType = $this->getClassVar("itemType"); $articlesTypesNewsName = eval("return {$itemType}::\$articlesTypesNewsName;"); $articlesTypes = new ArticlesTypesRecords(array("name" => $articlesTypesNewsName)); $filter["ref_type"] = $articlesTypes->current()->id; parent::__construct($filter, $order, $limit, $whereAdd); } catch (Exception $e) { throw $e; } }