コード例 #1
0
    /**
     * put first 3 fields of the ajax form
     */
    public function putAjaxFormFields($clientAction, $galleryID = null)
    {
        ?>
				<input type="hidden" name="action" value="unitegallery_ajax_action">		
				<input type="hidden" name="client_action" value="<?php 
        echo $clientAction;
        ?>
">
				
			<?php 
        if (method_exists("UniteProviderFunctionsUG", "getNonce")) {
            ?>
				
				<input type="hidden" name="nonce" value="<?php 
            echo UniteProviderFunctionsUG::getNonce();
            ?>
">
			<?php 
        }
        if (!empty($galleryID)) {
            ?>
				<input type="hidden" name="galleryid" value="<?php 
            echo $galleryID;
            ?>
">
			<?php 
        }
    }
コード例 #2
0
            $ugMaxItems = 20;
            break;
    }
    $galleryID = GlobalsUGGallery::$galleryID;
}
global $uniteGalleryVersion;
?>

<a id="fancybox_trigger" style="display:none" href="index.php?option=com_media&view=images&tmpl=component&author=&fieldid=field_image_dialog_choose">Fancybox Trigger</a>


<?php 
$script = "\n\t\tvar g_galleryType = \"{$galleryTypeName}\";\n\t\tvar g_view = \"" . self::$view . "\";\n\t\tvar g_galleryID = \"" . $galleryID . "\";\n\t\tvar g_pluginName = \"" . GlobalsUG::PLUGIN_NAME . "\";\n\t\tvar g_urlAjaxActions = \"" . GlobalsUG::$url_ajax . "\";\n\t\tvar g_urlViewBase = \"" . GlobalsUG::$url_component_admin . "\";\n\t\tif(typeof(g_settingsObj) == 'undefined')\n\t\t\tvar g_settingsObj = {};\n\t\tvar g_ugAdmin;\n\t";
//get nonce
if (method_exists("UniteProviderFunctionsUG", "getNonce")) {
    $script .= "\n\t\tvar g_ugNonce='" . UniteProviderFunctionsUG::getNonce() . "';";
}
UniteProviderFunctionsUG::printCustomScript($script);
?>
	
						
<div id="div_debug"></div>

<div id="debug_line" style="display:none"></div>
<div id="debug_side" style="display:none"></div>

<div class='unite_error_message' id="error_message" style="display:none;"></div>

<div class='unite_success_message' id="success_message" style="display:none;"></div>

<div id="viewWrapper" class="unite-view-wrapper unite-admin">
コード例 #3
0
 /**
  * get ajax url with params for actions in admin only
  */
 public static function getUrlAjaxActions($clientAction, $params = "")
 {
     $nonce = "";
     if (method_exists("UniteProviderFunctionsUG", "getNonce")) {
         $nonce = "&nonce=" . UniteProviderFunctionsUG::getNonce();
     }
     $urlAjax = GlobalsUG::$url_ajax . "?action=unitegallery_ajax_action{$nonce}&client_action={$clientAction}";
     if (!empty($params)) {
         $urlAjax .= "&" . $params;
     }
     $urlAjax = UniteFunctionsUG::normalizeLink($urlAjax);
     return $urlAjax;
 }