本文整理汇总了PHP中PhocaGalleryImage::getFormatIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP PhocaGalleryImage::getFormatIcon方法的具体用法?PHP PhocaGalleryImage::getFormatIcon怎么用?PHP PhocaGalleryImage::getFormatIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhocaGalleryImage
的用法示例。
在下文中一共展示了PhocaGalleryImage::getFormatIcon方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setFormatIcon
function _setFormatIcon()
{
if (empty($this->_formaticon)) {
phocagalleryimport('phocagallery.image.image');
$this->_formaticon = PhocaGalleryImage::getFormatIcon();
}
return true;
}
示例2: getFileSize
function getFileSize($filename, $readable = 1)
{
$path =& PhocaGalleryPath::getPath();
$fileNameAbs = JPath::clean($path->image_abs . $filename);
$formatIcon =& PhocaGalleryImage::getFormatIcon();
if (!JFile::exists($fileNameAbs)) {
$fileNameAbs = $path->image_abs_front . 'phoca_thumb_l_no_image.' . $formatIcon;
}
if ($readable == 1) {
return PhocaGalleryFile::getFileSizeReadable(filesize($fileNameAbs));
} else {
return filesize($fileNameAbs);
}
}
示例3: getImageSize
function getImageSize($filename, $returnString = 0, $extLink = 0)
{
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.path.path');
if ($extLink == 1) {
$fileNameAbs = $filename;
} else {
$path =& PhocaGalleryPath::getPath();
$fileNameAbs = JPath::clean($path->image_abs . $filename);
$formatIcon =& PhocaGalleryImage::getFormatIcon();
if (!JFile::exists($fileNameAbs)) {
$fileNameAbs = $path->image_abs_front . 'phoca_thumb_l_no_image.' . $formatIcon;
}
}
if ($returnString == 1) {
$imageSize = @getimagesize($fileNameAbs);
return $imageSize[0] . ' x ' . $imageSize[1];
} else {
return @getimagesize($fileNameAbs);
}
}
示例4: display
//.........这里部分代码省略.........
// VOTES Statistics Img
if ((int) $this->tmpl['displayratingimg'] == 1 || $this->tmpl['mb_rating']) {
$this->tmpl['votescountimg'] = 0;
$this->tmpl['votesaverageimg'] = 0;
$this->tmpl['voteswidthimg'] = 0;
$votesStatistics = PhocaGalleryRateImage::getVotesStatistics((int) $item->id);
if (!empty($votesStatistics->count)) {
$this->tmpl['votescountimg'] = $votesStatistics->count;
}
if (!empty($votesStatistics->average)) {
$this->tmpl['votesaverageimg'] = $votesStatistics->average;
if ($this->tmpl['votesaverageimg'] > 0) {
$this->tmpl['votesaverageimg'] = round((double) $this->tmpl['votesaverageimg'] / 0.5) * 0.5;
$this->tmpl['voteswidthimg'] = 22 * $this->tmpl['votesaverageimg'];
} else {
$this->tmpl['votesaverageimg'] = (int) 0;
// not float displaying
}
}
if ((int) $this->tmpl['votescountimg'] > 1) {
$this->tmpl['votestextimg'] = 'COM_PHOCAGALLERY_VOTES';
} else {
$this->tmpl['votestextimg'] = 'COM_PHOCAGALLERY_VOTE';
}
// Already rated?
$this->tmpl['alreadyratedimg'] = PhocaGalleryRateImage::checkUserVote((int) $item->id, (int) $user->id);
}
// Tags
$this->tmpl['displaying_tags_output'] = '';
if ($this->tmpl['display_tags_links'] == 1 || $this->tmpl['display_tags_links'] == 3 || $this->tmpl['mb_tags']) {
if ($this->tmpl['detailwindow'] == 7) {
$this->tmpl['displaying_tags_output'] = PhocaGalleryTag::displayTags($item->id);
} else {
$this->tmpl['displaying_tags_output'] = PhocaGalleryTag::displayTags($item->id, 1);
}
}
// Back button
$this->tmpl['backbutton'] = '';
if ($this->tmpl['detailwindow'] == 7) {
phocagalleryimport('phocagallery.image.image');
$formatIcon =& PhocaGalleryImage::getFormatIcon();
$this->tmpl['backbutton'] = '<div><a href="' . JRoute::_('index.php?option=com_phocagallery&view=category&id=' . $item->catslug . '&Itemid=' . JRequest::getVar('Itemid', 0, '', 'int')) . '"' . ' title="' . JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY') . '">' . JHtml::_('image', 'components/com_phocagallery/assets/images/icon-up-images.' . $formatIcon, JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY')) . '</a></div>';
}
// ASIGN
$this->assignRef('tmpl', $this->tmpl);
$this->assignRef('item', $item);
$this->_prepareDocument($item);
if ($this->tmpl['enable_multibox'] == 1) {
if ($item->download > 0) {
if ($this->tmpl['displayicondownload'] == 2) {
$backLink = 'index.php?option=com_phocagallery&view=category&id=' . $item->catslug . '&Itemid=' . JRequest::getVar('Itemid', 0, '', 'int');
phocagalleryimport('phocagallery.file.filedownload');
if (isset($item->exto) && $item->exto != '') {
PhocaGalleryFileDownload::download($item, $backLink, 1);
} else {
PhocaGalleryFileDownload::download($item, $backLink);
}
exit;
} else {
parent::display('multibox');
//parent::display('download');
}
} else {
if (isset($item->videocode) && $item->videocode != '' && $item->videocode != '0') {
$item->videocode = PhocaGalleryYoutube::displayVideo($item->videocode);
}
parent::display('multibox');
}
} else {
if (isset($item->videocode) && $item->videocode != '' && $item->videocode != '0') {
$item->videocode = PhocaGalleryYoutube::displayVideo($item->videocode);
if ($this->tmpl['detailwindow'] != 7 && $this->tmpl['ytb_display'] == 1) {
$document->addCustomTag("<style type=\"text/css\"> \n" . " html, body, .contentpane, div#all, div#main, div#system-message-container {padding: 0px !important;margin: 0px !important;} \n" . " div#sbox-window {background-color:#fff;padding: 0px;margin: 0px;} \n" . " </style> \n");
}
parent::display('video');
} else {
parent::display('slideshowjs');
if ($item->slideshow == 1) {
parent::display('slideshow');
} else {
if ($item->download > 0) {
if ($this->tmpl['displayicondownload'] == 2) {
$backLink = 'index.php?option=com_phocagallery&view=category&id=' . $item->catslug . '&Itemid=' . JRequest::getVar('Itemid', 0, '', 'int');
phocagalleryimport('phocagallery.file.filedownload');
if (isset($item->exto) && $item->exto != '') {
PhocaGalleryFileDownload::download($item, $backLink, 1);
} else {
PhocaGalleryFileDownload::download($item, $backLink);
}
exit;
} else {
parent::display('download');
}
} else {
parent::display($tpl);
}
}
}
}
}
示例5: display
//.........这里部分代码省略.........
if ($this->tmpl['enablecustomcss'] == 1) {
JHtml::stylesheet('components/com_phocagallery/assets/phocagallerycustom.css');
PhocaGalleryRenderFront::displayCustomCSS($this->tmpl['customcss']);
}
// PARAMS - Open window parameters - modal popup box or standard popup window
$this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
// Plugin information
if (isset($get['map']) && $get['map'] != '') {
$this->tmpl['detailwindow'] = $get['map'];
}
// Close and Reload links (for different window types)
$close = PhocaGalleryRenderFront::renderCloseReloadDetail($this->tmpl['detailwindow']);
$detail_window_close = $close['detailwindowclose'];
$detail_window_reload = $close['detailwindowreload'];
// PARAMS - Display Description in Detail window - set the font color
$this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
$this->tmpl['detailwindowbackgroundcolor'] = $this->params->get('detail_window_background_color', '#ffffff');
$this->tmpl['pgl'] = PhocaGalleryRenderInfo::getPhocaIc((int) $this->params->get('display_phoca_info', 1));
$description_lightbox_font_color = $this->params->get('description_lightbox_font_color', '#ffffff');
$description_lightbox_bg_color = $this->params->get('description_lightbox_bg_color', '#000000');
$description_lightbox_font_size = $this->params->get('description_lightbox_font_size', 12);
$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']);
}
// NO SCROLLBAR IN DETAIL WINDOW
if ($this->tmpl['detailwindow'] == 7) {
} else {
$document->addCustomTag("<style type=\"text/css\"> \n" . " html,body, .contentpane{overflow:hidden;background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";} \n" . " center, table {background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";} \n" . " #sbox-window {background-color:#fff;padding:5px} \n" . " </style> \n");
}
// PARAMS - Get image height and width
$this->tmpl['largemapwidth'] = (int) $this->params->get('front_modal_box_width', 680) - 20;
$this->tmpl['largemapheight'] = (int) $this->params->get('front_modal_box_height', 560) - 20;
// Multibox
if (isset($get['mapwidth']) && $get['mapwidth'] != '') {
$this->tmpl['largemapwidth'] = $get['mapwidth'];
}
if (isset($get['mapheight']) && $get['mapheight'] != '') {
$this->tmpl['largemapheight'] = $get['mapheight'];
}
// $this->tmpl['googlemapsapikey'] = $this->params->get( 'google_maps_api_key', '' );
// MODEL
$model =& $this->getModel();
$map = $model->getData();
phocagalleryimport('phocagallery.image.imagefront');
if (!empty($map)) {
if (isset($map->filename) && $map->filename != '') {
$file_thumbnail = PhocaGalleryImageFront::displayCategoryImageOrNoImage($map->filename, 'small');
$map->thumbnail = $file_thumbnail;
} else {
$map->thumbnail = '';
}
if (isset($map->latitude) && $map->latitude != '' && $map->latitude != 0 && isset($map->longitude) && $map->longitude != '' && $map->longitude != 0) {
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
}
}
// Second try to get category data
if (empty($map) || $map->longitude == '' && $map->latitude == '' && $map->geotitle == '') {
$map = $model->getDataCategory();
if (!empty($map)) {
if (isset($map->latitude) && $map->latitude != '' && $map->latitude != 0 && isset($map->longitude) && $map->longitude != '' && $map->longitude != 0) {
$map->thumbnail = '';
if ($map->geotitle == '') {
$map->geotitle = $map->title;
}
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
}
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
$map->catslug = '';
}
}
// Back button
$this->tmpl['backbutton'] = '';
if ($this->tmpl['detailwindow'] == 7) {
phocagalleryimport('phocagallery.image.image');
$formatIcon =& PhocaGalleryImage::getFormatIcon();
$this->tmpl['backbutton'] = '<div><a href="' . JRoute::_('index.php?option=com_phocagallery&view=category&id=' . $map->catslug . '&Itemid=' . JRequest::getVar('Itemid', 0, '', 'int')) . '"' . ' title="' . JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY') . '">' . JHtml::_('image', 'components/com_phocagallery/assets/images/icon-up-images.' . $formatIcon, JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY')) . '</a></div>';
}
// ASIGN
$this->assignRef('tmpl', $this->tmpl);
$this->assignRef('map', $map);
$this->_prepareDocument($map);
parent::display($tpl);
}
示例6: display
public function display($tpl = null)
{
$document =& JFactory::getDocument();
JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css');
JHTML::stylesheet('administrator/components/com_phocagallery/assets/jcp/picker.css');
$document->addScript(JURI::base(true) . '/components/com_phocagallery/assets/jcp/picker.js');
$this->require_ftp = JClientHelper::setCredentialsFromRequest('ftp');
if ($this->themeName()) {
$this->theme_name = $this->themeName();
}
// Background Image
$params = JComponentHelper::getParams('com_phocagallery');
$this->tmpl['formaticon'] = PhocaGalleryImage::getFormatIcon();
// Small
$this->tmpl['siw'] = $params->get('small_image_width', 50);
$this->tmpl['sih'] = $params->get('small_image_height', 50);
//After creating an image (post with data);
$this->tmpl['ssbgc'] = JRequest::getVar('ssbgc', '', '', 'string');
$this->tmpl['sibgc'] = JRequest::getVar('sibgc', '', '', 'string');
$this->tmpl['sibrdc'] = JRequest::getVar('sibrdc', '', '', 'string');
$this->tmpl['sie'] = JRequest::getVar('sie', '', '', 'int');
$this->tmpl['siec'] = JRequest::getVar('siec', '', '', 'string');
$siw = JRequest::getVar('siw', '', '', 'int');
$sih = JRequest::getVar('sih', '', '', 'int');
$this->tmpl['ssbgc'] = PhocaGalleryUtils::filterInput($this->tmpl['ssbgc']);
$this->tmpl['sibgc'] = PhocaGalleryUtils::filterInput($this->tmpl['sibgc']);
$this->tmpl['sibrdc'] = PhocaGalleryUtils::filterInput($this->tmpl['sibrdc']);
$this->tmpl['siec'] = PhocaGalleryUtils::filterInput($this->tmpl['siec']);
if ($this->tmpl['ssbgc'] != '') {
$this->tmpl['ssbgc'] = '#' . $this->tmpl['ssbgc'];
}
if ($this->tmpl['sibgc'] != '') {
$this->tmpl['sibgc'] = '#' . $this->tmpl['sibgc'];
}
if ($this->tmpl['sibrdc'] != '') {
$this->tmpl['sibrdc'] = '#' . $this->tmpl['sibrdc'];
}
if ($this->tmpl['siec'] != '') {
$this->tmpl['siec'] = '#' . $this->tmpl['siec'];
}
if ((int) $siw > 0) {
$this->tmpl['siw'] = (int) $siw;
}
if ((int) $sih > 0) {
$this->tmpl['sih'] = (int) $sih;
}
// Medium
$this->tmpl['miw'] = $params->get('medium_image_width', 100);
$this->tmpl['mih'] = $params->get('medium_image_height', 100);
//After creating an image (post with data);
$this->tmpl['msbgc'] = JRequest::getVar('msbgc', '', '', 'string');
$this->tmpl['mibgc'] = JRequest::getVar('mibgc', '', '', 'string');
$this->tmpl['mibrdc'] = JRequest::getVar('mibrdc', '', '', 'string');
$this->tmpl['mie'] = JRequest::getVar('mie', '', '', 'int');
$this->tmpl['miec'] = JRequest::getVar('miec', '', '', 'string');
$miw = JRequest::getVar('miw', '', '', 'int');
$mih = JRequest::getVar('mih', '', '', 'int');
$this->tmpl['msbgc'] = PhocaGalleryUtils::filterInput($this->tmpl['msbgc']);
$this->tmpl['mibgc'] = PhocaGalleryUtils::filterInput($this->tmpl['mibgc']);
$this->tmpl['mibrdc'] = PhocaGalleryUtils::filterInput($this->tmpl['mibrdc']);
$this->tmpl['miec'] = PhocaGalleryUtils::filterInput($this->tmpl['miec']);
if ($this->tmpl['msbgc'] != '') {
$this->tmpl['msbgc'] = '#' . $this->tmpl['msbgc'];
}
if ($this->tmpl['mibgc'] != '') {
$this->tmpl['mibgc'] = '#' . $this->tmpl['mibgc'];
}
if ($this->tmpl['mibrdc'] != '') {
$this->tmpl['mibrdc'] = '#' . $this->tmpl['mibrdc'];
}
if ($this->tmpl['miec'] != '') {
$this->tmpl['miec'] = '#' . $this->tmpl['miec'];
}
if ((int) $miw > 0) {
$this->tmpl['miw'] = (int) $miw;
}
if ((int) $mih > 0) {
$this->tmpl['mih'] = (int) $mih;
}
$this->addToolbar();
parent::display($tpl);
}
示例7: createBgImage
function createBgImage($data, &$errorMsg)
{
$params = JComponentHelper::getParams('com_phocagallery');
$jfile_thumbs = $params->get('jfile_thumbs', 1);
$jpeg_quality = $params->get('jpeg_quality', 85);
$jpeg_quality = PhocaGalleryImage::getJpegQuality($jpeg_quality);
$formatIcon = PhocaGalleryImage::getFormatIcon();
$path = PhocaGalleryPath::getPath();
$fileIn = $fileOut = $path->image_abs_front . $data['image'] . '.' . $formatIcon;
if ($fileIn !== '' && JFile::exists($fileIn)) {
$memory = 8;
$memoryLimitChanged = 0;
$memory = (int) ini_get('memory_limit');
if ($memory == 0) {
$memory = 8;
}
// Try to increase memory
if ($memory < 50) {
ini_set('memory_limit', '50M');
$memoryLimitChanged = 1;
}
$imageWidth = $data['iw'];
$imageHeight = $data['ih'];
$completeImageWidth = $imageWidth + 18;
$completeImageHeight = $imageHeight + 18;
$completeImageBackground = $data['sbgc'];
$retangleColor = $data['ibgc'];
$borderColor = $data['ibrdc'];
$shadowColor = $data['iec'];
$effect = $data['ie'];
// shadow or glow
$imgX = 6;
$imgWX = $imageWidth + 5 + $imgX;
// Image Width + space (padding) + Start Position
$imgY = 6;
$imgHY = $imageHeight + 5 + $imgY;
$brdX = $imgX - 1;
$brdWX = $imgWX + 1;
$brdY = $imgY - 1;
$brdHY = $imgHY + 1;
// Crate an image
$img = @imagecreatetruecolor($completeImageWidth, $completeImageHeight);
if (!$img) {
$errorMsg = 'ErrorNoImageCreateTruecolor';
return false;
}
if ($completeImageBackground == '') {
switch ($formatIcon) {
case 'jpg':
case 'jpeg':
case 'gif':
$completeImageBackground = '#ffffff';
break;
case 'png':
@imagealphablending($img, false);
imagefilledrectangle($img, 0, 0, $completeImageWidth, $completeImageHeight, imagecolorallocatealpha($img, 255, 255, 255, 127));
@imagealphablending($img, true);
break;
}
} else {
$bGClr = PhocaGalleryUtils::htmlToRgb($completeImageBackground);
imagefilledrectangle($img, 0, 0, $completeImageWidth, $completeImageHeight, imagecolorallocate($img, $bGClr[0], $bGClr[1], $bGClr[2]));
}
// Create Retangle
if ($retangleColor != '') {
$rtgClr = PhocaGalleryUtils::htmlToRgb($retangleColor);
$retangle = imagecolorallocate($img, $rtgClr[0], $rtgClr[1], $rtgClr[2]);
}
// Create Border
if ($borderColor != '') {
$brdClr = PhocaGalleryUtils::htmlToRgb($borderColor);
$border = imagecolorallocate($img, $brdClr[0], $brdClr[1], $brdClr[2]);
}
// Effect (shadow,glow)
if ((int) $effect > 0) {
if ($shadowColor != '') {
$shdClr = PhocaGalleryUtils::htmlToRgb($shadowColor);
if ((int) $effect == 3) {
$shdX = $brdX - 1;
$shdY = $brdY - 1;
$effectArray = array(55, 70, 85, 100, 115);
} else {
if ((int) $effect == 2) {
$shdX = $brdX + 3;
$shdY = $brdY + 3;
$effectArray = array(50, 70, 90, 110);
} else {
$shdX = $brdX + 3;
$shdY = $brdY + 3;
$effectArray = array(0, 0, 0, 0);
}
}
$shdWX = $brdWX + 1;
$shdHY = $brdHY + 1;
foreach ($effectArray as $key => $value) {
$effectImg = @imagecolorallocatealpha($img, $shdClr[0], $shdClr[1], $shdClr[2], $value);
if (!$effectImg) {
$errorMsg = 'ErrorNoImageColorAllocateAlpha';
return false;
}
//.........这里部分代码省略.........
示例8: orderDownIcon
function orderDownIcon($i, $n, $condition = true, $task = '#', $alt = 'COM_PHOCAGALLERY_MOVE_DOWN', $enabled = true)
{
$formatIcon = PhocaGalleryImage::getFormatIcon();
$alt = JText::_($alt);
$html = ' ';
if (($i < $n - 1 || $i + $this->limitstart < $this->total - 1) && $condition) {
if ($enabled) {
$html = '<a href="' . $task . '" title="' . $alt . '">';
$html .= ' <img src="' . JURI::base(true) . '/components/com_phocagallery/assets/images/icon-downarrow.' . $formatIcon . '" width="16" height="16" border="0" alt="' . $alt . '" />';
$html .= '</a>';
} else {
$html = '<img src="' . JURI::base(true) . '/components/com_phocagallery/assets/images/icon-downarrow0.' . $formatIcon . '" width="16" height="16" border="0" alt="' . $alt . '" />';
}
}
return $html;
}
示例9: renderFeedIcon
function renderFeedIcon($type = 'categories', $paramsIcons = true, $catid = 0, $catidAlias = '')
{
$paramsC = JComponentHelper::getParams('com_phocagallery');
$df = $paramsC->get('display_feed', 1);
if ($type == 'categories' && $df != 1 && $df != 2) {
return '';
}
if ($type == 'category' && $df != 1 && $df != 3) {
return '';
}
$url = PhocaGalleryRoute::getFeedRoute($type, $catid, $catidAlias);
$icon = PhocaGalleryImage::getFormatIcon();
if ($paramsIcons) {
$text = JHTML::_('image', 'components/com_phocagallery/assets/images/icon-feed.' . $icon, JText::_('COM_PHOCAGALLERY_RSS'));
} else {
$text = JText::_('COM_PHOCAGALLERY_RSS');
}
$output = '<a href="' . JRoute::_($url) . '" title="' . JText::_('COM_PHOCAGALLERY_RSS') . '">' . $text . '</a>';
return $output;
}
示例10: displayBackFolder
function displayBackFolder($size, $rightDisplayKey)
{
$fileThumbnail = new JObject();
// if category is not accessable, display the key in the image:
$key = '';
if ((int) $rightDisplayKey == 0) {
$key = '-key';
}
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.path.path');
$path =& PhocaGalleryPath::getPath();
$formatIcon =& PhocaGalleryImage::getFormatIcon();
$fileThumbnail->abs = '';
$paramsC = JComponentHelper::getParams('com_phocagallery');
if ($paramsC->get('image_background_shadow') != 'None') {
$fileThumbnail->rel = $path->image_rel_front . 'icon-up-images' . $key . '.' . $formatIcon;
} else {
$fileThumbnail->rel = $path->image_rel_front . 'icon-up-images' . $key . '.' . $formatIcon;
}
return $fileThumbnail->rel;
}