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


PHP rev_aq_resize函数代码示例

本文整理汇总了PHP中rev_aq_resize函数的典型用法代码示例。如果您正苦于以下问题:PHP rev_aq_resize函数的具体用法?PHP rev_aq_resize怎么用?PHP rev_aq_resize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: putSlides


//.........这里部分代码省略.........
            } else {
                $urlSlideImage = $slide->getParam("slide_bg_external", "");
                $info = '';
                $alt = '';
            }
            if (isset($slide->ignore_alt)) {
                $alt = '';
            }
            $bgType = $slide->getParam("background_type", "image");
            //get thumb url
            $is_special_nav = false;
            switch ($cur_slide_title) {
                //generate also if we have a special navigation selected
                case 'preview1':
                case 'preview2':
                case 'preview3':
                case 'preview4':
                case 'custom':
                    $is_special_nav = true;
            }
            $htmlThumb = "";
            if ($isThumbsActive == true || $is_special_nav == true) {
                $urlThumb = null;
                //check if post slider, if yes, get thumb from featured image
                //if($this->slider->isSlidesFromPosts())
                //	$urlThumb = '';
                if (empty($urlThumb)) {
                    $urlThumb = $slide->getParam("slide_thumb", "");
                }
                if ($bgType == 'image') {
                    if (empty($urlThumb)) {
                        //try to get resized thumb
                        $url_img_link = $slide->getImageUrl();
                        $urlThumb = rev_aq_resize($url_img_link, 320, 200, true, true, true);
                        /*$pathThumb = $slide->getImageFilepath();
                        		if(!empty($pathThumb))
                        			$urlThumb = UniteBaseClassRev::getImageUrl($pathThumb,$thumbWidth,$thumbHeight,true);*/
                    }
                    //if not - put regular image:
                    if (empty($urlThumb)) {
                        $urlThumb = $slide->getImageUrl();
                    }
                }
                $htmlThumb = 'data-thumb="' . $urlThumb . '" ';
            }
            //get link
            $htmlLink = "";
            $enableLink = $slide->getParam("enable_link", "false");
            if ($enableLink == "true") {
                $linkType = $slide->getParam("link_type", "regular");
                switch ($linkType) {
                    //---- normal link
                    default:
                    case "regular":
                        $link = $slide->getParam("link", "");
                        $linkOpenIn = $slide->getParam("link_open_in", "same");
                        $htmlTarget = "";
                        if ($linkOpenIn == "new") {
                            $htmlTarget = ' data-target="_blank"';
                        }
                        $htmlLink = "data-link=\"{$link}\" {$htmlTarget} ";
                        break;
                        //---- link to slide
                    //---- link to slide
                    case "slide":
                        $slideLink = UniteFunctionsRev::getVal($params, "slide_link");
开发者ID:szpaddy,项目名称:the7,代码行数:67,代码来源:revslider_output.class.php

示例2: putSlides


//.........这里部分代码省略.........
            }
            switch ($navigation_bullets_style) {
                //generate also if we have a special navigation selected
                case 'preview1':
                case 'preview2':
                case 'preview3':
                case 'preview4':
                case 'custom':
                    $is_special_nav = true;
            }
            $htmlThumb = "";
            if ($isThumbsActive == true || $is_special_nav == true) {
                $urlThumb = null;
                if (empty($urlThumb)) {
                    $urlThumb = $slide->getParam('slide_thumb', '');
                }
                $thumb_do = $slide->getParam('thumb_dimension', 'slider');
                if ($thumb_do == 'slider') {
                    //use the slider settings for width / height
                    $th_width = intval($this->slider->getParam('previewimage_width', $this->slider->getParam('thumb_width', 100)));
                    $th_height = intval($this->slider->getParam('previewimage_height', $this->slider->getParam('thumb_height', 50)));
                    //$th_width = intval($this->slider->getParam('thumb_width', 100));
                    //$th_height = intval($this->slider->getParam('thumb_height', 50));
                    if ($th_width == 0) {
                        $th_width = 100;
                    }
                    if ($th_height == 0) {
                        $th_height = 50;
                    }
                    if ($source_type == 'youtube' || $source_type == 'vimeo' || $bgType == 'image' || $bgType == 'vimeo' || $bgType == 'youtube' || $bgType == 'html5' || $bgType == 'streamvimeo' || $bgType == 'streamyoutube' || $bgType == 'streaminstagram' || $bgType == 'streamtwitter' || $bgType == 'streamvimeoboth' || $bgType == 'streamyoutubeboth' || $bgType == 'streaminstagramboth' || $bgType == 'streamtwitterboth') {
                        if (empty($urlThumb)) {
                            //try to get resized thumb
                            $url_img_link = $slide->getImageUrl();
                            $urlThumb = rev_aq_resize($url_img_link, $th_width, $th_height, true, true, true);
                        } else {
                            $urlThumb = rev_aq_resize($urlThumb, $th_width, $th_height, true, true, true);
                            if (empty($urlThumb)) {
                                $urlThumb = $slide->getImageUrl();
                                $urlThumb = rev_aq_resize($urlThumb, $th_width, $th_height, true, true, true);
                            }
                        }
                        //if not - put regular image:
                        if (empty($urlThumb)) {
                            $urlThumb = $slide->getImageUrl();
                        }
                    }
                } else {
                    //if not - put regular image:
                    if (empty($urlThumb)) {
                        $urlThumb = $slide->getImageUrl();
                    }
                }
                if (is_ssl()) {
                    $urlThumb = str_replace('http://', 'https://', $urlThumb);
                } else {
                    $urlThumb = str_replace('https://', 'http://', $urlThumb);
                }
                $htmlThumb = ' data-thumb="' . $urlThumb . '" ';
            }
            //get link
            $htmlLink = '';
            $enableLink = $slide->getParam('enable_link', 'false');
            if ($enableLink == 'true') {
                $linkType = $slide->getParam('link_type', 'regular');
                switch ($linkType) {
                    //---- normal link
开发者ID:surreal8,项目名称:wptheme,代码行数:67,代码来源:output.class.php

示例3: putSlides


//.........这里部分代码省略.........
                        $urlSlideImage = str_replace("http://", "https://", $urlSlideImage);
                    }
                }
                $imageFilename = $slide->getImageFilename();
                $info = pathinfo($imageFilename);
                $alt = $info["filename"];
            } else {
                $urlSlideImage = $slide->getParam("slide_bg_external", "");
                $info = '';
                $alt = '';
            }
            if (isset($slide->ignore_alt)) {
                $alt = '';
            }
            $bgType = $slide->getParam("background_type", "image");
            $is_special_nav = false;
            switch ($cur_slide_title) {
                case 'preview1':
                case 'preview2':
                case 'preview3':
                case 'preview4':
                case 'custom':
                    $is_special_nav = true;
            }
            $htmlThumb = "";
            if ($isThumbsActive == true || $is_special_nav == true) {
                $urlThumb = null;
                if (empty($urlThumb)) {
                    $urlThumb = $slide->getParam("slide_thumb", "");
                }
                if ($bgType == 'image') {
                    if (empty($urlThumb)) {
                        $url_img_link = $slide->getImageUrl();
                        $urlThumb = rev_aq_resize($url_img_link, 320, 200, true, true, true);
                    }
                    if (empty($urlThumb)) {
                        $urlThumb = $slide->getImageUrl();
                    }
                    $urlThumb = modify_layer_image($urlThumb);
                }
                $htmlThumb = 'data-thumb="' . $urlThumb . '" ';
            }
            $htmlLink = "";
            $enableLink = $slide->getParam("enable_link", "false");
            if ($enableLink == "true") {
                $linkType = $slide->getParam("link_type", "regular");
                switch ($linkType) {
                    default:
                    case "regular":
                        $link = $slide->getParam("link", "");
                        $linkOpenIn = $slide->getParam("link_open_in", "same");
                        $htmlTarget = "";
                        if ($linkOpenIn == "new") {
                            $htmlTarget = ' data-target="_blank"';
                        }
                        $htmlLink = "data-link=\"{$link}\" {$htmlTarget} ";
                        break;
                    case "slide":
                        $slideLink = UniteFunctionsRev::getVal($params, "slide_link");
                        if (!empty($slideLink) && $slideLink != "nothing") {
                            if (is_numeric($slideLink)) {
                                $slideLink = UniteFunctionsRev::getVal($this->slidesNumIndex, $slideLink);
                            }
                            if (!empty($slideLink)) {
                                $htmlLink = "data-link=\"slide\" data-linktoslide=\"{$slideLink}\" ";
                            }
开发者ID:evgrishin,项目名称:se1614,代码行数:67,代码来源:revslider_output.class.php


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