Changeset 6704 for extensions/LLGBO2


Ignore:
Timestamp:
Jul 24, 2010, 10:14:31 PM (14 years ago)
Author:
gbo
Message:

Improve header message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/main.inc.php

    r6649 r6704  
    22/*
    33Plugin Name: Look_like_gbo2
    4 Version:  2.1.f
     4Version:  2.1.g
    55Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
    6 Author: Ex-Ftb
     6Author: Gbo
    77Author URI: http://www.photos.bouteyron.fr/
    88Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery
     
    1313  2.1.d bug Css with IE6 & IE8
    1414  2.1.e fix bug   $conf['question_mark_in_urls']
    15   2.1.f fix bug   with metatda and video */
     15  2.1.f fix bug   with metatda and video 
     16  2.1.g fix bug   with metatda  + improve header message
     17   */
    1618
    1719if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    2022global $conf;
    2123
    22 define ('LLGBO_INFO_VERSION','2.1.f');
     24define ('LLGBO_INFO_VERSION','2.1.g');
    2325if (!defined('LLGBO_PATH'))
    2426{define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
     
    110112         }
    111113 if ($no_header == true)
    112 {$template->append('head_elements',"\n".' <STYLE type="text/css">#theHeader{display: none}</STYLE>');}
     114{$template->append('head_elements','<!-- llgbo -->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
    113115}       
    114116 
     
    124126$ThePicture = $template->get_template_vars('current');
    125127// 2.1.f fix notice with video
     128
    126129if ($ThePicture['is_picture'] <> 1 ) 
    127         {  $lang['Show file metadata'] =  'No Metadata';
     130        { $lang['Show file metadata'] =  'No Metadata';
    128131                return;}
    129132// ---------------------------         
     
    133136         If ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  // exif under bt
    134137                {  $metadata = $template->get_template_vars('metadata');
    135                 if(is_array($metadata))
    136                 {foreach($metadata[0] as $cle =>$tableau)
    137                          { if(is_array($tableau))
    138                          {   foreach($tableau as $cle=>$valeur)
    139                                 {   $swt= $swt.$cle.' : '.$valeur.'<br>';
    140                                         $meta = 1;}
    141                         }       }
    142                         if  ( pwg_get_session_var('show_metadata') == 1 )
    143                         {       $lang['Show file metadata'] =  'EXIF Metadata';
    144                             if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}}
    145                        
    146                         $template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
    147                         $template->Clear_assign('metadata');
    148                        
    149         } // hide original metadata
    150                 }
     138                if (is_array($metadata))
     139                  {
     140                  if (isset($metadata[0]) and is_array($metadata[0]))
     141                        {
     142                        foreach($metadata[0] as $cle =>$tableau)
     143                                 { if(is_array($tableau))
     144                                 {   foreach($tableau as $cle=>$valeur)
     145                                        {   $swt= $swt.$cle.' : '.$valeur.'<br>';
     146                                                $meta = 1;}
     147                                }       }
     148                                if  ( pwg_get_session_var('show_metadata') == 1 )
     149                                {       $lang['Show file metadata'] =  'EXIF Metadata';
     150                                     if (isset($metadata[0] ['TITLE'])) // advanced meta
     151                                        {$lang['Show file metadata']    = $metadata [0] ['TITLE'];}
     152                                        if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}
     153                                }
     154                               
     155                                $template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
     156                                 $template->Clear_assign('metadata');// hide original metadata 
     157                        }
     158                  } 
     159                }
    151160               
    152161}
     
    218227                        { $linkcss = '<link rel="stylesheet" type="text/css" href="'.$llgbo_path;
    219228                        $template->append('head_elements',$linkcss.'css/gbolook.css">');
    220                          $template->append('head_elements',"\n".' <STYLE type="text/css">#theImage{margin:auto;overflow: hidden;}</STYLE>');
     229                         $template->append('head_elements',"\n".'<STYLE type="text/css">#theImage{margin:auto;overflow: hidden;}</STYLE>');
    221230                          }
    222231//----------------------------------------------------   
     
    276285                If ($conf['LLGBO_SETTINGS'] [9]  == 'true' )
    277286                        {$template->assign('HDHREF', ' href="'.$ThePicture['high_url'].'"'.' title= " HD --> '.$ThePicture['name'].'"');
    278                           $template->append('head_elements', "\n".'<script type="text/javascript">
    279                                 window.onload = function() {
    280                         Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")[3]);
    281                                         }
    282                         </script>'  );}
     287                          $template->append('head_elements', "\n".'<script type="text/javascript">'."\n".'window.onload = function() {'."\n".'Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")[3]);}'."\n".'</script>'  );}
    283288           else
    284289           {$template->assign('HDHREF','title="'.$lang['Click on the picture to see it in high definition'].'" href="javascript:phpWGOpenWindow('."'".$ThePicture['high_url']."','".$uuid."','"."scrollbars=yes,toolbar=no,status=no,resizable=yes'".')"');}               
Note: See TracChangeset for help on using the changeset viewer.