Changeset 8057
- Timestamp:
- Dec 9, 2010, 3:10:07 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7964 r8057 40 40 load_language('lang', AUTOSIZE_PATH); 41 41 $my_path = dirname(__FILE__).'/'; 42 43 if (isset( $page['body_id']) ) { 44 if ( $page['body_id']=='thePicturePage' ) { 42 43 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage' ) { 45 44 if ( isset($picture['current'])){ 46 45 $autosize_parametres = cl_autosize_Get_Options(); 47 46 include (AUTOSIZE_PATH."include/affiche.php"); 48 $debug = isset($conf['debug']) ? $conf['debug'] : false ;49 $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ;50 47 51 if($autosize_parametres->check_icon_v == 'on'){ 52 53 $template->assign('cl_autosize_button', 54 array( 55 'cl_autosize_info' => 'cl_autosize_info' , 56 'cl_autosize_info_2' => 'cl_autosize_info_2' , 57 'URL' => $_SERVER['REQUEST_URI'] , 58 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png', 59 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png' 60 ) 61 62 ); 63 64 $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl')); 65 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); 48 49 if($autosize_parametres->check_icon_v == 'on'){ 50 $template->assign('cl_autosize_button', 51 array( 'cl_autosize_info' => 'cl_autosize_info' , 52 'cl_autosize_info_2' => 'cl_autosize_info_2' , 53 'URL' => $_SERVER['REQUEST_URI'] , 54 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png', 55 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png' 56 ) 57 58 ); 59 60 $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl')); 61 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); 66 62 } 67 68 69 $template->set_filenames( 63 $template->set_filenames( 70 64 array('autosize_content'=> $my_path.'template/autosize.tpl') 71 65 ); 72 $template->assign( 73 array('DEBUG' => $debug , 74 'cl_visible' => $cl_visible 75 ) 76 ); 77 66 78 67 return $template->parse( 'autosize_content', false); 79 } 80 81 } 68 69 } 82 70 } 83 71 } //public function cl_autosize_affiche … … 133 121 { 134 122 global $template,$user,$conf,$picture ,$page,$cl_plugin; 135 //userDefManage ?? 123 136 124 $my_path = basename(dirname(__FILE__)).'/' ; 137 125 $my_path = dirname(__FILE__).'/'; 138 $ debug = isset($conf['debug']) ? $conf['debug'] : false;126 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 139 127 140 128 $ThePicture = $template->get_template_vars('current'); 141 129 $tpl_name = $user['theme'] ; 142 if ( !empty($content) ) { return $content; } 143 if ($ThePicture['is_picture'] <> 1 ) { return $content; ; } 130 144 131 $autosizejs ='<!--- cl_autosize_script_3 -->'; 145 132 $autosizejs = $autosizejs.'<script type="text/javascript" id="jquery" charset="utf-8" src="'; 146 133 $autocss = $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 147 $template->append('head_elements',$autocss);134 // $template->append('head_elements',$autocss); 148 135 149 136 $autocss="<script type='text/javascript'> 150 jQuery('#theImage').css({opacity:'0.0'}); 137 /* cl_autosize_script_3 */ 138 var DEBUG=\"".$DEBUG."\" ; 139 if (fade_in !=0) jQuery('#theImage').css({opacity:'0.0'}); 151 140 </script>"; 152 141 153 142 $template->append('footer_elements',"\n".$autocss); 143 144 if ( !empty($content) ) { return $content; } 145 if ($ThePicture['is_picture'] <> 1 ) { 146 return $content; ; 147 } 148 149 154 150 return $content ; 155 151 … … 162 158 $my_path = basename(dirname(__FILE__)).'/' ; 163 159 $my_path = dirname(__FILE__).'/'; 164 $ debug = isset($conf['debug']) ? $conf['debug'] : false;165 160 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 161 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 166 162 $theme=$user['theme']; 167 163 $template->assign( … … 169 165 'cl_version' => $cl_plugin['version'] , 170 166 'name' => $cl_plugin['name'] , 171 'ma_page' => $ page['body_id'],167 'ma_page' => $ma_page, 172 168 173 169 'theme' => $theme , 174 'DEBUG' => $ debug,170 'DEBUG' => $DEBUG , 175 171 'AUTOSIZE_PATH' => AUTOSIZE_PATH 176 172 ) … … 178 174 179 175 $autoscript="<script type='text/javascript'> 176 /* cl_autosize_script_2 */ 177 var DEBUG=\"".$DEBUG."\" ; 180 178 if (typeof (save_framework) == 'function') 181 save_framework('".$ page['body_id']."');179 save_framework('".$ma_page."'); 182 180 </script>"; 183 181 $template->append('footer_elements',$autoscript); … … 192 190 { 193 191 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 194 195 $my_path = basename(dirname(__FILE__)).'/' ; 192 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 193 196 194 $my_path = dirname(__FILE__).'/'; 197 195 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 198 $ debug = isset($conf['debug']) ? $conf['debug'] : false;196 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 199 197 $autosize_parametres = cl_autosize_Get_Options() ; 200 198 $theme=$user['theme']; 201 199 $url = get_root_url(); 200 202 201 $template->assign( 203 array( 202 array( 204 203 'autosize_parametres' => $autosize_parametres , 205 204 'cl_plugins' => $cl_plugin , 206 205 'cl_version' => $cl_plugin['version'] , 207 206 'name' => $cl_plugin['name'] , 208 207 208 'MY_ROOT' => get_root_url(), 209 209 'theme' => $theme , 210 'DEBUG' => $ debug,210 'DEBUG' => $DEBUG , 211 211 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 212 212 ); 213 214 if( $page['body_id'] == 'theAdminPage' ) return ; 213 215 214 return $template->parse( 'autosize_init', false); 216 215 }// function cl_autosize_script -
extensions/Autosize/include/affiche.php
r7962 r8057 9 9 $cl_version=isset($cl_version)?$cl_version:""; 10 10 $cl_plugin=isset($cl_plugin)?$cl_plugin:""; 11 $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ; 12 $DEBUG=isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "false" ; 13 $DEBUG= isset($conf['cl_debug']) ? $conf['cl_debug'] : $DEBUG ; 14 11 15 12 16 $theme=$user['theme']; 13 17 $user_status = $user['status'] ; 14 18 $template->assign( array( 19 ) 20 ); 15 21 $template->assign( 16 22 array( 23 'DEBUG' => $DEBUG , 24 'cl_visible' => $cl_visible, 17 25 'cl_version' => $cl_version, 18 26 'cl_plugin' => $cl_plugin, -
extensions/Autosize/js/Affiche_script.js
r8007 r8057 1311 1311 1312 1312 1313 1314 $(function () { 1315 1313 $(function () { 1316 1314 jQuery('#pamoorama').live('ON', function (e) { 1317 1315 jQuery(jQuery('.debug').get(1)).trigger('ON'); … … 1356 1354 1357 1355 // Add 10 testing debugs to start with 1358 1356 jQuery(window).load(function () { 1359 1357 if (DEBUG == "true") { 1360 1358 for (var i = 0; i < 10; i++) { … … 1364 1362 1365 1363 } 1366 //}); //on load1364 }); //on load 1367 1365 }); -
extensions/Autosize/js/conflit.js
r7962 r8057 1 //==== autosize remplace $(... avec jQuery( ==== 2 /* 3 *[gmaps=id:1;width:800;height:640;] 4 * Luciano rv_gmaps 5 * pb : Gmaps llgbo pamooramics rv_map 6 */ 7 var d1 = 0; 8 var init_tb = 0; 9 var dom = {}; 10 11 if (typeof jQuery == 'undefined') { 12 alert(" jQuery n'est pas chargé"); 13 } else { 14 // jQuery est chargé 15 } 16 17 try{ 18 if (DEBUG == "true") { 19 20 } 21 }catch(e) 22 { 23 DEBUG = "false"; 24 } 1 //==== cl_conflit remplace $(... avec jQuery( ==== 2 25 3 //=================================================== 26 4 var detect = navigator.userAgent.toLowerCase(); … … 87 65 netscape = mybrowser.netscape || false; 88 66 89 90 //========================================91 /*function $defined(A) {92 $ = _$2; // ;93 return A != undefined;94 }95 */96 97 67 var time_out = 0; 98 68 //=================================================== … … 114 84 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 115 85 ret_element = jQuery().$Prototype(element); 116 } else if (retour.match(RegExp("GMaps", "gi"))) { 117 86 } else if (retour.match(RegExp("GMaps", "gi"))) { 118 87 119 88 ret_element = jQuery(element); … … 167 136 return ret_element; 168 137 } // conflit(element,nc) 169 170 171 172 173 138 //====================================================== 139 /* 140 * 141 * 142 */ 143 //====================================================== 174 144 jQuery(document).ready( 175 function (jQuery) {176 jQuery(window).load(function () {177 //============================================================178 jQuery("#icon_gmaps").bind('click', function () {145 function (jQuery) { 146 jQuery(window).load(function () { 147 //============================================================ 148 jQuery("#icon_gmaps").bind('click', function () { 179 149 180 150 jQuery('html,body').stop().scrollTop(0); … … 191 161 if (typeof(Parent)=="undefined") 192 162 Parent = "#theImage"; 193 194 info_image = jQuery(Parent).infos(); 195 p0 = jQuery(Parent); 196 if (p0.length > 0) { 197 198 //====================================================== 199 if (theme.match("gally", "gi")) 163 info_image = jQuery(Parent).infos(); 164 p0 = jQuery(Parent); 165 if (p0.length > 0) { 166 //====================================================== 167 if (theme.match("gally", "gi")) 200 168 if (jQuery.isFunction(inittoolbar)) { 201 169 if (typeof (currentTab) == "undefined") inittoolbar(); 202 else initializeImageMode("resize"); 203 204 205 if (info_image.position != "static") { 206 //==== compatibilité Gally/LLGBO === 207 //--- passage relative ==> static ===/ 208 jQuery(Parent).css({ position: "static" } ); 209 jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); 210 }; 170 else initializeImageMode("resize"); 171 if (info_image.position != "static") { 172 //==== compatibilité Gally/LLGBO === 173 //--- passage relative ==> static ===/ 174 jQuery(Parent).css({ position: "static" } ); 175 jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); 176 }; 177 } 211 178 } 212 }213 179 // jQuery(window).resize(); 214 215 180 }); 216 //============================================================= 217 218 // $ = _$2; ; 219 220 221 }) 222 ; 181 //============================================================= 182 // $ = _$2; ; 183 }); 223 184 224 185 … … 228 189 jQuery.fn.extend({ 229 190 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 191 //---------------- luciano ------------------------------- 192 $Luciano: function (el, nc) { 193 return document.id(el, nc, this.document); 194 }, 195 //=============== PaMOOramics =========================== 196 197 $Pamoorama: function (B) { 198 199 200 if (!B) { 201 if (typeof (B) == "boolean") return null; 202 203 } 204 205 try { 206 if (B.htmlElement) { 207 return Garbage.collect(B); 208 } 209 } catch (e) { 210 211 } 212 213 if ([window, document].contains(B)) { return B; } 214 var A = $type(B); 215 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; } 216 if (A != "element") { 217 return null; 218 } 219 if (B.htmlElement) { return Garbage.collect(B); } 220 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; } 221 $extend(B, Element.prototype); 222 B.htmlElement = function () { }; 223 try { return Garbage.collect(B); } catch (e) { 224 return; 225 } 226 227 }, 228 //=================================================== 229 $Prototype: function (element) { 230 //======== prototype.js ===================== 231 if (arguments.length > 1) { 232 for (var i = 0, elements = [], length = arguments.length; i < length; i++) 233 elements.push($(arguments[i])); 234 return elements; 235 } 236 if (typeof element == "string") 237 element = document.getElementById(element); 238 239 return Element.extend(element); 240 241 try { 242 new_element = Element.extend(element); 243 } catch (e) { 244 return new_element; 245 } 246 return new_element; 247 } 248 //========================================================= 288 249 }); // fin extend 289 250 … … 509 470 //==================================== 510 471 511 512 (function ($) {513 $(document).ready(function () {514 jQuery(window).load(function () {515 a = jQuery(':Description');516 });517 });518 //==============================================519 librairies=[];520 jQuery.extend(jQuery.expr[':'], {521 // Nom du sélecteur personnalisé522 Description: function (a) {523 n = jQuery(a).infos();524 if (n.id != "") {525 //alert("<" + n.nodeName +" id= " + n.id + " >") ;526 }527 if (n.nodeName == "SCRIPT")528 if (a.src == "") {529 Match = jQuery(a).html();530 /*531 if ( Match.match(new RegExp("jQuery", "gi") )) {532 alert(n.id + n.nodeName + a.outerHTML ) ;533 }534 if ( Match.match(new RegExp("ajax", "gi") )) {535 alert(n.id + n.nodeName + a.outerHTML ) ;536 }537 */538 if (Match.match(new RegExp("\\$", "gi"))) {539 540 if (Match.match(new RegExp("ajax", "gi"))) {541 // alert(n.id + n.nodeName + a.outerHTML);542 543 }544 }545 if (Match.match(new RegExp("pamoorama", "ig"))) {546 547 // alert(n.id + n.nodeName + a.innerHTML);548 549 }550 } else {551 552 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {553 jQuery.noop;554 librairies.push(a.src);555 }556 557 }558 559 return a;560 561 }562 }); //fin extend563 /*564 *565 */566 })(jQuery);567 568 569 472 570 473 $_0= $; -
extensions/Autosize/main.inc.php
r8006 r8057 12 12 define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 13 13 //================================================================================= 14 $path = AUTOSIZE_PATH; 15 //============================================================================ 16 include($path."include/constants.php"); 14 15 include(AUTOSIZE_PATH."include/constants.php"); 17 16 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 18 17 //================================================================== -
extensions/Autosize/template/autosize.tpl
r7962 r8057 4 4 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"} 5 5 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 6 7 8 6 <script type="text/javascript"> 9 var visible = '{$visible}';10 7 var fade_in = '{$fade_in}'; 11 8 var cl_visible = "{$cl_visible}" =="true"; … … 53 50 <!-- << autosize/template/autosize.tpl --> 54 51 {/html_head} 55 56 52 <script type="text/javascript"> 53 var DEBUG = '{$DEBUG}'; 54 var visible = '{$visible}'; 55 </script> 57 56 {if $DEBUG == "true"} 58 57 {assign var="visible" value="block"} … … 96 95 {/literal} 97 96 {else} 98 {assign var="visible" value="none"} {/if}<!-- << autosize/template/autosize.tpl body --> 97 {assign var="visible" value="none"} {/if} 98 99 <!-- << autosize/template/autosize.tpl body --> -
extensions/Autosize/template/cl_conflit.tpl
r7912 r8057 5 5 {/html_head} 6 6 7 <!--- {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) --->7 <!---{$ROOT_URL} -- {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) ---> 8 8 9 9 <!---FIN {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) ---> -
extensions/Autosize/template/conflit.tpl
r7962 r8057 1 1 {html_head} 2 <!--- Autosize/template/confilt.tpl (head) --->2 <!--- {$AUTOSIZE_PATH}template/confilt.tpl (head) ---> 3 3 <!--- Ajout scripts {$AUTOSIZE_PATH}---> 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} <!--- jquery.packed.js ---> 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- conflit.js ---> 6 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---jquery.dimensions.js ---> 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}<!--- RECHARGE DE {$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} ---> 5 <script type="text/javascript"> 6 var DEBUG = '{$DEBUG}'; 7 </script> 8 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- {$AUTOSIZE_PATH|@cat:"js/conflit.js"} ---> 9 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---{$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} ---> 7 10 <!--- fin Ajout scripts ---> 8 11 <script type="text/javascript"> 9 var DEBUG = '{$DEBUG}';10 12 var theme = '{$theme}'; 11 13 var cl_version = '{$cl_version}'; … … 24 26 <!---FIN Autosize/template/confilt.tpl (/head) ---> 25 27 {/html_head} 26 27 <!--- Autosize/template/confilt.tpl (body) ---> 28 29 30 <!---FIN Autosize/template/confilt.tpl (body) ---> 28 <!---{$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) ---> 29 <!---FIN {$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) --->
Note: See TracChangeset
for help on using the changeset viewer.