Changeset 4713


Ignore:
Timestamp:
Jan 20, 2010, 8:24:12 PM (14 years ago)
Author:
EXFTB
Message:

Avoid problems with Gally

Location:
extensions/LLGBO2
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/admin/llgbo_admin.php

    r4603 r4713  
    103103{$template->assign( 'LLGBO_VERSION' , LLGBO_INFO_VERSION);}
    104104$me = get_plugin_data($plugin_id);
    105 $template->clear_assign('LLGBOINFO');
     105$template->assign('LLGBOINFO','');
    106106// Load configuration settings from database
    107107
  • extensions/LLGBO2/admin/llgbo_adminsettings.tpl

    r4603 r4713  
    22 <h2> {'Title'|@translate} <br>  {$LLGBO_VERSION}</h2>
    33<h3>{'Howto'|@translate}</h3>
    4 
     4<span>{'llgo_warning_setting'|@translate} </span>
    55<form method="post" action="{$llgbo_F_ACTION}" class="properties">
    66<fieldset>
     
    99        <tr>
    1010                <td id="llgbotitle">{'llgo_global_setting'|@translate} </td>
    11    </tr>       
     11        </tr>          
    1212   <tr>
    1313                <td class="llgbolabel">{'llgbo_frame'|@translate}</td>
  • extensions/LLGBO2/js/sweettitlesn.js

    r4297 r4713  
    2020 var i,j,Over;this.x = document.createElement('div');
    2121 this.x.id = 'toolTip';document.getElementsByTagName('body')[0].appendChild(this.x);this.x.style.top = '0';this.x.style.visibility = 'hidden';var tipLen = this.tipElements.length;for ( i=0;i<tipLen;i++ ){
    22  var Elms = document.getElementsByTagName(this.tipElements[i]);var curLen = Elms.length;for ( j=0;j<curLen;j++ ){
     22 var Elms = document.getElementsByTagName(this.tipElements[i]);
     23
     24 var curLen = Elms.length;for ( j=0;j<curLen;j++ ){
    2325 var el= Elms[j];var tv = el.getAttribute('title')
     26   if (el.className  != 'navThumb')
     27 { 
    2428 if (tv != "null" && tv !=null && tv !="") //chrome
    2529{addEvent2(el,'mouseover',this.tipOver); addEvent2(el,'mousemove',this.tipMouseMove); addEvent2(el,'mouseout',this.tipOut); var sv = el.getAttribute('swttips'); el.setAttribute('Stitle',tv); el.setAttribute('Stip',sv ); el.removeAttribute('title');
    26  el.removeAttribute('swttips');} el.removeAttribute('alt');} } },
     30 el.removeAttribute('swttips');} el.removeAttribute('alt');} }
     31 } },
    2732 updateXY : function(e){ if (document.captureEvents){S.xCord = e.pageX;S.yCord = e.pageY;} else if (window.event.clientX){S.xCord = window.event.clientX+document.documentElement.scrollLeft;S.yCord = window.event.clientY+document.documentElement.scrollTop;}},
    2833 tipOut: function(){
  • extensions/LLGBO2/js/sweettitlesn_comment.js

    r4297 r4713  
    2626                        for ( j=0; j<curLen; j++ ) {
    2727                                var el= Elms[j];
    28                                 var tv = el.getAttribute('title')
    29                                 if ( tv != null && tv != "null" && tv !="")  //chrome
    30                                  {addEvent(el,'mouseover',this.tipOver);
    31                                         addEvent(el,'mousemove',this.tipMouseMove);
    32                                         addEvent(el,'mouseout',this.tipOut);
    33                                         var sv = el.getAttribute('swttips');
    34                                         el.setAttribute('tiptitle', tv);
    35                                         el.setAttribute('tipswt', sv );
    36                                         el.removeAttribute('title');
    37                                         el.removeAttribute('swttips');}
    38                                 el.removeAttribute('alt');}
     28                                   if (el.className  != 'navThumb') // pas de tooltip sur nav thumb
     29                                        { var tv = el.getAttribute('title')
     30                                                if ( tv != null && tv != "null" && tv !="")  //chrome
     31                                                 {addEvent(el,'mouseover',this.tipOver);
     32                                                        addEvent(el,'mousemove',this.tipMouseMove);
     33                                                        addEvent(el,'mouseout',this.tipOut);
     34                                                        var sv = el.getAttribute('swttips');
     35                                                        el.setAttribute('tiptitle', tv);
     36                                                        el.setAttribute('tipswt', sv );
     37                                                        el.removeAttribute('title');
     38                                                        el.removeAttribute('swttips');}
     39                                                el.removeAttribute('alt');}
     40                                        }
    3941                }
    4042        },
  • extensions/LLGBO2/language/en_UK/plugin.lang.php

    r4603 r4713  
    8383$lang['llgbo_always_displayexif'] = 'Always display METADATA:' ;
    8484$lang['Reset_To_Default'] = 'Reset to default values';
     85/*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
    8586?>
  • extensions/LLGBO2/language/es_ES/plugin.lang.php

    r4603 r4713  
    8383$lang['llgbo_always_displayexif'] = 'Siempre fijar el METADATA:' ;
    8484/* TODO */$lang['Reset_To_Default'] = 'Restaurar los valores por defecto';
     85/*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
    8586?>
  • extensions/LLGBO2/language/fr_FR/plugin.lang.php

    r4603 r4713  
    8383$lang['llgbo_always_displayexif'] = 'Toujours afficher les Metadata:' ;
    8484$lang['Reset_To_Default'] = 'Rétablir les valeurs par défaut';
     85$lang['llgo_warning_setting'] = 'Le cadre et la navigation sur image ne sont pas disponibles avec Gally';
    8586?>
  • extensions/LLGBO2/language/hu_HU/plugin.lang.php

    r4603 r4713  
    8282$lang['previewsamples']= 'Minta megtekintése';
    8383$lang['llgbo_always_displayexif'] = 'Mindig megjelenő METAADATOK (EXIF):' ;
     84/*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
    8485?>
  • extensions/LLGBO2/language/pl_PL/plugin.lang.php

    r4603 r4713  
    8383$lang['llgbo_always_displayexif'] = 'Zawsze wyświetlaj metadane:' ;
    8484/* TODO */$lang['Reset_To_Default'] = 'Przywróć wartości domyślne';
     85/*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
    8586?>
  • extensions/LLGBO2/main.inc.php

    r4604 r4713  
    22/*
    33Plugin Name: Look_like_gbo2
    4 Version:  2.0.K
     4Version:  2.0.L
    55Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
    66Author: Ex-Ftb 
     
    1717 /* 2.0.J  add sample display and fix bug in admin with chrome */
    1818 /* 2.0.K fix warning du to language file */
     19  /* 2.0.l  Avoid problem with Gally */
    1920if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    2021/* création d'une instance de la classe   */
     
    2223global $conf;
    2324
    24 define ('LLGBO_INFO_VERSION','2.0.K');
     25define ('LLGBO_INFO_VERSION','2.0.L');
    2526if (!defined('LLGBO_PATH'))
    2627{define('LLGBO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');}
     
    3132 $conf['LLGBO_HEADER'] = explode (",",$conf['LLGBOHEADER']);   
    3233/////////////////////////////////////////////////////
    33 /*  plugin Class  */
     34/*  PLUGIN CLASS  */
     35/////////////////////////////////////////////////////
    3436class look_like_gbo
    3537{/* Set the administration panel of the plugin */
     
    4143    return $menu;  }
    4244
    43 
    44 /* always display metadata */
     45//-------------------------------------------------------------
     46/*       ALWAYS      DISPLAY      METADATA */
     47//-------------------------------------------------------------
    4548function AutoDisplayMetadata()
    4649{global $conf;
     
    5255                {  pwg_set_session_var('show_metadata', 1 );}}
    5356}
    54  
    55  // reset nofollow, noindex
     57//-------------------------------------------------------------
     58// RESET NOFOLLOW, NOINDEX
     59//-------------------------------------------------------------
    5660function MyBeginheader()
    5761{ global $page,$conf;
     
    5963        { unset ($page['meta_robots']);}
    6064}
    61 //   manage H E A D E R
     65//-------------------------------------------------------------
     66//      MANAGE               H E A D E R
     67//-------------------------------------------------------------
    6268function Myheader()
    6369{global $template,$conf;
     
    104110 
    105111}  // end header
    106 
    107 //* improve functionnalities --> picture.tpl
     112 
     113//-------------------------------------------------------------
     114//* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL
     115//-------------------------------------------------------------
    108116function  DisplayGboLook()
    109117{ global $template,$conf;
     
    119127                        }       }
    120128                        $template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
    121                 $template->clear_assign('metadata');
     129                $template->Clear_assign('metadata');
    122130        } // hide original metadata
    123131                }
    124132               
    125133}
    126 
    127 /*  ------   Manage picture page----------------    */
     134//-----------------------------------------------------------------
     135/*  ------   MANAGE PICTURE PAGE----------------    */
     136//-----------------------------------------------------------------
    128137function MyPictureOptions($content )
    129 {global $template,$conf,$user
     138{global $template,$conf,$user,$lang;   
    130139$sweetcss = ' <! --- LLGBO tooltip css-->
    131140<style type="text/css">
     
    135144div#toolTip p.title {color:'.$conf['LLGBO_TOOLTIP'][4].';text-align:center;padding:0 0 3px 0;}
    136145</style>';
    137 // -----------  add JS tooltip in footer ----------------------
     146//-----------------------------------------------------------------
     147// -----------  add JS tooltip in footer --------------------
     148//-----------------------------------------------------------------
    138149 If (($conf['LLGBO'][1]  == 'true' ) /*  tooltip  */  or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */
    139150 or  ($conf['LLGBO_SETTINGS'] [4]  === 'true' ) /* usemap and Display Thumb  */)
     
    141152                  $linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH;
    142153              $sweetcss =  $sweetcss."\n".$javacss.'js/sweettitlesn.js"></script>'."\n";
    143                  //  $template->append('head_elements',$sweetcss);
    144                    $template->append('footer_elements',$sweetcss); }
    145 
     154                  $template->append('footer_elements',$sweetcss); }
     155//-----------------------------------------------------------------
    146156// Navigation improvement are always available
     157//-----------------------------------------------------------------
    147158$ThePicture = $template->get_template_vars('current');
    148159$next  = $template->get_template_vars('next');
     
    154165$prevthumb_title = $prev['TITLE'];     
    155166$usemap ='';
     167//----------------------------------------------------   
     168//-------      Tooltip                        -------------     
     169//----------------------------------------------------   
    156170If ($conf['LLGBO_SETTINGS'][1]  == 'true' )/*  tooltip  */
    157171        { $nextthumb_title = $next['TITLE'];
     
    166180                                                                        'U_IMG' =>  $last['U_IMG']));}
    167181        }       
     182///// YOGA or SIMPLE /////////////////////     
     183$themeconf = $template->get_template_vars('themeconf');
     184$tpl_name =  $themeconf['template'];
    168185/////////////////////////////////////////////
    169 // an other plugin is working -> go back
     186// AN OTHER PLUGIN IS WORKING -> GO BACK
     187//   - - - - - - - - - - - - - - - - - - - -
    170188if ( !empty($content) )   {  return $content;  }       
    171189//////////////////////////////////////////////////////////////////////
    172190// frame and navigation on picture  are only available on picture extension
    173191/////////////////////////////////////////////////////////////////       
    174 if ($ThePicture['is_picture'] <> 1 )    {  return  ; } 
     192if ($ThePicture['is_picture'] <> 1 )    {  return $content;  ; }       
     193if ( strtoupper($tpl_name) == 'GALLY') {
     194 return $content;  ; }  // Not compliant with Gally
    175195/////////////////////////////////////////////////////////////////       
    176196If (($conf['LLGBO_SETTINGS'] [1]  == 'true' )/*  tooltip display  */  or ($conf['LLGBO_SETTINGS'] [0] == 'true') /*  frame  */  )
    177197                        {$linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH;
    178                         $template->append('head_elements',$linkcss.'css/gbolook.css">');}
    179 
     198                        $template->append('head_elements',$linkcss.'css/gbolook.css">');
     199                         $template->append('head_elements',"\n".' <STYLE type="text/css">#theImage{margin:auto;overflow: hidden;z-index:1}
     200                         </STYLE>');
     201                          }
     202//----------------------------------------------------   
     203//-------      Usemap   values         -------------     
     204//----------------------------------------------------   
    180205If ($conf['LLGBO_SETTINGS'] [3]  == 'true' )  // usemap
    181206 {      $usemap = '" usemap="#prevnext' ;
    182         $imgw = $ThePicture['scaled_width'];
     207        $imgw = $ThePicture['scaled_width'];
    183208                $imgh = $ThePicture['scaled_height'];   
    184209                $template->assign(array(
     
    198223                         'PREVTHUMB'  =>  $swtimg.$prev['THUMB_SRC'].'>"',
    199224                         'PREVTHUMBTITLE'  =>  $prevthumb_title));}
    200 }  // end usemap               
    201 $alt = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
     225}  // end usemap
     226
     227//----------------------------------------------------   
     228//                  improve alt
     229//----------------------------------------------------   
     230$alt="";
     231/*
     232$related_cats =   $template->get_template_vars('related_categories');
     233if (isset($related_cats))
     234        {$related_cat = strip_tags($related_cats[0]);
     235        $related_cat = str_replace('&nbsp;'," ",$related_cat);
     236        $related_cat = str_replace($conf['level_separator'],"-",$related_cat);
     237        }
     238$alt1 = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
     239$alt= $related_cat.' - '.$alt1; */
     240//-----------------------------------------------------------------
    202241$template->assign( array(
    203242           'SRC_IMG' => $ThePicture['image_url'],
     
    218257         { $template->assign('SHOW_PICTURE_NAME_ON_TITLE', false);     
    219258                $template->assign('TITLE_FRAME_COLOR', $conf['LLGBO_FRAME'][0]);                 }
    220          
    221  /* HTML  frame  */
     259//----------------------------------------------------   
     260/*              HTML  frame                          */
     261//----------------------------------------------------   
    222262If (($conf['LLGBO_SETTINGS'] [0] == 'true') )
    223263        {   $bds = 0;
     
    240280                {$template->assign( array( 'TITLE_FRAME' => $ThePicture['name'] )); }   
    241281        }       // end frame
    242         else  // no frame
     282        else
     283        // no frame
    243284{$template->clear_assign('FRAME_BEGIN') ;}
    244285
  • extensions/LLGBO2/template/picture_content.tpl

    r4527 r4713  
    1212        {/if}>
    1313{/if}
     14
    1415{if  isset($FRAME_BEGIN)}
    1516        {if isset($TITLE_FRAME)}
     
    1718        {/if}
    1819        <div  id="gbo" {$FRAME_SIZE}>
     20          <div id="theImgContainer">
    1921        {$FRAME_BEGIN}
    2022                        {if isset($high) }
     
    2931                        {/if}>
    3032        {$FRAME_END}
     33        </div>
    3134</div>
    3235{/if}
Note: See TracChangeset for help on using the changeset viewer.