public static function getSlotContents() { if (!isset(self::$slots)) { $fh = Loader::helper('file'); Loader::library('marketplace'); $cfToken = Marketplace::getSiteToken(); $r = $fh->getContents(NEWSFLOW_SLOT_CONTENT_URL . '?cfToken=' . $cfToken); self::$slots = NewsflowSlotItem::parseResponse($r); } return self::$slots; }
public function view() { Loader::library('newsflow'); // get the latest data as well $slots = Newsflow::getSlotContents(); $this->set('slot', $slots[$this->slot]); // this is kind of a hack if ($this->slot == 'C') { $ni = Newsflow::getEditionByPath('/newsflow'); if (is_object($ni)) { $this->set('editionTitle', $ni->getTitle()); $this->set('editionDescription', $ni->getDescription()); $this->set('editionDate', $ni->getDate()); $this->set('editionID', $ni->getID()); } else { } } }
<?php defined('C5_EXECUTE') or die("Access Denied."); $cih = Loader::helper('concrete/interface'); if ($cih->showNewsflowOverlay()) { Loader::library('newsflow'); if (Loader::helper('validation/numbers')->integer($_REQUEST['cID'])) { $ed = Newsflow::getEditionByID($_REQUEST['cID']); if (is_object($ed)) { print $ed->getContent(); } } else { if (isset($_REQUEST['cPath'])) { $ed = Newsflow::getEditionByPath($_REQUEST['cPath']); if (is_object($ed)) { print $ed->getContent(); } } } }