Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php (revision 8056)
+++ /extensions/Autosize/autosize.inc.php (revision 8057)
@@ -40,44 +40,32 @@
load_language('lang', AUTOSIZE_PATH);
$my_path = dirname(__FILE__).'/';
-
- if (isset( $page['body_id']) ) {
- if ( $page['body_id']=='thePicturePage' ) {
+
+ if (isset( $page['body_id']) && $page['body_id']=='thePicturePage' ) {
if ( isset($picture['current'])){
$autosize_parametres = cl_autosize_Get_Options();
include (AUTOSIZE_PATH."include/affiche.php");
- $debug = isset($conf['debug']) ? $conf['debug'] : false ;
- $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ;
- if($autosize_parametres->check_icon_v == 'on'){
-
- $template->assign('cl_autosize_button',
- array(
- 'cl_autosize_info' => 'cl_autosize_info' ,
- 'cl_autosize_info_2' => 'cl_autosize_info_2' ,
- 'URL' => $_SERVER['REQUEST_URI'] ,
- 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png',
- 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png'
- )
-
- );
-
- $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl'));
- $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
+
+ if($autosize_parametres->check_icon_v == 'on'){
+ $template->assign('cl_autosize_button',
+ array( 'cl_autosize_info' => 'cl_autosize_info' ,
+ 'cl_autosize_info_2' => 'cl_autosize_info_2' ,
+ 'URL' => $_SERVER['REQUEST_URI'] ,
+ 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png',
+ 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png'
+ )
+
+ );
+
+ $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl'));
+ $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
}
-
-
- $template->set_filenames(
+ $template->set_filenames(
array('autosize_content'=> $my_path.'template/autosize.tpl')
);
- $template->assign(
- array('DEBUG' => $debug ,
- 'cl_visible' => $cl_visible
- )
- );
-
+
return $template->parse( 'autosize_content', false);
- }
-
- }
+
+ }
}
} //public function cl_autosize_affiche
@@ -133,23 +121,31 @@
{
global $template,$user,$conf,$picture ,$page,$cl_plugin;
- //userDefManage ??
+
$my_path = basename(dirname(__FILE__)).'/' ;
$my_path = dirname(__FILE__).'/';
- $debug = isset($conf['debug']) ? $conf['debug'] : false ;
+ $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ;
$ThePicture = $template->get_template_vars('current');
$tpl_name = $user['theme'] ;
- if ( !empty($content) ) { return $content; }
- if ($ThePicture['is_picture'] <> 1 ) { return $content; ; }
+
$autosizejs ='';
$autosizejs = $autosizejs.''."\n";
- $template->append('head_elements',$autocss);
+ // $template->append('head_elements',$autocss);
$autocss="";
$template->append('footer_elements',"\n".$autocss);
+
+ if ( !empty($content) ) { return $content; }
+ if ($ThePicture['is_picture'] <> 1 ) {
+ return $content; ;
+ }
+
+
return $content ;
@@ -162,6 +158,6 @@
$my_path = basename(dirname(__FILE__)).'/' ;
$my_path = dirname(__FILE__).'/';
- $debug = isset($conf['debug']) ? $conf['debug'] : false ;
-
+ $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ;
+ $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
$theme=$user['theme'];
$template->assign(
@@ -169,8 +165,8 @@
'cl_version' => $cl_plugin['version'] ,
'name' => $cl_plugin['name'] ,
- 'ma_page' => $page['body_id'],
+ 'ma_page' => $ma_page,
'theme' => $theme ,
- 'DEBUG' => $debug ,
+ 'DEBUG' => $DEBUG ,
'AUTOSIZE_PATH' => AUTOSIZE_PATH
)
@@ -178,6 +174,8 @@
$autoscript="";
$template->append('footer_elements',$autoscript);
@@ -192,25 +190,26 @@
{
global $template,$user,$conf,$picture ,$page, $cl_plugin ;
-
- $my_path = basename(dirname(__FILE__)).'/' ;
+ if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ;
+
$my_path = dirname(__FILE__).'/';
$template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) );
- $debug = isset($conf['debug']) ? $conf['debug'] : false ;
+ $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ;
$autosize_parametres = cl_autosize_Get_Options() ;
$theme=$user['theme'];
-
+ $url = get_root_url();
+
$template->assign(
- array(
+ array(
'autosize_parametres' => $autosize_parametres ,
'cl_plugins' => $cl_plugin ,
'cl_version' => $cl_plugin['version'] ,
'name' => $cl_plugin['name'] ,
-
+
+ 'MY_ROOT' => get_root_url(),
'theme' => $theme ,
- 'DEBUG' => $debug ,
+ 'DEBUG' => $DEBUG ,
'AUTOSIZE_PATH' => AUTOSIZE_PATH)
);
-
- if( $page['body_id'] == 'theAdminPage' ) return ;
+
return $template->parse( 'autosize_init', false);
}// function cl_autosize_script
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php (revision 8056)
+++ /extensions/Autosize/include/affiche.php (revision 8057)
@@ -9,10 +9,18 @@
$cl_version=isset($cl_version)?$cl_version:"";
$cl_plugin=isset($cl_plugin)?$cl_plugin:"";
+$cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ;
+ $DEBUG=isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "false" ;
+$DEBUG= isset($conf['cl_debug']) ? $conf['cl_debug'] : $DEBUG ;
+
$theme=$user['theme'];
$user_status = $user['status'] ;
-
+ $template->assign( array(
+ )
+ );
$template->assign(
array(
+ 'DEBUG' => $DEBUG ,
+ 'cl_visible' => $cl_visible,
'cl_version' => $cl_version,
'cl_plugin' => $cl_plugin,
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js (revision 8056)
+++ /extensions/Autosize/js/Affiche_script.js (revision 8057)
@@ -1311,7 +1311,5 @@
-
- $(function () {
-
+$(function () {
jQuery('#pamoorama').live('ON', function (e) {
jQuery(jQuery('.debug').get(1)).trigger('ON');
@@ -1356,5 +1354,5 @@
// Add 10 testing debugs to start with
-
+ jQuery(window).load(function () {
if (DEBUG == "true") {
for (var i = 0; i < 10; i++) {
@@ -1364,4 +1362,4 @@
}
- // }); //on load
+ }); //on load
});
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js (revision 8056)
+++ /extensions/Autosize/js/conflit.js (revision 8057)
@@ -1,26 +1,4 @@
-//==== autosize remplace $(... avec jQuery( ====
-/*
-*[gmaps=id:1;width:800;height:640;]
-* Luciano rv_gmaps
-* pb : Gmaps llgbo pamooramics rv_map
-*/
-var d1 = 0;
-var init_tb = 0;
-var dom = {};
-
-if (typeof jQuery == 'undefined') {
- alert(" jQuery n'est pas chargé");
-} else {
- // jQuery est chargé
-}
-
-try{
- if (DEBUG == "true") {
-
- }
-}catch(e)
-{
- DEBUG = "false";
-}
+//==== cl_conflit remplace $(... avec jQuery( ====
+
//===================================================
var detect = navigator.userAgent.toLowerCase();
@@ -87,12 +65,4 @@
netscape = mybrowser.netscape || false;
-
-//========================================
-/*function $defined(A) {
-$ = _$2; // ;
-return A != undefined;
-}
-*/
-
var time_out = 0;
//===================================================
@@ -114,6 +84,5 @@
else if (retour.match(RegExp("rv_gmaps", "gi"))) {
ret_element = jQuery().$Prototype(element);
- } else if (retour.match(RegExp("GMaps", "gi"))) {
-
+ } else if (retour.match(RegExp("GMaps", "gi"))) {
ret_element = jQuery(element);
@@ -167,14 +136,15 @@
return ret_element;
} // conflit(element,nc)
-
-
-
-
-
+//======================================================
+/*
+*
+*
+*/
+//======================================================
jQuery(document).ready(
- function (jQuery) {
- jQuery(window).load(function () {
- //============================================================
- jQuery("#icon_gmaps").bind('click', function () {
+ function (jQuery) {
+ jQuery(window).load(function () {
+ //============================================================
+ jQuery("#icon_gmaps").bind('click', function () {
jQuery('html,body').stop().scrollTop(0);
@@ -191,34 +161,25 @@
if (typeof(Parent)=="undefined")
Parent = "#theImage";
-
- info_image = jQuery(Parent).infos();
- p0 = jQuery(Parent);
- if (p0.length > 0) {
-
- //======================================================
- if (theme.match("gally", "gi"))
+ info_image = jQuery(Parent).infos();
+ p0 = jQuery(Parent);
+ if (p0.length > 0) {
+ //======================================================
+ if (theme.match("gally", "gi"))
if (jQuery.isFunction(inittoolbar)) {
if (typeof (currentTab) == "undefined") inittoolbar();
- else initializeImageMode("resize");
-
-
- if (info_image.position != "static") {
- //==== compatibilité Gally/LLGBO ===
- //--- passage relative ==> static ===/
- jQuery(Parent).css({ position: "static" } );
- jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
- };
+ else initializeImageMode("resize");
+ if (info_image.position != "static") {
+ //==== compatibilité Gally/LLGBO ===
+ //--- passage relative ==> static ===/
+ jQuery(Parent).css({ position: "static" } );
+ jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
+ };
+ }
}
- }
// jQuery(window).resize();
-
});
- //=============================================================
-
- // $ = _$2; ;
-
-
- })
-;
+ //=============================================================
+ // $ = _$2; ;
+});
@@ -228,62 +189,62 @@
jQuery.fn.extend({
- //---------------- luciano -------------------------------
- $Luciano: function (el, nc) {
- return document.id(el, nc, this.document);
- },
- //=============== PaMOOramics ===========================
-
- $Pamoorama: function (B) {
-
-
- if (!B) {
- if (typeof (B) == "boolean") return null;
-
- }
-
- try {
- if (B.htmlElement) {
- return Garbage.collect(B);
- }
- } catch (e) {
-
- }
-
- if ([window, document].contains(B)) { return B; }
- var A = $type(B);
- if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
- if (A != "element") {
- return null;
- }
- if (B.htmlElement) { return Garbage.collect(B); }
- if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
- $extend(B, Element.prototype);
- B.htmlElement = function () { };
- try { return Garbage.collect(B); } catch (e) {
- return;
- }
-
- },
- //===================================================
- $Prototype: function (element) {
- //======== prototype.js =====================
- if (arguments.length > 1) {
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
- elements.push($(arguments[i]));
- return elements;
- }
- if (typeof element == "string")
- element = document.getElementById(element);
-
- return Element.extend(element);
-
- try {
- new_element = Element.extend(element);
- } catch (e) {
- return new_element;
- }
- return new_element;
- }
- //=========================================================
+//---------------- luciano -------------------------------
+$Luciano: function (el, nc) {
+return document.id(el, nc, this.document);
+},
+//=============== PaMOOramics ===========================
+
+$Pamoorama: function (B) {
+
+
+if (!B) {
+if (typeof (B) == "boolean") return null;
+
+}
+
+try {
+if (B.htmlElement) {
+return Garbage.collect(B);
+}
+} catch (e) {
+
+}
+
+if ([window, document].contains(B)) { return B; }
+var A = $type(B);
+if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
+if (A != "element") {
+return null;
+}
+if (B.htmlElement) { return Garbage.collect(B); }
+if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
+$extend(B, Element.prototype);
+B.htmlElement = function () { };
+try { return Garbage.collect(B); } catch (e) {
+return;
+}
+
+},
+//===================================================
+$Prototype: function (element) {
+//======== prototype.js =====================
+if (arguments.length > 1) {
+for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+elements.push($(arguments[i]));
+return elements;
+}
+if (typeof element == "string")
+element = document.getElementById(element);
+
+return Element.extend(element);
+
+try {
+new_element = Element.extend(element);
+} catch (e) {
+return new_element;
+}
+return new_element;
+}
+//=========================================================
}); // fin extend
@@ -509,62 +470,4 @@
//====================================
-
-(function ($) {
- $(document).ready(function () {
- jQuery(window).load(function () {
- a = jQuery(':Description');
- });
- });
- //==============================================
- librairies=[];
- jQuery.extend(jQuery.expr[':'], {
- // Nom du sélecteur personnalisé
- Description: function (a) {
- n = jQuery(a).infos();
- if (n.id != "") {
- //alert("<" + n.nodeName +" id= " + n.id + " >") ;
- }
- if (n.nodeName == "SCRIPT")
- if (a.src == "") {
- Match = jQuery(a).html();
- /*
- if ( Match.match(new RegExp("jQuery", "gi") )) {
- alert(n.id + n.nodeName + a.outerHTML ) ;
- }
- if ( Match.match(new RegExp("ajax", "gi") )) {
- alert(n.id + n.nodeName + a.outerHTML ) ;
- }
- */
- if (Match.match(new RegExp("\\$", "gi"))) {
-
- if (Match.match(new RegExp("ajax", "gi"))) {
- // alert(n.id + n.nodeName + a.outerHTML);
-
- }
- }
- if (Match.match(new RegExp("pamoorama", "ig"))) {
-
- // alert(n.id + n.nodeName + a.innerHTML);
-
- }
- } else {
-
- if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {
- jQuery.noop;
- librairies.push(a.src);
- }
-
- }
-
- return a;
-
- }
- }); //fin extend
- /*
- *
- */
-})(jQuery);
-
-
$_0= $;
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php (revision 8056)
+++ /extensions/Autosize/main.inc.php (revision 8057)
@@ -12,7 +12,6 @@
define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' );
//=================================================================================
- $path = AUTOSIZE_PATH;
-//============================================================================
- include($path."include/constants.php");
+
+ include(AUTOSIZE_PATH."include/constants.php");
include_once(AUTOSIZE_PATH.'autosize.inc.php');
//==================================================================
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl (revision 8056)
+++ /extensions/Autosize/template/autosize.tpl (revision 8057)
@@ -4,8 +4,5 @@
{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
{known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}
-
-
{if $DEBUG == "true"}
{assign var="visible" value="block"}
@@ -96,3 +95,5 @@
{/literal}
{else}
- {assign var="visible" value="none"} {/if}
+ {assign var="visible" value="none"} {/if}
+
+
Index: /extensions/Autosize/template/cl_conflit.tpl
===================================================================
--- /extensions/Autosize/template/cl_conflit.tpl (revision 8056)
+++ /extensions/Autosize/template/cl_conflit.tpl (revision 8057)
@@ -5,5 +5,5 @@
{/html_head}
-
+
Index: /extensions/Autosize/template/conflit.tpl
===================================================================
--- /extensions/Autosize/template/conflit.tpl (revision 8056)
+++ /extensions/Autosize/template/conflit.tpl (revision 8057)
@@ -1,11 +1,13 @@
{html_head}
-
+
-{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}
-{known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
-{known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}
+{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}
+
+{known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
+{known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}