예제 #1
0
$arrAnimations = $operations->getArrAnimations();
$arrEndAnimations = $operations->getArrEndAnimations();
$htmlButtonDown = '<div id="layer_captions_down" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-arrowthick-1-s"></span></div>';
$buttonEditStyles = UniteFunctionsBanner::getHtmlLink("javascript:void(0)", "<i class='icon-magic'></i>Edit CSS File", "button_edit_css", "button-primary btn-blue");
$arrEasing = $operations->getArrEasing();
$arrEndEasing = $operations->getArrEndEasing();
$captionsAddonHtml = $htmlButtonDown . $buttonEditStyles;
//Set Layer settings
$layerSettings = new UniteSettingsAdvancedBanner();
$layerSettings->addSection(__("Layer Params", BANNERROTATOR_TEXTDOMAIN), __("layer_params", BANNERROTATOR_TEXTDOMAIN));
$layerSettings->addSap(__("Layer Params", BANNERROTATOR_TEXTDOMAIN), __("layer_params"));
$layerSettings->addTextBox(__("layer_caption"), __("caption_green"), __("Style", BANNERROTATOR_TEXTDOMAIN), array(UniteSettingsBanner::PARAM_ADDTEXT => $captionsAddonHtml, "class" => "textbox-caption"));
$addHtmlTextarea = UniteFunctionsBanner::getHtmlLink("javascript:void(0)", "insert button", "linkInsertButton", "disabled");
$layerSettings->addTextArea("layer_text", "", __("Text / Html", BANNERROTATOR_TEXTDOMAIN), array("class" => "area-layer-params", UniteSettingsBanner::PARAM_ADDTEXT_BEFORE_ELEMENT => $addHtmlTextarea));
$layerSettings->addTextBox("layer_image_link", "", __("Image Link", BANNERROTATOR_TEXTDOMAIN), array("class" => "text-sidebar-link", "hidden" => true));
$layerSettings->addSelect("layer_link_open_in", array("same" => __("Same Window", BANNERROTATOR_TEXTDOMAIN), "new" => __("New Window", BANNERROTATOR_TEXTDOMAIN)), __("Link Open In", BANNERROTATOR_TEXTDOMAIN), "same", array("hidden" => true));
$layerSettings->addSelect("layer_animation", $arrAnimations, __("Animation", BANNERROTATOR_TEXTDOMAIN), "fade");
$layerSettings->addSelect("layer_easing", $arrEasing, __("Easing", BANNERROTATOR_TEXTDOMAIN), "easeOutExpo");
$params = array("unit" => __("ms", BANNERROTATOR_TEXTDOMAIN));
$layerSettings->addTextBox("layer_speed", "", "Speed", $params);
$layerSettings->addCheckbox("layer_hidden", false, __("Hide Under Width", BANNERROTATOR_TEXTDOMAIN));
//Put left top
$textOffsetX = __("OffsetX", BANNERROTATOR_TEXTDOMAIN);
$textX = __("X", BANNERROTATOR_TEXTDOMAIN);
$params = array("attrib_text" => "data-textoffset='{$textOffsetX}' data-textnormal='{$textX}'");
$layerSettings->addTextBox("layer_left", "", __("X", BANNERROTATOR_TEXTDOMAIN), $params);
$textOffsetY = __("OffsetY", BANNERROTATOR_TEXTDOMAIN);
$textY = __("Y", BANNERROTATOR_TEXTDOMAIN);
$params = array("attrib_text" => "data-textoffset='{$textOffsetY}' data-textnormal='{$textY}'");
$layerSettings->addTextBox("layer_top", "", __("Y", BANNERROTATOR_TEXTDOMAIN), $params);
$layerSettings->addTextBox("layer_align_hor", "left", "Hor Align", array("hidden" => true));
예제 #2
0
<?php

//Set Slide settings
$arrTransitions = $operations->getArrTransition();
$arrSlideNames = $slider->getArrSlideNames();
$slideSettings = new UniteSettingsAdvancedBanner();
//Title
$params = array("description" => __("The title of the slide, will be shown in the slides list.", BANNERROTATOR_TEXTDOMAIN), "class" => "medium-text");
$slideSettings->addTextBox("title", __("Slide", BANNERROTATOR_TEXTDOMAIN), __("Slide Title", BANNERROTATOR_TEXTDOMAIN), $params);
//State
$params = array("description" => __("The state of the slide. The unpublished slide will be excluded from the slider.", BANNERROTATOR_TEXTDOMAIN));
$slideSettings->addSelect("state", array("published" => __("Published", BANNERROTATOR_TEXTDOMAIN), "unpublished" => __("Unpublished", BANNERROTATOR_TEXTDOMAIN)), __("State", BANNERROTATOR_TEXTDOMAIN), "published", $params);
//Visible from
$params = array("description" => __("If set, slide will be visible after the date is reached", BANNERROTATOR_TEXTDOMAIN));
$slideSettings->addDatePicker("date_from", "", __("Visible from", BANNERROTATOR_TEXTDOMAIN), $params);
//Visible until
$params = array("description" => __("If set, slide will be visible till the date is reached", BANNERROTATOR_TEXTDOMAIN));
$slideSettings->addDatePicker("date_to", "", __("Visible until", BANNERROTATOR_TEXTDOMAIN), $params);
$slideSettings->addHr("");
//WPML
$isWpmlExists = UniteWpmlBanner::isWpmlExists();
$useWpml = $slider->getParam("useWpml", "false");
if ($isWpmlExists && $useWpml == "true") {
    $arrLangs = UniteWpmlBanner::getArrLanguages();
    $params = array("description" => __("The language of the slide (uses WPML plugin).", BANNERROTATOR_TEXTDOMAIN));
    $slideSettings->addSelect("lang", $arrLangs, __("Language", BANNERROTATOR_TEXTDOMAIN), "all", $params);
}
//Transition
$params = array("description" => "The appearance transition of this slide.");
$slideSettings->addSelect("slide_transition", $arrTransitions, "Transition", "random", $params);
//Delay