8 require_once(
'ChWsbConfig.php');
35 $this->sPrefix =
'ch_' . $this->
getUri();
36 $this->isPermalinkEnabled =
getParam($this->sPrefix .
'_permalinks') ==
'on';
38 $this->aDefaultAlbums = array(
'profile_album_name');
43 foreach ($this->aFilesConfig
as $k => $a)
44 $this->aFilePostfix[$k] = $a[
'postfix'];
53 if ($this->aUploaders)
61 $this->aUploaders = array(
63 'title' =>
'_sys_txt_uploader_html5',
64 'action' =>
'accept_html5',
65 'form' =>
'getUploadHtml5File',
66 'handle' =>
'serviceAcceptHtml5File',
69 'title' =>
'_' . $this->sPrefix .
'_regular',
70 'action' =>
'accept_upload',
71 'form' =>
'getUploadFormFile',
72 'handle' =>
'serviceAcceptFile',
75 'title' =>
'_' . $this->sPrefix .
'_record',
76 'action' =>
'accept_record',
77 'form' =>
'getRecordFormFile',
78 'handle' =>
'serviceAcceptRecordFile',
81 'title' =>
'_' . $this->sPrefix .
'_embed',
82 'action' =>
'accept_embed',
83 'form' =>
'getEmbedFormFile',
84 'handle' =>
'serviceAcceptEmbedFile',
115 $sName = array_key_exists($sPseud, $this->aGlParams) ? $this->aGlParams[$sPseud] : $this->
getMainPrefix() .
'_' .$sPseud;
126 $sPref =
'_' . $this->sPrefix .
'_admin_';
128 'action_activate' => array(
129 'caption' => $sPref .
'activate',
130 'method' =>
'adminApproveFile'
132 'action_deactivate' => array(
133 'caption' => $sPref .
'deactivate',
134 'method' =>
'adminDisapproveFile'
136 'action_featured' => array(
137 'caption' => $sPref .
'feature',
138 'method' =>
'adminMakeFeatured'
140 'action_unfeatured' => array(
141 'caption' => $sPref .
'unfeature',
142 'method' =>
'adminMakeUnfeatured'
144 'action_delete' => array(
145 'caption' => $sPref .
'delete',
146 'method' =>
'_deleteFile'
155 $sPref .
'edit' => array(
'type' =>
'submit',
'value' =>
_t(
'_Edit')),
156 $sPref .
'delete' => array(
'type' =>
'submit',
'value' =>
_t(
'_Delete')),
157 $sPref .
'organize' => array(
'type' =>
'submit',
'value' =>
_t(
'_' . $this->sPrefix .
'_organize_objects')),
158 $sPref .
'add_objects' => array(
'type' =>
'submit',
'value' =>
_t(
'_' . $this->sPrefix .
'_add_objects')),
167 foreach ($aAllUploaders
as $sKey => $aValue) {
168 if (in_array($sKey, $aList))
169 $aChoosen[
_t($sKey)] = $aValue;
176 if (!($sAllowed = $this->
getGlParam(
'allowed_exts')))
179 $aExts = preg_split(
'/[\s,;]/', $sAllowed);
180 return in_array(
$sExt, $aExts);
185 $sExt = pathinfo($sFilename, PATHINFO_EXTENSION);
193 $sData =
getParam($this->sPrefix .
'_uploader_switcher');
194 if (strlen($sData) > 0)
195 $aAllTypes = explode(
',', $sData);
198 foreach ($aAllTypes
as $sValue) {
210 $a[$r[
'title']] = array (
211 'active' =>
$_GET[
'mode'] == $k ?
true :
false,
212 'href' => $sLink .
'&mode=' . $k,
224 foreach($this->aDefaultAlbums
as $sAlbum)
225 $aResult[] = str_replace(array_keys($aReplacement), array_values($aReplacement), $this->
getGlParam($sAlbum));