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


PHP PhocaGalleryImage::correctSwitchSize方法代码示例

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


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

示例1: preg_match

    // Categories View in Category View
    if ($this->tmpl['display_categories_cv']) {
        echo $this->loadTemplate('categories');
    }
    echo $this->loadTemplate('images');
    echo '<div class="ph-cb"></div><div>&nbsp;</div>';
    echo $this->loadTemplate('pagination');
    echo '</div>' . "\n";
} else {
    // Standard category displaying
    $this->checkRights = 0;
    // Switch image
    $noBaseImg = false;
    $noBaseImg = preg_match("/phoca_thumb_l_no_image/i", $this->tmpl['basic_image']);
    if ($this->tmpl['switch_image'] == 1 && $noBaseImg == false) {
        $switchImage = PhocaGalleryImage::correctSwitchSize($this->tmpl['switch_height'], $this->tmpl['switch_width']);
        echo '<div class="main-switch-image"><center>' . '<table border="0" cellspacing="5" cellpadding="5" class="main-switch-image-table">' . '<tr>' . '<td align="center" valign="middle" style="text-align:center;' . 'width: ' . $switchImage['width'] . 'px;' . 'height: ' . $switchImage['height'] . 'px;' . 'background: url(\'' . $this->tmpl['wait_image'] . '\') ' . $switchImage['centerw'] . 'px ' . $switchImage['centerh'] . 'px no-repeat;margin:0px;padding:0px;">' . $this->tmpl['basic_image'] . '</td>' . '</tr></table></center></div>' . "\n";
    }
    // Categories View in Category View
    if ($this->tmpl['display_categories_cv']) {
        echo $this->loadTemplate('categories');
    }
    // Rendering images
    echo $this->loadTemplate('images');
    echo '<div class="ph-cb">&nbsp;</div>';
    echo $this->loadTemplate('pagination');
    if ($this->tmpl['displaytabs'] > 0) {
        echo '<div id="phocagallery-pane">';
        echo JHtml::_('tabs.start', 'config-tabs-com_phocagallery-category', array('useCookie' => 1, 'startOffset' => $this->tmpl['tab']));
        if ((int) $this->tmpl['display_rating'] == 1) {
            echo JHtml::_('tabs.panel', JHtml::_('image', 'media/com_phocagallery/images/icon-vote.png', '') . '&nbsp;' . JText::_('COM_PHOCAGALLERY_RATING'), 'pgvotes');
开发者ID:VierlingMt,项目名称:joomla-3.x,代码行数:31,代码来源:default.php

示例2: onContentPrepare


//.........这里部分代码省略.........
                                         		} else if ($tmpl['detail_window'] == 7 ) {
                                         			$output .= '';
                                         		} else {
                                         			$output .= ' rel="'. $buttonOther->options.'"';
                                         		}*/
                                         $output .= PhocaGalleryRenderFront::renderAAttributeOther($tmpl['detail_window'], $buttonOther->options, $tmpl['highslideonclick'], $tmpl['highslideonclick2']);
                                     }
                                     $output .= ' >';
                                     $output .= '<img src="' . JURI::base(true) . '/media/com_phocagallery/images/icon-download.png" alt="' . $image->title . '" />';
                                     $output .= '</a>';
                                 }
                                 $output .= '</div>';
                                 if ($float == '') {
                                     $output .= '<div style="clear:both"> </div>';
                                 }
                             }
                             break;
                     }
                     $output .= '</div>';
                     $iI++;
                 }
             }
             //--------------------------
             // DISPLAYING OF SWITCHIMAGE
             //--------------------------
             if ($view == 'switchimage') {
                 $path = PhocaGalleryPath::getPath();
                 $waitImage = $path->image_rel . 'icon-switch.gif';
                 $basicImage = $path->image_rel . 'phoca_thumb_l_no_image.' . $tmpl['formaticon'];
                 if ($basic_image_id > 0) {
                     $query = 'SELECT *' . ' FROM #__phocagallery' . ' WHERE id = ' . (int) $basic_image_id;
                     $db->setQuery($query);
                     $basicImageArray = $db->loadObject();
                     $switchImage = PhocaGalleryImage::correctSwitchSize($switch_height, $switch_width);
                     if ((int) $switch_width > 0 && (int) $switch_height > 0 && $switch_fixed_size == 1) {
                         $wHArray = array('id' => 'PhocaGalleryobjectPicture', 'border' => '0', 'width' => $switch_width, 'height' => $switch_height);
                         $wHString = ' id="PhocaGalleryobjectPicture"  border="0" width="' . $switch_width . '" height="' . $switch_height . '"';
                     } else {
                         $wHArray = array('id' => 'PhocaGalleryobjectPicture', 'border' => '0');
                         $wHString = ' id="PhocaGalleryobjectPicture"  border="0"';
                     }
                     if (isset($basicImageArray->extl) && isset($basicImageArray->extid) && $basicImageArray->extid != '') {
                         $basicImage = JHTML::_('image', $basicImageArray->extl, '', $wHArray);
                     } else {
                         if (isset($basicImageArray->filename)) {
                             $fileBasicThumb = PhocaGalleryFileThumbnail::getThumbnailName($basicImageArray->filename, 'large');
                             $basicImage = JHTML::_('image', $fileBasicThumb->rel, '', $wHString);
                         } else {
                             $basicImage = '';
                         }
                     }
                 }
                 $document->addCustomTag(PhocaGalleryRenderFront::switchImage($waitImage));
                 //$switchImage['height']	= $switchImage['height'] + 5;
                 $output .= '<div><center class="main-switch-image" style="margin:0px;padding:7px 5px 7px 5px;margin-bottom:15px;"><table border="0" cellspacing="5" cellpadding="5" style=""><tr><td align="center" valign="middle" style="text-align:center;width:' . $switchImage['width'] . 'px;height:' . $switchImage['height'] . 'px; background: url(\'' . JURI::root() . '/media/com_phocagallery/images/images/icon-switch.gif\') ' . $switchImage['centerw'] . 'px ' . $switchImage['centerh'] . 'px no-repeat;margin:0px;padding:0px;">';
                 $output .= $basicImage . '</td></tr></table></center></div>';
             } else {
                 // Overlib
             }
             //--------------------------
             // DISPLAYING OF Clear Both
             //--------------------------
             if ($view == 'clearboth') {
                 $output .= '<div style="clear:both"> </div>';
             }
             if ($view == 'clearright') {
开发者ID:01J,项目名称:skazkipronebo,代码行数:67,代码来源:phocagallery.php


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