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


PHP RevSlide::getParam方法代码示例

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


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

示例1: getSlideFullWidthVideoData

 /**
  * 
  * get slide full width video data
  */
 private function getSlideFullWidthVideoData(RevSlide $slide)
 {
     $response = array("found" => false);
     //deal full width video:
     $enableVideo = $slide->getParam("enable_video", "false");
     if ($enableVideo != "true") {
         return $response;
     }
     $videoID = $slide->getParam("video_id", "");
     $videoID = trim($videoID);
     if (empty($videoID)) {
         return $response;
     }
     $response["found"] = true;
     $videoType = is_numeric($videoID) ? "vimeo" : "youtube";
     $videoAutoplay = $slide->getParam("video_autoplay");
     $response["type"] = $videoType;
     $response["videoID"] = $videoID;
     $response["autoplay"] = UniteFunctionsRev::strToBool($videoAutoplay);
     return $response;
 }
开发者ID:rohichurch,项目名称:rohichurch-wp,代码行数:25,代码来源:revslider_output.class.php

示例2: RevSlide

//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();
//set layer caption as first caption class
开发者ID:nimishavyas,项目名称:proiti,代码行数:30,代码来源:slide.php

示例3: getSlidesFromGallery

 /**
  * 
  * get slides of the current slider
  */
 public function getSlidesFromGallery($publishedOnly = false)
 {
     $this->validateInited();
     $arrSlides = array();
     $arrSlideRecords = $this->db->fetch(GlobalsRevSlider::$table_slides, "slider_id=" . $this->id, "slide_order");
     $arrChildren = array();
     foreach ($arrSlideRecords as $record) {
         $slide = new RevSlide();
         $slide->initByData($record);
         $slideID = $slide->getID();
         $arrIdsAssoc[$slideID] = true;
         if ($publishedOnly == true) {
             $state = $slide->getParam("state", "published");
             if ($state == "unpublished") {
                 continue;
             }
         }
         $parentID = $slide->getParam("parentid", "");
         if (!empty($parentID)) {
             $lang = $slide->getParam("lang", "");
             if (!isset($arrChildren[$parentID])) {
                 $arrChildren[$parentID] = array();
             }
             $arrChildren[$parentID][] = $slide;
             continue;
             //skip adding to main list
         }
         //init the children array
         $slide->setArrChildren(array());
         $arrSlides[$slideID] = $slide;
     }
     //add children array to the parent slides
     foreach ($arrChildren as $parentID => $arr) {
         if (!isset($arrSlides[$parentID])) {
             continue;
         }
         $arrSlides[$parentID]->setArrChildren($arr);
     }
     $this->arrSlides = $arrSlides;
     return $arrSlides;
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:45,代码来源:revslider_slider.class.php

示例4: getSlideFullWidthVideoData

 /**
  * 
  * get slide full width video data
  */
 private function getSlideFullWidthVideoData(RevSlide $slide)
 {
     $response = array("found" => false);
     //deal full width video:
     $enableVideo = $slide->getParam("enable_video", "false");
     if ($enableVideo != "true") {
         return $response;
     }
     $videoID = $slide->getParam("video_id", "");
     $videoID = trim($videoID);
     if (empty($videoID)) {
         return $response;
     }
     $response["found"] = true;
     $videoType = is_numeric($videoID) ? "vimeo" : "youtube";
     $videoAutoplay = $slide->getParam("video_autoplay");
     $videoCover = $slide->getParam("cover");
     $videoAutoplayOnlyFirstTime = $slide->getParam("autoplayonlyfirsttime");
     $previewimage = $slide->getParam("previewimage", "");
     $videoNextslide = $slide->getParam("video_nextslide");
     $mute = $slide->getParam("mute");
     $response["type"] = $videoType;
     $response["videoID"] = $videoID;
     $response["autoplay"] = UniteFunctionsRev::strToBool($videoAutoplay);
     $response["cover"] = UniteFunctionsRev::strToBool($videoCover);
     $response["autoplayonlyfirsttime"] = UniteFunctionsRev::strToBool($videoAutoplayOnlyFirstTime);
     $response["previewimage"] = UniteFunctionsRev::strToBool($previewimage);
     $response["nextslide"] = UniteFunctionsRev::strToBool($videoNextslide);
     $response["mute"] = UniteFunctionsRev::strToBool($mute);
     return $response;
 }
开发者ID:jhener79,项目名称:vlakc,代码行数:35,代码来源:revslider_output.class.php

示例5: RevSliderOperations

$slideParams = $slide->getParams();
$operations = new RevSliderOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSlideNames = $slider->getArrSlideNames();
$arrSlides = $slider->getSlides(false);
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = RevSliderFunctions::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
//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;
}
//add tools.min.js
wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', array(), RevSliderGlobals::SLIDER_REVISION);
$arrLayers = $slide->getLayers();
//set Layer settings
$cssContent = $operations->getCaptionsContent();
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
//$arrCaptionClassesSorted = $operations->getArrCaptionClasses($cssContent);
$arrCaptionClassesSorted = RevSliderCssParser::get_captions_sorted();
$arrFontFamily = $operations->getArrFontFamilys($slider);
$arrCSS = $operations->getCaptionsContentArray();
$arrButtonClasses = $operations->getButtonClasses();
$arrAnim = $operations->getFullCustomAnimations();
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:31,代码来源:slide-editor.php

示例6: __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

示例7: getSlides

 /**
  * 
  * get slides of the current slider
  */
 public function getSlides($publishedOnly = false)
 {
     $this->validateInited();
     $arrSlides = array();
     $arrSlideRecords = $this->db->fetch(GlobalsRevSlider::$table_slides, "slider_id=" . $this->id, "slide_order");
     foreach ($arrSlideRecords as $record) {
         $slide = new RevSlide();
         $slide->initByData($record);
         if ($publishedOnly == true) {
             $state = $slide->getParam("state", "published");
             if ($state == "unpublished") {
                 continue;
             }
         }
         $arrSlides[] = $slide;
     }
     $this->arrSlides = $arrSlides;
     return $arrSlides;
 }
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:23,代码来源:revslider_slider.class.php

示例8: putCreativeLayer

 /**
  * put creative layer
  */
 private function putCreativeLayer(RevSlide $slide, $static_slide = false)
 {
     $layers = $slide->getLayers();
     $slider_type = $this->slider->getParam('slider-type');
     $icon_sets = RevSliderBase::set_icon_sets(array());
     $customAnimations = RevSliderOperations::getCustomAnimations('customin');
     //get all custom animations
     $customEndAnimations = RevSliderOperations::getCustomAnimations('customout');
     //get all custom animations
     $startAnimations = RevSliderOperations::getArrAnimations(false);
     //only get the standard animations
     $endAnimations = RevSliderOperations::getArrEndAnimations(false);
     //only get the standard animations
     $fullCustomAnims = RevSliderOperations::getFullCustomAnimations();
     $lazyLoad = $this->slider->getParam('lazy_load_type', false);
     if ($lazyLoad === false) {
         //do fallback checks to removed lazy_load value since version 5.0 and replaced with an enhanced version
         $old_ll = $this->slider->getParam('lazy_load', 'off');
         $lazyLoad = $old_ll == 'on' ? 'all' : 'none';
     }
     $isTemplate = $this->slider->getParam('template', 'false');
     $enable_custom_size_notebook = $this->slider->getParam('enable_custom_size_notebook', 'off');
     $enable_custom_size_tablet = $this->slider->getParam('enable_custom_size_tablet', 'off');
     $enable_custom_size_iphone = $this->slider->getParam('enable_custom_size_iphone', 'off');
     $enabled_sizes = array('desktop' => 'on', 'notebook' => $enable_custom_size_notebook, 'tablet' => $enable_custom_size_tablet, 'mobile' => $enable_custom_size_iphone);
     $adv_resp_sizes = $enable_custom_size_notebook == 'on' || $enable_custom_size_tablet == 'on' || $enable_custom_size_iphone == 'on' ? true : false;
     $image_source_type = $this->slider->getParam('def-image_source_type', 'full');
     if (empty($layers)) {
         return false;
     }
     $zIndex = 5;
     $slideID = $slide->getID();
     $in_class_usage = array();
     foreach ($layers as $layer) {
         $unique_id = RevSliderFunctions::getVal($layer, 'unique_id');
         if ($unique_id == '') {
             $unique_id = $zIndex - 4;
         }
         //$visible = RevSliderFunctions::getVal($layer, 'visible', true);
         //if($visible == false) continue;
         $type = RevSliderFunctions::getVal($layer, 'type', 'text');
         //set if video full screen
         $videoclass = '';
         $isFullWidthVideo = false;
         if ($type == 'video') {
             $videoclass = ' tp-videolayer';
             $videoData = RevSliderFunctions::getVal($layer, 'video_data');
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
                 $isFullWidthVideo = RevSliderFunctions::getVal($videoData, 'fullwidth');
                 $isFullWidthVideo = RevSliderFunctions::strToBool($isFullWidthVideo);
             } else {
                 $videoData = array();
             }
         }
         $class = RevSliderFunctions::getVal($layer, 'style');
         if (trim($class) !== '') {
             $this->class_include['.' . trim($class)] = true;
             //add classname for style inclusion
             //get class styles for further compare usage
             if (!isset($in_class_usage[trim($class)])) {
                 $in_class_usage[trim($class)] = RevSliderOperations::getCaptionsContentArray(trim($class));
             }
         }
         //set defaults for stylings
         $dff = '';
         $dta = 'left';
         $dfs = 'normal';
         $dtd = 'none';
         $dpa = '0px 0px 0px 0px';
         $dbs = 'none';
         $dbw = '0px';
         $dbr = '0px 0px 0px 0px';
         $dfos = false;
         $dlh = false;
         $dfw = false;
         $dco = false;
         $dcot = 1;
         $dbc = 'transparent';
         $dbt = 1;
         $dboc = 'transparent';
         $dbot = 1;
         /**
          * remove this following to get back to 5.0.4.1 in terms of output styling
          **/
         $do_remove_inline = apply_filters('revslider_remove_inline', true);
         if ($do_remove_inline) {
             if (isset($in_class_usage[trim($class)]) && isset($in_class_usage[trim($class)]['params'])) {
                 //defaults get set here
                 $dfos = isset($in_class_usage[trim($class)]['params']->{'font-size'}) ? $in_class_usage[trim($class)]['params']->{'font-size'} : $dfos;
                 $dlh = isset($in_class_usage[trim($class)]['params']->{'line-height'}) ? $in_class_usage[trim($class)]['params']->{'line-height'} : $dlh;
                 $dfw = isset($in_class_usage[trim($class)]['params']->{'font-weight'}) ? $in_class_usage[trim($class)]['params']->{'font-weight'} : $dfw;
                 $dco = isset($in_class_usage[trim($class)]['params']->{'color'}) ? $in_class_usage[trim($class)]['params']->{'color'} : $dco;
                 $dcot = isset($in_class_usage[trim($class)]['params']->{'color-transparency'}) ? $in_class_usage[trim($class)]['params']->{'color-transparency'} : $dcot;
                 $dbc = isset($in_class_usage[trim($class)]['params']->{'background-color'}) ? $in_class_usage[trim($class)]['params']->{'background-color'} : $dbc;
                 $dbt = isset($in_class_usage[trim($class)]['params']->{'background-transparency'}) ? $in_class_usage[trim($class)]['params']->{'background-transparency'} : $dbt;
                 $dboc = isset($in_class_usage[trim($class)]['params']->{'border-color'}) ? $in_class_usage[trim($class)]['params']->{'border-color'} : $dboc;
//.........这里部分代码省略.........
开发者ID:allanRoberto,项目名称:klassea,代码行数:101,代码来源:output.class.php


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