当前位置: 首页>>代码示例>>PHP>>正文


PHP PhocaGalleryImage::getRealImageSize方法代码示例

本文整理汇总了PHP中PhocaGalleryImage::getRealImageSize方法的典型用法代码示例。如果您正苦于以下问题:PHP PhocaGalleryImage::getRealImageSize方法的具体用法?PHP PhocaGalleryImage::getRealImageSize怎么用?PHP PhocaGalleryImage::getRealImageSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhocaGalleryImage的用法示例。


在下文中一共展示了PhocaGalleryImage::getRealImageSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display


//.........这里部分代码省略.........
         exit;
     }
     // - - - - - - - - - - - - - - - - - - - -
     phocagalleryimport('phocagallery.image.image');
     phocagalleryimport('phocagallery.render.renderdetailbutton');
     // Javascript Slideshow buttons
     $detailButton = new PhocaGalleryRenderDetailButton();
     if ($this->tmpl['enable_multibox'] == 1) {
         $detailButton->setType('multibox');
     }
     $item->reloadbutton = $detailButton->getReload($item->catslug, $item->slug);
     $item->closebutton = $detailButton->getClose($item->catslug, $item->slug);
     $item->closetext = $detailButton->getCloseText($item->catslug, $item->slug);
     $item->nextbutton = $detailButton->getNext((int) $item->catid, (int) $item->id, (int) $item->ordering);
     $item->nextbuttonhref = $detailButton->getNext((int) $item->catid, (int) $item->id, (int) $item->ordering, 1);
     $item->prevbutton = $detailButton->getPrevious((int) $item->catid, (int) $item->id, (int) $item->ordering);
     $slideshowData = $detailButton->getJsSlideshow((int) $item->catid, (int) $item->id, (int) $var['slideshow'], $item->catslug, $item->slug);
     $item->slideshowbutton = $slideshowData['icons'];
     $item->slideshowfiles = $slideshowData['files'];
     $item->slideshow = $var['slideshow'];
     $item->download = $var['download'];
     // ALT VALUE
     $altValue = PhocaGalleryRenderFront::getAltValue($this->tmpl['altvalue'], $item->title, $item->description, $item->metadesc);
     $item->altvalue = $altValue;
     // Get file thumbnail or No Image
     $item->filenameno = $item->filename;
     $item->filename = PhocaGalleryFile::getTitleFromFile($item->filename, 1);
     $item->filesize = PhocaGalleryFile::getFileSize($item->filenameno);
     $realImageSize = '';
     $extImage = PhocaGalleryImage::isExtImage($item->extid);
     if ($extImage) {
         $item->extl = $item->extl;
         $item->exto = $item->exto;
         $realImageSize = PhocaGalleryImage::getRealImageSize($item->extl, '', 1);
         $item->imagesize = PhocaGalleryImage::getImageSize($item->exto, 1, 1);
         if ($item->extw != '') {
             $extw = explode(',', $item->extw);
             $item->extw = $extw[0];
         }
         $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($item->extw, $item->exth, $this->tmpl['picasa_correct_width_l'], $this->tmpl['picasa_correct_height_l']);
         $item->linkimage = JHtml::_('image', $item->extl, $item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-detail-image'));
         $item->realimagewidth = $correctImageRes['width'];
         $item->realimageheight = $correctImageRes['height'];
     } else {
         $item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');
         $item->linkimage = JHtml::_('image', $item->linkthumbnailpath, $item->altvalue, array('class' => 'pg-detail-image'));
         $realImageSize = PhocaGalleryImage::getRealImageSize($item->filenameno);
         $item->imagesize = PhocaGalleryImage::getImageSize($item->filenameno, 1);
         if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
             $item->realimagewidth = $realImageSize['w'];
             $item->realimageheight = $realImageSize['h'];
         } else {
             $item->realimagewidth = $this->tmpl['largewidth'];
             $item->realimageheight = $this->tmpl['largeheight'];
         }
     }
     // Add Statistics
     $model->hit(JRequest::getVar('id', '', '', 'int'));
     // R A T I N G
     // Only registered (VOTES + COMMENTS)
     $this->tmpl['notregisteredimg'] = true;
     $this->tmpl['usernameimg'] = '';
     if ($access > 0) {
         $this->tmpl['notregisteredimg'] = false;
         $this->tmpl['usernameimg'] = $user->name;
     }
开发者ID:optimosolution,项目名称:marhk,代码行数:67,代码来源:view.html.php

示例2: tdImage

 public function tdImage($item, $button, $txtE, $class = '', $avatarAbs = '', $avatarRel = '')
 {
     $o = '<td class="' . $class . '">' . "\n";
     $o .= '<div class="phocagallery-box-file">' . "\n" . ' <center>' . "\n" . '  <div class="phocagallery-box-file-first">' . "\n" . '   <div class="phocagallery-box-file-second">' . "\n" . '    <div class="phocagallery-box-file-third">' . "\n" . '     <center>' . "\n";
     if ($avatarAbs != '' && $avatarRel != '') {
         // AVATAR
         if (JFile::exists($avatarAbs . $item->avatar)) {
             $o .= '<a class="' . $button->modalname . '"' . ' title="' . $button->text . '"' . ' href="' . JURI::root() . $avatarRel . $item->avatar . '" ' . ' rel="' . $button->options . '" >' . '<img src="' . JURI::root() . $avatarRel . $item->avatar . '?imagesid=' . md5(uniqid(time())) . '" alt="' . JText::_($txtE) . '" />' . '</a>';
         } else {
             $o .= JHTML::_('image', '/media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', '');
         }
     } else {
         // PICASA
         if (isset($item->extid) && $item->extid != '') {
             $resW = explode(',', $item->extw);
             $resH = explode(',', $item->exth);
             $correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50);
             $imgLink = $item->extl;
             $o .= '<a class="' . $button->modalname . '" title="' . $button->text . '" href="' . $imgLink . '" rel="' . $button->options . '" >' . '<img src="' . $item->exts . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="' . JText::_($txtE) . '" />' . '</a>' . "\n";
         } else {
             if (isset($item->fileoriginalexist) && $item->fileoriginalexist == 1) {
                 $imageRes = PhocaGalleryImage::getRealImageSize($item->filename, 'small');
                 $correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
                 $imgLink = PhocaGalleryFileThumbnail::getThumbnailName($item->filename, 'large');
                 $o .= '<a class="' . $button->modalname . '" title="' . $button->text . '" href="' . JURI::root() . $imgLink->rel . '" rel="' . $button->options . '" >' . '<img src="' . JURI::root() . $item->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="' . JText::_($txtE) . '" />' . '</a>' . "\n";
             } else {
                 $o .= JHTML::_('image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', '');
             }
         }
     }
     $o .= '     </center>' . "\n" . '    </div>' . "\n" . '   </div>' . "\n" . '  </div>' . "\n" . ' </center>' . "\n" . '</div>' . "\n";
     $o .= '</td>' . "\n";
     return $o;
 }
开发者ID:VierlingMt,项目名称:joomla-3.x,代码行数:34,代码来源:renderadminviews.php

示例3:

	<td>
		<input type="hidden" id="cb<?php 
                    echo $k;
                    ?>
" name="cid[]" value="<?php 
                    echo $row->id;
                    ?>
" />
		<?php 
                    echo $this->tmpl['imagepagination']->getRowOffset($i);
                    ?>
	</td>
	<td align="center" valign="middle">
	<?php 
                    $row->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($row->filename, 'small');
                    $imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small');
                    $correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
                    //echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())),'', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
                    echo '<img src="' . JURI::root() . $row->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="" />';
                    ?>
	</td>

	<td><a href="<?php 
                    echo $linkEdit;
                    ?>
" title="<?php 
                    echo JText::_('COM_PHOCAGALLERY_EDIT_IMAGE');
                    ?>
"><?php 
                    echo $row->title;
                    ?>
开发者ID:01J,项目名称:skazkipronebo,代码行数:31,代码来源:default_images.php

示例4: explode

} else {
    $fileThumb = PhocaGalleryFileThumbnail::getOrCreateThumbnail($this->item->filename, '', 0, 0, 0);
    $this->item->linkthumbnailpath = $fileThumb['thumb_name_m_no_rel'];
    $this->item->fileoriginalexist = 1;
}
echo '<div style="float:right;margin:5px;">';
// PICASA
if (isset($this->item->extid) && $this->item->extid != '') {
    $resW = explode(',', $this->item->extw);
    $resH = explode(',', $this->item->exth);
    $correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 100, 100);
    $imgLink = $this->item->extl;
    echo '<img class="img-polaroid" src="' . $this->item->exts . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="" />';
} else {
    if (isset($this->item->fileoriginalexist) && $this->item->fileoriginalexist == 1) {
        $imageRes = PhocaGalleryImage::getRealImageSize($this->item->filename, 'medium');
        //$correctImageRes 	= PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 100, 100);
        $imgLink = PhocaGalleryFileThumbnail::getThumbnailName($this->item->filename, 'large');
        // TODO check the image
        echo '<img class="img-polaroid" style="max-width:100px;" src="' . JURI::root() . $this->item->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" alt="" />' . '</a>';
    } else {
    }
}
echo '</div>';
echo '</div>';
//end span2
echo $r->formInputs();
echo $r->endForm();
?>
		
开发者ID:naka211,项目名称:malerfirmaet,代码行数:29,代码来源:edit.php

示例5: display


//.........这里部分代码省略.........
         // Seems we are in iframe
         $this->tmpl['enable_multibox_iframe'] = 1;
     }
     // CSS
     PhocaGalleryRenderFront::renderAllCSS();
     if ($this->tmpl['gallerymetakey'] != '') {
         $document->setMetaData('keywords', $this->tmpl['gallerymetakey']);
     }
     if ($this->tmpl['gallerymetadesc'] != '') {
         $document->setMetaData('description', $this->tmpl['gallerymetadesc']);
     }
     // PARAMS - Open window parameters - modal popup box or standard popup window
     $detail_window = $this->params->get('detail_window', 0);
     // Plugin information
     if (isset($get['comment']) && $get['comment'] != '') {
         $detail_window = $get['comment'];
     }
     // Only registered (VOTES + COMMENTS)
     $this->tmpl['not_registered'] = true;
     $this->tmpl['name'] = '';
     if ($access) {
         $this->tmpl['not_registered'] = false;
         $this->tmpl['name'] = $user->name;
     }
     $document->addScript(JURI::base(true) . '/media/com_phocagallery/js/comments.js');
     $document->addCustomTag(PhocaGalleryRenderFront::renderCommentJS((int) $this->tmpl['maxcommentchar']));
     $this->tmpl['already_commented'] = PhocaGalleryCommentImage::checkUserComment((int) $this->tmpl['id'], (int) $user->id);
     $commentItem = PhocaGalleryCommentImage::displayComment((int) $this->tmpl['id']);
     // PARAMS - Display Description in Detail window - set the font color
     $this->tmpl['detailwindowbackgroundcolor'] = $this->params->get('detail_window_background_color', '#ffffff');
     $this->tmpl['detailwindow'] = $this->params->get('detail_window', 0);
     $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);
     // NO SCROLLBAR IN DETAIL WINDOW
     $document->addCustomTag("<style type=\"text/css\"> \n" . " html,body, .contentpane{background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";text-align:left;} \n" . " center, table {background:" . $this->tmpl['detailwindowbackgroundcolor'] . ";} \n" . " #sbox-window {background-color:#fff;padding:5px} \n" . " </style> \n");
     $model = $this->getModel();
     $item = $model->getData();
     $this->tmpl['imgtitle'] = $item->title;
     // Back button
     $this->tmpl['backbutton'] = '';
     if ($this->tmpl['detailwindow'] == 7 || $this->tmpl['display_comment_nopup']) {
         // Display Image
         // Access check - don't display the image if you have no access to this image (if user add own url)
         // USER RIGHT - ACCESS - - - - - - - - - -
         $rightDisplay = 0;
         if (!empty($item)) {
             $rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $item->cataccessuserid, $item->cataccess, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
         }
         if ($rightDisplay == 0) {
             $this->tmpl['pl'] = 'index.php?option=com_users&view=login&return=' . base64_encode($uri->toString());
             $app->redirect(JRoute::_($this->tmpl['pl'], false), JText::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'));
             exit;
         }
         // - - - - - - - - - - - - - - - - - - - -
         phocagalleryimport('phocagallery.image.image');
         $this->tmpl['backbutton'] = '<div><a href="' . JRoute::_('index.php?option=com_phocagallery&view=category&id=' . $this->tmpl['catid'] . '&Itemid=' . $this->itemId) . '"' . ' title="' . JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY') . '">' . JHtml::_('image', 'media/com_phocagallery/images/icon-up-images.png', JText::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY')) . '</a></div>';
         // Get file thumbnail or No Image
         $item->filenameno = $item->filename;
         $item->filename = PhocaGalleryFile::getTitleFromFile($item->filename, 1);
         $item->filesize = PhocaGalleryFile::getFileSize($item->filenameno);
         $altValue = PhocaGalleryRenderFront::getAltValue($this->tmpl['altvalue'], $item->title, $item->description, $item->metadesc);
         $item->altvalue = $altValue;
         $realImageSize = '';
         $extImage = PhocaGalleryImage::isExtImage($item->extid);
         if ($extImage) {
             $item->extl = $item->extl;
             $item->exto = $item->exto;
             $realImageSize = PhocaGalleryImage::getRealImageSize($item->extl, '', 1);
             $item->imagesize = PhocaGalleryImage::getImageSize($item->exto, 1, 1);
             if ($item->extw != '') {
                 $extw = explode(',', $item->extw);
                 $item->extw = $extw[0];
             }
             $correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($item->extw, $item->exth, $this->tmpl['picasa_correct_width_l'], $this->tmpl['picasa_correct_height_l']);
             $item->linkimage = JHtml::_('image', $item->extl, $item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
             $item->realimagewidth = $correctImageRes['width'];
             $item->realimageheight = $correctImageRes['height'];
         } else {
             $item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');
             $item->linkimage = JHtml::_('image', $item->linkthumbnailpath, $item->altvalue);
             $realImageSize = PhocaGalleryImage::getRealImageSize($item->filenameno);
             $item->imagesize = PhocaGalleryImage::getImageSize($item->filenameno, 1);
             if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
                 $item->realimagewidth = $realImageSize['w'];
                 $item->realimageheight = $realImageSize['h'];
             } else {
                 $item->realimagewidth = $this->tmpl['largewidth'];
                 $item->realimageheight = $this->tmpl['largeheight'];
             }
         }
         $this->assignRef('item', $item);
     }
     // ACTION
     $this->assignRef('item', $item);
     $this->tmpl['action'] = $uri->toString();
     $this->assignRef('commentitem', $commentItem);
     $this->_prepareDocument($item);
     parent::display($tpl);
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:101,代码来源:view.html.php

示例6: array

?>
<div class="phocagallery-box-file-i">
	<center>
		<div class="phocagallery-box-file-first-i">
			<div class="phocagallery-box-file-second">
				<div class="phocagallery-box-file-third">
					<center>
					<a href="#" onclick="if (window.parent) window.parent.<?php 
echo $this->fce;
?>
('<?php 
echo $this->_tmp_img->nameno;
?>
');">
	<?php 
$imageRes = PhocaGalleryImage::getRealImageSize($this->_tmp_img->nameno, 'medium');
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 100, 100);
echo JHTML::_('image', $this->_tmp_img->linkthumbnailpath, '', array('width' => $image['width'], 'height' => $image['height']), '', null);
?>
</a>
					</center>
				</div>
			</div>
		</div>
	</center>
	
	<div class="name"><?php 
echo $this->_tmp_img->name;
?>
</div>
		<div class="detail" style="text-align:right">
开发者ID:sansandeep143,项目名称:av,代码行数:31,代码来源:default_image.php


注:本文中的PhocaGalleryImage::getRealImageSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。