本文整理汇总了PHP中RevOperations::getCaptionsContent方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::getCaptionsContent方法的具体用法?PHP RevOperations::getCaptionsContent怎么用?PHP RevOperations::getCaptionsContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevOperations
的用法示例。
在下文中一共展示了RevOperations::getCaptionsContent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteCaptionsContentData
/**
*
* delete captions css file content
* @return new captions html select
*/
public function deleteCaptionsContentData($handle)
{
$db = new UniteDBRev();
$db->delete(GlobalsRevSlider::$table_css, "handle='.tp-caption." . $handle . "'");
//$this->updateDynamicCaptions();
//output captions array
$operations = new RevOperations();
$cssContent = $operations->getCaptionsContent();
$arrCaptions = $operations->getArrCaptionClasses($cssContent);
return $arrCaptions;
}
示例2: onAjaxAction
/**
*
* onAjax action handler
*/
public static function onAjaxAction()
{
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevOperations();
$action = self::getPostGetVar("client_action");
$data = self::getPostGetVar("data");
try {
switch ($action) {
case "export_slider":
$sliderID = self::getGetVar("sliderid");
$slider->initByID($sliderID);
$slider->exportSlider();
break;
case "import_slider":
self::importSliderHandle();
break;
case "create_slider":
$newSliderID = $slider->createSliderFromOptions($data);
self::ajaxResponseSuccessRedirect("The slider successfully created", self::getViewUrl("sliders"));
break;
case "update_slider":
$slider->updateSliderFromOptions($data);
self::ajaxResponseSuccess("Slider updated");
break;
case "delete_slider":
$slider->deleteSliderFromData($data);
self::ajaxResponseSuccessRedirect("The slider deleted", self::getViewUrl(self::VIEW_SLIDERS));
break;
case "duplicate_slider":
$slider->duplicateSliderFromData($data);
self::ajaxResponseSuccessRedirect("The duplicate successfully, refreshing page...", self::getViewUrl(self::VIEW_SLIDERS));
break;
case "add_slide":
$slider->createSlideFromData($data);
$sliderID = $data["sliderid"];
self::ajaxResponseSuccessRedirect("Slide Created", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "update_slide":
$slide->updateSlideFromData($data);
self::ajaxResponseSuccess("Slide updated");
break;
case "delete_slide":
$slide->deleteSlideFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect("Slide Deleted Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "duplicate_slide":
$sliderID = $slider->duplicateSlideFromData($data);
self::ajaxResponseSuccessRedirect("Slide Duplicated Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "get_captions_css":
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess("CSS file saved succesfully!", array("arrCaptions" => $arrCaptions));
break;
case "restore_captions_css":
$operations->restoreCaptionsCss();
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_slides_order":
$slider->updateSlidesOrderFromData($data);
self::ajaxResponseSuccess("Order updated successfully");
break;
case "change_slide_image":
$slide->updateSlideImageFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "slider_id");
self::ajaxResponseSuccessRedirect("Slide Changed Successfully", self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "preview_slide":
$operations->putSlidePreviewByData($data);
break;
case "preview_slider":
$sliderID = UniteFunctionsRev::getPostVariable("sliderid");
$operations->previewOutput($sliderID);
break;
default:
self::ajaxResponseError("wrong ajax action: {$action} ");
break;
}
} catch (Exception $e) {
$message = $e->getMessage();
self::ajaxResponseError($message);
}
//it's an ajax action, so exit
self::ajaxResponseError("No response output on <b> {$action} </b> action. please check with the developer.");
exit;
}
示例3: onAjaxAction
/**
*
* onAjax action handler
*/
public static function onAjaxAction()
{
$slider = new RevSlider();
$slide = new RevSlide();
$operations = new RevOperations();
$action = self::getPostGetVar("client_action");
$data = self::getPostGetVar("data");
try {
switch ($action) {
case "export_slider":
$sliderID = self::getGetVar("sliderid");
$slider->initByID($sliderID);
$slider->exportSlider();
break;
case "import_slider":
self::importSliderHandle();
break;
case "import_slider_slidersview":
$viewBack = self::getViewUrl(self::VIEW_SLIDERS);
self::importSliderHandle($viewBack);
break;
case "create_slider":
$newSliderID = $slider->createSliderFromOptions($data);
self::ajaxResponseSuccessRedirect(__("The slider successfully created", REVSLIDER_TEXTDOMAIN), self::getViewUrl("sliders"));
break;
case "update_slider":
$slider->updateSliderFromOptions($data);
self::ajaxResponseSuccess(__("Slider updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slider":
$slider->deleteSliderFromData($data);
self::ajaxResponseSuccessRedirect(__("The slider deleted", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
break;
case "duplicate_slider":
$slider->duplicateSliderFromData($data);
self::ajaxResponseSuccessRedirect(__("The duplicate successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
break;
case "add_slide":
$numSlides = $slider->createSlideFromData($data);
$sliderID = $data["sliderid"];
if ($numSlides == 1) {
$responseText = __("Slide Created", REVSLIDER_TEXTDOMAIN);
} else {
$responseText = $numSlides . " " . __("Slides Created", REVSLIDER_TEXTDOMAIN);
}
$urlRedirect = self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}");
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "add_slide_fromslideview":
$slideID = $slider->createSlideFromData($data, true);
$urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
$responseText = __("Slide Created, redirecting...", REVSLIDER_TEXTDOMAIN);
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "update_slide":
$slide->updateSlideFromData($data);
self::ajaxResponseSuccess(__("Slide updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slide":
$slide->deleteSlideFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect(__("Slide Deleted Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "duplicate_slide":
$sliderID = $slider->duplicateSlideFromData($data);
self::ajaxResponseSuccessRedirect(__("Slide Duplicated Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "copy_move_slide":
$sliderID = $slider->copyMoveSlideFromData($data);
self::ajaxResponseSuccessRedirect(__("The operation successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "get_captions_css":
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess(__("CSS file saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "restore_captions_css":
$operations->restoreCaptionsCss();
$contentCSS = $operations->getCaptionsContent();
self::ajaxResponseData($contentCSS);
break;
case "update_slides_order":
$slider->updateSlidesOrderFromData($data);
self::ajaxResponseSuccess(__("Order updated successfully", REVSLIDER_TEXTDOMAIN));
break;
case "change_slide_image":
$slide->updateSlideImageFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "slider_id");
self::ajaxResponseSuccessRedirect(__("Slide Changed Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "preview_slide":
$operations->putSlidePreviewByData($data);
break;
//.........这里部分代码省略.........
示例4: RevOperations
<?php
$operations = new RevOperations();
//set Layer settings
$contentCSS = $operations->getCaptionsContent();
$arrAnimations = $operations->getArrAnimations();
$arrEndAnimations = $operations->getArrEndAnimations();
$htmlButtonDown = '<div id="layer_captions_down" style="width:30px; text-align:center;padding:0px;" class="revgray button-primary"><i class="eg-icon-down-dir"></i></div>';
$buttonEditStyles = UniteFunctionsRev::getHtmlLink("javascript:void(0)", "<i class=\"revicon-magic\"></i>Edit Style", "button_edit_css", "button-primary revblue");
$buttonEditStylesGlobal = UniteFunctionsRev::getHtmlLink("javascript:void(0)", "<i class=\"revicon-palette\"></i>Edit Global Style", "button_edit_css_global", "button-primary revblue");
$arrSplit = $operations->getArrSplit();
$arrEasing = $operations->getArrEasing();
$arrEndEasing = $operations->getArrEndEasing();
$captionsAddonHtml = $htmlButtonDown . $buttonEditStyles . $buttonEditStylesGlobal;
//set Layer settings
$layerSettings = new UniteSettingsAdvancedRev();
$layerSettings->addSection(ControllerModulerevslideropencart::$lang_var['Layer_Params'], ControllerModulerevslideropencart::$lang_var['layer_params']);
$layerSettings->addSap(ControllerModulerevslideropencart::$lang_var['Layer_Params'], ControllerModulerevslideropencart::$lang_var['layer_params']);
$layerSettings->addTextBox("layer_caption", ControllerModulerevslideropencart::$lang_var['caption_green'], ControllerModulerevslideropencart::$lang_var['Style'], array(UniteSettingsRev::PARAM_ADDTEXT => $captionsAddonHtml, "class" => "textbox-caption"));
$addHtmlTextarea = '';
if ($sliderTemplate == "true") {
$addHtmlTextarea .= UniteFunctionsRev::getHtmlLink("javascript:void(0)", "Insert Meta", "linkInsertTemplate", "disabled revblue button-primary");
}
$addHtmlTextarea .= UniteFunctionsRev::getHtmlLink("javascript:void(0)", "Insert Button", "linkInsertButton", "disabled revblue button-primary");
$layerSettings->addTextArea("layer_text", "", ControllerModulerevslideropencart::$lang_var['Text_Html'], array("class" => "area-layer-params", UniteSettingsRev::PARAM_ADDTEXT_BEFORE_ELEMENT => $addHtmlTextarea));
$layerSettings->addTextBox("layer_image_link", "", ControllerModulerevslideropencart::$lang_var['Image_Link'], array("class" => "text-sidebar-link", "hidden" => true));
$layerSettings->addSelect("layer_link_open_in", array("same" => ControllerModulerevslideropencart::$lang_var['Same_Window'], "new" => ControllerModulerevslideropencart::$lang_var['New_Window']), ControllerModulerevslideropencart::$lang_var['Link_Open'], "same", array("hidden" => true));
$layerSettings->addSelect("layer_animation", $arrAnimations, ControllerModulerevslideropencart::$lang_var['Start_Animation'], "fade");
$layerSettings->addSelect("layer_easing", $arrEasing, ControllerModulerevslideropencart::$lang_var['Start_Easing'], "Power3.easeInOut");
$params = array("unit" => ControllerModulerevslideropencart::$lang_var['ms']);
$paramssplit = array("unit" => ControllerModulerevslideropencart::$lang_var['ms_keep_low']);
示例5: updateCaptionsContentData
/**
*
* update captions css file content
* @return new captions html select
*/
public function updateCaptionsContentData($content)
{
if (isset($content['handle'])) {
$handle = $content['handle'];
$arrUpdate = array();
$arrUpdate["params"] = stripslashes(json_encode(str_replace("'", '"', $content['params'])));
$arrUpdate["hover"] = stripslashes(json_encode(str_replace("'", '"', @$content['hover'])));
$arrUpdate["settings"] = stripslashes(json_encode(str_replace("'", '"', @$content['settings'])));
$_cssItem = Mage::getModel('nwdrevslider/css')->getCollection()->addFieldToFilter('handle', '.tp-caption.' . $handle)->setPageSize(1)->getFirstItem();
$_cssItem->addData($arrUpdate)->save();
}
//output captions array
$operations = new RevOperations();
$cssContent = $operations->getCaptionsContent();
$arrCaptions = $operations->getArrCaptionClasses($cssContent);
return $arrCaptions;
}