8 require_once(CH_DIRECTORY_PATH_CLASSES .
'ChWsbProfileFields.php');
19 $this->_aParam = $aParam;
23 $aFormInputsSubmit = array(
26 'name' =>
'submit_form',
27 'value' =>
_t(
'_Submit'),
32 $this->_aCustomForm[
'inputs'] = array_merge($this->_aCustomForm[
'inputs'], $aFormInputsSubmit);
34 parent::__construct($this->_aCustomForm);
41 'form_attrs' => array(
42 'name' =>
'form_site',
43 'action' => CH_WSB_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() .
'browse/my/add',
45 'enctype' =>
'multipart/form-data',
50 'table' =>
'ch_sites_main',
52 'submit_name' =>
'submit_form',
60 'caption' =>
_t(
'_ch_sites_form_url'),
64 'params' => array(1, 255),
65 'error' =>
_t(
'_ch_sites_form_field_err'),
80 $oCategories->getTagObjectConfig();
83 'form_attrs' => array(
84 'name' =>
'form_site',
85 'action' => CH_WSB_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() .
'browse/my/add',
87 'enctype' =>
'multipart/form-data',
92 'table' =>
'ch_sites_main',
95 'uri_title' =>
'title',
96 'submit_name' =>
'submit_form',
104 'value' => isset($this->_aParam[
'url']) ? $this->_aParam[
'url'] :
'',
105 'caption' =>
_t(
'_ch_sites_form_url'),
109 'params' => array(1, 255),
110 'error' =>
_t(
'_ch_sites_form_field_err'),
120 'value' => isset($this->_aParam[
'title']) ? $this->_aParam[
'title'] :
'',
121 'caption' =>
_t(
'_ch_sites_form_title'),
125 'params' => array(1, 100),
126 'error' =>
_t(
'_ch_sites_form_field_err'),
133 'description' => array(
134 'type' =>
'textarea',
135 'name' =>
'description',
136 'value' => isset($this->_aParam[
'description']) ? $this->_aParam[
'description'] :
'',
137 'caption' =>
_t(
'_ch_sites_form_description'),
142 'params' => array(1, 64000),
143 'error' =>
_t(
'_ch_sites_form_field_err'),
149 'thumbnail' => array(
151 'name' =>
'thumbnail',
153 'caption' =>
'Thumbnail'
158 'caption' =>
_t(
'_ch_sites_form_photo'),
159 'info' =>
_t(
'_ch_sites_form_photo_inf')
164 'caption' =>
_t(
'_Tags'),
168 'error' =>
_t(
'_ch_sites_form_field_err'),
173 'info' =>
_t(
'_sys_tags_note')
175 'categories' => $oCategories->getGroupChooser(
'ch_sites', (
int)$this->_oModule->iOwnerId,
true),
176 'allowView' => $this->_oModule->oPrivacy->getGroupChooser($this->_oModule->iOwnerId,
177 'ch_sites',
'view', array(),
_t(
'_ch_sites_caption_allow_view')),
178 'allowComments' => $this->_oModule->oPrivacy->getGroupChooser($this->_oModule->iOwnerId,
179 'ch_sites',
'comments', array(),
_t(
'_ch_sites_caption_allow_comments')),
180 'allowRate' => $this->_oModule->oPrivacy->getGroupChooser($this->_oModule->iOwnerId,
181 'ch_sites',
'rate', array(),
_t(
'_ch_sites_caption_allow_rate')),
185 if (isset($this->_aParam[
'thumbnail']) &&
getParam(
'ch_sites_account_type') !=
'No Automated Screenshots') {
186 $aForm[
'inputs'][
'thumbnail'][
'content'] = $this->_aParam[
'thumbnail'];
187 $aForm[
'inputs'][
'photo'][
'caption'] =
_t(
'_ch_sites_form_other_thumbnail');
189 if (isset($this->_aParam[
'thumbnail_html'])) {
191 'thumbnail_html' => array(
193 'name' =>
'thumbnail_html',
194 'value' => $this->_aParam[
'thumbnail_html'],
199 unset(
$aForm[
'inputs'][
'thumbnail']);
210 'medTags' =>
'sites',
211 'Categories' => array(
'Sites'),
213 $sTmpFile = CH_DIRECTORY_PATH_ROOT .
'tmp/' .
time() . (isset($_COOKIE[
'memberID']) ? (int)$_COOKIE[
'memberID'] :
'');
214 $bResult = $isRemote ?
copy($sPath, $sTmpFile) : move_uploaded_file($_FILES[
'photo'][
'tmp_name'], $sTmpFile);
216 $iRet =
ChWsbService::call(
'photos',
'perform_photo_upload', array($sTmpFile, $aFileInfo,
false),