/** * Initialize the uploader * * @return null */ public function initForumUploader() { $uploader = new \Cx\Core_Modules\Uploader\Model\Entity\Uploader(); $uploader->setCallback('forumFileUploaderCallback'); $options = array('id' => 'forum-attachment-uploader', 'allowed-extensions' => explode(',', $this->_arrSettings['allowed_extensions']), 'style' => 'display:none', 'data-upload-limit' => 1); $uploader->setOptions($options); $cx = \Cx\Core\Core\Controller\Cx::instanciate(); $uploader->setFinishedCallback(array($cx->getCodeBaseModulePath() . '/Forum/Controller/Forum.class.php', '\\Cx\\Modules\\Forum\\Controller\\Forum', 'uploadFinished')); $this->_objTpl->setVariable(array('FORUM_UPLOADER' => $uploader->getXhtml(), 'FORUM_UPLOADER_ID' => $uploader->getId())); }