예제 #1
0
 /**
  * @see	\cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     $imageIDs = $content->imageIDs;
     //neccessary for old data (version 2.0.0 Beta 7 or older)
     if (is_string($content->imageIDs)) {
         $imageIDs = explode(',', $content->imageIDs);
     }
     $list = new FileList();
     $list->getConditionBuilder()->add('fileID in (?)', array($imageIDs));
     $list->readObjects();
     WCF::getTPL()->assign(array('images' => $list));
     return parent::getOutput($content);
 }
예제 #2
0
 /**
  * @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);
 }
예제 #3
0
 /**
  * @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);
 }
예제 #4
0
 /**
  * @see	\cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     $file = FileCache::getInstance()->getFile($content->fileID);
     WCF::getTPL()->assign(array('file' => $file));
     return parent::getOutput($content);
 }
예제 #5
0
 /**
  * @see	\cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     $image = FileCache::getInstance()->getFile($content->imageID);
     WCF::getTPL()->assign(array('image' => $image));
     return AbstractContentType::getOutput($content);
 }