本文整理汇总了PHP中PhocaGalleryImage::getTransformImageArray方法的典型用法代码示例。如果您正苦于以下问题:PHP PhocaGalleryImage::getTransformImageArray方法的具体用法?PHP PhocaGalleryImage::getTransformImageArray怎么用?PHP PhocaGalleryImage::getTransformImageArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhocaGalleryImage
的用法示例。
在下文中一共展示了PhocaGalleryImage::getTransformImageArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
//.........这里部分代码省略.........
}
$this->items[$iS]->display_icon_extlink2 = 0;
if (isset($this->items[$iS]->extlink2)) {
$this->items[$iS]->extlink2 = explode("|", $this->items[$iS]->extlink2, 4);
if (isset($this->items[$iS]->extlink2[0]) && $this->items[$iS]->extlink2[0] != '' && isset($this->items[$iS]->extlink2[1])) {
$this->items[$iS]->display_icon_extlink2 = 1;
$this->tmpl['display_icon_extlink2_box'] = 1;
// because of height of box
if (!isset($this->items[$iS]->extlink2[2])) {
$this->items[$iS]->extlink2[2] = '_self';
}
if (!isset($this->items[$iS]->extlink2[3]) || $this->items[$iS]->extlink2[3] == 1) {
$this->items[$iS]->extlink2[4] = JHtml::_('image', 'media/com_phocagallery/images/icon-extlink2.png', JText::_($this->items[$iS]->extlink2[1]));
$this->items[$iS]->extlink2[5] = '';
} else {
$this->items[$iS]->extlink2[4] = $this->items[$iS]->extlink2[1];
$this->items[$iS]->extlink2[5] = 'style="text-decoration:underline"';
}
} else {
$this->items[$iS]->display_icon_extlink2 = 0;
}
}
// OVERLIB
if (!empty($this->items[$iS]->description)) {
$divPadding = 'ph-ovrl1';
} else {
$divPadding = 'ph-ovrl2';
}
// Resize image in overlib by rate
$wHOutput = array();
if (isset($this->items[$iS]->extpic) && $this->items[$iS]->extpic != '') {
if ((int) $this->tmpl['overlibimagerate'] > 0) {
$imgSize = @getimagesize($this->items[$iS]->extl);
$wHOutput = PhocaGalleryImage::getTransformImageArray($imgSize, $this->tmpl['overlibimagerate']);
}
$oImg = JHtml::_('image', $this->items[$iS]->extl, '', $wHOutput);
} else {
$thumbL = str_replace('phoca_thumb_m1_', 'phoca_thumb_m_', $this->items[$iS]->linkthumbnailpath);
$thumbL = str_replace('phoca_thumb_m2_', 'phoca_thumb_m_', $thumbL);
$thumbL = str_replace('phoca_thumb_m3_', 'phoca_thumb_m_', $thumbL);
$thumbL = str_replace('phoca_thumb_m_', 'phoca_thumb_l_', $thumbL);
if ((int) $this->tmpl['overlibimagerate'] > 0) {
$imgSize = @getimagesize($thumbL);
$wHOutput = PhocaGalleryImage::getTransformImageArray($imgSize, $this->tmpl['overlibimagerate']);
}
$thumbLI = str_replace('phoca_thumb_m1_', 'phoca_thumb_m_', $this->items[$iS]->linkthumbnailpath);
$thumbLI = str_replace('phoca_thumb_m2_', 'phoca_thumb_m_', $thumbLI);
$thumbLI = str_replace('phoca_thumb_m3_', 'phoca_thumb_m_', $thumbLI);
$oImg = JHtml::_('image', $thumbL, '', $wHOutput);
}
switch ($enable_overlib) {
case 1:
case 4:
$uBy = '';
//Uploaded by ...
if ($enable_overlib == 4 && isset($this->items[$iS]->usernameno) && $this->items[$iS]->usernameno != '') {
$uBy = '<div>' . JText::_('COM_PHOCAGALLERY_UPLOADED_BY') . ' <strong>' . $this->items[$iS]->usernameno . '</strong></div>';
}
$this->items[$iS]->overlib = 1;
$this->items[$iS]->overlib_value = "\n\n" . "onmouseover=\"return overlib('" . htmlspecialchars(addslashes('<div class="pg-overlib"><center>' . $oImg . "</center></div>" . $uBy)) . "', CAPTION, '" . htmlspecialchars(addslashes($this->items[$iS]->title)) . "' ," . htmlspecialchars($this->tmpl['overlib_attributes']) . ");\"" . " onmouseout=\"return nd();\"" . "\n";
break;
case 2:
case 5:
$uBy = '';
//Uploaded by ...
if ($enable_overlib == 5 && isset($this->items[$iS]->usernameno) && $this->items[$iS]->usernameno != '') {
示例2: display
//.........这里部分代码省略.........
}
$items[$iS]->displayiconextlink2 = 0;
if (isset($items[$iS]->extlink2)) {
$items[$iS]->extlink2 = explode("|", $items[$iS]->extlink2, 4);
if (isset($items[$iS]->extlink2[0]) && $items[$iS]->extlink2[0] != '' && isset($items[$iS]->extlink2[1])) {
$items[$iS]->displayiconextlink2 = 1;
$this->tmpl['displayiconextlink2box'] = 1;
// because of height of box
if (!isset($items[$iS]->extlink2[2])) {
$items[$iS]->extlink2[2] = '_self';
}
if (!isset($items[$iS]->extlink2[3]) || $items[$iS]->extlink2[3] == 1) {
$items[$iS]->extlink2[4] = JHtml::_('image', 'components/com_phocagallery/assets/images/icon-extlink2.' . $this->tmpl['formaticon'], JText::_($items[$iS]->extlink2[1]));
$items[$iS]->extlink2[5] = '';
} else {
$items[$iS]->extlink2[4] = $items[$iS]->extlink2[1];
$items[$iS]->extlink2[5] = 'style="text-decoration:underline"';
}
} else {
$items[$iS]->displayiconextlink2 = 0;
}
}
// OVERLIB
if (!empty($items[$iS]->description)) {
$divPadding = 'padding:5px;';
} else {
$divPadding = 'padding:0px;margin:0px;';
}
// Resize image in overlib by rate
$wHOutput = array();
if (isset($items[$iS]->extpic) && $items[$iS]->extpic != '') {
if ((int) $this->tmpl['overlibimagerate'] > 0) {
$imgSize = @getimagesize($items[$iS]->extl);
$wHOutput = PhocaGalleryImage::getTransformImageArray($imgSize, $this->tmpl['overlibimagerate']);
}
$oImg = JHtml::_('image', $items[$iS]->extl, '', $wHOutput);
} else {
if ((int) $this->tmpl['overlibimagerate'] > 0) {
$thumbL = str_replace('phoca_thumb_m_', 'phoca_thumb_l_', $items[$iS]->linkthumbnailpath);
$imgSize = @getimagesize($thumbL);
$wHOutput = PhocaGalleryImage::getTransformImageArray($imgSize, $this->tmpl['overlibimagerate']);
}
$oImg = JHtml::_('image', str_replace('phoca_thumb_m_', 'phoca_thumb_l_', $items[$iS]->linkthumbnailpath), '', $wHOutput);
}
switch ($enable_overlib) {
case 1:
case 4:
$uBy = '';
//Uploaded by ...
if ($enable_overlib == 4 && isset($items[$iS]->usernameno) && $items[$iS]->usernameno != '') {
$uBy = '<div>' . JText::_('COM_PHOCAGALLERY_UPLOADED_BY') . ' <strong>' . $items[$iS]->usernameno . '</strong></div>';
}
$items[$iS]->overlib = 1;
$items[$iS]->overlib_value = " onmouseover=\"return overlib('" . htmlspecialchars(addslashes('<div class="pg-overlib"><center>' . $oImg . "</center></div>" . $uBy)) . "', CAPTION, '" . htmlspecialchars(addslashes($items[$iS]->title)) . "', BELOW, RIGHT, BGCLASS,'bgPhocaClass', FGCOLOR, '" . $this->tmpl['olfgcolor'] . "', BGCOLOR, '" . $this->tmpl['olbgcolor'] . "', TEXTCOLOR, '" . $this->tmpl['oltfcolor'] . "', CAPCOLOR, '" . $this->tmpl['olcfcolor'] . "');\"" . " onmouseout=\"return nd();\" ";
break;
case 2:
case 5:
$uBy = '';
//Uploaded by ...
if ($enable_overlib == 5 && isset($items[$iS]->usernameno) && $items[$iS]->usernameno != '') {
$uBy = '<div>' . JText::_('COM_PHOCAGALLERY_UPLOADED_BY') . ' <strong>' . $items[$iS]->usernameno . '</strong></div>';
}
$items[$iS]->overlib = 2;
$items[$iS]->description = str_replace("\n", '<br />', $items[$iS]->description);
$items[$iS]->description = str_replace("\r", ' ', $items[$iS]->description);
$items[$iS]->overlib_value = " onmouseover=\"return overlib('" . htmlspecialchars(addslashes('<div class="pg-overlib"><div style="' . $divPadding . '">' . $items[$iS]->description . '</div></div>' . $uBy)) . "', CAPTION, '" . htmlspecialchars(addslashes($items[$iS]->title)) . "', BELOW, RIGHT, CSSCLASS, TEXTFONTCLASS, 'fontPhocaClass', FGCLASS, 'fgPhocaClass', BGCLASS, 'bgPhocaClass', CAPTIONFONTCLASS,'capfontPhocaClass', CLOSEFONTCLASS, 'capfontclosePhocaClass');\"" . " onmouseout=\"return nd();\" ";