/** * @see \cms\system\content\type\IContentType::getFormTemplate() */ public function getFormTemplate() { $contentData = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->contentData; if (isset($contentData['fileID'])) { $file = new File($contentData['fileID']); if ($file->fileID) { WCF::getTPL()->assign(array('file' => $file)); } } return parent::getFormTemplate(); }
/** * @see \cms\system\content\type\IContentType::getFormTemplate() */ public function getFormTemplate() { $contentData = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->contentData; if (isset($contentData['imageIDs'])) { $imageList = new FileList(); $imageList->getConditionBuilder()->add('fileID in (?)', array($contentData['imageIDs'])); $imageList->readObjects(); WCF::getTPL()->assign(array('imageList' => $imageList)); } return parent::getFormTemplate(); }
/** * @see \cms\system\content\type\IContentType::getOutput() */ public function getOutput(Content $content) { if ($content->userID) { $user = UserProfile::getUserProfile($content->userID); } else { if ($content->name) { $user = UserProfile::getUserProfileByUsername($content->name); } else { throw new SystemException('Neither user id nor username provided'); } } WCF::getTPL()->assign(array('user' => $user)); return parent::getOutput($content); }
/** * @see \cms\system\content\type\IContentType::getOutput() */ public function getOutput(Content $content) { $rssURL = $content->url; //try { $request = new HTTPRequest($rssURL); $request->execute(); $feedData = $request->getReply(); $feedData = $feedData['body']; //} //catch (SystemException $e) { //// log error //$e->getExceptionID(); //return; //} if (!($xml = simplexml_load_string($feedData))) { return; } $feed = array(); $i = $content->limit; $feedType = $this->getFeedType($xml); $feed = $this->getFeedData($xml, $i, $feedType); WCF::getTPL()->assign(array('rssFeed' => $feed)); return parent::getOutput($content); }
/** * @see \cms\system\content\type\IContentType::readParameters() */ public function readParameters() { parent::readParameters(); PollManager::getInstance()->setObject('de.codequake.cms.content', 0); }
/** * @see \cms\system\content\type\IContentType::getFormTemplate() */ public function getFormTemplate() { WCF::getTPL()->assign(array('boxList' => DashboardBoxCacheBuilder::getInstance()->getData(array(), 'boxes'))); return parent::getFormTemplate(); }