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


PHP RevSlider::getParams方法代码示例

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


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

示例1: RevSlide

<?php

//get input
$slideID = UniteFunctionsRev::getGetVar("id");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
//set slide delay
$sliderDelay = $slider->getParam("delay", "9000");
$slideDelay = $slide->getParam("delay", "");
if (empty($slideDelay)) {
    $slideDelay = $sliderDelay;
}
require self::getSettingsFilePath("slide_settings");
require self::getSettingsFilePath("layer_settings");
$settingsLayerOutput = new UniteSettingsProductSidebarRev();
$settingsSlideOutput = new UniteSettingsRevProductRev();
$arrLayers = $slide->getLayers();
//get settings objects
$settingsLayer = self::getSettings("layer_settings");
$settingsSlide = self::getSettings("slide_settings");
$cssContent = self::getSettings("css_captions_content");
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
$arrButtonClasses = $operations->getButtonClasses();
开发者ID:nimishavyas,项目名称:proiti,代码行数:31,代码来源:slide.php

示例2: block

 function block($instance)
 {
     extract($instance);
     if ($mb == '') {
         $mb = '58';
     }
     $slider5 = new RevSlider();
     $arrSliders = $slider5->getArrSliders();
     $sliders_test = '';
     foreach ($arrSliders as $slider5t) {
         $sliders_test .= $slider5t->getAlias();
     }
     if ($sliders_test != '') {
         $slider5->initByAlias($re);
         $sliderParams = $slider5->getParams();
         $revh = $sliderParams["height"];
         $salias = '';
         foreach ($arrSliders as $slider5) {
             $salias .= $slider5->getAlias();
         }
         if ($salias != '') {
             if ($f == 'yes') {
                 echo '<div class="fullwimage rev_slider_fullw">';
                 putRevSlider($re);
                 echo '</div><div style="height:' . $revh . 'px;margin-bottom:' . $mb . 'px;" class="cl"></div>';
             } else {
                 putRevSlider($re);
             }
         }
     }
     //sliders test end
 }
开发者ID:shuramita,项目名称:dhsd,代码行数:32,代码来源:cb-blocks.php

示例3: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     //get input
     $slideID = $this->getRequest()->getParam('id');
     //init slide object
     $slide = new RevSlide();
     $slide->initByID($slideID);
     $slideParams = $slide->getParams();
     $operations = new RevOperations();
     //init slider object
     $sliderID = $slide->getSliderID();
     $slider = new RevSlider();
     $slider->initByID($sliderID);
     $sliderParams = $slider->getParams();
     $arrSlideNames = $slider->getArrSlideNames();
     //check if slider is template
     $sliderTemplate = $slider->getParam("template", "false");
     //set slide delay
     $sliderDelay = $slider->getParam("delay", "9000");
     $slideDelay = $slide->getParam("delay", "");
     if (empty($slideDelay)) {
         $slideDelay = $sliderDelay;
     }
     require $this->getSettingsFilePath("slide_settings");
     require $this->getSettingsFilePath("layer_settings");
     $settingsLayerOutput = new UniteSettingsProductSidebarRev();
     $settingsSlideOutput = new UniteSettingsRevProductRev();
     $arrLayers = $slide->getLayers();
     $loadGoogleFont = $slider->getParam("load_googlefont", "false");
     //get settings objects
     $settingsLayer = $this->getSettings("layer_settings");
     $settingsSlide = $this->getSettings("slide_settings");
     $cssContent = $this->getSettings("css_captions_content");
     $arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
     $arrFontFamily = $operations->getArrFontFamilys($slider);
     $arrCSS = $operations->getCaptionsContentArray();
     $arrButtonClasses = $operations->getButtonClasses();
     $urlCaptionsCSS = GlobalsRevSlider::$urlCaptionsCSS;
     $arrAnim = $operations->getFullCustomAnimations();
     //set layer caption as first caption class
     $firstCaption = !empty($arrCaptionClasses) ? $arrCaptionClasses[0] : "";
     $settingsLayer->updateSettingValue("layer_caption", $firstCaption);
     //set stored values from "slide params"
     $settingsSlide->setStoredValues($slideParams);
     //init the settings output object
     $settingsLayerOutput->init($settingsLayer);
     $settingsSlideOutput->init($settingsSlide);
     //set various parameters needed for the page
     $width = $sliderParams["width"];
     $height = $sliderParams["height"];
     $imageUrl = $slide->getImageUrl();
     $imageID = $slide->getImageID();
     $imageFilename = $slide->getImageFilename();
     $style = "height:" . $height . "px;";
     //
     $divLayersWidth = "width:" . $width . "px;";
     $divbgminwidth = "min-width:" . $width . "px;";
     //set iframe parameters
     $iframeWidth = $width + 60;
     $iframeHeight = $height + 50;
     $iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
     $closeUrl = $this->getViewUrl(RevSliderAdmin::VIEW_SLIDES, "id=" . $sliderID);
     $jsonLayers = UniteFunctionsRev::jsonEncodeForClientSide($arrLayers);
     $jsonCaptions = UniteFunctionsRev::jsonEncodeForClientSide($arrCaptionClasses);
     $jsonFontFamilys = UniteFunctionsRev::jsonEncodeForClientSide($arrFontFamily);
     $arrCssStyles = UniteFunctionsRev::jsonEncodeForClientSide($arrCSS);
     $arrCustomAnim = UniteFunctionsRev::jsonEncodeForClientSide($arrAnim);
     //bg type params
     $bgType = UniteFunctionsRev::getVal($slideParams, "background_type", "image");
     $slideBGColor = UniteFunctionsRev::getVal($slideParams, "slide_bg_color", "#E7E7E7");
     $divLayersClass = "slide_layers";
     $bgSolidPickerProps = 'class="inputColorPicker slide_bg_color disabled" disabled="disabled"';
     $bgFit = UniteFunctionsRev::getVal($slideParams, "bg_fit", "cover");
     $bgFitX = intval(UniteFunctionsRev::getVal($slideParams, "bg_fit_x", "100"));
     $bgFitY = intval(UniteFunctionsRev::getVal($slideParams, "bg_fit_y", "100"));
     $bgPosition = UniteFunctionsRev::getVal($slideParams, "bg_position", "center top");
     $bgPositionX = intval(UniteFunctionsRev::getVal($slideParams, "bg_position_x", "0"));
     $bgPositionY = intval(UniteFunctionsRev::getVal($slideParams, "bg_position_y", "0"));
     $bgEndPosition = UniteFunctionsRev::getVal($slideParams, "bg_end_position", "center top");
     $bgEndPositionX = intval(UniteFunctionsRev::getVal($slideParams, "bg_end_position_x", "0"));
     $bgEndPositionY = intval(UniteFunctionsRev::getVal($slideParams, "bg_end_position_y", "0"));
     $kenburn_effect = UniteFunctionsRev::getVal($slideParams, "kenburn_effect", "off");
     $kb_duration = UniteFunctionsRev::getVal($slideParams, "kb_duration", $sliderParams["delay"]);
     $kb_easing = UniteFunctionsRev::getVal($slideParams, "kb_easing", "Linear.easeNone");
     $kb_start_fit = UniteFunctionsRev::getVal($slideParams, "kb_start_fit", "100");
     $kb_end_fit = UniteFunctionsRev::getVal($slideParams, "kb_end_fit", "100");
     $bgRepeat = UniteFunctionsRev::getVal($slideParams, "bg_repeat", "no-repeat");
     $slideBGExternal = UniteFunctionsRev::getVal($slideParams, "slide_bg_external", "");
     $style_wrapper = '';
     $class_wrapper = '';
     switch ($bgType) {
         case "trans":
             $divLayersClass = "slide_layers";
             $class_wrapper = "trans_bg";
             break;
         case "solid":
//.........这里部分代码省略.........
开发者ID:perseusl,项目名称:kingdavid,代码行数:101,代码来源:Slide.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $operations = new RevOperations();
     $sliderID = $this->getRequest()->getParam('id');
     $storeID = $this->getRequest()->getParam('store_id', 0);
     if (empty($sliderID)) {
         UniteFunctionsRev::throwError("Slider ID not found");
     }
     $slider = new RevSlider();
     $slider->initByID($sliderID);
     $sliderParams = $slider->getParams();
     $arrSliders = $slider->getArrSlidersShort($sliderID);
     $selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
     $numSliders = count($arrSliders);
     //set iframe parameters
     $width = $sliderParams["width"];
     $height = $sliderParams["height"];
     $iframeWidth = $width + 60;
     $iframeHeight = $height + 50;
     $iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
     $arrSlides = $slider->getSlides(false, $storeID);
     $numSlides = count($arrSlides);
     $linksSliderSettings = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/' . $sliderID);
     $patternViewSlide = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/[slideid]');
     $useStaticLayers = $slider->getParam("enable_static_layers", "off");
     //treat in case of slides from gallery
     if ($slider->isSlidesFromPosts() == false) {
         $templateName = "slides_gallery";
         // store view
         $selectStoreView = Mage::app()->getLayout()->createBlock('core/html_select')->setName('select_storeview')->setId('select_storeview')->setTitle('Store View')->setValue($storeID)->setOptions(Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true))->getHtml();
         $this->assign('storeID', $storeID);
         $this->assign('selectStoreView', $selectStoreView);
         $this->setTemplate('nwdthemes/revslider/templates/slides_gallery.phtml');
     } else {
         //slides from posts
         $templateName = "slides_posts";
         $sourceType = $slider->getParam("source_type", "posts");
         $showSortBy = $sourceType == "posts" ? true : false;
         $showDelete = $sourceType == "specific_posts" ? true : false;
         //get button links
         $urlNewPost = $this->helper('adminhtml')->getUrl('adminhtml/catalog_product/new');
         $linkNewPost = UniteFunctionsRev::getHtmlLink($urlNewPost, $this->__("<i class='revicon-pencil-1'></i>New Product"), "button_new_post", "button-primary revblue", true);
         //get ordering
         $arrSortBy = $this->helper('nwdrevslider')->getArrSortBy();
         $sortBy = $slider->getParam("post_sortby", RevSlider::DEFAULT_POST_SORTBY);
         $selectSortBy = UniteFunctionsRev::getHTMLSelect($arrSortBy, $sortBy, "id='select_sortby'", true);
         $this->assign('showSortBy', $showSortBy);
         $this->assign('showDelete', $showDelete);
         $this->assign('selectSortBy', $selectSortBy);
         $this->assign('linkNewPost', $linkNewPost);
         $this->setTemplate('nwdthemes/revslider/templates/slides_posts.phtml');
     }
     $this->assign('sliderID', $sliderID);
     $this->assign('iframeStyle', $iframeStyle);
     $this->assign('patternViewSlide', $patternViewSlide);
     $this->assign('selectSliders', $selectSliders);
     $this->assign('linksSliderSettings', $linksSliderSettings);
     $this->assign('useStaticLayers', $useStaticLayers);
     $this->assign('arrSlides', $arrSlides);
     $this->assign('slider', $slider);
     $this->assign('numSlides', $numSlides);
     $this->assign('numSliders', $numSliders);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:67,代码来源:Slides.php


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