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


PHP RevOperations::getCustomAnimations方法代码示例

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


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

示例1: putCreativeLayer

 /**
  * 
  * put creative layer
  */
 private function putCreativeLayer(RevSlide $slide, $static_slide = false)
 {
     $layers = $slide->getLayers();
     $customAnimations = RevOperations::getCustomAnimations('customin');
     //get all custom animations
     $customEndAnimations = RevOperations::getCustomAnimations('customout');
     //get all custom animations
     $startAnimations = RevOperations::getArrAnimations(false);
     //only get the standard animations
     $endAnimations = RevOperations::getArrEndAnimations(false);
     //only get the standard animations
     $lazyLoad = $this->slider->getParam("lazy_load", "off");
     $isTemplate = $this->slider->getParam("template", "false");
     if (empty($layers)) {
         return false;
     }
     $zIndex = 5;
     foreach ($layers as $layer) {
         $type = UniteFunctionsRev::getVal($layer, "type", "text");
         //set if video full screen
         $videoclass = '';
         $isFullWidthVideo = false;
         if ($type == "video") {
             $videoclass = ' tp-videolayer';
             $videoData = UniteFunctionsRev::getVal($layer, "video_data");
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
                 $isFullWidthVideo = UniteFunctionsRev::getVal($videoData, "fullwidth");
                 $isFullWidthVideo = UniteFunctionsRev::strToBool($isFullWidthVideo);
             } else {
                 $videoData = array();
             }
         }
         $class = UniteFunctionsRev::getVal($layer, "style");
         if (trim($class) !== '') {
             $this->class_include['.' . trim($class)] = true;
         }
         //add classname for style inclusion
         $animation = UniteFunctionsRev::getVal($layer, "animation", "tp-fade");
         if ($animation == "fade") {
             $animation = "tp-fade";
         }
         $customin = '';
         if (!array_key_exists($animation, $startAnimations) && array_key_exists($animation, $customAnimations)) {
             //if true, add custom animation
             $customin .= 'data-customin="';
             $animArr = RevOperations::getCustomAnimationByHandle($customAnimations[$animation]);
             if ($animArr !== false) {
                 $customin .= RevOperations::parseCustomAnimationByArray($animArr);
             }
             $customin .= '"';
             $animation = 'customin';
         }
         if (strpos($animation, 'customin-') !== false || strpos($animation, 'customout-') !== false) {
             $animation = "tp-fade";
         }
         //set output class:
         $layer_2d_rotation = intval(UniteFunctionsRev::getVal($layer, "2d_rotation", '0'));
         $layer_2d_origin_x = intval(UniteFunctionsRev::getVal($layer, "2d_origin_x", '50'));
         $layer_2d_origin_y = intval(UniteFunctionsRev::getVal($layer, "2d_origin_y", '50'));
         if ($layer_2d_rotation == 0) {
             $outputClass = "tp-caption " . trim($class);
         } else {
             $outputClass = "tp-caption ";
         }
         $outputClass = trim($outputClass) . " ";
         $outputClass .= trim($animation);
         $left = UniteFunctionsRev::getVal($layer, "left", 0);
         $top = UniteFunctionsRev::getVal($layer, "top", 0);
         $speed = UniteFunctionsRev::getVal($layer, "speed", 300);
         $time = UniteFunctionsRev::getVal($layer, "time", 0);
         $easing = UniteFunctionsRev::getVal($layer, "easing", "easeOutExpo");
         $randomRotate = UniteFunctionsRev::getVal($layer, "random_rotation", "false");
         $randomRotate = UniteFunctionsRev::boolToStr($randomRotate);
         $splitin = UniteFunctionsRev::getVal($layer, "split", "none");
         $splitout = UniteFunctionsRev::getVal($layer, "endsplit", "none");
         $elementdelay = intval(UniteFunctionsRev::getVal($layer, "splitdelay", 0));
         $endelementdelay = intval(UniteFunctionsRev::getVal($layer, "endsplitdelay", 0));
         if ($elementdelay > 0) {
             $elementdelay /= 100;
         }
         if ($endelementdelay > 0) {
             $endelementdelay /= 100;
         }
         $text = UniteFunctionsRev::getVal($layer, "text");
         if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate
             $text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         }
         $htmlVideoAutoplay = "";
         $htmlVideoAutoplayOnlyFirstTime = "";
         $htmlVideoNextSlide = "";
         $htmlVideoThumbnail = "";
         $htmlMute = '';
         $htmlCover = '';
         $htmlDotted = '';
//.........这里部分代码省略.........
开发者ID:jhener79,项目名称:vlakc,代码行数:101,代码来源:revslider_output.class.php

示例2: deleteCustomAnim

 /**
  *
  * delete custom animations
  */
 public static function deleteCustomAnim($rawID)
 {
     if (trim($rawID) != '') {
         $db = new UniteDBRev();
         $id = str_replace(array('customin-', 'customout'), array('', ''), $rawID);
         $db->delete(GlobalsRevSlider::$table_layer_anims, "id = '" . mysql_real_escape_string($id) . "'");
     }
     $arrAnims['customin'] = RevOperations::getCustomAnimations();
     $arrAnims['customout'] = RevOperations::getCustomAnimations('customout');
     $arrAnims['customfull'] = RevOperations::getFullCustomAnimations();
     return $arrAnims;
 }
开发者ID:misfist,项目名称:missdrepants-network,代码行数:16,代码来源:revslider_operations.class.php

示例3: putCreativeLayer

 /**
  * 
  * put creative layer
  */
 private function putCreativeLayer(RevSlide $slide)
 {
     $layers = $slide->getLayers();
     $customAnimations = RevOperations::getCustomAnimations('customin');
     //get all custom animations
     $customEndAnimations = RevOperations::getCustomAnimations('customout');
     //get all custom animations
     $startAnimations = RevOperations::getArrAnimations(false);
     //only get the standard animations
     $endAnimations = RevOperations::getArrEndAnimations(false);
     //only get the standard animations
     $lazyLoad = $this->slider->getParam("lazy_load", "off");
     if (empty($layers)) {
         return false;
     }
     $zIndex = 2;
     foreach ($layers as $layer) {
         $type = UniteFunctionsRev::getVal($layer, "type", "text");
         //set if video full screen
         $isFullWidthVideo = false;
         if ($type == "video") {
             $videoData = UniteFunctionsRev::getVal($layer, "video_data");
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
                 $isFullWidthVideo = UniteFunctionsRev::getVal($videoData, "fullwidth");
                 $isFullWidthVideo = UniteFunctionsRev::strToBool($isFullWidthVideo);
             } else {
                 $videoData = array();
             }
         }
         $class = UniteFunctionsRev::getVal($layer, "style");
         $animation = UniteFunctionsRev::getVal($layer, "animation", "tp-fade");
         if ($animation == "fade") {
             $animation = "tp-fade";
         }
         $customin = '';
         if (!array_key_exists($animation, $startAnimations) && array_key_exists($animation, $customAnimations)) {
             //if true, add custom animation
             $customin .= 'data-customin="';
             $animArr = RevOperations::getCustomAnimationByHandle($customAnimations[$animation]);
             if ($animArr !== false) {
                 $customin .= RevOperations::parseCustomAnimationByArray($animArr);
             }
             $customin .= '"';
             $animation = 'customin';
         }
         if (strpos($animation, 'customin-') !== false || strpos($animation, 'customout-') !== false) {
             $animation = "tp-fade";
         }
         //set output class:
         $outputClass = "tp-caption " . trim($class);
         $outputClass = trim($outputClass) . " ";
         $outputClass .= trim($animation);
         $left = UniteFunctionsRev::getVal($layer, "left", 0);
         $top = UniteFunctionsRev::getVal($layer, "top", 0);
         $speed = UniteFunctionsRev::getVal($layer, "speed", 300);
         $time = UniteFunctionsRev::getVal($layer, "time", 0);
         $easing = UniteFunctionsRev::getVal($layer, "easing", "easeOutExpo");
         $randomRotate = UniteFunctionsRev::getVal($layer, "random_rotation", "false");
         $randomRotate = UniteFunctionsRev::boolToStr($randomRotate);
         $splitin = UniteFunctionsRev::getVal($layer, "split", "none");
         $splitout = UniteFunctionsRev::getVal($layer, "endsplit", "none");
         $elementdelay = intval(UniteFunctionsRev::getVal($layer, "splitdelay", 0));
         $endelementdelay = intval(UniteFunctionsRev::getVal($layer, "endsplitdelay", 0));
         if ($elementdelay > 0) {
             $elementdelay /= 100;
         }
         if ($endelementdelay > 0) {
             $endelementdelay /= 100;
         }
         $text = UniteFunctionsRev::getVal($layer, "text");
         $htmlVideoAutoplay = "";
         $htmlVideoAutoplayOnlyFirstTime = "";
         $htmlVideoNextSlide = "";
         $htmlVideoThumbnail = "";
         $htmlMute = '';
         $htmlCover = '';
         $htmlDotted = '';
         $htmlRatio = '';
         $htmlRewind = '';
         $ids = UniteFunctionsRev::getVal($layer, "attrID");
         $classes = UniteFunctionsRev::getVal($layer, "attrClasses");
         $title = UniteFunctionsRev::getVal($layer, "attrTitle");
         $rel = UniteFunctionsRev::getVal($layer, "attrRel");
         $ids = $ids != '' ? ' id="' . $ids . '"' : '';
         $classes = $classes != '' ? ' ' . $classes : '';
         $title = $title != '' ? ' title="' . $title . '"' : '';
         $rel = $rel != '' ? ' rel="' . $rel . '"' : '';
         $max_width = UniteFunctionsRev::getVal($layer, "max_width", 'auto');
         $max_height = UniteFunctionsRev::getVal($layer, "max_height", 'auto');
         $white_space = UniteFunctionsRev::getVal($layer, "whitespace", 'nowrap');
         $inline_styles = '';
         //set html:
         $html = "";
         switch ($type) {
             default:
//.........这里部分代码省略.........
开发者ID:proj-2014,项目名称:vlan247-test-wp2,代码行数:101,代码来源:revslider_output.class.php


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