コード例 #1
0
 public function __construct($aInfo, $oTemplate = false)
 {
     $this->MODULE = 'bx_timeline';
     parent::__construct($aInfo, $oTemplate);
     $iUserId = $this->_oModule->getUserId();
     $iOwnerId = $this->_oModule->getOwnerId();
     $this->aFormAttrs['action'] = BX_DOL_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'post/';
     $this->aInputs['owner_id']['value'] = $iOwnerId;
     if (isset($this->aInputs['link'])) {
         $this->aInputs['link']['content'] = $this->_oModule->_oTemplate->getAttachLinkField($iUserId);
     }
     if (isset($this->aInputs['photo'])) {
         $aFormNested = array('params' => array('nested_form_template' => 'uploader_nfw.html'), 'inputs' => array());
         $oFormNested = new BxDolFormNested('photo', $aFormNested, 'do_submit', $this->_oModule->_oTemplate);
         $this->aInputs['photo']['storage_object'] = $this->_oModule->_oConfig->getObject('storage_photos');
         $this->aInputs['photo']['images_transcoder'] = $this->_oModule->_oConfig->getObject('transcoder_photos_preview');
         $this->aInputs['photo']['uploaders'] = $this->_oModule->_oConfig->getUploaders('photo');
         $this->aInputs['photo']['upload_buttons_titles'] = array('Simple' => 'camera');
         $this->aInputs['photo']['multiple'] = true;
         $this->aInputs['photo']['ghost_template'] = $oFormNested;
     }
     if (isset($this->aInputs['video'])) {
         $aFormNested = array('params' => array('nested_form_template' => 'uploader_nfw.html'), 'inputs' => array());
         $oFormNested = new BxDolFormNested('video', $aFormNested, 'do_submit', $this->_oModule->_oTemplate);
         $this->aInputs['video']['storage_object'] = $this->_oModule->_oConfig->getObject('storage_videos');
         $this->aInputs['video']['images_transcoder'] = $this->_oModule->_oConfig->getObject('transcoder_videos_poster');
         $this->aInputs['video']['uploaders'] = $this->_oModule->_oConfig->getUploaders('video');
         $this->aInputs['video']['upload_buttons_titles'] = array('Simple' => 'video-camera');
         $this->aInputs['video']['multiple'] = true;
         $this->aInputs['video']['ghost_template'] = $oFormNested;
     }
     if (isset($this->aInputs['attachments'])) {
         $this->aInputs['attachments']['content'] = '__attachments_menu__';
     }
 }
コード例 #2
0
 public function __construct($aInfo, $oTemplate = false)
 {
     parent::__construct($aInfo, $oTemplate);
     $CNF =& $this->_oModule->_oConfig->CNF;
     if (isset($this->aInputs[$CNF['FIELD_TEXT']])) {
         $this->aInputs[$CNF['FIELD_TEXT']]['attrs'] = array_merge(array('id' => $CNF['FIELD_TEXT_ID']), is_array($this->aInputs[$CNF['FIELD_TEXT']]['attrs']) ? $this->aInputs[$CNF['FIELD_TEXT']]['attrs'] : array());
     }
     if (isset($this->aInputs[$CNF['FIELD_PHOTO']])) {
         $this->aInputs[$CNF['FIELD_PHOTO']]['storage_object'] = $CNF['OBJECT_STORAGE'];
         $this->aInputs[$CNF['FIELD_PHOTO']]['uploaders'] = array('sys_simple', 'sys_html5');
         $this->aInputs[$CNF['FIELD_PHOTO']]['images_transcoder'] = $CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW'];
         $this->aInputs[$CNF['FIELD_PHOTO']]['multiple'] = true;
         $this->aInputs[$CNF['FIELD_PHOTO']]['content_id'] = 0;
         $this->aInputs[$CNF['FIELD_PHOTO']]['ghost_template'] = '';
     }
     if (isset($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']])) {
         bx_import('BxDolPrivacy');
         $this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']] = BxDolPrivacy::getGroupChooser($CNF['OBJECT_PRIVACY_VIEW']);
     }
 }
コード例 #3
0
 public function __construct($aInfo, $oTemplate = false)
 {
     parent::__construct($aInfo, $oTemplate);
     $CNF =& $this->_oModule->_oConfig->CNF;
     if (!empty($CNF['FIELD_PICTURE'])) {
         $this->_aImageFields[$CNF['FIELD_PICTURE']] = array('storage_object' => $CNF['OBJECT_STORAGE'], 'images_transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_THUMB'], 'field_preview' => $CNF['FIELD_PICTURE_PREVIEW']);
     }
     if (!empty($CNF['FIELD_COVER'])) {
         $this->_aImageFields[$CNF['FIELD_COVER']] = array('storage_object' => $CNF['OBJECT_STORAGE_COVER'], 'images_transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_COVER_THUMB'], 'field_preview' => $CNF['FIELD_COVER_PREVIEW']);
     }
     if (!empty($CNF['FIELD_PICTURE_PREVIEW'])) {
         $this->_aImageFields[$CNF['FIELD_PICTURE_PREVIEW']] = $this->_aImageFields[$CNF['FIELD_PICTURE']];
     }
     if (!empty($CNF['FIELD_COVER_PREVIEW'])) {
         $this->_aImageFields[$CNF['FIELD_COVER_PREVIEW']] = $this->_aImageFields[$CNF['FIELD_COVER']];
     }
     $oAccountProfile = BxDolProfile::getInstanceAccountProfile();
     if ($oAccountProfile) {
         $this->_iAccountProfileId = $oAccountProfile->id();
     }
 }