本文整理汇总了PHP中RevSlider::copyMoveSlideFromData方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlider::copyMoveSlideFromData方法的具体用法?PHP RevSlider::copyMoveSlideFromData怎么用?PHP RevSlider::copyMoveSlideFromData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSlider
的用法示例。
在下文中一共展示了RevSlider::copyMoveSlideFromData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAjaxAction
//.........这里部分代码省略.........
case "add_slide_fromslideview":
$slideID = $slider->createSlideFromData($data, true);
$urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
$responseText = __("Slide Created, redirecting...", REVSLIDER_TEXTDOMAIN);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "update_slide":
require self::getSettingsFilePath("slide_settings");
$slide->updateSlideFromData($data, $slideSettings);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("Slide updated", REVSLIDER_TEXTDOMAIN));
break;
case "update_static_slide":
$slide->updateStaticSlideFromData($data);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("Static Layers updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slide":
$isPost = $slide->deleteSlideFromData($data);
if ($isPost) {
$message = __("Post Deleted Successfully", REVSLIDER_TEXTDOMAIN);
} else {
$message = __("Slide Deleted Successfully", REVSLIDER_TEXTDOMAIN);
}
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect($message, 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_static_css":
sdsconfig::getgeneratecssfile();
$contentCSS = $operations->getStaticCss();
self::ajaxResponseData($contentCSS);
break;
case "get_dynamic_css":
sdsconfig::getgeneratecssfile();
$contentCSS = $operations->getDynamicCss();
self::ajaxResponseData($contentCSS);
break;
case "insert_captions_css":
$arrCaptions = $operations->insertCaptionsContentData($data);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "delete_captions_css":
$arrCaptions = $operations->deleteCaptionsContentData($data);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("Style deleted succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_static_css":
$staticCss = $operations->updateStaticCss($data);
sdsconfig::getgeneratecssfile();
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("css" => $staticCss));
break;
示例2: onAjaxAction
//.........这里部分代码省略.........
$slide->updateSlideFromData($data);
self::ajaxResponseSuccess(__("Slide updated", 'revslider'));
break;
case "update_static_slide":
$slide->updateStaticSlideFromData($data);
self::ajaxResponseSuccess(__("Static Global Layers updated", 'revslider'));
break;
case "delete_slide":
case "delete_slide_stay":
$isPost = $slide->deleteSlideFromData($data);
if ($isPost) {
$message = __("Post deleted", 'revslider');
} else {
$message = __("Slide deleted", 'revslider');
}
$sliderID = RevSliderFunctions::getVal($data, "sliderID");
if ($action == 'delete_slide_stay') {
self::ajaxResponseSuccess($message);
} else {
self::ajaxResponseSuccessRedirect($message, self::getViewUrl(self::VIEW_SLIDE, "id=new&slider={$sliderID}"));
}
break;
case "duplicate_slide":
case "duplicate_slide_stay":
$return = $slider->duplicateSlideFromData($data);
if ($action == 'duplicate_slide_stay') {
self::ajaxResponseSuccess(__("Slide duplicated", 'revslider'), array('id' => $return[1]));
} else {
self::ajaxResponseSuccessRedirect(__("Slide duplicated", 'revslider'), self::getViewUrl(self::VIEW_SLIDE, "id=new&slider=" . $return[0]));
}
break;
case "copy_move_slide":
case "copy_move_slide_stay":
$sliderID = $slider->copyMoveSlideFromData($data);
if ($action == 'copy_move_slide_stay') {
self::ajaxResponseSuccess(__("Success!", 'revslider'));
} else {
self::ajaxResponseSuccessRedirect(__("Success! Refreshing page...", 'revslider'), self::getViewUrl(self::VIEW_SLIDE, "id=new&slider={$sliderID}"));
}
break;
case "add_slide_to_template":
$template = new RevSliderTemplate();
if (!isset($data['slideID']) || intval($data['slideID']) == 0) {
RevSliderFunctions::throwError(__('No valid Slide ID given', 'revslider'));
exit;
}
if (!isset($data['title']) || strlen(trim($data['title'])) < 3) {
RevSliderFunctions::throwError(__('No valid title given', 'revslider'));
exit;
}
if (!isset($data['settings']) || !isset($data['settings']['width']) || !isset($data['settings']['height'])) {
RevSliderFunctions::throwError(__('No valid title given', 'revslider'));
exit;
}
$return = $template->copySlideToTemplates($data['slideID'], $data['title'], $data['settings']);
if ($return == false) {
RevSliderFunctions::throwError(__('Could not save Slide as Template', 'revslider'));
exit;
}
//get HTML for template section
ob_start();
$rs_disable_template_script = true;
//disable the script output of template selector file
include RS_PLUGIN_PATH . 'admin/views/templates/template-selector.php';
$html = ob_get_contents();
ob_clean();
示例3: onAjaxAction
//.........这里部分代码省略.........
$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":
require self::getSettingsFilePath("slide_settings");
$slide->updateSlideFromData($data, $slideSettings);
self::ajaxResponseSuccess(__("Slide updated", REVSLIDER_TEXTDOMAIN));
break;
case "update_static_slide":
$slide->updateStaticSlideFromData($data);
self::ajaxResponseSuccess(__("Static Layers updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slide":
$isPost = $slide->deleteSlideFromData($data);
if ($isPost) {
$message = __("Post Deleted Successfully", REVSLIDER_TEXTDOMAIN);
} else {
$message = __("Slide Deleted Successfully", REVSLIDER_TEXTDOMAIN);
}
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect($message, 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_static_css":
$contentCSS = $operations->getStaticCss();
self::ajaxResponseData($contentCSS);
break;
case "get_dynamic_css":
$contentCSS = $operations->getDynamicCss();
self::ajaxResponseData($contentCSS);
break;
case "insert_captions_css":
$arrCaptions = $operations->insertCaptionsContentData($data);
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "delete_captions_css":
$arrCaptions = $operations->deleteCaptionsContentData($data);
self::ajaxResponseSuccess(__("Style deleted succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_static_css":
$staticCss = $operations->updateStaticCss($data);
self::ajaxResponseSuccess(__("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("css" => $staticCss));
break;
case "insert_custom_anim":
$arrAnims = $operations->insertCustomAnim($data);
//$arrCaptions =
self::ajaxResponseSuccess(__("Animation saved succesfully!", REVSLIDER_TEXTDOMAIN), $arrAnims);
//,array("arrCaptions"=>$arrCaptions)
break;
示例4: onAjaxAction
//.........这里部分代码省略.........
$slideID = $slider->createSlideFromData($data, true);
$urlRedirect = self::getViewUrl(self::VIEW_SLIDE, "id={$slideID}");
$responseText = __ug("Slide Created, redirecting...", REVSLIDER_TEXTDOMAIN);
self::ajaxResponseSuccessRedirect($responseText, $urlRedirect);
break;
case "update_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_EDIT_SLIDE);
require self::getSettingsFilePath("slide_settings");
$slide->updateSlideFromData($data, $slideSettings);
self::ajaxResponseSuccess(__ug("Slide updated", REVSLIDER_TEXTDOMAIN));
break;
case "delete_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$isPost = $slide->deleteSlideFromData($data);
if ($isPost) {
$message = __ug("Post Deleted Successfully", REVSLIDER_TEXTDOMAIN);
} else {
$message = __ug("Slide Deleted Successfully", REVSLIDER_TEXTDOMAIN);
}
$sliderID = UniteFunctionsRev::getVal($data, "sliderID");
self::ajaxResponseSuccessRedirect($message, self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "update_static_slide":
$slide->updateStaticSlideFromData($data);
self::ajaxResponseSuccess(__ug("Static Global Layers updated", REVSLIDER_TEXTDOMAIN));
break;
case "duplicate_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$sliderID = $slider->duplicateSlideFromData($data);
self::ajaxResponseSuccessRedirect(__ug("Slide Duplicated Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "copy_move_slide":
RevOperations::validatePermission(GlobalsRevSlider::PERMISSION_SLIDE_OPERATIONS);
$sliderID = $slider->copyMoveSlideFromData($data);
self::ajaxResponseSuccessRedirect(__ug("The operation successfully, refreshing page...", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "get_static_css":
$contentCSS = $operations->getStaticCss();
self::ajaxResponseData($contentCSS);
break;
case "get_dynamic_css":
$contentCSS = $operations->getDynamicCss();
self::ajaxResponseData($contentCSS);
break;
case "insert_captions_css":
$arrCaptions = $operations->insertCaptionsContentData($data);
self::ajaxResponseSuccess(__ug("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_captions_css":
$arrCaptions = $operations->updateCaptionsContentData($data);
self::ajaxResponseSuccess(__ug("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "delete_captions_css":
$arrCaptions = $operations->deleteCaptionsContentData($data);
self::ajaxResponseSuccess(__ug("Style deleted succesfully!", REVSLIDER_TEXTDOMAIN), array("arrCaptions" => $arrCaptions));
break;
case "update_static_css":
$staticCss = $operations->updateStaticCss($data);
self::ajaxResponseSuccess(__ug("CSS saved succesfully!", REVSLIDER_TEXTDOMAIN), array("css" => $staticCss));
break;
case "insert_custom_anim":
$arrAnims = $operations->insertCustomAnim($data);
//$arrCaptions =
self::ajaxResponseSuccess(__ug("Animation saved succesfully!", REVSLIDER_TEXTDOMAIN), $arrAnims);
//,array("arrCaptions"=>$arrCaptions)
break;
示例5: 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;
//.........这里部分代码省略.........