本文整理汇总了PHP中RevSlide类的典型用法代码示例。如果您正苦于以下问题:PHP RevSlide类的具体用法?PHP RevSlide怎么用?PHP RevSlide使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RevSlide类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: RevSlide
<?php
//get input
$slideID = UniteFunctionsRev::getGetVar("id");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
//dmp($slideParams);exit();
$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 self::getSettingsFilePath("slide_settings");
require self::getSettingsFilePath("layer_settings");
//add tools.min.js
self::addScript("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools');
$settingsLayerOutput = new UniteSettingsProductSidebarRev();
$settingsSlideOutput = new UniteSettingsRevProductRev();
$arrLayers = $slide->getLayers();
开发者ID:AlexanderBogdan,项目名称:poliplast,代码行数:31,代码来源:slide.php
示例2: addLangFromData
/**
*
* add language (add slide that connected to current slide) from data
*/
private function addLangFromData($data)
{
$sliderID = RevSliderFunctions::getVal($data, "sliderid");
$slideID = RevSliderFunctions::getVal($data, "slideid");
$lang = RevSliderFunctions::getVal($data, "lang");
//duplicate slide
$slider = new RevSlider();
$slider->initByID($sliderID);
$newSlideID = $slider->duplicateSlide($slideID);
//update new slide
$this->initByID($newSlideID);
$arrUpdate = array();
$arrUpdate["lang"] = $lang;
$arrUpdate["parentid"] = $slideID;
$this->updateParamsInDB($arrUpdate);
$urlIcon = RevSliderWpml::getFlagUrl($lang);
$title = RevSliderWpml::getLangTitle($lang);
$newSlide = new RevSlide();
$newSlide->initByID($slideID);
$arrLangCodes = $newSlide->getArrChildLangCodes();
$isAll = RevSliderWpml::isAllLangsInArray($arrLangCodes);
$html = "<li>\r\n\t\t\t\t\t<img id=\"icon_lang_" . $newSlideID . "\" class=\"icon_slide_lang\" src=\"" . $urlIcon . "\" title=\"" . $title . "\" data-slideid=\"" . $newSlideID . "\" data-lang=\"" . $lang . "\">\r\n\t\t\t\t\t<div class=\"icon_lang_loader loader_round\" style=\"display:none\"></div>\t\t\t\t\t\t\t\t\r\n\t\t\t\t</li>";
$response = array();
$response["operation"] = "add";
$response["isAll"] = $isAll;
$response["html"] = $html;
return $response;
}
开发者ID:hathbanger,项目名称:squab,代码行数:32,代码来源:slide.class.php
示例3: getSlides
/**
*
* get slides of the current slider
*/
public function getSlides()
{
$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);
$arrSlides[] = $slide;
}
$this->arrSlides = $arrSlides;
return $arrSlides;
}
开发者ID:ConceptHaus,项目名称:huasca,代码行数:17,代码来源:revslider_slider.class.php
示例4: 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
示例5: 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
示例6: onAjaxAction
/**
*
* onAjax action handler
*/
public static function onAjaxAction()
{
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevOperations();
$action = self::getPostGetVar("client_action");
$data = self::getPostGetVar("data");
try {
switch ($action) {
case "export_slider":
$sliderID = self::getGetVar("sliderid");
$slider->initByID($sliderID);
$slider->exportSlider();
break;
case "import_slider":
self::importSliderHandle();
break;
case "create_slider":
$newSliderID = $slider->createSliderFromOptions($data);
self::ajaxResponseSuccessRedirect("The slider successfully created", self::getViewUrl("sliders"));
break;
case "update_slider":
$slider->updateSliderFromOptions($data);
self::ajaxResponseSuccess("Slider updated");
break;
case "delete_slider":
$slider->deleteSliderFromData($data);
self::ajaxResponseSuccessRedirect("The slider deleted", self::getViewUrl(self::VIEW_SLIDERS));
break;
case "duplicate_slider":
$slider->duplicateSliderFromData($data);
self::ajaxResponseSuccessRedirect("The duplicate successfully, refreshing page...", self::getViewUrl(self::VIEW_SLIDERS));
break;
case "add_slide":
$slider->createSlideFromData($data);
$sliderID = $data["sliderid"];
self::ajaxResponseSuccessRedirect("Slide Created", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "update_slide":
$slide->updateSlideFromData($data);
self::ajaxResponseSuccess("Slide updated");
break;
case "delete_slide":
$slide->deleteSlideFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect("Slide Deleted Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "duplicate_slide":
$sliderID = $slider->duplicateSlideFromData($data);
self::ajaxResponseSuccessRedirect("Slide Duplicated Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "get_captions_css":
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess("CSS file saved succesfully!", array("arrCaptions" => $arrCaptions));
break;
case "restore_captions_css":
$operations->restoreCaptionsCss();
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_slides_order":
$slider->updateSlidesOrderFromData($data);
self::ajaxResponseSuccess("Order updated successfully");
break;
case "change_slide_image":
$slide->updateSlideImageFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "slider_id");
self::ajaxResponseSuccessRedirect("Slide Changed Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "preview_slide":
$operations->putSlidePreviewByData($data);
break;
case "preview_slider":
$sliderID = UniteFunctionsRev::getPostVariable("sliderid");
$operations->previewOutput($sliderID);
break;
default:
self::ajaxResponseError("wrong ajax action: {$action} ");
break;
}
} catch (Exception $e) {
$message = $e->getMessage();
self::ajaxResponseError($message);
}
//it's an ajax action, so exit
self::ajaxResponseError("No response output on <b> {$action} </b> action. please check with the developer.");
exit;
}
开发者ID:nimishavyas,项目名称:proiti,代码行数:96,代码来源:revslider_admin.php
示例7: onAjaxAction
/**
*
* onAjax action handler
*/
public static function onAjaxAction()
{
$actionIndicator = self::getPostGetVar("action");
if ($actionIndicator != "uniterevolution_ajax_action") {
return false;
}
$action = self::getPostGetVar("client_action");
$data = self::getPostGetVar("data");
$nonce = self::getPostGetVar("nonce");
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevOperations();
try {
//verify the nonce
$isVerified = wp_verify_nonce($nonce, "revslider_actions");
if ($isVerified == false) {
UniteFunctionsRev::throwError("Wrong request");
}
switch ($action) {
case "export_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
$sliderID = self::getGetVar("sliderid");
$dummy = self::getGetVar("dummy");
$slider->initByID($sliderID);
$slider->exportSlider($dummy);
break;
case "import_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
$updateAnim = self::getPostGetVar("update_animations");
$updateStatic = self::getPostGetVar("update_static_captions");
self::importSliderHandle(null, $updateAnim, $updateStatic);
break;
case "import_slider_slidersview":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
$viewBack = self::getViewUrl(self::VIEW_SLIDERS);
$updateAnim = self::getPostGetVar("update_animations");
$updateStatic = self::getPostGetVar("update_static_captions");
self::importSliderHandle($viewBack, $updateAnim, $updateStatic);
break;
case "create_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
self::requireSettings("slider_settings");
$settingsMain = self::getSettings("slider_main");
$settingsParams = self::getSettings("slider_params");
$data = $operations->modifyCustomSliderParams($data);
$newSliderID = $slider->createSliderFromOptions($data, $settingsMain, $settingsParams);
self::ajaxResponseSuccessRedirect(__ug("The slider successfully created", REVSLIDER_TEXTDOMAIN), self::getViewUrl("sliders"));
break;
case "update_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_SETTINGS);
self::requireSettings("slider_settings");
$settingsMain = self::getSettings("slider_main");
$settingsParams = self::getSettings("slider_params");
$data = $operations->modifyCustomSliderParams($data);
$slider->updateSliderFromOptions($data, $settingsMain, $settingsParams);
self::ajaxResponseSuccess(__ug("Slider updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
$isDeleted = $slider->deleteSliderFromData($data);
if (is_array($isDeleted)) {
$isDeleted = implode(', ', $isDeleted);
self::ajaxResponseError("Template can't be deleted, it is still being used by the following Sliders: " . $isDeleted);
} else {
self::ajaxResponseSuccessRedirect(__ug("The slider deleted", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
}
break;
case "duplicate_slider":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDER_OPERATIONS);
$slider->duplicateSliderFromData($data);
self::ajaxResponseSuccessRedirect(__ug("The duplicate successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
break;
case "add_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$numSlides = $slider->createSlideFromData($data);
$sliderID = $data["sliderid"];
if ($numSlides == 1) {
$responseText = __ug("Slide Created", REVSLIDER_TEXTDOMAIN);
} else {
$responseText = $numSlides . " " . __ug("Slides Created", REVSLIDER_TEXTDOMAIN);
}
$urlRedirect = self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}");
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "add_slide_fromslideview":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$slideID = $slider->createSlideFromData($data, true);
$urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
$responseText = __ug("Slide Created, redirecting...", REVSLIDER_TEXTDOMAIN);
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "update_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_EDIT_SLIDE);
require self::getSettingsFilePath("slide_settings");
$slide->updateSlideFromData($data, $slideSettings);
self::ajaxResponseSuccess(__ug("Slide updated", REVSLIDER_TEXTDOMAIN));
//.........这里部分代码省略.........
开发者ID:jhener79,项目名称:vlakc,代码行数:101,代码来源:revslider_admin.php
示例8: onAjaxAction
/**
*
* onAjax action handler
*/
public static function onAjaxAction()
{
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevOperations();
$action = self::getPostGetVar("client_action");
$data = self::getPostGetVar("data");
try {
switch ($action) {
case "export_slider":
$sliderID = self::getGetVar("sliderid");
$slider->initByID($sliderID);
$slider->exportSlider();
break;
case "import_slider":
self::importSliderHandle();
break;
case "import_slider_slidersview":
$viewBack = self::getViewUrl(self::VIEW_SLIDERS);
self::importSliderHandle($viewBack);
break;
case "create_slider":
$newSliderID = $slider->createSliderFromOptions($data);
self::ajaxResponseSuccessRedirect(__("The slider successfully created", REVSLIDER_TEXTDOMAIN), self::getViewUrl("sliders"));
break;
case "update_slider":
$slider->updateSliderFromOptions($data);
self::ajaxResponseSuccess(__("Slider updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slider":
$slider->deleteSliderFromData($data);
self::ajaxResponseSuccessRedirect(__("The slider deleted", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
break;
case "duplicate_slider":
$slider->duplicateSliderFromData($data);
self::ajaxResponseSuccessRedirect(__("The duplicate successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
break;
case "add_slide":
$numSlides = $slider->createSlideFromData($data);
$sliderID = $data["sliderid"];
if ($numSlides == 1) {
$responseText = __("Slide Created", REVSLIDER_TEXTDOMAIN);
} else {
$responseText = $numSlides . " " . __("Slides Created", REVSLIDER_TEXTDOMAIN);
}
$urlRedirect = self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}");
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "add_slide_fromslideview":
$slideID = $slider->createSlideFromData($data, true);
$urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
$responseText = __("Slide Created, redirecting...", REVSLIDER_TEXTDOMAIN);
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "update_slide":
$slide->updateSlideFromData($data);
self::ajaxResponseSuccess(__("Slide updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slide":
$slide->deleteSlideFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect(__("Slide Deleted Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "duplicate_slide":
$sliderID = $slider->duplicateSlideFromData($data);
self::ajaxResponseSuccessRedirect(__("Slide Duplicated Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "copy_move_slide":
$sliderID = $slider->copyMoveSlideFromData($data);
self::ajaxResponseSuccessRedirect(__("The operation successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "get_captions_css":
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess(__("CSS file saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "restore_captions_css":
$operations->restoreCaptionsCss();
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_slides_order":
$slider->updateSlidesOrderFromData($data);
self::ajaxResponseSuccess(__("Order updated successfully", REVSLIDER_TEXTDOMAIN));
break;
case "change_slide_image":
$slide->updateSlideImageFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "slider_id");
self::ajaxResponseSuccessRedirect(__("Slide Changed Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "preview_slide":
$operations->putSlidePreviewByData($data);
break;
//.........这里部分代码省略.........
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:101,代码来源:revslider_admin.php
示例9: include_custom_css
public static function include_custom_css()
{
$type = isset($_GET['view']) ? $_GET['view'] : '';
$page = isset($_GET['page']) ? $_GET['page'] : '';
if ($page !== 'slider' && $page !== 'revslider_navigation') {
return false;
}
//showbiz fix
$sliderID = '';
switch ($type) {
case 'slider':
$sliderID = isset($_GET['id']) ? $_GET['id'] : '';
break;
case 'slide':
$slideID = isset($_GET['id']) ? $_GET['id'] : '';
if ($slideID == 'new') {
break;
}
$slide = new RevSlide();
$slide->initByID($slideID);
$sliderID = $slide->getSliderID();
break;
default:
if (isset($_GET['slider'])) {
$sliderID = $_GET['slider'];
}
break;
}
$arrFieldsParams = array();
if (!empty($sliderID)) {
$slider = new RevSlider();
$slider->initByID($sliderID);
$settingsFields = $slider->getSettingsFields();
$arrFieldsMain = $settingsFields['main'];
$arrFieldsParams = $settingsFields['params'];
$custom_css = @stripslashes($arrFieldsParams['custom_css']);
$custom_css = RevSliderCssParser::compress_css($custom_css);
echo '<style>' . $custom_css . '</style>';
}
}
开发者ID:ksan5835,项目名称:maadithottam,代码行数:40,代码来源:revslider-admin.class.php
示例10: 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
示例11: putCreativeLayer
/**
*
* put creative layer
*/
private function putCreativeLayer(RevSlide $slide)
{
$layers = $slide->getLayers();
if (empty($layers)) {
return false;
}
?>
<?php
foreach ($layers as $layer) {
$type = UniteFunctionsRev::getVal($layer, "type", "text");
$class = UniteFunctionsRev::getVal($layer, "style");
$animation = UniteFunctionsRev::getVal($layer, "animation", "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);
$text = UniteFunctionsRev::getVal($layer, "text");
$htmlVideoAutoplay = "";
//set html:
$html = "";
switch ($type) {
default:
case "text":
$html = $text;
$html = do_shortcode($html);
break;
case "image":
$urlImage = UniteFunctionsRev::getVal($layer, "image_url");
$html = '<img src="' . $urlImage . '" alt="' . $text . '">';
$imageLink = UniteFunctionsRev::getVal($layer, "link", "");
if (!empty($imageLink)) {
$openIn = UniteFunctionsRev::getVal($layer, "link_open_in", "same");
$target = "";
if ($openIn == "new") {
$target = ' target="_blank"';
}
$html = '<a href="' . $imageLink . '"' . $target . '>' . $html . '</a>';
}
break;
case "video":
$videoType = trim(UniteFunctionsRev::getVal($layer, "video_type"));
$videoID = trim(UniteFunctionsRev::getVal($layer, "video_id"));
$videoWidth = trim(UniteFunctionsRev::getVal($layer, "video_width"));
$videoHeight = trim(UniteFunctionsRev::getVal($layer, "video_height"));
switch ($videoType) {
case "youtube":
$html = "<iframe src='http://www.youtube.com/embed/{$videoID}?hd=1&wmode=opaque&controls=1&showinfo=0;rel=0' width='{$videoWidth}' height='{$videoHeight}' style='width:{$videoWidth}px;height:{$videoHeight}px;'></iframe>";
break;
case "vimeo":
$html = "<iframe src='http://player.vimeo.com/video/{$videoID}?title=0&byline=0&portrait=0' width='{$videoWidth}' height='{$videoHeight}' style='width:{$videoWidth}px;height:{$videoHeight}px;'></iframe>";
break;
default:
UniteFunctionsRev::throwError("wrong video type: {$videoType}");
break;
}
$videoAutoplay = UniteFunctionsRev::getVal($layer, "video_autoplay");
if ($videoAutoplay == "true") {
$htmlVideoAutoplay = ' data-autoplay="true"';
}
break;
}
//handle end transitions:
$endTime = trim(UniteFunctionsRev::getVal($layer, "endtime"));
$htmlEnd = "";
if (!empty($endTime)) {
$htmlEnd = "data-end=\"{$endTime}\"";
$endSpeed = trim(UniteFunctionsRev::getVal($layer, "endspeed"));
if (!empty($endSpeed)) {
$htmlEnd .= " data-endspeed=\"{$endSpeed}\"";
}
$endEasing = trim(UniteFunctionsRev::getVal($layer, "endeasing"));
if (!empty($endSpeed) && $endEasing != "nothing") {
$htmlEnd .= " data-endeasing=\"{$endEasing}\"";
}
//add animation to class
$endAnimation = trim(UniteFunctionsRev::getVal($layer, "endanimation"));
if (!empty($endAnimation) && $endAnimation != "auto") {
$outputClass .= " " . $endAnimation;
}
}
//slide link
$htmlLink = "";
$slideLink = UniteFunctionsRev::getVal($layer, "link_slide");
if (!empty($slideLink) && $slideLink != "nothing") {
//get slide index from id
if (is_numeric($slideLink)) {
$slideLink = UniteFunctionsRev::getVal($this->slidesNumIndex, $slideLink);
}
if (!empty($slideLink)) {
//.........这里部分代码省略.........
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:101,代码来源:revslider_output.class.php
示例12: 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
示例13: getParentSlide
/**
*
* return parent slide. If the slide is parent, return this slide.
*/
public function getParentSlide()
{
$parentID = $this->getParam("parentid", "");
if (empty($parentID)) {
return $this;
}
$parentSlide = new RevSlide();
$parentSlide->initByID($parentID);
return $parentSlide;
}
开发者ID:perseusl,项目名称:kingdavid,代码行数:14,代码来源:revslider_slide.class.php
示例14: putCreativeLayer
/**
*
* put creative layer
*/
public function putCreativeLayer(RevSlide $slide)
{
$layers = $slide->getLayers();
if (empty($layers)) {
return false;
}
?>
<?php
foreach ($layers as $layer) {
$type = UniteFunctionsRev::getVal($layer, "type", "text");
$class = UniteFunctionsRev::getVal($layer, "style");
$animation = UniteFunctionsRev::getVal($layer, "animation", "fade");
//set output class:
$outputClass = "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);
$text = UniteFunctionsRev::getVal($layer, "text");
//set html:
$html = "";
switch ($type) {
default:
case "text":
$html = $text;
$html = do_shortcode($html);
break;
case "image":
$urlImage = UniteFunctionsRev::getVal($layer, "image_url");
$html = '<img src="' . $urlImage . '" alt="' . $text . '">';
$imageLink = UniteFunctionsRev::getVal($layer, "link", "");
if (!empty($imageLink)) {
$openIn = UniteFunctionsRev::getVal($layer, "link_open_in", "same");
$target = "";
if ($openIn == "new") {
$target = ' target="_blank"';
}
$html = '<a href="' . $imageLink . '"' . $target . '>' . $html . '</a>';
}
break;
case "video":
$videoType = trim(UniteFunctionsRev::getVal($layer, "video_type"));
$videoID = trim(UniteFunctionsRev::getVal($layer, "video_id"));
$videoWidth = trim(UniteFunctionsRev::getVal($layer, "video_width"));
$videoHeight = trim(UniteFunctionsRev::getVal($layer, "video_height"));
switch ($videoType) {
case "youtube":
$html = "<iframe src='http://www.youtube.com/embed/{$videoID}?hd=1&wmode=opaque&controls=1&showinfo=0' width='{$videoWidth}' height='{$videoHeight}'></iframe>";
break;
case "vimeo":
$html = "<iframe src='http://player.vimeo.com/video/{$videoID}?title=0&byline=0&portrait=0' width='{$videoWidth}' height='{$videoHeight}'></iframe>";
break;
default:
UniteFunctionsRev::throwError("wrong video type: {$videoType}");
break;
}
break;
}
?>
<div class="<?php
echo $outputClass;
?>
"
data-x="<?php
echo $left;
?>
"
data-y="<?php
echo $top;
?>
"
data-speed="<?php
echo $speed;
?>
"
data-start="<?php
echo $time;
?>
"
data-easing="<?php
echo $easing;
?>
"><?php
echo $html;
?>
</div>
<?php
}
?>
<?php
//.........这里部分代码省略.........
开发者ID:rohichurch,项目名称:rohichurch-wp,代码行数:101,代码来源:revslider_output.class.php
示例15: intval
$sID = intval(RevSliderFunctions::getGetVar("slider"));
if ($sID > 0) {
$revs = new RevSlider();
$revs->initByID($sID);
//check if we already have slides, if yes, go to first
$arrS = $revs->getSlides(false);
if (empty($arrS)) {
$slideID = $revs->createSlideFromData(array('sliderid' => $sID), true);
} else {
$slideID = key($arrS);
}
}
}
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevSliderOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSlideNames = $slider->getArrSlideNames();
|
请发表评论