/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser, $ilAccess, $ilSetting; if ($this->getCurrentDetailLevel() == 0) { return ""; } $feed_set = new ilSetting("feed"); if ($feed_set->get("disable_rep_feeds")) { return ""; } // if no dynamic reload if (!$this->getDynamic()) { $this->feed->fetch(); $this->setData($this->feed->getItems()); } //$this->setTitle($this->feed->getChannelTitle()); $this->setData($this->feed->getItems()); if ($ilAccess->checkAccess("write", "", $this->getRefId())) { $ilCtrl->setParameterByClass("ilobjexternalfeedgui", "ref_id", $this->getRefId()); $ilCtrl->setParameter($this, "external_feed_block_id", $this->getBlockId()); $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjexternalfeedgui", "ilexternalfeedblockgui"), "editFeedBlock"), $lng->txt("settings")); $ilCtrl->clearParametersByClass("ilobjexternalfeedgui"); } // JS enabler $add = ""; if ($_SESSION["il_feed_js"] == "n" || $ilUser->getPref("il_feed_js") == "n" && $_SESSION["il_feed_js"] != "y") { $add = $this->getJSEnabler(); } return parent::getHTML() . $add; }
/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser, $ilAccess, $ilSetting; $feed_set = new ilSetting("feed"); if ($ilSetting->get("block_limit_pdfeed") == 0) { return ""; } if ($this->getCurrentDetailLevel() == 0) { return ""; } // if no dynamic reload if (!$this->getDynamic()) { $this->feed->fetch(); $this->setData($this->feed->getItems()); } $ilCtrl->setParameter($this, "external_feed_block_id", $this->getBlockId()); $this->addBlockCommand($ilCtrl->getLinkTarget($this, "editFeedBlock"), $lng->txt("edit")); $this->addBlockCommand($ilCtrl->getLinkTarget($this, "confirmDeleteFeedBlock"), $lng->txt("delete")); $ilCtrl->setParameter($this, "external_feed_block_id", ""); // JS enabler $add = ""; if ($_SESSION["il_feed_js"] == "n" || $ilUser->getPref("il_feed_js") == "n" && $_SESSION["il_feed_js"] != "y") { $add = $this->getJSEnabler(); } return parent::getHTML() . $add; }