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


PHP RevSlider::getArrSlidersShort方法代码示例

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


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

示例1: array

 function ot_type_revslider_select($args = array())
 {
     extract($args);
     $has_desc = $field_desc ? true : false;
     echo '<div class="format-setting type-revslider-select ' . ($has_desc ? 'has-desc' : 'no-desc') . '">';
     echo $has_desc ? '<div class="description">' . htmlspecialchars_decode($field_desc) . '</div>' : '';
     echo '<div class="format-setting-inner">';
     // Add This only if RevSlider is Activated
     if (class_exists('RevSliderAdmin')) {
         echo '<select name="' . esc_attr($field_name) . '" id="' . esc_attr($field_id) . '" class="option-tree-ui-select ' . $field_class . '">';
         /* get revolution array */
         $slider = new RevSlider();
         $arrSliders = $slider->getArrSlidersShort();
         /* has slides */
         if (!empty($arrSliders)) {
             echo '<option value="">-- ' . __('Choose One', 'option-tree') . ' --</option>';
             foreach ($arrSliders as $rev_id => $rev_slider) {
                 echo '<option value="' . esc_attr($rev_id) . '"' . selected($field_value, $rev_id, false) . '>' . esc_attr($rev_slider) . '</option>';
             }
         } else {
             echo '<option value="">' . __('No Sliders Found', 'option-tree') . '</option>';
         }
         echo '</select>';
     } else {
         echo '<span style="color: red;">' . __('Sorry! Revolution Slider is not Installed or Activated', 'ventus') . '</span>';
     }
     echo '</div>';
     echo '</div>';
 }
开发者ID:adampdarcy,项目名称:paola,代码行数:29,代码来源:ot-themeoptions.php

示例2: register

 function register()
 {
     // Init Post Type
     $post = new SpyropressCustomPostType('Page');
     $menus = wp_get_nav_menus();
     $menu_options = array();
     if (isset($menus) && count($menus) > 0) {
         foreach ($menus as $menu) {
             $menu_options[$menu->term_id] = $menu->name;
         }
     }
     // Add Meta Boxes
     $meta_fields['options'] = array(array('label' => __('Slider', 'spyropress'), 'type' => 'heading', 'slug' => 'options'), array('label' => __('OnePage Navigation Menu', 'spyropress'), 'id' => 'onepage_menu', 'type' => 'select', 'class' => 'page_template one-page-php', 'options' => $menu_options), array('label' => __('Slider', 'spyropress'), 'type' => 'sub_heading'), array('label' => __('Slider Type', 'spyropress'), 'id' => 'slider', 'type' => 'select', 'class' => 'enable_changer', 'options' => array('nivo' => __('Nivo Slider', 'spyropress'), 'rev' => __('Revolution Slider', 'spyropress'))), array('label' => __('Nivo Slider', 'spyropress'), 'id' => 'nivo_slider', 'type' => 'select', 'class' => 'slider nivo', 'options' => spyropress_get_sliders()));
     if (class_exists('RevSlider')) {
         $slider = new RevSlider();
         $arrSliders = $slider->getArrSlidersShort();
         $meta_fields['options'][] = array('label' => __('Revolution Slider', 'spyropress'), 'id' => 'rev_slider', 'type' => 'select', 'class' => 'slider rev', 'options' => $arrSliders);
         $meta_fields['options'][] = array('label' => __('Revolution Slider Skin', 'spyropress'), 'id' => 'rev_slider_skin', 'type' => 'select', 'class' => 'slider rev', 'options' => array('dark' => __('Dark', 'spyropress'), 'light' => __('Light', 'spyropress'), 'full' => __('FullScreen', 'spyropress'), 'dark dark-video' => __('Video - Dark', 'spyropress'), 'light dark-light' => __('Video - Light', 'spyropress')), 'std' => 'dark');
     }
     $meta_fields['options'][] = array('label' => __('Header', 'spyropress'), 'type' => 'sub_heading');
     $meta_fields['options'][] = array('label' => __('Header Type', 'spyropress'), 'id' => 'top_header', 'type' => 'select', 'class' => 'enable_changer', 'options' => array('none' => __('None', 'spyropress'), 'default' => __('Default', 'spyropress'), 'custom' => __('Custom Header', 'spyropress')), 'std' => 'default');
     $meta_fields['options'][] = array('label' => __('Custom Header Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'class' => 'top_header custom', 'desc' => __('Either use Bucket or Content', 'spyropress'), 'options' => spyropress_get_buckets());
     $meta_fields['options'][] = array('label' => __('Custom Header Content', 'spyropress'), 'id' => 'header_content', 'type' => 'editor', 'desc' => __('Either use Bucket or Content', 'spyropress'), 'class' => 'top_header custom');
     $meta_fields['options'][] = array('label' => __('Custom Header Background', 'spyropress'), 'id' => 'background', 'type' => 'background', 'class' => 'top_header custom');
     $meta_fields['options'][] = array('label' => __('Top Border color', 'spyropress'), 'id' => 'border_top', 'type' => 'colorpicker', 'class' => 'top_header custom');
     $meta_fields['options'][] = array('label' => __('Bottom Border color', 'spyropress'), 'id' => 'border_bottom', 'type' => 'colorpicker', 'class' => 'top_header custom');
     $meta_fields['options'][] = array('label' => __('Layout', 'spyropress'), 'type' => 'sub_heading');
     $meta_fields['options'][] = array('label' => __('Layout Type', 'spyropress'), 'id' => 'layout_type', 'type' => 'select', 'options' => array('full' => __('Full Width', 'spyropress'), 'left' => __('Left Sidebar', 'spyropress'), 'right' => __('Right Sidebar', 'spyropress')), 'std' => 'full');
     $post->add_meta_box('page_options', __('Page Options', 'spyropress'), $meta_fields, '_page_options', false, 'normal', 'high');
 }
开发者ID:rinodung,项目名称:myfreetheme,代码行数:30,代码来源:page-init.php

示例3: yit_get_revolution_sliders

function yit_get_revolution_sliders()
{
    global $wpdb;
    if (!yit_if_thereis_revslider()) {
        return array();
    }
    $tableName = GlobalsRevSlider::$table_sliders;
    $slider = new RevSlider();
    return $slider->getArrSlidersShort();
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:10,代码来源:config.php

示例4: form

 /**
  * 
  * the form
  */
 public function form($instance)
 {
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSlidersShort();
     $sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
     if (empty($arrSliders)) {
         echo __("No sliders found, Please create a slider", tk_theme_name);
     } else {
         $field = "rev_slider";
         $fieldID = $this->get_field_id($field);
         $fieldName = $this->get_field_name($field);
         $select = UniteFunctionsRev::getHTMLSelect($arrSliders, $sliderID, 'name="' . $fieldName . '" id="' . $fieldID . '"', true);
     }
     echo "Choose slider: ";
     echo $select;
 }
开发者ID:rohichurch,项目名称:rohichurch-wp,代码行数:20,代码来源:revslider_widget.class.php

示例5: form

    /**
     * 
     * the form
     */
    public function form($instance)
    {
        $slider = new RevSlider();
        $arrSliders = $slider->getArrSlidersShort();
        if (empty($arrSliders)) {
            echo __("No sliders found, Please create a slider");
        } else {
            $sliderID = UniteFunctionsRev::getVal($instance, "rev_slider");
            $homepage = UniteFunctionsRev::getVal($instance, "rev_slider_homepage");
            $field = "rev_slider";
            $fieldID = $this->get_field_id($field);
            $fieldName = $this->get_field_name($field);
            $select = UniteFunctionsRev::getHTMLSelect($arrSliders, $sliderID, 'name="' . $fieldName . '" id="' . $fieldID . '"', true);
            $fieldCheck = "rev_slider_homepage";
            $fieldID_check = $this->get_field_id($fieldCheck);
            $fieldName_check = $this->get_field_name($fieldCheck);
            $checked = "";
            if ($homepage == "on") {
                $checked = "checked='checked'";
            }
            ?>
			Choose Slider: <?php 
            echo $select;
            ?>
			<div style="padding-top:10px;"></div>
			<label for="<?php 
            echo $fieldID_check;
            ?>
">Home Page Only:</label>
			<input type="checkbox" name="<?php 
            echo $fieldName_check;
            ?>
" id="<?php 
            echo $fieldID_check;
            ?>
" <?php 
            echo $checked;
            ?>
 >
			<div style="padding-top:10px;"></div>
		<?php 
        }
        //else
    }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:48,代码来源:revslider_widget.class.php

示例6: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $this->requireFramework();
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSlidersShort();
     $selectedID = $this->value;
     if (empty($selectedID)) {
         $selectedID = JRequest::getCmd("sliderid");
     }
     $html = "<select id='{$this->id}_id' name='{$this->name}'>";
     foreach ($arrSliders as $id => $title) {
         $selected = "";
         if ($id == $selectedID) {
             $selected = 'selected="selected"';
         }
         $html .= "<option value='{$id}' {$selected}>{$title}</option>";
     }
     $html .= "</select>";
     return $html;
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:26,代码来源:slider.php

示例7: _adventure_tours_hsm_get_slider_selector

/**
 * Local function that returns field that allows to select revolution slider.
 *
 * @return assoc
 */
function _adventure_tours_hsm_get_slider_selector()
{
    $isRevoSliderInstalled = class_exists('RevSlider');
    $revoSlidersList = array();
    if ($isRevoSliderInstalled) {
        $slider = new RevSlider();
        if ($arrSliders = $slider->getArrSlidersShort()) {
            foreach ($arrSliders as $sid => $stitle) {
                $revoSlidersList[] = array('value' => $sid, 'label' => $stitle);
            }
        }
    }
    $descriptionNoticeText = '';
    if (!$isRevoSliderInstalled) {
        $descriptionNoticeText = esc_html__('Please install and activate the Slider Revolution plugin.', 'adventure-tours');
    } else {
        if (empty($revoSlidersList)) {
            $descriptionNoticeText = esc_html__('Please go to Slider Revolution plugin and create a slider.', 'adventure-tours');
        }
    }
    return array('label' => esc_html__('Choose Slider', 'adventure-tours'), 'type' => 'select', 'name' => 'slider_alias', 'description' => $descriptionNoticeText ? '<span style="color:#EE0000">' . $descriptionNoticeText . '</span>' : '', 'items' => $revoSlidersList, 'dependency' => array('field' => 'section_mode', 'function' => 'adventure_tours_vp_header_section_is_slider'));
}
开发者ID:j-kenneth,项目名称:Expeero,代码行数:27,代码来源:header-section-meta.php

示例8: RevSlider

 /**
  * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
  * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
  * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
  *
  *
  * @param array $params this array holds the default values for $content and $args. 
  * @return $params the return array usually holds an innerHtml key that holds item specific markup.
  */
 function editor_element($params)
 {
     //fetch all registered slides and save them to the slides array
     $slider = new RevSlider();
     $arrSliders = $slider->getArrSlidersShort();
     $slides = array_flip($arrSliders);
     if (empty($params['args']['id']) && is_array($slides)) {
         $params['args']['id'] = reset($slides);
     }
     $element = array('subtype' => $slides, 'type' => 'select', 'std' => $params['args']['id'], 'class' => 'avia-recalc-shortcode', 'data' => array('attr' => 'id'));
     $inner = "<img src='" . $this->config['icon'] . "' title='" . $this->config['name'] . "' />";
     if (empty($slides)) {
         $inner .= "<div><a target='_blank' href='" . admin_url('admin.php?page=revslider') . "'>" . __('No Revolution Slider Found. Click here to create one', 'avia_framework') . "</a></div>";
     } else {
         $inner .= "<div class='avia-element-label'>" . $this->config['name'] . "</div>";
         $inner .= AviaHtmlHelper::render_element($element);
         $inner .= "<a target='_blank' href='" . admin_url('admin.php?page=revslider') . "'>" . __('Edit Revolution Slider here', 'avia_framework') . "</a>";
     }
     $params['class'] = "av_sidebar";
     $params['content'] = NULL;
     $params['innerHtml'] = $inner;
     return $params;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:32,代码来源:slideshow_revolution.php

示例9: array

<div class="rd_metabox">
<?php 
$this->select('slider_type', 'Page Slider', array('no' => 'No Slider', 'layer' => 'Revolution Slider', 'layerslider' => 'LayerSlider'), '');
?>

<?php 
if (is_plugin_active('revslider/revslider.php')) {
    $slider = new RevSlider();
    $arrSliders = $slider->getArrSlidersShort();
    $arrSliders[0] = 'Select a slider';
    $this->select('slider', 'Select Revolution Slider', $arrSliders, '');
}
if (is_plugin_active('LayerSlider/layerslider.php')) {
    global $wpdb;
    $slides_array[0] = 'Select a slider';
    // Table name
    $table_name = $wpdb->prefix . "layerslider";
    // Get sliders
    $sliders = $wpdb->get_results("SELECT * FROM {$table_name}\n\t\t\t\t\t\t\t\t\t\t\tWHERE flag_hidden = '0' AND flag_deleted = '0'\n\t\t\t\t\t\t\t\t\t\t\tORDER BY date_c ASC");
    if (!empty($sliders)) {
        foreach ($sliders as $key => $item) {
            $slides[$item->id] = '';
        }
    }
    if (isset($slides) && $slides) {
        foreach ($slides as $key => $val) {
            $slides_array[$key] = 'LayerSlider #' . $key;
        }
    }
    $this->select('layerslider', 'Select LayerSlider', $slides_array, '');
}
开发者ID:axelander95,项目名称:wsguiavirtualpichincha,代码行数:31,代码来源:page_options.php

示例10: RevSlide

}
$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();
$arrSlides = $slider->getSlides(false);
$arrSlidesWPML = $slider->getSlidesWPML(false, $slide);
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = RevSliderFunctions::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
//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;
}
//add tools.min.js
wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', array(), RevSliderGlobals::SLIDER_REVISION);
$arrLayers = $slide->getLayers();
//set Layer settings
$cssContent = $operations->getCaptionsContent();
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:slide-editor.php

示例11: RevSlide

//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevSliderOperations();
$rs_nav = new RevSliderNavigation();
$arr_navigations = $rs_nav->get_all_navigations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSlideNames = $slider->getArrSlideNames();
$arrSlides = $slider->getSlides(false);
$arrSlidesWPML = $slider->getSlidesWPML(false, $slide);
$arrSliders = $slider->getArrSlidersShort($sliderID);
$arrSlidersFull = $slider->getArrSlidersShort();
$selectSliders = RevSliderFunctions::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
//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;
}
//add tools.min.js
wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', array(), RevSliderGlobals::SLIDER_REVISION);
$arrLayers = $slide->getLayers();
//set Layer settings
$cssContent = $operations->getCaptionsContent();
开发者ID:ksan5835,项目名称:maadithottam,代码行数:31,代码来源:slide-editor.php

示例12: array

 function get_select_target_options($type)
 {
     $options = array();
     switch ($type) {
         case 'page':
             $entries = get_pages('title_li=&orderby=name&number=40');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'cat':
             $entries = get_categories('orderby=name&hide_empty=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->term_id] = $entry->name;
             }
             break;
         case 'author':
             $mk_user_query = get_users();
             if (!empty($mk_user_query)) {
                 foreach ($mk_user_query as $user) {
                     $options[$user_id] = $user->display_name;
                 }
             }
             break;
         case 'post':
             $entries = get_posts('orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'portfolio':
             $entries = get_posts('post_type=portfolio&orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'flexslider':
             $entries = get_posts('post_type=slideshow&orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'banner_builder':
             $entries = get_posts('post_type=banner_builder&orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'icarousel':
             $entries = get_posts('post_type=icarousel&orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'edge':
             $entries = get_posts('post_type=edge&orderby=title&numberposts=20&order=ASC&suppress_filters=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->ID] = $entry->post_title;
             }
             break;
         case 'portfolio_category':
             $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->slug] = $entry->name;
             }
             break;
         case 'portfolio_category_id':
             $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
             foreach ($entries as $key => $entry) {
                 $options[$entry->term_id] = $entry->name;
             }
             break;
         case 'revolution_slider':
             if (class_exists('RevSlider')) {
                 $slider = new RevSlider();
                 $arrSliders = $slider->getArrSlidersShort();
                 foreach ($arrSliders as $key => $entry) {
                     $options[$key] = $entry;
                 }
             }
             break;
         case 'layer_slider_source':
             if (is_plugin_active('LayerSlider/layerslider.php')) {
                 global $wpdb;
                 $table_name = $wpdb->prefix . "layerslider";
                 $sliders = $wpdb->get_results("SELECT * FROM {$table_name}\n                                                WHERE flag_hidden = '0' AND flag_deleted = '0'\n                                                ORDER BY date_c ASC LIMIT 100");
                 if ($sliders != null && !empty($sliders)) {
                     foreach ($sliders as $item) {
                         $options[$item->id] = $item->name;
                     }
                 }
             }
     }
     return $options;
 }
开发者ID:namleduc,项目名称:thqc,代码行数:95,代码来源:metabox-generator.php

示例13: form

    public function form($instance)
    {
        if (isset($instance['show_filter'])) {
            $show_filter = $instance['show_filter'];
        } else {
            $show_filter = TRUE;
        }
        if (isset($instance['horizontal_filter'])) {
            $horizontal_filter = $instance['horizontal_filter'];
        } else {
            $horizontal_filter = FALSE;
        }
        $slider = new RevSlider();
        $arrSliders = $slider->getArrSlidersShort();
        $field = "revolution_slider";
        $fieldID = $this->get_field_id($field);
        $fieldName = $this->get_field_name($field);
        $sliderID = UniteFunctionsRev::getVal($instance, $field);
        $select = UniteFunctionsRev::getHTMLSelect($arrSliders, $sliderID, 'name="' . $fieldName . '" id="' . $fieldID . '"', true);
        ?>

                <p>
                    <label for="<?php 
        echo $this->get_field_id('revolution_slider');
        ?>
"><?php 
        echo __('Revolution Slider', 'aviators');
        ?>
</label>
                    <?php 
        print $select;
        ?>
                </p>
		<p>
			<label for="<?php 
        echo $this->get_field_id('show_filter');
        ?>
"><?php 
        echo __('Show filter', 'aviators');
        ?>
</label>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('show_filter');
        ?>
" name="<?php 
        echo $this->get_field_name('show_filter');
        ?>
" value="1" <?php 
        checked($show_filter);
        ?>
>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('horizontal_filter');
        ?>
"><?php 
        echo __('Horizontal filter', 'aviators');
        ?>
</label>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('horizontal_filter');
        ?>
" name="<?php 
        echo $this->get_field_name('horizontal_filter');
        ?>
" value="1" <?php 
        checked($horizontal_filter);
        ?>
>
		</p>
	<?php 
    }
开发者ID:dongchpp,项目名称:BIPHP,代码行数:74,代码来源:revolution_slider.php

示例14: array

    $arrSortBy = $arrSortBy + $arrEMSortBy;
}
$sliderMainSettings->addSelect("post_sortby", $arrSortBy, __("Sort Posts By", REVSLIDER_TEXTDOMAIN), RevSlider::DEFAULT_POST_SORTBY);
//sort direction
$arrSortDir = UniteFunctionsWPRev::getArrSortDirection();
$sliderMainSettings->addRadio("posts_sort_direction", $arrSortDir, __("Sort Direction", REVSLIDER_TEXTDOMAIN), RevSlider::DEFAULT_POST_SORTDIR);
//max posts for slider
$arrParams = array("class" => "small", "unit" => "posts");
$sliderMainSettings->addTextBox("max_slider_posts", "30", __("Max Posts Per Slider", REVSLIDER_TEXTDOMAIN), $arrParams);
//exerpt limit
$arrParams = array("class" => "small", "unit" => "words");
$sliderMainSettings->addTextBox("excerpt_limit", "55", __("Limit The Excerpt To", REVSLIDER_TEXTDOMAIN), $arrParams);
//slider template
$sliderMainSettings->addhr();
$slider1 = new RevSlider();
$arrSlidersTemplates = $slider1->getArrSlidersShort(null, RevSlider::SLIDER_TYPE_TEMPLATE);
$sliderMainSettings->addSelect("slider_template_id", $arrSlidersTemplates, __("Template Slider", REVSLIDER_TEXTDOMAIN), "", array());
$sliderMainSettings->endBulkControl();
$arrParams = array("description" => __("Type here the post IDs you want to use separated by coma. ex: 23,24,25", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addTextBox("posts_list", "", __("Specific Posts List", REVSLIDER_TEXTDOMAIN), $arrParams);
$sliderMainSettings->addControl("source_type", "posts_list", UniteSettingsRev::CONTROL_TYPE_SHOW, "specific_posts");
$sliderMainSettings->addHr();
//set slider type / texts
$sliderMainSettings->addRadio("slider_type", array("fixed" => __("Fixed", REVSLIDER_TEXTDOMAIN), "responsitive" => __("Custom", REVSLIDER_TEXTDOMAIN), "fullwidth" => __("Auto Responsive", REVSLIDER_TEXTDOMAIN), "fullscreen" => __("Full Screen", REVSLIDER_TEXTDOMAIN)), __("Slider Layout", REVSLIDER_TEXTDOMAIN), "fullwidth");
$arrParams = array("class" => "medium", "description" => __("Example: #header or .header, .footer, #somecontainer | The height of fullscreen slider will be decreased with the height of these Containers to fit perfect in the screen", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addTextBox("fullscreen_offset_container", "", __("Offset Containers", REVSLIDER_TEXTDOMAIN), $arrParams);
$sliderMainSettings->addControl("slider_type", "fullscreen_offset_container", UniteSettingsRev::CONTROL_TYPE_SHOW, "fullscreen");
$arrParams = array("class" => "medium", "description" => __("Defines an Offset to the top. Can be used with px and %. Example: 40px or 10%", REVSLIDER_TEXTDOMAIN));
$sliderMainSettings->addTextBox("fullscreen_offset_size", "", __("Offset Size", REVSLIDER_TEXTDOMAIN), $arrParams);
$sliderMainSettings->addControl("slider_type", "fullscreen_offset_size", UniteSettingsRev::CONTROL_TYPE_SHOW, "fullscreen");
$arrParams = array("description" => __("", REVSLIDER_TEXTDOMAIN));
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:31,代码来源:slider_settings.php

示例15: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $operations = new RevOperations();
     $sliderID = $this->getRequest()->getParam('id');
     $storeID = $this->getRequest()->getParam('store_id', 0);
     if (empty($sliderID)) {
         UniteFunctionsRev::throwError("Slider ID not found");
     }
     $slider = new RevSlider();
     $slider->initByID($sliderID);
     $sliderParams = $slider->getParams();
     $arrSliders = $slider->getArrSlidersShort($sliderID);
     $selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
     $numSliders = count($arrSliders);
     //set iframe parameters
     $width = $sliderParams["width"];
     $height = $sliderParams["height"];
     $iframeWidth = $width + 60;
     $iframeHeight = $height + 50;
     $iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
     $arrSlides = $slider->getSlides(false, $storeID);
     $numSlides = count($arrSlides);
     $linksSliderSettings = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/' . $sliderID);
     $patternViewSlide = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/[slideid]');
     $useStaticLayers = $slider->getParam("enable_static_layers", "off");
     //treat in case of slides from gallery
     if ($slider->isSlidesFromPosts() == false) {
         $templateName = "slides_gallery";
         // store view
         $selectStoreView = Mage::app()->getLayout()->createBlock('core/html_select')->setName('select_storeview')->setId('select_storeview')->setTitle('Store View')->setValue($storeID)->setOptions(Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true))->getHtml();
         $this->assign('storeID', $storeID);
         $this->assign('selectStoreView', $selectStoreView);
         $this->setTemplate('nwdthemes/revslider/templates/slides_gallery.phtml');
     } else {
         //slides from posts
         $templateName = "slides_posts";
         $sourceType = $slider->getParam("source_type", "posts");
         $showSortBy = $sourceType == "posts" ? true : false;
         $showDelete = $sourceType == "specific_posts" ? true : false;
         //get button links
         $urlNewPost = $this->helper('adminhtml')->getUrl('adminhtml/catalog_product/new');
         $linkNewPost = UniteFunctionsRev::getHtmlLink($urlNewPost, $this->__("<i class='revicon-pencil-1'></i>New Product"), "button_new_post", "button-primary revblue", true);
         //get ordering
         $arrSortBy = $this->helper('nwdrevslider')->getArrSortBy();
         $sortBy = $slider->getParam("post_sortby", RevSlider::DEFAULT_POST_SORTBY);
         $selectSortBy = UniteFunctionsRev::getHTMLSelect($arrSortBy, $sortBy, "id='select_sortby'", true);
         $this->assign('showSortBy', $showSortBy);
         $this->assign('showDelete', $showDelete);
         $this->assign('selectSortBy', $selectSortBy);
         $this->assign('linkNewPost', $linkNewPost);
         $this->setTemplate('nwdthemes/revslider/templates/slides_posts.phtml');
     }
     $this->assign('sliderID', $sliderID);
     $this->assign('iframeStyle', $iframeStyle);
     $this->assign('patternViewSlide', $patternViewSlide);
     $this->assign('selectSliders', $selectSliders);
     $this->assign('linksSliderSettings', $linksSliderSettings);
     $this->assign('useStaticLayers', $useStaticLayers);
     $this->assign('arrSlides', $arrSlides);
     $this->assign('slider', $slider);
     $this->assign('numSlides', $numSlides);
     $this->assign('numSliders', $numSliders);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:67,代码来源:Slides.php


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