本文整理汇总了PHP中PhocaGalleryFile::getFileSizeReadable方法的典型用法代码示例。如果您正苦于以下问题:PHP PhocaGalleryFile::getFileSizeReadable方法的具体用法?PHP PhocaGalleryFile::getFileSizeReadable怎么用?PHP PhocaGalleryFile::getFileSizeReadable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhocaGalleryFile
的用法示例。
在下文中一共展示了PhocaGalleryFile::getFileSizeReadable方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMultipleUploadSizeFormat
public static function getMultipleUploadSizeFormat($size)
{
$readableSize = PhocaGalleryFile::getFileSizeReadable($size, '%01.0f %s', 1);
$readableSize = str_replace(' ', '', $readableSize);
$readableSize = strtolower($readableSize);
return $readableSize;
}
示例2: getFileSize
function getFileSize($filename, $readable = 1)
{
$path =& PhocaGalleryPath::getPath();
$fileNameAbs = JPath::clean($path->image_abs . $filename);
if (!JFile::exists($fileNameAbs)) {
$fileNameAbs = $path->image_abs_front . 'phoca_thumb_l_no_image.png';
}
if ($readable == 1) {
return PhocaGalleryFile::getFileSizeReadable(filesize($fileNameAbs));
} else {
return filesize($fileNameAbs);
}
}
示例3: display
public function display($tpl = null)
{
$this->field = JRequest::getVar('field');
$this->fce = 'phocaSelectFileName_' . $this->field;
JHTML::stylesheet('media/com_phocagallery/css/administrator/phocagallery.css');
$document =& JFactory::getDocument();
//$document->addCustomTag(PhocaGalleryRenderAdmin::renderIeCssLink(1));
$this->folderstate = $this->get('FolderState');
$this->images = $this->get('Images');
$this->folders = $this->get('Folders');
$this->session = JFactory::getSession();
$params = JComponentHelper::getParams('com_phocagallery');
$this->tmpl['enablethumbcreation'] = $params->get('enable_thumb_creation', 1);
$this->tmpl['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int) $this->tmpl['enablethumbcreation']);
$this->tmpl['multipleuploadchunk'] = $params->get('multiple_upload_chunk', 0);
$this->tmpl['large_image_width'] = $params->get('large_image_width', 640);
$this->tmpl['large_image_height'] = $params->get('large_image_height', 480);
$this->tmpl['javaboxwidth'] = $params->get('java_box_width', 480);
$this->tmpl['javaboxheight'] = $params->get('java_box_height', 480);
$this->tmpl['uploadmaxsize'] = $params->get('upload_maxsize', 3145728);
$this->tmpl['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->tmpl['uploadmaxsize']);
$this->tmpl['uploadmaxreswidth'] = $params->get('upload_maxres_width', 3072);
$this->tmpl['uploadmaxresheight'] = $params->get('upload_maxres_height', 2304);
$this->tmpl['enablejava'] = $params->get('enable_java', -1);
$this->tmpl['enablemultiple'] = $params->get('enable_multiple', 0);
$this->tmpl['multipleuploadmethod'] = $params->get('multiple_upload_method', 1);
$this->tmpl['multipleresizewidth'] = $params->get('multiple_resize_width', -1);
$this->tmpl['multipleresizeheight'] = $params->get('multiple_resize_height', -1);
$this->currentFolder = '';
if (isset($this->folderstate->folder) && $this->folderstate->folder != '') {
$this->currentFolder = $this->folderstate->folder;
}
// - - - - - - - - - -
//TABS
// - - - - - - - - - -
$this->tmpl['tab'] = JRequest::getVar('tab', '', '', 'string');
$this->tmpl['displaytabs'] = 0;
// UPLOAD
$this->tmpl['currenttab']['upload'] = $this->tmpl['displaytabs'];
$this->tmpl['displaytabs']++;
// MULTIPLE UPLOAD
if ((int) $this->tmpl['enablemultiple'] >= 0) {
$this->tmpl['currenttab']['multipleupload'] = $this->tmpl['displaytabs'];
$this->tmpl['displaytabs']++;
}
// MULTIPLE UPLOAD
if ($this->tmpl['enablejava'] >= 0) {
$this->tmpl['currenttab']['javaupload'] = $this->tmpl['displaytabs'];
$this->tmpl['displaytabs']++;
}
// - - - - - - - - - - -
// Upload
// - - - - - - - - - - -
$sU = new PhocaGalleryFileUploadSingle();
$sU->returnUrl = 'index.php?option=com_phocagallery&view=phocagalleryi&tab=upload&tmpl=component&field=' . $this->field . '&folder=' . $this->currentFolder;
$sU->tab = 'upload';
$this->tmpl['su_output'] = $sU->getSingleUploadHTML();
$this->tmpl['su_url'] = JURI::base() . 'index.php?option=com_phocagallery&task=phocagalleryu.upload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&viewback=phocagalleryi&field=' . $this->field . '&' . 'folder=' . $this->currentFolder . '&tab=upload';
// - - - - - - - - - - -
// Multiple Upload
// - - - - - - - - - - -
// Get infos from multiple upload
$muFailed = JRequest::getVar('mufailed', '0', '', 'int');
$muUploaded = JRequest::getVar('muuploaded', '0', '', 'int');
$this->tmpl['mu_response_msg'] = $muUploadedMsg = '';
if ($muUploaded > 0) {
$muUploadedMsg = JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded;
}
if ($muFailed > 0) {
$muFailedMsg = JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed;
}
if ($muFailed > 0 && $muUploaded > 0) {
$this->tmpl['mu_response_msg'] = '<div class="alert alert-info">' . '<button type="button" class="close" data-dismiss="alert">×</button>' . JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded . '<br />' . JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed . '</div>';
} else {
if ($muFailed > 0 && $muUploaded == 0) {
$this->tmpl['mu_response_msg'] = '<div class="alert alert-error">' . '<button type="button" class="close" data-dismiss="alert">×</button>' . JText::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG') . ': ' . $muFailed . '</div>';
} else {
if ($muFailed == 0 && $muUploaded > 0) {
$this->tmpl['mu_response_msg'] = '<div class="alert alert-success">' . '<button type="button" class="close" data-dismiss="alert">×</button>' . JText::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG') . ': ' . $muUploaded . '</div>';
} else {
$this->tmpl['mu_response_msg'] = '';
}
}
}
if ((int) $this->tmpl['enablemultiple'] >= 0) {
PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries();
$mU = new PhocaGalleryFileUploadMultiple();
$mU->frontEnd = 0;
$mU->method = $this->tmpl['multipleuploadmethod'];
$mU->url = JURI::base() . 'index.php?option=com_phocagallery&task=phocagalleryu.multipleupload&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&tab=multipleupload&field=' . $this->field . '&folder=' . $this->currentFolder;
$mU->reload = JURI::base() . 'index.php?option=com_phocagallery&view=phocagalleryi&tmpl=component&' . $this->session->getName() . '=' . $this->session->getId() . '&' . JSession::getFormToken() . '=1&tab=multipleupload&' . 'field=' . $this->field . '&folder=' . $this->currentFolder;
$mU->maxFileSize = PhocaGalleryFileUploadMultiple::getMultipleUploadSizeFormat($this->tmpl['uploadmaxsize']);
$mU->chunkSize = '1mb';
$mU->imageHeight = $this->tmpl['multipleresizeheight'];
$mU->imageWidth = $this->tmpl['multipleresizewidth'];
$mU->imageQuality = 100;
$mU->renderMultipleUploadJS(0, $this->tmpl['multipleuploadchunk']);
$this->tmpl['mu_output'] = $mU->getMultipleUploadHTML();
}
// - - - - - - - - - - -
//.........这里部分代码省略.........
示例4: display
function display($tpl = null)
{
$app = JFactory::getApplication();
$document =& JFactory::getDocument();
$uri =& JFactory::getURI();
$menus = $app->getMenu();
$menu = $menus->getActive();
$this->params =& $app->getParams();
$user =& JFactory::getUser();
$path = PhocaGalleryPath::getPath();
$this->itemId = $app->input->get('Itemid', 0, 'int');
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
$access = PhocaGalleryAccess::isAccess($user->getAuthorisedViewLevels(), $neededAccessLevels);
$this->tmpl['pi'] = 'media/com_phocagallery/images/';
$this->tmpl['pp'] = 'index.php?option=com_phocagallery&view=user&controller=user';
$this->tmpl['pl'] = 'index.php?option=com_users&view=login&return=' . base64_encode($this->tmpl['pp'] . '&Itemid=' . $this->itemId);
// LIBRARY
$library =& PhocaGalleryLibrary::getLibrary();
//$libraries['pg-css-ie'] = $library->getLibrary('pg-css-ie');
// Only registered users
if (!$access) {
$app->redirect(JRoute::_($this->tmpl['pl'], false), JText::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'));
exit;
}
$this->tmpl['gallerymetakey'] = $this->params->get('gallery_metakey', '');
$this->tmpl['gallerymetadesc'] = $this->params->get('gallery_metadesc', '');
if ($this->tmpl['gallerymetakey'] != '') {
$document->setMetaData('keywords', $this->tmpl['gallerymetakey']);
}
if ($this->tmpl['gallerymetadesc'] != '') {
$document->setMetaData('description', $this->tmpl['gallerymetadesc']);
}
PhocaGalleryRenderFront::renderAllCSS();
// = = = = = = = = = = =
// PANE
// = = = = = = = = = = =
// - - - - - - - - - -
// ALL TABS
// - - - - - - - - - -
// UCP is disabled (security reasons)
if ((int) $this->params->get('enable_user_cp', 0) == 0) {
$app->redirect(JURI::base(true), JText::_('COM_PHOCAGALLERY_UCP_DISABLED'));
exit;
}
$this->tmpl['tab'] = $app->input->get('tab', 0, 'string');
$this->tmpl['maxuploadchar'] = $this->params->get('max_upload_char', 1000);
$this->tmpl['maxcreatecatchar'] = $this->params->get('max_create_cat_char', 1000);
$this->tmpl['dp'] = PhocaGalleryRenderInfo::getPhocaIc((int) $this->params->get('display_phoca_info', 1));
$this->tmpl['showpageheading'] = $this->params->get('show_page_heading', 1);
$this->tmpl['javaboxwidth'] = $this->params->get('java_box_width', 480);
$this->tmpl['javaboxheight'] = $this->params->get('java_box_height', 480);
$this->tmpl['enableuploadavatar'] = $this->params->get('enable_upload_avatar', 1);
$this->tmpl['uploadmaxsize'] = $this->params->get('upload_maxsize', 3145728);
$this->tmpl['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->tmpl['uploadmaxsize']);
$this->tmpl['uploadmaxreswidth'] = $this->params->get('upload_maxres_width', 3072);
$this->tmpl['uploadmaxresheight'] = $this->params->get('upload_maxres_height', 2304);
$this->tmpl['multipleuploadchunk'] = $this->params->get('multiple_upload_chunk', 0);
$this->tmpl['displaytitleupload'] = $this->params->get('display_title_upload', 0);
$this->tmpl['displaydescupload'] = $this->params->get('display_description_upload', 0);
$this->tmpl['enablejava'] = $this->params->get('enable_java', -1);
$this->tmpl['enablemultiple'] = $this->params->get('enable_multiple', 0);
$this->tmpl['ytbupload'] = $this->params->get('youtube_upload', 0);
$this->tmpl['multipleuploadmethod'] = $this->params->get('multiple_upload_method', 1);
$this->tmpl['multipleresizewidth'] = $this->params->get('multiple_resize_width', -1);
$this->tmpl['multipleresizeheight'] = $this->params->get('multiple_resize_height', -1);
$this->tmpl['usersubcatcount'] = $this->params->get('user_subcat_count', 5);
$this->tmpl['userimagesmaxspace'] = $this->params->get('user_images_max_size', 20971520);
$this->tmpl['iepx'] = '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
//Subcateogry
$this->tmpl['parentid'] = $app->input->get('parentcategoryid', 0, 'int');
$document->addScript(JURI::base(true) . '/media/com_phocagallery/js/comments.js');
$document->addCustomTag(PhocaGalleryRenderFront::renderOnUploadJS());
$document->addCustomTag(PhocaGalleryRenderFront::renderDescriptionCreateCatJS((int) $this->tmpl['maxcreatecatchar']));
$document->addCustomTag(PhocaGalleryRenderFront::userTabOrdering());
// SubCategory + Image
$document->addCustomTag(PhocaGalleryRenderFront::renderDescriptionCreateSubCatJS((int) $this->tmpl['maxcreatecatchar']));
$document->addCustomTag(PhocaGalleryRenderFront::saveOrderUserJS());
$model = $this->getModel('user');
$ownerMainCategory = $model->getOwnerMainCategory($user->id);
$this->tmpl['usertab'] = 1;
$this->tmpl['createcategory'] = 1;
$this->tmpl['createsubcategory'] = 1;
$this->tmpl['images'] = 1;
$this->tmpl['displayupload'] = 1;
// Tabs
$displayTabs = 0;
if ((int) $this->tmpl['usertab'] == 0) {
$currentTab['user'] = -1;
} else {
$currentTab['user'] = $displayTabs;
$displayTabs++;
}
if ((int) $this->tmpl['createcategory'] == 0) {
$currentTab['createcategory'] = -1;
} else {
$currentTab['createcategory'] = $displayTabs;
$displayTabs++;
}
if ((int) $this->tmpl['createsubcategory'] == 0) {
$currentTab['createsubcategory'] = -1;
//.........这里部分代码省略.........
示例5: realSingleUpload
public static function realSingleUpload($frontEnd = 0)
{
// $paramsC = JComponentHelper::getParams('com_phocagallery');
// $chunkMethod = $paramsC->get( 'multiple_upload_chunk', 0 );
// $uploadMethod = $paramsC->get( 'multiple_upload_method', 1 );
$app = JFactory::getApplication();
JRequest::checkToken('request') or jexit('ERROR: ' . JText::_('COM_PHOCAGALLERY_INVALID_TOKEN'));
JResponse::allowCache(false);
$path = PhocaGalleryPath::getPath();
$file = JRequest::getVar('Filedata', '', 'files', 'array');
$folder = JRequest::getVar('folder', '', '', 'path');
$format = JRequest::getVar('format', 'html', '', 'cmd');
$return = JRequest::getVar('return-url', null, 'post', 'base64');
//includes field
$viewBack = JRequest::getVar('viewback', '', '', '');
$tab = JRequest::getVar('tab', '', '', 'string');
$field = JRequest::getVar('field');
$errUploadMsg = '';
$folderUrl = $folder;
$tabUrl = '';
$component = JRequest::getVar('option', '', '', 'string');
// In case no return value will be sent (should not happen)
if ($component != '' && $frontEnd == 0) {
$componentUrl = 'index.php?option=' . $component;
} else {
$componentUrl = 'index.php';
}
if ($tab != '') {
$tabUrl = '&tab=' . (string) $tab;
}
$ftp = JClientHelper::setCredentialsFromRequest('ftp');
// Make the filename safe
if (isset($file['name'])) {
$file['name'] = JFile::makeSafe($file['name']);
}
if (isset($folder) && $folder != '') {
$folder = $folder . DS;
}
// All HTTP header will be overwritten with js message
if (isset($file['name'])) {
$filepath = JPath::clean($path->image_abs . $folder . strtolower($file['name']));
if (!PhocaGalleryFileUpload::canUpload($file, $errUploadMsg, $frontEnd)) {
if ($errUploadMsg == 'COM_PHOCAGALLERY_WARNING_FILE_TOOLARGE') {
$errUploadMsg = JText::_($errUploadMsg) . ' (' . PhocaGalleryFile::getFileSizeReadable($file['size']) . ')';
} else {
if ($errUploadMsg == 'COM_PHOCAGALLERY_WARNING_FILE_TOOLARGE_RESOLUTION') {
$imgSize = PhocaGalleryImage::getImageSize($file['tmp_name']);
$errUploadMsg = JText::_($errUploadMsg) . ' (' . (int) $imgSize[0] . ' x ' . (int) $imgSize[1] . ' px)';
} else {
$errUploadMsg = JText::_($errUploadMsg);
}
}
if ($return) {
$app->enqueueMessage($errUploadMsg, 'error');
$app->redirect(base64_decode($return) . '&folder=' . $folderUrl);
exit;
} else {
$app->enqueueMessage($errUploadMsg, 'error');
$app->redirect($componentUrl, $errUploadMsg, 'error');
exit;
}
}
if (JFile::exists($filepath)) {
if ($return) {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_FILE_ALREADY_EXISTS'), 'error');
$app->redirect(base64_decode($return) . '&folder=' . $folderUrl);
exit;
} else {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_FILE_ALREADY_EXISTS'), 'error');
$app->redirect($componentUrl);
exit;
}
}
if (!JFile::upload($file['tmp_name'], $filepath)) {
if ($return) {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error');
$app->redirect(base64_decode($return) . '&folder=' . $folderUrl);
exit;
} else {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error');
$app->redirect($componentUrl);
exit;
}
} else {
if ((int) $frontEnd > 0) {
return $file['name'];
}
if ($return) {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_SUCCESS_FILE_UPLOAD'));
$app->redirect(base64_decode($return) . '&folder=' . $folderUrl);
exit;
} else {
$app->enqueueMessage(JText::_('COM_PHOCAGALLERY_SUCCESS_FILE_UPLOAD'));
$app->redirect($componentUrl, JText::_('COM_PHOCAGALLERY_SUCCESS_FILE_UPLOAD'));
exit;
}
}
} else {
$msg = JText::_('COM_PHOCAGALLERY_ERROR_UNABLE_TO_UPLOAD_FILE');
if ($return) {
//.........这里部分代码省略.........
示例6: _singleFileUploadAvatar
function _singleFileUploadAvatar(&$errUploadMsg, $file, &$redirectUrl)
{
$app = JFactory::getApplication();
JRequest::checkToken('request') or jexit('Invalid Token');
jimport('joomla.client.helper');
$ftp =& JClientHelper::setCredentialsFromRequest('ftp');
$path = PhocaGalleryPath::getPath();
$format = JRequest::getVar('format', 'html', '', 'cmd');
$return = JRequest::getVar('return-url', null, 'post', 'base64');
$viewBack = JRequest::getVar('viewback', '', '', '');
$view = JRequest::getVar('view', '', 'get', '', JREQUEST_NOTRIM);
$paramsC = JComponentHelper::getParams('com_phocagallery');
$limitStartUrl = $this->getLimitStartUrl(0, 'subcat');
$return = JRoute::_($this->_url . $limitStartUrl->subcat . $limitStartUrl->image, false);
$enableUploadAvatar = (int) $paramsC->get('enable_upload_avatar', 1);
if ($enableUploadAvatar != 1) {
$errUploadMsg = JText::_('COM_PHOCAGALLERY_NOT_ABLE_UPLOAD_AVATAR');
$redirectUrl = $return;
return false;
}
if (isset($file['name'])) {
$fileAvatar = md5(uniqid(time())) . '.' . JFile::getExt($file['name']);
$filepath = JPath::clean($path->avatar_abs . DS . $fileAvatar);
if (!PhocaGalleryFileUpload::canUpload($file, $errUploadMsg)) {
if ($errUploadMsg == 'COM_PHOCAGALLERY_WARNING_FILE_TOOLARGE') {
$errUploadMsg = JText::_($errUploadMsg) . ' (' . PhocaGalleryFile::getFileSizeReadable($file['size']) . ')';
} else {
if ($errUploadMsg == 'COM_PHOCAGALLERY_WARNING_FILE_TOOLARGERESOLUTION') {
$imgSize = PhocaGalleryImage::getImageSize($file['tmp_name']);
$errUploadMsg = JText::_($errUploadMsg) . ' (' . (int) $imgSize[0] . ' x ' . (int) $imgSize[1] . ' px)';
} else {
$errUploadMsg = JText::_($errUploadMsg);
}
}
$redirectUrl = $return;
return false;
}
if (!JFile::upload($file['tmp_name'], $filepath)) {
$errUploadMsg = JText::_('COM_PHOCAGALLERY_FILE_UNABLE_UPLOAD');
$redirectUrl = $return;
return false;
} else {
$redirectUrl = $return;
//Create thumbnail small, medium, large (Delete previous before)
PhocaGalleryFileThumbnail::deleteFileThumbnail('avatars/' . $fileAvatar, 1, 1, 1);
$returnFrontMessage = PhocaGalleryFileThumbnail::getOrCreateThumbnail('avatars/' . $fileAvatar, $return, 1, 1, 1, 1);
if ($returnFrontMessage != 'Success') {
$errUploadMsg = JText::_('COM_PHOCAGALLERY_THUMBNAIL_AVATAR_NOT_CREATED');
return false;
}
// Saving file name into database with relative path
$succeeded = false;
PhocaGalleryControllerUser::saveUser($fileAvatar, $succeeded, $errUploadMsg);
$redirectUrl = $return;
return $succeeded;
}
} else {
$errUploadMsg = JText::_('COM_PHOCAGALLERY_WARNING_FILETYPE');
$redirectUrl = $return;
return false;
}
return false;
}
示例7: display
//.........这里部分代码省略.........
$infoOutput .= strtoupper($key.'.'.$name).'='.$name.'<br />';
$infoOutput .= $key.'.'.$name.';';
}
}*/
$infoOutput = '';
$i = 0;
foreach ($setExifArray as $ks => $vs) {
if ($i % 2 == 0) {
$class = 'class="first"';
} else {
$class = 'class="second"';
}
if ($vs != '') {
$vsValues = explode(".", $vs, 2);
if (isset($vsValues[0])) {
$section = $vsValues[0];
} else {
$section = '';
}
if (isset($vsValues[1])) {
$name = $vsValues[1];
} else {
$name = '';
}
if ($section != '' && $name != '') {
if (isset($exif[$section][$name])) {
switch ($name) {
case 'FileDateTime':
jimport('joomla.utilities.date');
$date = new JDate($exif[$section][$name]);
$exifValue = $date->format('d/m/Y, H:m');
break;
case 'FileSize':
$exifValue = PhocaGalleryFile::getFileSizeReadable($exif[$section][$name]);
break;
case 'Height':
case 'Width':
case 'ExifImageWidth':
case 'ExifImageLength':
$exifValue = $exif[$section][$name] . ' px';
break;
case 'IsColor':
switch ((int) $exif[$section][$name]) {
case 0:
$exifValue = JText::_('COM_PHOCAGALLERY_NO');
break;
default:
$exifValue = JText::_('COM_PHOCAGALLERY_YES');
break;
}
break;
case 'ResolutionUnit':
switch ((int) $exif[$section][$name]) {
case 2:
$exifValue = JText::_('COM_PHOCAGALLERY_INCH');
break;
case 3:
$exifValue = JText::_('COM_PHOCAGALLERY_CM');
break;
case 4:
$exifValue = JText::_('COM_PHOCAGALLERY_MM');
break;
case 5:
$exifValue = JText::_('COM_PHOCAGALLERY_MICRO');
break;
case 0:
示例8: display
//.........这里部分代码省略.........
$display_cat_name_breadcrumbs = $this->params->get('display_cat_name_breadcrumbs', 1);
$popup_width = $this->params->get('front_modal_box_width', 680);
$popup_height = $this->params->get('front_modal_box_height', 560);
$this->tmpl['maxuploadchar'] = $this->params->get('max_upload_char', 1000);
$this->tmpl['maxcommentchar'] = $this->params->get('max_comment_char', 1000);
$this->tmpl['maxcreatecatchar'] = $this->params->get('max_create_cat_char', 1000);
$this->tmpl['commentwidth'] = $this->params->get('comment_width', 500);
$this->tmpl['displaycategorygeotagging'] = $this->params->get('display_category_geotagging', 0);
$this->tmpl['displaycategorystatistics'] = $this->params->get('display_category_statistics', 0);
// Used for Highslide JS (only image)
$this->tmpl['displaydescriptiondetail'] = $this->params->get('display_description_detail', 0);
$this->tmpl['display_title_description'] = $this->params->get('display_title_description', 0);
$this->tmpl['charlengthname'] = $this->params->get('char_length_name', 15);
$this->tmpl['char_cat_length_name'] = $this->params->get('char_cat_length_name', 9);
$this->tmpl['display_icon_geo'] = $this->params->get('display_icon_geotagging', 0);
// Check the category
$this->tmpl['display_icon_geoimage'] = $this->params->get('display_icon_geotagging', 0);
// Check the image
$this->tmpl['display_camera_info'] = $this->params->get('display_camera_info', 0);
// PARAMS - Upload
$this->tmpl['multipleuploadchunk'] = $this->params->get('multiple_upload_chunk', 0);
$this->tmpl['displaytitleupload'] = $this->params->get('display_title_upload', 0);
$this->tmpl['displaydescupload'] = $this->params->get('display_description_upload', 0);
$this->tmpl['enablejava'] = $this->params->get('enable_java', -1);
$this->tmpl['enablemultiple'] = $this->params->get('enable_multiple', 0);
$this->tmpl['multipleuploadmethod'] = $this->params->get('multiple_upload_method', 1);
$this->tmpl['multipleresizewidth'] = $this->params->get('multiple_resize_width', -1);
$this->tmpl['multipleresizeheight'] = $this->params->get('multiple_resize_height', -1);
$this->tmpl['javaboxwidth'] = $this->params->get('java_box_width', 480);
$this->tmpl['javaboxheight'] = $this->params->get('java_box_height', 480);
$this->tmpl['large_image_width'] = $this->params->get('large_image_width', 640);
$this->tmpl['large_image_height'] = $this->params->get('large_image_height', 640);
$this->tmpl['uploadmaxsize'] = $this->params->get('upload_maxsize', 3145728);
$this->tmpl['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->tmpl['uploadmaxsize']);
$this->tmpl['uploadmaxreswidth'] = $this->params->get('upload_maxres_width', 3072);
$this->tmpl['uploadmaxresheight'] = $this->params->get('upload_maxres_height', 2304);
$display_description_detail = $this->params->get('display_description_detail', 0);
$description_detail_height = $this->params->get('description_detail_height', 16);
$detail_buttons = $this->params->get('detail_buttons', 1);
//$modal_box_overlay_color = $this->params->get( 'modal_box_overlay_color', '#000000' );
$modal_box_overlay_opacity = $this->params->get('modal_box_overlay_opacity', 0.3);
//$modal_box_border_color = $this->params->get( 'modal_box_border_color', '#6b6b6b' );
//$modal_box_border_width = $this->params->get( 'modal_box_border_width', '2' );
$this->tmpl['enablecooliris'] = $this->params->get('enable_cooliris', 0);
$highslide_class = $this->params->get('highslide_class', 'rounded-white');
$highslide_opacity = $this->params->get('highslide_opacity', 0);
$highslide_outline_type = $this->params->get('highslide_outline_type', 'rounded-white');
$highslide_fullimg = $this->params->get('highslide_fullimg', 0);
$highslide_slideshow = $this->params->get('highslide_slideshow', 1);
$highslide_close_button = $this->params->get('highslide_close_button', 0);
$this->tmpl['jakslideshowdelay'] = $this->params->get('jak_slideshow_delay', 5);
$this->tmpl['jakorientation'] = $this->params->get('jak_orientation', 'none');
$this->tmpl['jakdescription'] = $this->params->get('jak_description', 1);
$this->tmpl['jakdescriptionheight'] = $this->params->get('jak_description_height', 0);
$this->tmpl['categoryimageordering'] = $this->params->get('category_image_ordering', 10);
$this->tmpl['externalcommentsystem'] = $this->params->get('external_comment_system', 0);
$display_subcat_page_cv = $this->params->get('display_subcat_page_cv', 0);
$this->tmpl['display_back_button_cv'] = $this->params->get('display_back_button_cv', 1);
$this->tmpl['display_categories_back_button_cv'] = $this->params->get('display_categories_back_button_cv', 1);
$medium_image_width_cv = (int) $this->params->get('medium_image_width', 100) + 18;
$medium_image_height_cv = (int) $this->params->get('medium_image_height', 100) + 18;
$small_image_width_cv = (int) $this->params->get('small_image_width', 50) + 18;
$small_image_height_cv = (int) $this->params->get('small_image_height', 50) + 18;
$this->tmpl['imagetypecv'] = $this->tmpl['image_categories_size_cv'];
$this->tmpl['overlibimagerate'] = (int) $this->params->get('overlib_image_rate', '');
$this->tmpl['gallerymetakey'] = $this->params->get('gallery_metakey', '');
示例9: display
function display($tpl = null)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$uri = JFactory::getURI();
//$menus = JSite::getMenu();
$menus = JFactory::getApplication()->getMenu();
$menu = $menus->getActive();
$this->params = $app->getParams();
$this->tmpl['user'] = JFactory::getUser();
$this->tmpl['action'] = $uri->toString();
$path = PhocaGalleryPath::getPath();
$limitStart = JRequest::getVar('limitstart', 0, '', 'int');
$id = JRequest::getVar('id', 0, '', 'int');
$this->tagId = JRequest::getVar('tagid', 0, '', 'int');
$this->tmpl['tab'] = JRequest::getVar('tab', 0, '', 'int');
$this->tmpl['formaticon'] = PhocaGalleryImage::getFormatIcon();
$this->tmpl['pl'] = 'index.php?option=com_users&view=login&return=' . base64_encode($uri->toString());
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
$access = PhocaGalleryAccess::isAccess($this->tmpl['user']->authorisedLevels(), $neededAccessLevels);
// LIBRARY
$library =& PhocaGalleryLibrary::getLibrary();
$libraries['pg-group-shadowbox'] = $library->getLibrary('pg-group-shadowbox');
$libraries['pg-group-highslide'] = $library->getLibrary('pg-group-highslide');
$libraries['pg-group-jak'] = $library->getLibrary('pg-group-jak');
// PARAMS
$this->tmpl['displaycatnametitle'] = $this->params->get('display_cat_name_title', 1);
$display_cat_name_breadcrumbs = $this->params->get('display_cat_name_breadcrumbs', 1);
$image_background_color = $this->params->get('image_background_color', '#f5f5f5');
$this->tmpl['displayimageshadow'] = $this->params->get('image_background_shadow', 'shadow1');
$this->tmpl['imagewidth'] = $this->params->get('medium_image_width', 100);
$this->tmpl['imageheight'] = $this->params->get('medium_image_height', 100);
$popup_width = $this->params->get('front_modal_box_width', 680);
$popup_height = $this->params->get('front_modal_box_height', 560);
$this->tmpl['olbgcolor'] = $this->params->get('ol_bg_color', '#666666');
$this->tmpl['olfgcolor'] = $this->params->get('ol_fg_color', '#f6f6f6');
$this->tmpl['oltfcolor'] = $this->params->get('ol_tf_color', '#000000');
$this->tmpl['olcfcolor'] = $this->params->get('ol_cf_color', '#ffffff');
$this->tmpl['maxuploadchar'] = $this->params->get('max_upload_char', 1000);
$this->tmpl['maxcommentchar'] = $this->params->get('max_comment_char', 1000);
$this->tmpl['maxcreatecatchar'] = $this->params->get('max_create_cat_char', 1000);
$this->tmpl['commentwidth'] = $this->params->get('comment_width', 500);
$this->tmpl['displayrating'] = $this->params->get('display_rating', 0);
$this->tmpl['displayratingimg'] = $this->params->get('display_rating_img', 0);
$this->tmpl['displaycomment'] = $this->params->get('display_comment', 0);
$this->tmpl['displaycommentimg'] = $this->params->get('display_comment_img', 0);
$this->tmpl['displaysubcategory'] = $this->params->get('display_subcategory', 1);
$this->tmpl['displaycategorygeotagging'] = $this->params->get('display_category_geotagging', 0);
$this->tmpl['displaycategorystatistics'] = $this->params->get('display_category_statistics', 0);
// Used for Highslide JS (only image)
$this->tmpl['displaydescriptiondetail'] = $this->params->get('display_description_detail', 0);
$this->tmpl['displaytitleindescription'] = $this->params->get('display_title_description', 0);
$this->tmpl['displayname'] = $this->params->get('display_name', 1);
$this->tmpl['displayicondetail'] = $this->params->get('display_icon_detail', 1);
$this->tmpl['displayicondownload'] = $this->params->get('display_icon_download', 2);
$this->tmpl['displayiconfolder'] = $this->params->get('display_icon_folder', 0);
$this->tmpl['displayiconvm'] = $this->params->get('display_icon_vm', 0);
$this->tmpl['fontsizename'] = $this->params->get('font_size_name', 12);
$this->tmpl['fontsizeimgdesc'] = $this->params->get('font_size_img_desc', 10);
$this->tmpl['imgdescboxheight'] = $this->params->get('img_desc_box_height', 30);
$this->tmpl['displayimgdescbox'] = $this->params->get('display_img_desc_box', 0);
$this->tmpl['charlengthimgdesc'] = $this->params->get('char_length_img_desc', 300);
$this->tmpl['charlengthname'] = $this->params->get('char_length_name', 15);
$this->tmpl['displayicongeo'] = $this->params->get('display_icon_geotagging', 0);
// Check the category
$this->tmpl['displayicongeoimage'] = $this->params->get('display_icon_geotagging', 0);
// Check the image
$this->tmpl['displaycamerainfo'] = $this->params->get('display_camera_info', 0);
$this->tmpl['displaypage'] = PhocaGalleryRenderInfo::getPhocaIc((int) $this->params->get('display_phoca_info', 1));
$this->tmpl['switchimage'] = $this->params->get('switch_image', 0);
$this->tmpl['switchheight'] = $this->params->get('switch_height', 480);
$this->tmpl['switchwidth'] = $this->params->get('switch_width', 640);
$this->tmpl['switchfixedsize'] = $this->params->get('switch_fixed_size', 0);
// PARAMS - Upload
$this->tmpl['multipleuploadchunk'] = $this->params->get('multiple_upload_chunk', 0);
$this->tmpl['displaytitleupload'] = $this->params->get('display_title_upload', 0);
$this->tmpl['displaydescupload'] = $this->params->get('display_description_upload', 0);
$this->tmpl['enablejava'] = $this->params->get('enable_java', 0);
$this->tmpl['enablemultiple'] = $this->params->get('enable_multiple', 0);
$this->tmpl['multipleuploadmethod'] = $this->params->get('multiple_upload_method', 1);
$this->tmpl['multipleresizewidth'] = $this->params->get('multiple_resize_width', -1);
$this->tmpl['multipleresizeheight'] = $this->params->get('multiple_resize_height', -1);
$this->tmpl['javaboxwidth'] = $this->params->get('java_box_width', 480);
$this->tmpl['javaboxheight'] = $this->params->get('java_box_height', 480);
$this->tmpl['large_image_width'] = $this->params->get('large_image_width', 640);
$this->tmpl['large_image_height'] = $this->params->get('large_image_height', 640);
$this->tmpl['uploadmaxsize'] = $this->params->get('upload_maxsize', 3145728);
$this->tmpl['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->tmpl['uploadmaxsize']);
$this->tmpl['uploadmaxreswidth'] = $this->params->get('upload_maxres_width', 3072);
$this->tmpl['uploadmaxresheight'] = $this->params->get('upload_maxres_height', 2304);
$this->tmpl['phocagallerywidth'] = $this->params->get('phocagallery_width', '');
$this->tmpl['phocagallerycenter'] = $this->params->get('phocagallery_center', '');
$display_description_detail = $this->params->get('display_description_detail', 0);
$description_detail_height = $this->params->get('description_detail_height', 16);
$this->tmpl['categoryboxspace'] = $this->params->get('category_box_space', 0);
$this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
$detail_buttons = $this->params->get('detail_buttons', 1);
$modal_box_overlay_color = $this->params->get('modal_box_overlay_color', '#000000');
$modal_box_overlay_opacity = $this->params->get('modal_box_overlay_opacity', 0.3);
$modal_box_border_color = $this->params->get('modal_box_border_color', '#6b6b6b');
//.........这里部分代码省略.........