本文整理汇总了PHP中RevSliderOutput::putSliderBase方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderOutput::putSliderBase方法的具体用法?PHP RevSliderOutput::putSliderBase怎么用?PHP RevSliderOutput::putSliderBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderOutput
的用法示例。
在下文中一共展示了RevSliderOutput::putSliderBase方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putSlider
/**
*
* put the kb slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
if (strtolower($putIn) == "homepage" && is_front_page() == false) {
return false;
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例2: putSlider
/**
*
* put the rev slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
$isPutIn = self::isPutIn($putIn);
if ($isPutIn == false) {
return false;
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例3: putSlider
/**
*
* put the kb slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
$putIn = strtolower($putIn);
if ($putIn == "homepage") {
//filter by homepage
if (is_front_page() == false) {
return false;
}
} else {
//case filter by pages
if (!empty($putIn)) {
$arrPutInPages = array();
$arrPagesTemp = explode(",", $putIn);
foreach ($arrPagesTemp as $page) {
if (is_numeric($page) || $page == "homepage") {
$arrPutInPages[] = $page;
}
}
if (!empty($arrPutInPages)) {
//get current page id
$currentPageID = "";
if (is_front_page() == true) {
$currentPageID = "homepage";
} else {
global $post;
if (isset($post->ID)) {
$currentPageID = $post->ID;
}
}
//do the filter by pages
if (array_search($currentPageID, $arrPutInPages) === false) {
return false;
}
}
}
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例4: previewOutputMarkup
//.........这里部分代码省略.........
}
?>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.tools.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<?php
$head_content = ob_get_contents();
ob_clean();
ob_end_clean();
ob_start();
$custom_css = RevOperations::getStaticCss();
echo $custom_css . "\n\n";
echo '/*****************' . "\n";
echo ' ** ' . __('CAPTIONS CSS', REVSLIDER_TEXTDOMAIN) . "\n";
echo ' ****************/' . "\n\n";
$db = new UniteDBRev();
$styles = $db->fetch(GlobalsRevSlider::$table_css);
echo UniteCssParserRev::parseDbArrayToCss($styles, "\n");
$style_content = ob_get_contents();
ob_clean();
ob_end_clean();
ob_start();
$output->putSliderBase($sliderID);
$content = ob_get_contents();
ob_clean();
ob_end_clean();
$script_content = substr($content, strpos($content, '<script type="text/javascript">'), strpos($content, '</script>') + 9 - strpos($content, '<script type="text/javascript">'));
$content = htmlentities(str_replace($script_content, '', $content));
$script_content = str_replace(' ', '', $script_content);
$script_content = str_replace(array('<script type="text/javascript">', '</script>'), '', $script_content);
?>
<style>
body { font-family:sans-serif; font-size:12px;}
textarea { background:#f1f1f1; border:#ddd; font-size:10px; line-height:16px; margin-bottom:40px; padding:10px;}
.rev_cont_title { color:#000; text-decoration:none;font-size:14px; line-height:24px; font-weight:800;background: #D5D5D5;padding: 10px;}
.rev_cont_title a,
.rev_cont_title a:visited { margin-left:25px;font-size:12px;line-height:12px;float:right;background-color:#8e44ad; color:#fff; padding:8px 10px;text-decoration:none;}
.rev_cont_title a:hover { background-color:#9b59b6}
</style>
<p><?php
$dir = wp_upload_dir();
?>
<?php
_e('Replace image path:', REVSLIDER_TEXTDOMAIN);
?>
<?php
_e('From:', REVSLIDER_TEXTDOMAIN);
?>
<input type="text" name="orig_image_path" value="<?php
echo @$dir['baseurl'];
?>
" /> <?php
_e('To:', REVSLIDER_TEXTDOMAIN);
?>
<input type="text" name="replace_image_path" value="" /> <input id="rev_replace_images" type="button" name="replace_images" value="<?php
示例5: previewOutput
//.........这里部分代码省略.........
$selectLangChoose = UniteFunctionsRev::getHTMLSelect($arrLanguages, $currentLang, "id='select_langs'", true);
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RevSliderAdmin::$url_plugin . "rs-plugin/";
$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&sliderid=" . $sliderID . "&lang=[lang]&nonce=[nonce]";
$nonce = wp_create_nonce("revslider_actions");
$setBase = is_ssl() ? "https://" : "http://";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
//check if dynamic-captions.css exists. If not, include captions.php
//if(file_exists(UniteBaseClassRev::$path_plugin."rs-plugin/css/dynamic-captions.css") == false){
?>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/captions.php?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
/*}else{
?>
<link rel='stylesheet' href='<?php echo $urlPlugin?>css/dynamic-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
<?php
}*/
$custom_css = RevOperations::getStaticCss();
echo '<style type="text/css">' . $custom_css . '</style>';
/*<!--link rel='stylesheet' href='<?php echo $urlPlugin?>css/static-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' /-->*/
?>
<script type='text/javascript' src='<?php
echo $setBase;
?>
ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.plugins.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
if ($wpmlActive == true) {
?>
<div style="margin-bottom:10px;text-align:center;">
<?php
_e("Choose language", REVSLIDER_TEXTDOMAIN);
?>
: <?php
echo $selectLangChoose;
?>
</div>
<script type="text/javascript">
var g_previewPattern = '<?php
echo $urlPreviewPattern;
?>
';
jQuery("#select_langs").change(function(){
var lang = this.value;
var nonce = "<?php
echo $nonce;
?>
";
var pattern = g_previewPattern;
var urlPreview = pattern.replace("[lang]",lang).replace("[nonce]",nonce);
location.href = urlPreview;
});
</script>
<?php
}
?>
<?php
$output->putSliderBase($sliderID);
?>
</body>
</html>
<?php
exit;
}
示例6: previewOutputMarkup
public function previewOutputMarkup($sliderID)
{
$export_real = true;
//if false, then kriki export for JavaScript Standalone version
if ($export_real) {
//set all different file path's here
$path_fonts = 'fonts/';
$path_css = 'css/';
$path_js = 'js/';
$path_assets = 'assets';
$path_assets_raw = 'assets';
$path_assets_vid = 'assets';
$path_assets_raw_vid = 'assets';
} else {
$path_fonts = '../../revolution/fonts/';
$path_css = '../../revolution/css/';
$path_js = '../../revolution/js/';
$path_assets = '../../assets/images';
$path_assets_raw = 'assets/images';
$path_assets_vid = '../../assets/videos';
$path_assets_raw_vid = 'assets/videos';
}
if (function_exists("unzip_file") == false && class_exists("ZipArchive") == false) {
echo __('ZipArchive extension not available, please enable it to use this functionality.', REVSLIDER_TEXTDOMAIN);
exit;
}
$zip = new ZipArchive();
$success = $zip->open(RevSliderGlobals::$uploadsUrlExportZip, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);
if ($success !== true) {
echo __("No write permissions. Can't create zip file: ", REVSLIDER_TEXTDOMAIN) . RevSliderGlobals::$uploadsUrlExportZip;
exit;
}
if ($sliderID == "empty_output") {
echo __("Wrong request!", REVSLIDER_TEXTDOMAIN);
exit;
}
$output = new RevSliderOutput();
$operations = new RevSliderOperations();
$slider = new RevSlider();
$slider->initByID($sliderID);
$output->setPreviewMode();
$http = is_ssl() ? 'https' : 'http';
$arrValues = $operations->getGeneralSettingsValues();
$set_diff_font = RevSliderFunctions::getVal($arrValues, "change_font_loading", '');
if ($set_diff_font !== '') {
$font_url = $set_diff_font;
} else {
$font_url = $http . '://fonts.googleapis.com/css?family=';
}
$static_css = RevSliderOperations::getStaticCss();
ob_start();
$output->putSliderBase($sliderID, array(), true);
$content = ob_get_contents();
ob_clean();
ob_end_clean();
$fonts = '';
while (strpos($content, '<!-- FONT -->') !== false) {
$temp_font = substr($content, strpos($content, '<!-- FONT -->'), strpos($content, '<!-- /FONT -->') + 14 - strpos($content, '<!-- FONT -->')) . "\n";
$fonts .= $temp_font;
$starthtml = substr($content, 0, strpos($content, '<!-- FONT -->'));
$endhtml = substr($content, strpos($content, '<!-- /FONT -->') + 14);
$content = $starthtml . $endhtml;
//remove from html markup
}
$fonts = str_replace(array('<!-- FONT -->', '<!-- /FONT -->'), '', $fonts);
//remove the tags
$scripts = '';
while (strpos($content, '<!-- SCRIPT -->') !== false) {
$temp_script = substr($content, strpos($content, '<!-- SCRIPT -->'), strpos($content, '<!-- /SCRIPT -->') + 16 - strpos($content, '<!-- SCRIPT -->')) . "\n";
$scripts .= $temp_script;
$starthtml = substr($content, 0, strpos($content, '<!-- SCRIPT -->'));
$endhtml = substr($content, strpos($content, '<!-- /SCRIPT -->') + 16);
$content = $starthtml . $endhtml;
//remove from html markup
}
$scripts = str_replace(array('<!-- SCRIPT -->', '<!-- /SCRIPT -->'), '', $scripts);
//remove the tags
$styles = '';
while (strpos($content, '<!-- STYLE -->') !== false) {
$temp_style = substr($content, strpos($content, '<!-- STYLE -->'), strpos($content, '<!-- /STYLE -->') + 15 - strpos($content, '<!-- STYLE -->')) . "\n";
$styles .= $temp_style;
$starthtml = substr($content, 0, strpos($content, '<!-- STYLE -->'));
$endhtml = substr($content, strpos($content, '<!-- /STYLE -->') + 15);
$content = $starthtml . $endhtml;
//remove from html markup
}
$styles = str_replace(array('<!-- STYLE -->', '<!-- /STYLE -->'), '', $styles);
//remove the tags
$full_content = '';
ob_start();
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
//.........这里部分代码省略.........
示例7: putSlider
/**
* put the rev slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "", $gal_ids = array(), $settings = array(), $order = array())
{
$settings = apply_filters('revslider_modify_slider_settings', $settings, $sliderID);
$isPutIn = self::isPutIn($putIn);
if ($isPutIn == false) {
return false;
}
//check if on mobile and if option hide on mobile is set
$output = new RevSliderOutput();
$output->putSliderBase($sliderID, $gal_ids, false, $settings, $order);
$slider = $output->getSlider();
return $slider;
}
示例8: previewOutput
/**
*
* preview slider output
* if output object is null - create object
*/
public function previewOutput($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RevSliderAdmin::$url_plugin . "rs-plugin/";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css' type='text/css' media='all' />
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/captions.css' type='text/css' media='all' />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.plugins.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.js'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
$output->putSliderBase($sliderID);
?>
</body>
</html>
<?php
exit;
}
示例9: putSlider
/**
*
* put the kb slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID)
{
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
}
示例10: previewOutput
/**
*
* preview slider output
* if output object is null - create object
*/
public function previewOutput($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
$arrLanguages = UniteWpmlRev::getArrLanguages(false);
//set current lang to output
$currentLang = UniteFunctionsRev::getPostGetVariable("lang");
if (empty($currentLang)) {
$currentLang = UniteWpmlRev::getCurrentLang();
}
if (empty($currentLang)) {
$currentLang = $arrLanguages[0];
}
$output->setLang($currentLang);
$selectLangChoose = UniteFunctionsRev::getHTMLSelect($arrLanguages, $currentLang, "id='select_langs'", true);
}
$output->setPreviewMode();
//put the output html
$urlPlugin = RevSliderAdmin::$url_plugin . "rs-plugin/";
$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&sliderid={$sliderID}&lang=[lang]";
?>
<html>
<head>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css' type='text/css' media='all' />
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/captions.css' type='text/css' media='all' />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
if ($wpmlActive == true) {
?>
<div style="margin-bottom:10px;text-align:center;">
<?php
_e("Choose language");
?>
: <?php
echo $selectLangChoose;
?>
</div>
<script type="text/javascript">
var g_previewPattern = '<?php
echo $urlPreviewPattern;
?>
';
jQuery("#select_langs").change(function(){
var lang = this.value;
var pattern = g_previewPattern;
var urlPreview = pattern.replace("[lang]",lang);
location.href = urlPreview;
});
</script>
<?php
}
?>
<?php
$output->putSliderBase($sliderID);
?>
</body>
</html>
<?php
exit;
}
示例11: UniteDBRev
}
$loadType = $params->get("js_load_type", "head");
$isJSInBody = $loadType == "body" ? true : false;
$noConflictMode = $params->get("no_conflict_mode") == "true" ? true : false;
//css includes
$document->addStyleSheet(GlobalsRevSlider::$url_item_plugin . "css/settings.css");
if (file_exists(GlobalsRevSlider::$filepath_dynamic_captions) == true) {
$document->addStyleSheet(GlobalsRevSlider::$urlDynamicCaptionsCSS);
} else {
$document->addStyleSheet(GlobalsRevSlider::$urlCaptionsCSS);
}
//add inline styles
/*
$db = new UniteDBRev();
$styles = $db->fetch(GlobalsRevSlider::$table_css);
$styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
$document->addStyleDeclaration( $styles );
*/
//dmp($styles);exit();
$document->addStyleSheet(GlobalsRevSlider::$urlStaticCaptionsCSS);
//include js:
if ($isJSInBody == false) {
$document->addScript(GlobalsRevSlider::$url_item_plugin . "js/jquery.themepunch.tools.min.js");
$document->addScript(GlobalsRevSlider::$url_item_plugin . "js/jquery.themepunch.revolution.min.js");
}
$output = new RevSliderOutput();
$output->jsToBody = $isJSInBody;
$output->noConflictMode = $noConflictMode;
$output->putSliderBase($sliderID);
?>
示例12: previewOutputMarkup
public function previewOutputMarkup($sliderID, $output = null)
{
if ($sliderID == "empty_output") {
$this->loadingMessageOutput();
exit;
}
if ($output == null) {
$output = new RevSliderOutput();
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$output->setPreviewMode();
//put the output html
$urlPlugin = "http://yourpluginpath/";
$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&only_markup=true&sliderid=" . $sliderID . "&lang=[lang]&nonce=[nonce]";
$setBase = Mage::helper('nwdrevslider')->isSsl() ? "https://" : "http://";
?>
<html>
<head>
<script type='text/javascript' src='<?php
echo $setBase;
?>
ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
</head>
<body style="padding:0px;margin:0px;">
<?php
//UniteBaseClassRev::$url_plugin
ob_start();
?>
<link rel='stylesheet' href='<?php
echo $urlPlugin;
?>
css/settings.css?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
' type='text/css' media='all' />
<?php
$_usedStyles = array();
$_slides = $slider->getSlides();
foreach ($_slides as $_slide) {
$_layers = $_slide->getLayers();
foreach ($_layers as $_layer) {
$_style = isset($_layer['style']) ? $_layer['style'] : '';
if ($_style && !in_array($_style, $_usedStyles)) {
$_usedStyles[] = $_style;
}
}
}
echo Mage::helper('nwdrevslider')->inlcudeStyleFonts($_usedStyles);
$http = Mage::helper('nwdrevslider')->isSsl() ? 'https' : 'http';
?>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.tools.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<script type='text/javascript' src='<?php
echo $urlPlugin;
?>
js/jquery.themepunch.revolution.min.js?rev=<?php
echo GlobalsRevSlider::SLIDER_REVISION;
?>
'></script>
<?php
$head_content = ob_get_contents();
ob_clean();
ob_end_clean();
ob_start();
$custom_css = RevOperations::getStaticCss();
echo $custom_css . "\n\n";
echo '/*****************' . "\n";
echo ' ** ' . __('CAPTIONS CSS') . "\n";
echo ' ****************/' . "\n\n";
$db = new UniteDBRev();
$styles = $db->fetch(GlobalsRevSlider::$table_css);
echo UniteCssParserRev::parseDbArrayToCss($styles, "\n");
$style_content = ob_get_contents();
ob_clean();
ob_end_clean();
ob_start();
$output->putSliderBase($sliderID);
$content = ob_get_contents();
ob_clean();
ob_end_clean();
$script_content = substr($content, strpos($content, '<script type="text/javascript">'), strpos($content, '</script>') + 9 - strpos($content, '<script type="text/javascript">'));
$content = htmlentities(str_replace($script_content, '', $content));
$script_content = str_replace(' ', '', $script_content);
$script_content = str_replace(array('<script type="text/javascript">', '</script>'), '', $script_content);
?>
<style>
body { font-family:sans-serif; font-size:12px;}
textarea { background:#f1f1f1; border:#ddd; font-size:10px; line-height:16px; margin-bottom:40px; padding:10px;}
.rev_cont_title { color:#000; text-decoration:none;font-size:14px; line-height:24px; font-weight:800;background: #D5D5D5;padding: 10px;}
.rev_cont_title a,
.rev_cont_title a:visited { margin-left:25px;font-size:12px;line-height:12px;float:right;background-color:#8e44ad; color:#fff; padding:8px 10px;text-decoration:none;}
.rev_cont_title a:hover { background-color:#9b59b6}
</style>
//.........这里部分代码省略.........