/** * * put theme related scripts */ protected function putScripts($putSkins = true) { parent::putScripts(); if ($this->putJsToBody == false) { HelperGalleryUG::addScriptAbsoluteUrl($this->urlPlugin . "themes/slider/ug-theme-slider.js", "unitegallery_slider_theme"); } }
/** * * put theme related scripts */ protected function putScripts($putSkins = true) { parent::putScripts(); if ($this->putJsToBody == false) { HelperGalleryUG::addScriptAbsoluteUrl($this->urlPlugin . "themes/default/ug-theme-default.js", "unitegallery_default_theme"); } HelperGalleryUG::addStyleAbsoluteUrl($this->urlPlugin . "themes/default/ug-theme-default.css", "ug-theme-default"); }
/** * update thumb panel defaults of some gallery settings * should be inited gallery inside the framework */ public static function updateThumbPanelDefaults($data) { UniteFunctionsUG::validateNotEmpty(GlobalsUGGallery::$gallery, "The gallery shouold be inited"); //$valuesParams["theme_panel_position"] = $position; //include settings $panelPos = UniteFunctionsUG::getVal($data, "position"); require HelperGalleryUG::getFilepathSettings("gallery_settings"); $posRelatedFields = self::getPositionRelatedSettings(); $valuesParams = UniteFunctionsUG::filterArrFields($valuesParams, $posRelatedFields); $valuesParams["theme_panel_position"] = $panelPos; GlobalsUGGallery::$gallery->updateParams($valuesParams); }
/** * * put theme related scripts */ protected function putScripts($putSkins = true) { parent::putScripts(false); //don't put skins if ($this->putJsToBody == false) { HelperGalleryUG::addScriptAbsoluteUrl($this->urlPlugin . "themes/video/ug-theme-video.js", "unitegallery_video_theme"); } $skin = $this->getParam("theme_skin"); $urlSkin = $this->urlPlugin . "themes/video/skin-{$skin}.css"; //if exists modified version, take the modified $filepath_modified = GlobalsUG::$path_media_ug . "themes/video/skin-{$skin}-modified.css"; if (file_exists($filepath_modified)) { $urlSkin = $this->urlPlugin . "themes/video/skin-{$skin}-modified.css"; } HelperGalleryUG::addStyleAbsoluteUrl($urlSkin, "ug-theme-video-{$skin}"); }
/** * run client ajax actions */ function onClientAjaxActions() { $action = UniteFunctionsUG::getPostGetVariable("action"); if ($action != "unitegallery_ajax_action") { echo "nothing here"; exit; } $clientAction = UniteFunctionsUG::getPostGetVariable("client_action"); $objItems = new UniteGalleryItems(); $galleryHtmlID = UniteFunctionsUG::getPostVariable("galleryID"); $data = UniteFunctionsUG::getPostVariable("data"); if (empty($data)) { $data = array(); } $data["galleryID"] = HelperGalleryUG::getGalleryIDFromHtmlID($galleryHtmlID); try { switch ($clientAction) { case "front_get_cat_items": $html = $objItems->getHtmlFrontFromData($data); $output = array("html" => $html); HelperUG::ajaxResponseData($output); break; default: HelperUG::ajaxResponseError("wrong ajax action: <b>{$action}</b> "); break; } } catch (Exception $e) { $message = $e->getMessage(); $errorMessage = $message; if (GlobalsUG::SHOW_TRACE == true) { $trace = $e->getTraceAsString(); $errorMessage = $message . "<pre>" . $trace . "</pre>"; } HelperUG::ajaxResponseError($errorMessage); } //it's an ajax action, so exit HelperUG::ajaxResponseError("No response output on <b> {$action} </b> action. please check with the developer."); exit; }
<?php /** * @package Unite Gallery * @author UniteCMS.net / Valiano * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * */ defined('_JEXEC') or die('Restricted access'); require HelperGalleryUG::getPathViewHelper("categorytabs");
<?php defined('_JEXEC') or die('Restricted access'); HelperGalleryUG::addScript("js/video_admin.js", "video_admin"); //add codemirror scripts HelperGalleryUG::addScriptAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/codemirror.js", "codemirror_js"); HelperGalleryUG::addScriptAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/css.js", "codemirror_cssjs"); HelperGalleryUG::addStyleAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/codemirror.css", "codemirror_css");
/** * get default settings values * get them only once */ protected function getDefautSettingsValues() { require HelperGalleryUG::getFilepathSettings("gallery_settings"); return $valuesMerged; }
/** * get default settings override. * get them every time, take the position into the calculation */ protected function getDefautSettingsValues() { $panelPos = $this->getParam("theme_panel_position"); require HelperGalleryUG::getFilepathSettings("gallery_settings"); return $valuesMerged; }
<?php defined('_JEXEC') or die('Restricted access'); $galleryID = GlobalsUGGallery::$galleryID; //add codemirror scripts HelperUG::addScriptAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/codemirror.js", "codemirror_js"); HelperUG::addScriptAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/css.js", "codemirror_cssjs"); HelperUG::addScriptAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/javascript.js", "codemirror_jsjs"); HelperUG::addStyleAbsoluteUrl(GlobalsUG::$urlPlugin . "js/codemirror/codemirror.css", "codemirror_css"); //enable advanced tab if disabled $showAdvanced = GlobalsUGGallery::$gallery->getParam("show_advanced_tab"); $showAdvanced = UniteFunctionsUG::strToBool($showAdvanced); if ($showAdvanced == false) { GlobalsUGGallery::$gallery->updateParam("show_advanced_tab", "true"); } require GlobalsUG::$pathHelpersSettings . "advancedtab_main.php"; require GlobalsUG::$pathHelpersSettings . "advancedtab_params.php"; $outputMain = new UniteSettingsProductUG(); $outputParams = new UniteSettingsProductSidebarUG(); $galleryTitle = GlobalsUGGallery::$gallery->getTitle(); $headerTitle = $galleryTitle . __(" - [advanced settings]", UNITEGALLERY_TEXTDOMAIN); $arrValues = GlobalsUGGallery::$gallery->getParams(); //set setting values from the slider $settingsMain->setStoredValues($arrValues); $settingsParams->setStoredValues($arrValues); $outputMain->init($settingsMain); $outputParams->init($settingsParams); $linkExport = HelperUG::getUrlAjaxActions("export_gallery_settings", "galleryid={$galleryID}"); require HelperGalleryUG::getPathHelperTemplate("gallery_advanced");
<?php /** * @package Unite Gallery * @author UniteCMS.net / Valiano * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * */ defined('_JEXEC') or die('Restricted access'); require HelperGalleryUG::getPathViewHelper("advanced");
<?php /** * @package Unite Gallery * @author UniteCMS.net / Valiano * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * */ defined('_JEXEC') or die('Restricted access'); $pathViewSettings = HelperGalleryUG::getPathView("settings", false); if (file_exists($pathViewSettings)) { require $pathViewSettings; } else { require HelperGalleryUG::getPathViewHelper("settings_common"); }
<?php /** * @package Unite Gallery * @author UniteCMS.net / Valiano * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * */ defined('_JEXEC') or die('Restricted access'); require HelperGalleryUG::getPathHelperTemplate("header"); ?> <?php if (empty($arrGalleries)) { ?> <div> <?php _e("No Galleries Found", UNITEGALLERY_TEXTDOMAIN); ?> </div> <?php } else { ?> <table class='unite_table_items'> <thead> <tr> <th width='3%'><?php _e("ID", UNITEGALLERY_TEXTDOMAIN); ?>
defined('_JEXEC') or die('Restricted access'); require HelperGalleryUG::getPathHelperTemplate("header"); ?> <div class="settings_panel"> <div class="settings_panel_left"> <div class="settings_panel_left_inner settings_panel_box"> <?php $outputMain->draw("form_gallery_main", true); ?> <?php require HelperGalleryUG::getPathHelperTemplate("gallery_new_buttons"); ?> </div> </div> <div class="settings_panel_right"> <?php //$outputParams->draw("form_gallery_params",true); ?> </div> <div class="unite-clear"></div> </div>
" style="display:none;"> <div id="dialog_edit_item_loader" class="loader_round"> <?php _e("Loading Item Data...", UNITEGALLERY_TEXTDOMAIN); ?> </div> <div id="dialog_edit_item_content" class="dialog_edit_item_content"></div> <div id="dialog_edit_error_message" class="unite_error_message" style="display:none"></div> </div> <?php require GlobalsUG::$pathViews . "system/video_dialog.php"; ?> <a class='unite-button-secondary mleft_10' href='<?php echo HelperGalleryUG::getUrlViewGalleriesList(); ?> ' ><?php _e("Close", UNITEGALLERY_TEXTDOMAIN); ?> </a> <?php $script = "\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tvar selectedCatID = \"{$selectedCategory}\";\n\t\t\t\t\tvar galleryAdmin = new UGAdminItems();\n\t\t\t\t\tgalleryAdmin.initGalleryView(selectedCatID);\n\t\t\t\t});\n\t\t\t"; UniteProviderFunctionsUG::printCustomScript($script);
$outputMain = new UniteSettingsProductUG(); $outputParams = new UniteSettingsProductSidebarUG(); $filepathBeforeDraw = HelperGalleryUG::getPathView("settings_before_draw", false); if ($isNewGallery) { $galleryTitle = GlobalsUGGallery::$galleryTypeTitle; $headerTitle = $galleryTitle . __(" - [settings]", UNITEGALLERY_TEXTDOMAIN); if (file_exists($filepathBeforeDraw)) { require_once $filepathBeforeDraw; } $outputMain->init($settingsMain); $outputParams->init($settingsParams); require HelperGalleryUG::getPathHelperTemplate("gallery_new"); } else { $galleryTitle = GlobalsUGGallery::$gallery->getTitle(); $headerTitle = $galleryTitle . __(" - [settings]", UNITEGALLERY_TEXTDOMAIN); $galleryType = GlobalsUGGallery::$gallery->getTypeName(); $arrValues = GlobalsUGGallery::$gallery->getParamsForSettings(); //get categories select dialog $objCategories = new UniteGalleryCategories(); $arrCats = $objCategories->getCatsShort("component"); $htmlSelectCats = UniteFunctionsUG::getHTMLSelect($arrCats, "", "id='ds_select_cats'", true); //set setting values from the slider $settingsMain->setStoredValues($arrValues); $settingsParams->setStoredValues($arrValues); if (isset($filepathBeforeDraw) && file_exists($filepathBeforeDraw)) { require_once $filepathBeforeDraw; } $outputMain->init($settingsMain); $outputParams->init($settingsParams); require HelperGalleryUG::getPathHelperTemplate("gallery_edit"); }
<?php defined('_JEXEC') or die('Restricted access'); //require settings $galleryID = GlobalsUGGallery::$galleryID; //enable tabs if disabled $enableTabs = GlobalsUGGallery::$gallery->getParam("enable_category_tabs"); $enableTabs = UniteFunctionsUG::strToBool($enableTabs); if ($enableTabs == false) { GlobalsUGGallery::$gallery->updateParam("enable_category_tabs", "true"); } require GlobalsUG::$pathHelpersSettings . "categorytab_main.php"; require GlobalsUG::$pathHelpersSettings . "categorytab_params.php"; $outputMain = new UniteSettingsProductUG(); $outputParams = new UniteSettingsProductSidebarUG(); $galleryTitle = GlobalsUGGallery::$gallery->getTitle(); $headerTitle = $galleryTitle . __(" - [settings]", UNITEGALLERY_TEXTDOMAIN); $arrValues = GlobalsUGGallery::$gallery->getParams(); //set setting values from the slider $settingsMain->setStoredValues($arrValues); $settingsParams->setStoredValues($arrValues); $outputMain->init($settingsMain); $outputParams->init($settingsParams); require HelperGalleryUG::getPathHelperTemplate("gallery_categorytabs");
<?php defined('_JEXEC') or die('Restricted access'); //set panel position from get if (empty($galleryID)) { $getPanelPos = UniteFunctionsUG::getGetVar("thumbpos", "bottom"); $settingsParams->updateSettingValue("theme_panel_position", $getPanelPos); } HelperGalleryUG::addJsText("changedefauts_confirm", __("Do you sure to set the theme panel position defaults?", UNITEGALLERY_TEXTDOMAIN)); HelperGalleryUG::addJsText("changedefauts_success", __("The default settings has been succssfully changed.", UNITEGALLERY_TEXTDOMAIN)); HelperGalleryUG::addJsText("changedefauts_template", __("Set [pos] Defaults.", UNITEGALLERY_TEXTDOMAIN)); $panelPosition = $settingsParams->getSettingValue("theme_panel_position", "bottom"); $posName = ucfirst($panelPosition); $settingsParams->updateSettingValue("theme_button_set_defaults", "Set {$posName} Defaults");
<?php defined('_JEXEC') or die('Restricted access'); HelperGalleryUG::addScript("js/compact_admin.js", "compact_admin");
?> > <a href="<?php echo HelperGalleryUG::getUrlViewItems(); ?> "><?php _e("Items", UNITEGALLERY_TEXTDOMAIN); ?> </a> </li> <li <?php echo $classPreview; ?> > <a href="<?php echo HelperGalleryUG::getUrlViewPreview(); ?> "><?php _e("Preview", UNITEGALLERY_TEXTDOMAIN); ?> </a> </li> </ul> <div class='settings_limit_message'> This gallery has limitations: <b> <?php echo $ugMaxItems; ?> items limit </b> in the preview and output. <br> For removing the limitations, upgrade to <b>"Unite Gallery Full Version"</b>.
<?php defined('_JEXEC') or die('Restricted access'); /** * gets $action, $data , and working framework, so globals and helper works * response from helperUG */ switch ($action) { case "update_thumbpanel_defaults": UGCompactThemeHelper::updateThumbPanelDefaults($data); $urlRedirect = HelperGalleryUG::getUrlViewCurrentGallery(); HelperUG::ajaxResponseSuccessRedirect("Position settings updated successfully", $urlRedirect); break; default: HelperUG::ajaxResponseError("wrong ajax action (Compact Theme): <b>{$action}</b> "); break; }
<?php defined('_JEXEC') or die('Restricted access'); HelperGalleryUG::addScript("js/grid_admin.js", "grid_admin");