本文整理汇总了PHP中RevSliderOutput::putSlider方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderOutput::putSlider方法的具体用法?PHP RevSliderOutput::putSlider怎么用?PHP RevSliderOutput::putSlider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderOutput
的用法示例。
在下文中一共展示了RevSliderOutput::putSlider方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: widget
/**
*
* widget output
*/
public function widget($args, $instance)
{
$sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
$homepageCheck = UniteFunctionsRev::getVal($instance, "rev_slider_homepage");
$homepage = "";
if ($homepageCheck == "on") {
$homepage = "homepage";
}
if (empty($sliderID)) {
return false;
}
RevSliderOutput::putSlider($sliderID, $homepage);
}
示例2: renderSlider
public function renderSlider()
{
if (Mage::helper('nwdall')->getCfg('general/enabled', 'nwdrevslider_config')) {
ob_start();
$slider = RevSliderOutput::putSlider($this->getData('alias'));
$content = ob_get_contents();
ob_clean();
ob_end_clean();
} else {
$content = '';
}
return $content;
}
示例3: widget
/**
*
* widget output
*/
public function widget($args, $instance)
{
$sliderID = $instance["rev_slider"];
if (empty($sliderID)) {
return false;
}
?>
<div class="sidebar_widget_holder">
<?php
RevSliderOutput::putSlider($sliderID);
?>
</div>
<?php
}
示例4: widget
/**
*
* widget output
*/
public function widget($args, $instance)
{
$sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
$title = UniteFunctionsRev::getVal($instance, "rev_slider_title");
$homepageCheck = UniteFunctionsRev::getVal($instance, "rev_slider_homepage");
$homepage = "";
if ($homepageCheck == "on") {
$homepage = "homepage";
}
$pages = UniteFunctionsRev::getVal($instance, "rev_slider_pages");
if (!empty($pages)) {
if (!empty($homepage)) {
$homepage .= ",";
}
$homepage .= $pages;
}
if (empty($sliderID)) {
return false;
}
//widget output
$beforeWidget = UniteFunctionsRev::getVal($args, "before_widget");
$afterWidget = UniteFunctionsRev::getVal($args, "after_widget");
$beforeTitle = UniteFunctionsRev::getVal($args, "before_title");
$afterTitle = UniteFunctionsRev::getVal($args, "after_title");
echo $beforeWidget;
if (!empty($title)) {
echo $beforeTitle . $title . $afterTitle;
}
RevSliderOutput::putSlider($sliderID, $homepage);
echo $afterWidget;
}
示例5: putRevSlider
/**
*
* put rev slider on the page.
* the data can be slider ID or slider alias.
*/
function putRevSlider($data, $putIn = "")
{
$operations = new RevSliderOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = RevSliderFunctions::getVal($arrValues, "includes_globally", "on");
$strPutIn = RevSliderFunctions::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
if ($isPutIn == false && $includesGlobally == "off") {
$output = new RevSliderOutput();
$option1Name = __("Include RevSlider libraries globally (all pages/posts)", 'revslider');
$option2Name = __("Pages to include RevSlider libraries", 'revslider');
$output->putErrorMessage(__("If you want to use the PHP function \"putRevSlider\" in your code please make sure to check \" ", 'revslider') . $option1Name . __(" \" in the backend's \"General Settings\" (top right panel). <br> <br> Or add the current page to the \"", 'revslider') . $option2Name . __("\" option box.", 'revslider'));
return false;
}
ob_start();
$slider = RevSliderOutput::putSlider($data, $putIn);
$content = ob_get_contents();
ob_clean();
ob_end_clean();
if (is_object($slider)) {
$disable_on_mobile = @$slider->getParam("disable_on_mobile", "off");
// Do not output Slider if we are on mobile
if ($disable_on_mobile == 'on') {
$mobile = strstr($_SERVER['HTTP_USER_AGENT'], 'Android') || strstr($_SERVER['HTTP_USER_AGENT'], 'webOS') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'Windows Phone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad') || wp_is_mobile() ? true : false;
if ($mobile) {
return false;
}
}
}
echo $content;
}
示例6: putRevSlider
/**
*
* put rev slider on the page.
* the data can be slider ID or slider alias.
*/
function putRevSlider($data, $putIn = "")
{
$operations = new RevOperations();
$arrValues = $operations->getGeneralSettingsValues();
$includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
$strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
$isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
if ($isPutIn == false && $includesGlobally == "off") {
$output = new RevSliderOutput();
$option1Name = "Include RevSlider libraries globally (all pages/posts)";
$option2Name = "Pages to include RevSlider libraries";
$output->putErrorMessage(__("If you want to use the PHP function \"putRevSlider\" in your code please make sure to check \" ", REVSLIDER_TEXTDOMAIN) . $option1Name . __(" \" in the backend's \"General Settings\" (top right panel). <br> <br> Or add the current page to the \"", REVSLIDER_TEXTDOMAIN) . $option2Name . __("\" option box."));
return false;
}
RevSliderOutput::putSlider($data, $putIn);
}
示例7: onFrontAjaxAction
/**
* onAjax action handler
*/
public static function onFrontAjaxAction()
{
$db = new RevSliderDB();
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevSliderOperations();
$token = self::getPostVar("token", false);
//verify the token
$isVerified = wp_verify_nonce($token, 'RevSlider_Front');
$error = false;
if ($isVerified) {
$data = self::getPostVar('data', false);
switch (self::getPostVar('client_action', false)) {
case 'get_slider_html':
$id = intval(self::getPostVar('id', 0));
if ($id > 0) {
$html = '';
add_filter('revslider_add_js_delay', array('RevSliderAdmin', 'rev_set_js_delay'));
ob_start();
$slider_class = RevSliderOutput::putSlider($id);
$html = ob_get_contents();
//add styling
$custom_css = RevSliderOperations::getStaticCss();
$custom_css = RevSliderCssParser::compress_css($custom_css);
$styles = $db->fetch(RevSliderGlobals::$table_css);
$styles = RevSliderCssParser::parseDbArrayToCss($styles, "\n");
$styles = RevSliderCssParser::compress_css($styles);
$html .= '<style type="text/css">' . $custom_css . '</style>';
$html .= '<style type="text/css">' . $styles . '</style>';
ob_clean();
ob_end_clean();
$result = !empty($slider_class) && $html !== '' ? true : false;
if (!$result) {
$error = __('Slider not found', 'revslider');
} else {
if ($html !== false) {
self::ajaxResponseData($html);
} else {
$error = __('Slider not found', 'revslider');
}
}
} else {
$error = __('No Data Received', 'revslider');
}
break;
}
} else {
$error = true;
}
if ($error !== false) {
$showError = __('Loading Error', 'revslider');
if ($error !== true) {
$showError = __('Loading Error: ', 'revslider') . $error;
}
self::ajaxResponseError($showError, false);
}
exit;
}
示例8: putRevSlider
/**
*
* put kb slider on the page.
* the data can be slider ID or slider alias.
*/
function putRevSlider($data, $putIn = "")
{
RevSliderOutput::putSlider($data, $putIn);
}
示例9: generateSliderById
public function generateSliderById($id = 1)
{
$content = '';
if (empty($id)) {
return 'no id found';
}
ob_start();
RevSliderOutput::putSlider($id, '');
$content = ob_get_contents();
ob_end_clean();
$this->smarty->assign('revhome', $content);
return $this->display(__FILE__, 'views/templates/front/revolution_slider.tpl');
}
示例10: show_page_slider
function show_page_slider()
{
global $page_datas;
$revolution_exists = class_exists('RevSlider') && class_exists('UniteFunctionsRev');
switch ($page_datas['page_slider']) {
case 'revolution':
if ($revolution_exists) {
RevSliderOutput::putSlider($page_datas['page_revolution'], "");
}
break;
case 'layerslider':
echo do_shortcode('[layerslider id="' . $page_datas['page_layerslider'] . '"]');
break;
case 'none':
break;
default:
break;
}
}
示例11: show_page_slider
function show_page_slider()
{
global $page_datas;
$revolution_exists = class_exists('RevSlider') && class_exists('UniteFunctionsRev');
switch ($page_datas['page_slider']) {
case 'revolution':
if ($revolution_exists) {
RevSliderOutput::putSlider($page_datas['page_revolution'], "");
}
break;
case 'flex':
show_flex_slider($page_datas['page_flex']);
break;
case 'nivo':
show_nivo_slider($page_datas['page_nivo']);
break;
case 'product':
show_prod_slider($page_datas['product_tag']);
break;
case 'none':
break;
default:
break;
}
}
示例12: putRevSlider
/**
*
* put kb slider on the page.
* the data can be slider ID or slider alias.
*/
function putRevSlider($data)
{
RevSliderOutput::putSlider($data);
}
示例13: rev_slider_shortcode
function rev_slider_shortcode($args)
{
$sliderAlias = UniteFunctionsRev::getVal($args, 0);
ob_start();
$slider = RevSliderOutput::putSlider($sliderAlias);
$content = ob_get_contents();
ob_clean();
ob_end_clean();
//handle slider output types
if (!empty($slider)) {
$outputType = $slider->getParam("output_type", "");
switch ($outputType) {
case "compress":
$content = str_replace("\n", "", $content);
$content = str_replace("\r", "", $content);
return $content;
break;
case "echo":
echo $content;
//bypass the filters
break;
default:
return $content;
break;
}
} else {
return $content;
}
//normal output
}
示例14: ob_get_clean
$video = ob_get_clean();
echo str_replace('<video class="', '<video class="video-js vjs-default-skin manual', $video);
?>
</div>
<?php
} else {
?>
<div class="slider-container <?php
echo $options['rev_slider_skin'];
?>
">
<?php
ob_start();
RevSliderOutput::putSlider($options['rev_slider'], '');
$video = ob_get_clean();
echo str_replace('<video class="', '<video class="video-js vjs-default-skin manual', $video);
?>
</div>
<?php
}
} elseif (isset($options['slider']) && 'nivo' == $options['slider']) {
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
echo do_shortcode('[slider id=' . $options['nivo_slider'] . ']');
示例15: index
protected function index($setting)
{
$this->language->load('module/revslideropencart');
if (!defined('rs_plugin_url')) {
define('rs_plugin_url', REV_DIR_CONFIG . 'revslider/');
}
if (!defined('rs_admin_css')) {
define('rs_admin_css', rs_plugin_url . 'css/');
}
if (!defined('rs_admin_js')) {
define('rs_admin_js', rs_plugin_url . 'js/');
}
if (!defined('rs_admin_img')) {
define('rs_admin_img', rs_plugin_url . 'images/');
}
if (!defined('rs_rs_plugin')) {
define('rs_rs_plugin', rs_plugin_url . 'rs-plugin/');
}
static $module = 0;
// start load external file
// $this->config->load('revslider/revslider_front');
// end load external file
// start add font
$font = new ThemePunch_Fonts();
$fonts = $font->get_all_fonts();
if (!empty($fonts)) {
$http = get_http();
foreach ($fonts as $font) {
if ($font !== '') {
$url = $http . "fonts.googleapis.com/css?family=" . strip_tags($font['url']);
$this->document->addStyle($url);
}
}
}
// end add font
// start load media file
$this->document->addScript(rs_rs_plugin . 'js/jquery.themepunch.tools.min.js');
$this->document->addScript(rs_rs_plugin . 'js/jquery.themepunch.revolution.min.js');
$this->document->addStyle(rs_rs_plugin . 'css/settings.css');
$this->document->addStyle(rs_rs_plugin . 'css/static-captions.css');
$this->document->addStyle(rs_rs_plugin . 'css/dynamic-captions.css');
$this->document->addStyle(rs_rs_plugin . 'css/captions.css');
// end load media file
// start revsliderfront setting
$sliders = $this->hookCommonCb($setting['slider_id']);
$content = '';
$g_fonts = '';
if (!empty($sliders)) {
ob_start();
foreach ($sliders as $slider) {
$slider = (object) $slider;
$params = json_decode($slider->params);
$params->jquery_noconflict = 'off';
if (isset($params->google_font) && is_array($params->google_font)) {
foreach ($params->google_font as $google_font) {
$g_fonts .= html_entity_decode($google_font);
}
}
RevSliderOutput::putSlider($setting['slider_id'], '');
}
$content = ob_get_contents();
ob_end_clean();
}
$content .= $g_fonts;
$this->data['rev_content'] = $content;
// end revsliderfront setting
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/revslideropencart.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/revslideropencart.tpl';
} else {
$this->template = 'default/template/module/revslideropencart.tpl';
}
$this->render();
}