• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP UniteDBRev类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: putRevCssCaptions

/**
 * 
 * get revolution slider captions css
 */
function putRevCssCaptions()
{
    $tableCss = "#__" . GlobalsRevSlider::TABLE_CSS_NAME;
    $db = new UniteDBRev();
    $arrStyles = $db->fetch($tableCss);
    $cssStyles = UniteCssParserRev::parseDbArrayToCss($arrStyles, "\n");
    header('Content-type: text/css');
    echo $cssStyles;
    exit;
}
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:14,代码来源:uniterevolution2.php


示例2: onAddScripts

 /**
  * 
  * a must function. you can not use it, but the function must stay there!.
  *   
  */
 public static function onAddScripts()
 {
     $operations = new RevOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally", "on");
     $includesFooter = UniteFunctionsRev::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = UniteFunctionsRev::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off") {
         $isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
         $hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
     //check if dynamic-captions.css exists. If not, include captions.php
     if (file_exists(self::$path_plugin . "rs-plugin/css/dynamic-captions.css") == false) {
         self::addDynamicStyle("captions", "rs-plugin-captions", "rs-plugin/css");
     } else {
         $db = new UniteDBRev();
         $styles = $db->fetch(GlobalsRevSlider::$table_css);
         $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
         wp_add_inline_style('rs-plugin-settings', $styles);
         //self::addStyle("dynamic-captions","rs-captions","rs-plugin/css");
     }
     $custom_css = RevOperations::getStaticCss();
     wp_add_inline_style('rs-plugin-settings', $custom_css);
     //self::addStyle("static-captions","rs-plugin-static","rs-plugin/css");
     $setBase = is_ssl() ? "https://" : "http://";
     $url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
     self::addScriptAbsoluteUrl($url_jquery, "jquery");
     if ($includesFooter == "off") {
         self::addScriptWaitFor("jquery.themepunch.plugins.min", "rs-plugin/js", 'themepunchtools', 'jquery');
         self::addScriptWaitFor("jquery.themepunch.revolution.min", "rs-plugin/js", 'revmin', 'jquery');
     } else {
         //put javascript to footer
         UniteBaseClassRev::addAction('wp_footer', 'putJavascript');
     }
 }
开发者ID:donpapa26,项目名称:bakancslistad,代码行数:47,代码来源:revslider_front.php


示例3: initProcess

 /**
  * 
  * @throws Exception
  */
 public function initProcess()
 {
     //        $loadTemplate = true;
     $revAction = Tools::getValue('revControllerAction');
     //        if(!empty($revAction))
     $loadTemplate = false;
     $productAdmin = new RevSliderAdmin(_PS_MODULE_DIR_ . 'revsliderprestashop', $loadTemplate);
     switch ($revAction) {
         case 'uploadimage':
             $this->rev_uploader();
             break;
         case 'captions':
             $db = new UniteDBRev();
             $styles = $db->fetch(GlobalsRevSlider::$table_css);
             header("Content-Type: text/css; charset=utf-8");
             echo UniteCssParserRev::parseDbArrayToCss($styles, "\n");
             break;
         default:
             break;
     }
     die;
 }
开发者ID:evgrishin,项目名称:se1614,代码行数:26,代码来源:revolutionslider_ajax.php


示例4: cmo_import_sliders_ajax

function cmo_import_sliders_ajax()
{
    global $wpdb;
    if (!class_exists('UniteFunctionsRev')) {
        ajax_finish(false, __('Revolution Slider plugin is not installed or activated.', 'cumulo'));
    } else {
        $rev_directory = CMO_FRAMEWORK_PATH . '/demo/sliders/';
        if (!empty($_POST['demo'])) {
            if ($_POST['demo'] != 'default') {
                $rev_directory .= $_POST['demo'] . '/';
            }
        }
        foreach (glob($rev_directory . '*.zip') as $filename) {
            $filename = basename($filename);
            $rev_files[] = $rev_directory . $filename;
        }
        foreach ($rev_files as $rev_file) {
            $filepath = $rev_file;
            $zip = new ZipArchive();
            $importZip = $zip->open($filepath, ZIPARCHIVE::CREATE);
            if ($importZip === true) {
                $slider_export = $zip->getStream('slider_export.txt');
                $custom_animations = $zip->getStream('custom_animations.txt');
                $dynamic_captions = $zip->getStream('dynamic-captions.css');
                $static_captions = $zip->getStream('static-captions.css');
                $content = '';
                $animations = '';
                $dynamic = '';
                $static = '';
                while (!feof($slider_export)) {
                    $content .= fread($slider_export, 1024);
                }
                if ($custom_animations) {
                    while (!feof($custom_animations)) {
                        $animations .= fread($custom_animations, 1024);
                    }
                }
                if ($dynamic_captions) {
                    while (!feof($dynamic_captions)) {
                        $dynamic .= fread($dynamic_captions, 1024);
                    }
                }
                if ($static_captions) {
                    while (!feof($static_captions)) {
                        $static .= fread($static_captions, 1024);
                    }
                }
                fclose($slider_export);
                if ($custom_animations) {
                    fclose($custom_animations);
                }
                if ($dynamic_captions) {
                    fclose($dynamic_captions);
                }
                if ($static_captions) {
                    fclose($static_captions);
                }
                //check for images!
            } else {
                $content = @file_get_contents($filepath);
            }
            if ($importZip === true) {
                //we have a zip
                $db = new UniteDBRev();
                //update/insert custom animations
                $animations = @unserialize($animations);
                if (!empty($animations)) {
                    foreach ($animations as $key => $animation) {
                        $exist = $db->fetch(GlobalsRevSlider::$table_layer_anims, "handle = '" . $animation['handle'] . "'");
                        if (!empty($exist)) {
                            if ($updateAnim == "true") {
                                $arrUpdate = array();
                                $arrUpdate['params'] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                                $db->update(GlobalsRevSlider::$table_layer_anims, $arrUpdate, array('handle' => $animation['handle']));
                                $id = $exist['0']['id'];
                            } else {
                                $arrInsert = array();
                                $arrInsert["handle"] = 'copy_' . $animation['handle'];
                                $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                                $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                            }
                        } else {
                            $arrInsert = array();
                            $arrInsert["handle"] = $animation['handle'];
                            $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                            $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                        }
                        $content = str_replace(array('customin-' . $animation['id'], 'customout-' . $animation['id']), array('customin-' . $id, 'customout-' . $id), $content);
                    }
                } else {
                }
                //overwrite/append static-captions.css
                if (!empty($static)) {
                    if (isset($updateStatic) && $updateStatic == "true") {
                        RevOperations::updateStaticCss($static);
                    } else {
                        //append
                        $static_cur = RevOperations::getStaticCss();
                        $static = $static_cur . "\n" . $static;
                        RevOperations::updateStaticCss($static);
//.........这里部分代码省略.........
开发者ID:supahseppe,项目名称:ashley-travel,代码行数:101,代码来源:demo-importer-ajax.php


示例5: add_inline_styles

 /**
  * Output Dynamic Inline Styles
  */
 public function add_inline_styles()
 {
     echo '<div class="revsliderstyles">';
     echo '<style type="text/css">';
     $db = new UniteDBRev();
     $styles = $db->fetch(GlobalsRevSlider::$table_css);
     foreach ($styles as $key => $style) {
         $handle = str_replace('.tp-caption', '', $style['handle']);
         if (!isset($this->class_include[$handle])) {
             unset($styles[$key]);
         }
     }
     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
     $styles = UniteCssParserRev::compress_css($styles);
     echo $styles;
     // KRISZTIAN MODIFICATION FOR INNERLAYERS
     $stylesinnerlayers = str_replace('.tp-caption', '', $styles);
     echo $stylesinnerlayers;
     // END MODIFICATION
     echo '</style>' . "\n";
     echo '</div>';
 }
开发者ID:szpaddy,项目名称:the7,代码行数:25,代码来源:revslider_output.class.php


示例6: importSliderFromPost

 public function importSliderFromPost($updateAnim = true, $updateStatic = true)
 {
     try {
         $sliderID = UniteFunctionsRev::getPostVariable("sliderid");
         $sliderExists = !empty($sliderID);
         if ($sliderExists) {
             $this->initByID($sliderID);
         }
         $filepath = $_FILES["import_file"]["tmp_name"];
         if (file_exists($filepath) == false) {
             UniteFunctionsRev::throwError("Import file not found!!!");
         }
         if (!class_exists("ZipArchive")) {
             $importZip = false;
         } else {
             $zip = new ZipArchive();
             $importZip = $zip->open($filepath, ZIPARCHIVE::CREATE);
         }
         if ($importZip === true) {
             $slider_export = $zip->getStream('slider_export.txt');
             $custom_animations = $zip->getStream('custom_animations.txt');
             $dynamic_captions = $zip->getStream('dynamic-captions.css');
             $static_captions = $zip->getStream('static-captions.css');
             if (!$slider_export) {
                 UniteFunctionsRev::throwError("slider_export.txt does not exist!");
             }
             $content = '';
             $animations = '';
             $dynamic = '';
             $static = '';
             while (!feof($slider_export)) {
                 $content .= fread($slider_export, 1024);
             }
             if ($custom_animations) {
                 while (!feof($custom_animations)) {
                     $animations .= fread($custom_animations, 1024);
                 }
             }
             if ($dynamic_captions) {
                 while (!feof($dynamic_captions)) {
                     $dynamic .= fread($dynamic_captions, 1024);
                 }
             }
             if ($static_captions) {
                 while (!feof($static_captions)) {
                     $static .= fread($static_captions, 1024);
                 }
             }
             fclose($slider_export);
             if ($custom_animations) {
                 fclose($custom_animations);
             }
             if ($dynamic_captions) {
                 fclose($dynamic_captions);
             }
             if ($static_captions) {
                 fclose($static_captions);
             }
         } else {
             $content = @file_get_contents($filepath);
         }
         if ($importZip === true) {
             $db = new UniteDBRev();
             $animations = @unserialize($animations);
             if (!empty($animations)) {
                 foreach ($animations as $key => $animation) {
                     $exist = $db->fetch(GlobalsRevSlider::$table_layer_anims, "handle = '" . $animation['handle'] . "'");
                     if (!empty($exist)) {
                         if ($updateAnim == "true") {
                             $arrUpdate = array();
                             $arrUpdate['params'] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                             $db->update(GlobalsRevSlider::$table_layer_anims, $arrUpdate, array('handle' => $animation['handle']));
                             $id = $exist['0']['id'];
                         } else {
                             $arrInsert = array();
                             $arrInsert["handle"] = 'copy_' . $animation['handle'];
                             $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                             $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                         }
                     } else {
                         $arrInsert = array();
                         $arrInsert["handle"] = $animation['handle'];
                         $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                         $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                     }
                     $content = str_replace(array('customin-' . $animation['id'], 'customout-' . $animation['id']), array('customin-' . $id, 'customout-' . $id), $content);
                 }
                 dmp(__("animations imported!", REVSLIDER_TEXTDOMAIN));
             } else {
                 dmp(__("no custom animations found, if slider uses custom animations, the provided export may be broken...", REVSLIDER_TEXTDOMAIN));
             }
             if (!empty($static)) {
                 if ($updateStatic == "true") {
                     RevOperations::updateStaticCss($static);
                 } else {
                     $static_cur = RevOperations::getStaticCss();
                     $static = $static_cur . "\n" . $static;
                     RevOperations::updateStaticCss($static);
                 }
             }
//.........这里部分代码省略.........
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:101,代码来源:revslider_slider.class.php


示例7: importSliderFromPost

 /**
  * 
  * import slider from multipart form
  */
 public function importSliderFromPost($updateAnim = true, $updateStatic = true)
 {
     try {
         $sliderID = UniteFunctionsRev::getPostVariable("sliderid");
         $sliderExists = !empty($sliderID);
         if ($sliderExists) {
             $this->initByID($sliderID);
         }
         $filepath = $_FILES["import_file"]["tmp_name"];
         if (file_exists($filepath) == false) {
             UniteFunctionsRev::throwError("Import file not found!!!");
         }
         //check if zip file or fallback to old, if zip, check if all files exist
         $zip = new ZipArchive();
         $importZip = $zip->open($filepath, ZIPARCHIVE::CREATE);
         if ($importZip === true) {
             //true or integer. If integer, its not a correct zip file
             //check if files all exist in zip
             $slider_export = $zip->getStream('slider_export.txt');
             $custom_animations = $zip->getStream('custom_animations.txt');
             $dynamic_captions = $zip->getStream('dynamic-captions.css');
             $static_captions = $zip->getStream('static-captions.css');
             if (!$slider_export) {
                 UniteFunctionsRev::throwError("slider_export.txt does not exist!");
             }
             //if(!$custom_animations)  UniteFunctionsRev::throwError("custom_animations.txt does not exist!");
             //if(!$dynamic_captions) UniteFunctionsRev::throwError("dynamic-captions.css does not exist!");
             //if(!$static_captions)  UniteFunctionsRev::throwError("static-captions.css does not exist!");
             $content = '';
             $animations = '';
             $dynamic = '';
             $static = '';
             while (!feof($slider_export)) {
                 $content .= fread($slider_export, 1024);
             }
             if ($custom_animations) {
                 while (!feof($custom_animations)) {
                     $animations .= fread($custom_animations, 1024);
                 }
             }
             if ($dynamic_captions) {
                 while (!feof($dynamic_captions)) {
                     $dynamic .= fread($dynamic_captions, 1024);
                 }
             }
             if ($static_captions) {
                 while (!feof($static_captions)) {
                     $static .= fread($static_captions, 1024);
                 }
             }
             fclose($slider_export);
             if ($custom_animations) {
                 fclose($custom_animations);
             }
             if ($dynamic_captions) {
                 fclose($dynamic_captions);
             }
             if ($static_captions) {
                 fclose($static_captions);
             }
             //check for images!
         } else {
             //check if fallback
             //get content array
             $content = @file_get_contents($filepath);
         }
         if ($importZip === true) {
             //we have a zip
             $db = new UniteDBRev();
             //update/insert custom animations
             $animations = @unserialize($animations);
             if (!empty($animations)) {
                 foreach ($animations as $key => $animation) {
                     //$animation['id'], $animation['handle'], $animation['params']
                     $exist = $db->fetch(GlobalsRevSlider::$table_layer_anims, "handle = '" . $animation['handle'] . "'");
                     if (!empty($exist)) {
                         //update the animation, get the ID
                         if ($updateAnim == "true") {
                             //overwrite animation if exists
                             $arrUpdate = array();
                             $arrUpdate['params'] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                             $db->update(GlobalsRevSlider::$table_layer_anims, $arrUpdate, array('handle' => $animation['handle']));
                             $id = $exist['0']['id'];
                         } else {
                             //insert with new handle
                             $arrInsert = array();
                             $arrInsert["handle"] = 'copy_' . $animation['handle'];
                             $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                             $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                         }
                     } else {
                         //insert the animation, get the ID
                         $arrInsert = array();
                         $arrInsert["handle"] = $animation['handle'];
                         $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                         $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
//.........这里部分代码省略.........
开发者ID:ConceptHaus,项目名称:huasca,代码行数:101,代码来源:revslider_slider.class.php


示例8: onAddScripts

 /**
  * 
  * a must function. adds scripts on the page
  * add all page scripts and styles here.
  * pelase don't remove this function
  * common scripts even if the plugin not load, use this function only if no choise.
  */
 public static function onAddScripts()
 {
     self::addStyle("edit_layers", "edit_layers");
     //add google font
     //$urlGoogleFont = "http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700";
     //self::addStyleAbsoluteUrl($urlGoogleFont,"google-font-pt-sans-narrow");
     self::addScriptCommon("edit_layers", "unite_layers");
     self::addScriptCommon("css_editor", "unite_css_editor");
     self::addScript("rev_admin");
     self::addScript("jquery.themepunch.plugins.min", "rs-plugin/js", 'themepunchtools');
     //include all media upload scripts
     self::addMediaUploadIncludes();
     //add rs css:
     self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
     $db = new UniteDBRev();
     $styles = $db->fetch(GlobalsRevSlider::$table_css);
     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
     $styles = UniteCssParserRev::compress_css($styles);
     wp_add_inline_style('rs-plugin-settings', $styles);
     $custom_css = RevOperations::getStaticCss();
     $custom_css = UniteCssParserRev::compress_css($custom_css);
     wp_add_inline_style('rs-plugin-settings', $custom_css);
     //self::addStyle("static-captions","rs-plugin-static","rs-plugin/css");
 }
开发者ID:Alderx,项目名称:publioriente,代码行数:31,代码来源:revslider_admin.php


示例9: onFrontAjaxAction

 /**
  * onAjax action handler
  */
 public static function onFrontAjaxAction()
 {
     $db = new UniteDBRev();
     $slider = new RevSlider();
     $slide = new RevSlide();
     $operations = new RevOperations();
     $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 = RevOperations::getStaticCss();
                     $custom_css = UniteCssParserRev::compress_css($custom_css);
                     $styles = $db->fetch(GlobalsRevSlider::$table_css);
                     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
                     $styles = UniteCssParserRev::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_TEXTDOMAIN);
                     } else {
                         if ($html !== false) {
                             self::ajaxResponseData($html);
                         } else {
                             $error = __('Slider not found', REVSLIDER_TEXTDOMAIN);
                         }
                     }
                 } else {
                     $error = __('No Data Received', REVSLIDER_TEXTDOMAIN);
                 }
                 break;
         }
     } else {
         $error = true;
     }
     if ($error !== false) {
         $showError = __('Loading Error', REVSLIDER_TEXTDOMAIN);
         if ($error !== true) {
             $showError = __('Loading Error: ', REVSLIDER_TEXTDOMAIN) . $error;
         }
         self::ajaxResponseError($showError, false);
     }
     exit;
 }
开发者ID:srinivasulurao,项目名称:transcharity,代码行数:61,代码来源:revslider_admin.php


示例10: onAddScripts

 /**
  *
  * a must function. adds scripts on the page
  * add all page scripts and styles here.
  * pelase don't remove this function
  * common scripts even if the plugin not load, use this function only if no choise.
  */
 public static function onAddScripts()
 {
     global $wp_version;
     $style_pre = '';
     $style_post = '';
     if ($wp_version < 3.7) {
         $style_pre = '<style type="text/css">';
         $style_post = '</style>';
     }
     self::addStyle("edit_layers", "edit_layers");
     //add google font
     //$urlGoogleFont = "http://fonts.useso.com/css?family=PT+Sans+Narrow:400,700";
     //self::addStyleAbsoluteUrl($urlGoogleFont,"google-font-pt-sans-narrow");
     self::addScriptCommon("edit_layers", "unite_layers");
     self::addScriptCommon("css_editor", "unite_css_editor");
     self::addScript("rev_admin");
     self::addScript("jquery.themepunch.tools.min", "rs-plugin/js", 'tp-tools');
     //include all media upload scripts
     self::addMediaUploadIncludes();
     //add rs css:
     self::addStyle("settings", "rs-plugin-settings", "rs-plugin/css");
     $db = new UniteDBRev();
     $styles = $db->fetch(GlobalsRevSlider::$table_css);
     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
     $styles = UniteCssParserRev::compress_css($styles);
     wp_add_inline_style('rs-plugin-settings', $style_pre . $styles . $style_post);
     // KRISZTIAN MODIFICATION FOR INNERLAYERS
     $stylesinnerlayers = str_replace('.tp-caption', '', $styles);
     wp_add_inline_style('rs-plugin-settings', $style_pre . $stylesinnerlayers . $style_post);
     // END MODIFICATION
     $custom_css = RevOperations::getStaticCss();
     $custom_css = UniteCssParserRev::compress_css($custom_css);
     wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
     //self::addStyle("static-captions","rs-plugin-static","rs-plugin/css");
 }
开发者ID:szpaddy,项目名称:the7,代码行数:42,代码来源:revslider_admin.php


示例11: header

<?php

header("Content-Type: text/css; charset=utf-8");
$absolute_path = str_replace('\\', '/', __FILE__);
$path_to_file = explode('/revslider/rs-plugin/', $absolute_path);
$path_to_wp = $path_to_file[0] . '/../..';
require_once $path_to_wp . '/wp-load.php';
$currentFolder = dirname($absolute_path);
//include framework files
require_once $currentFolder . '/../../inc_php/framework/include_framework.php';
$db = new UniteDBRev();
$styles = $db->fetch(GlobalsRevSlider::$table_css);
echo UniteCssParserRev::parseDbArrayToCss($styles, "\n");
开发者ID:IDOAgency,项目名称:PAHClinic,代码行数:13,代码来源:captions.php


示例12: tt_revo_importer

function tt_revo_importer()
{
    if (class_exists('UniteFunctionsRev')) {
        global $wpdb;
        $revo_directory = get_stylesheet_directory() . '/framework/addons/wordpress-importer/files/revsliders/';
        $revo_files = array();
        $db = new UniteDBRev();
        $revo_obj = new RevSlider();
        $aliases = $revo_obj->getAllSliderAliases();
        foreach (glob($revo_directory . '*.txt') as $filename) {
            $filename = basename($filename);
            $revo_files[] = get_stylesheet_directory_uri() . '/framework/addons/wordpress-importer/files/revsliders/' . $filename;
        }
        foreach ($revo_files as $rev_file) {
            $get_revo_file = wp_remote_get($rev_file);
            $ncd = $get_revo_file['body'];
            if (base64_decode($ncd, true)) {
                $slider_data = @unserialize(base64_decode($ncd));
            } else {
                ob_start();
                $ncd = preg_replace('!s:(\\d+):"(.*?)";!e', "'s:'.strlen('\$2').':\"\$2\";'", trim($ncd));
                //clear errors in string
                ob_end_clean();
                $slider_data = @unserialize($ncd);
            }
            if (empty($slider_data)) {
                continue;
            }
            $slider_params = $slider_data["params"];
            if (in_array($slider_params['alias'], $aliases)) {
                continue;
            }
            $serialized_content = serialize($slider_data);
            /* Detecting Animations and Styles */
            $animations = isset($slider_data["custom_animations"]) ? $slider_data["custom_animations"] : array();
            if (!empty($animations)) {
                foreach ($animations as $key => $animation) {
                    //$animation['id'], $animation['handle'], $animation['params']
                    $exist = $db->fetch(GlobalsRevSlider::$table_layer_anims, "handle = '" . $animation['handle'] . "'");
                    if (!empty($exist)) {
                        //update the animation, get the ID
                        $arrUpdate = array();
                        $arrUpdate['params'] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                        $db->update(GlobalsRevSlider::$table_layer_anims, $arrUpdate, array('handle' => $animation['handle']));
                        $id = $exist['0']['id'];
                    } else {
                        //insert the animation, get the ID
                        $arrInsert = array();
                        $arrInsert["handle"] = $animation['handle'];
                        $arrInsert["params"] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                        $id = $db->insert(GlobalsRevSlider::$table_layer_anims, $arrInsert);
                    }
                    $serialized_content = str_replace(array('customin-' . $animation['id'], 'customout-' . $animation['id']), array('customin-' . $id, 'customout-' . $id), $serialized_content);
                }
            }
            // Static Captions
            $static = isset($slider_data["static_captions"]) ? $slider_data["static_captions"] : "";
            if (!empty($static)) {
                RevOperations::updateStaticCss($static);
            }
            //overwrite/create dynamic-captions.css
            //parse css to classes
            if (isset($slider_data["dynamic_captions"]) && !empty($slider_data["dynamic_captions"])) {
                $dynamicCss = UniteCssParserRev::parseCssToArray($slider_data["dynamic_captions"]);
                if (is_array($dynamicCss) && $dynamicCss !== false && count($dynamicCss) > 0) {
                    foreach ($dynamicCss as $class => $styles) {
                        //check if static style or dynamic style
                        $class = trim($class);
                        if (strpos($class, ':hover') === false && strpos($class, ':') !== false || strpos($class, " ") !== false || strpos($class, ".tp-caption") === false || (strpos($class, ".") === false || strpos($class, "#") !== false) || strpos($class, ">") !== false) {
                            //.tp-caption>.imageclass or .tp-caption.imageclass>img or .tp-caption.imageclass .img
                            continue;
                        }
                        //is a dynamic style
                        if (strpos($class, ':hover') !== false) {
                            $class = trim(str_replace(':hover', '', $class));
                            $arrInsert = array();
                            $arrInsert["hover"] = json_encode($styles);
                            $arrInsert["settings"] = json_encode(array('hover' => 'true'));
                        } else {
                            $arrInsert = array();
                            $arrInsert["params"] = json_encode($styles);
                        }
                        //check if class exists
                        $result = $db->fetch(GlobalsRevSlider::$table_css, "handle = '" . $class . "'");
                        if (!empty($result)) {
                            //update
                            $db->update(GlobalsRevSlider::$table_css, $arrInsert, array('handle' => $class));
                        } else {
                            //insert
                            $arrInsert["handle"] = $class;
                            $db->insert(GlobalsRevSlider::$table_css, $arrInsert);
                        }
                    }
                }
            }
            $slider_data = unserialize($serialized_content);
            $slider_params = $slider_data["params"];
            /*
            if(isset($slider_params["background_image"])) {
                $slider_params["background_image"] = UniteFunctionsWPRev::getImageUrlFromPath($slider_params["background_image"]);
//.........这里部分代码省略.........
开发者ID:petersondrs,项目名称:tellura,代码行数:101,代码来源:revo-importer.php


示例13: fclose

     }
     if ($dynamic_captions) {
         fclose($dynamic_captions);
     }
     if ($static_captions) {
         fclose($static_captions);
     }
     //check for images!
 } else {
     //check if fallback
     //get content array
     $content = @file_get_contents($filepath);
 }
 if ($importZip === true) {
     //we have a zip
     $db = new UniteDBRev();
     //update/insert custom animations
     $animations = @unserialize($animations);
     if (!empty($animations)) {
         foreach ($animations as $key => $animation) {
             //$animation['id'], $animation['handle'], $animation['params']
             $exist = $db->fetch(GlobalsRevSlider::$table_layer_anims, "handle = '" . $animation['handle'] . "'");
             if (!empty($exist)) {
                 //update the animation, get the ID
                 if ($updateAnim == "true") {
                     //overwrite animation if exists
                     $arrUpdate = array();
                     $arrUpdate['params'] = stripslashes(json_encode(str_replace("'", '"', $animation['params'])));
                     $db->update(GlobalsRevSlider::$table_layer_anims, $arrUpdate, array('handle' => $animation['handle']));
                     $id = $exist['0']['id'];
                 } else {
开发者ID:jgeletka,项目名称:simskin,代码行数:31,代码来源:themeva-importer.php


示例14: 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>
//.........这里部分代码省略.........
开发者ID:perseusl,项目名称:kingdavid,代码行数:101,代码来源:revslider_operations.class.php


示例15: add_inline_styles

 /**
  * Output Dynamic Inline Styles
  */
 public function add_inline_styles()
 {
     //echo '<div class="revsliderstyles">';
     echo '<style scoped>';
     $db = new UniteDBRev();
     $styles = $db->fetch(GlobalsRevSlider::$table_css);
     foreach ($styles as $key => $style) {
         $handle = str_replace('.tp-caption', '', $style['handle']);
         if (!isset($this->class_include[$handle])) {
             unset($styles[$key]);
         }
     }
     $styles = UniteCssParserRev::parseDbArrayToCss($styles, "\n");
     $styles = UniteCssParserRev::compress_css($styles);
     echo $styles;
     echo '</style>' . "\n";
     //echo '</div>';
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:21,代码来源:revslider_output.class.php


示例16: importCaptionsCssContentArray

 /**
  * 
  * import contents of the css file
  */
 public static function importCaptionsCssContentArray()
 {
     $db = new UniteDBRev();
     $css = self::getCaptionsCssContentArray();
     $static = array();
     if (is_array($css) && $css !== false && count($css) > 0) {
         foreach ($css as $class => $styles) {
             //check if static style or dynamic style
             $class = trim($class);
             if (strpos($class, ':hover') === false && strpos($class, ':') !== false || strpos($class, " ") !== false || strpos($class, ".tp-caption") === false || (strpos($class, ".") === false || strpos($class, "#") !== false) || strpos($class, ">") !== false) {
                 //.tp-caption>.imageclass or .tp-caption.imageclass>img or .tp-caption.imageclass .img
                 $static[$class] = $styles;
                 continue;
             }
             //is a dynamic style
             if (strpos($class, ':hover') !== false) {
                 $class = trim(str_replace(':hover', '', $class));
                 $arrInsert = array();
                 $arrInsert["hover"] = json_encode($styles);
                 $arrInsert["settings"] = json_encode(array('hover' => 'true'));
             } else {
                 $arrInsert = array();
                 $arrInsert["params"] = json_encode($styles);
             }
             //check if class exists
             $result = $db->fetch(GlobalsRevSlider::$table_css, "handle = '" . $class . "'");
             if (!empty($result)) {
                 //update
                 $db->update(GlobalsRevSlider::$table_css, $arrInsert, array('handle' => $class));
             } else {
                 //insert
                 $arrInsert["handle"] = $class;
                 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP UniteFunctionsRev类代码示例发布时间:2022-05-23
下一篇:
PHP UniteCssParserRev类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap