Ignore:
Timestamp:
May 25, 2010, 10:54:34 PM (14 years ago)
Author:
vdigital
Message:

Admin page design review mainly for the "clear" theme
Code review

Location:
extensions/charlies_content
Files:
3 added
7 edited
1 copied
5 moved

Legend:

Unmodified
Added
Removed
  • extensions/charlies_content/charlies.css

    r6220 r6360  
    77        background-color: transparent;
    88}
    9 #theImage { padding-top:5px;}
     9#theImage {
     10        padding-top:5px;
     11}
    1012#theImage #charlie {
    11   margin:0px auto 5px auto;
     13        margin:0px auto 5px auto;
    1214        padding: 0; background-color: transparent;
    1315        border: 0;
    14   border-color: #cccccc #aaaaaa #666666 #aaaaaa; border-style: ridge;
     16        border-color: #cccccc #aaaaaa #666666 #aaaaaa; border-style: ridge;
    1517}
    1618#theImage #charlie .none_1 { /* none */ }
     
    5456
    5557a.xl { border:1px solid #666; color:#FF7700; cursor:pointer; display:block; font-size:95%; margin:5px auto;
    56 padding:8px 41px; text-align:center; width:555px; background: transparent url(./expender.png) no-repeat scroll 1px 0px; }
    57 a.xl:hover,  a.xl:active { border: 1px solid #666; }
     58padding:8px 41px; text-align:center; width:580px; background: #333 url(images/expender.png) no-repeat scroll 24px 0px; }
     59a.xl:hover,  a.xl:active { background-color:#111; border:1px solid #333; }
    5860a.nlink { border:0; color:#666; cursor:pointer; font-size:60%; margin:5px auto 2px; padding:0px 6px;}
    59 a.xl.selected { border:0; color: #666; background-image: none;}
     61.clear a.xl.ui-state-active { color: #333; }
     62a.xl.ui-state-active { border:0; color: #f1f1f1; background-image: none; background-color:#333;}
     63.clear a.xl  { background-color:#ddd; border:1px solid #f1f1f1;}
     64.checking { background-color:#333; border:12px solid #333;}
     65.clear .checking { background-color:#F8F8F8; border:12px solid #F8F8F8;}
    6066.Charlies legend { padding: 0px 8px;}
    6167.content .errors, .content .infos { position:relative;}
    6268
    63 #theAdminPage  #pwgMain  { background: url("./city-lights-2.jpg") no-repeat scroll right -48px transparent; height:114px;}
    64 #theAdminPage  #pwgMain  { background: url("./city-lights.jpg") no-repeat scroll right -55px transparent; height:114px;}
     69#theAdminPage  #pwgMain .Charlies *,
     70#theAdminPage  #pwgMain .Charlies *:hover,
     71#theAdminPage  #pwgMain .Charlies *:focus,
     72#theAdminPage  #pwgMain .Charlies *:active { outline: 0; }
     73
     74a.xl, #theAdminPage  #pwgMain .Charlies  input,
     75#theAdminPage  #pwgMain .Charlies #main-options li,
     76#theAdminPage  #pwgMain .Charlies #main-options li a {
     77        border-radius: 8px; -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px;
     78}
     79#theAdminPage .Charlies fieldset,
     80#theAdminPage .Charlies .checking {
     81        border-radius: 16px; -moz-border-radius: 16px; -khtml-border-radius: 16px; -webkit-border-radius: 16px;
     82}
     83
     84#theAdminPage  #pwgMain .Charlies  input {
     85padding-left:5px;
     86}
     87
     88#theAdminPage #the_page h2 { display:block; display:none; height:34px; margin:-2px 0 0; max-height:34px; min-height:34px; }
     89#theAdminPage #the_page.roma h2  { background: url(images/city-lights.jpg)  no-repeat scroll 86% -46px transparent; }
     90#theAdminPage #the_page.roma h2.cl2 { background: url(images/city-lights-2.jpg)  no-repeat scroll 86% -46px transparent; }
     91
     92#theAdminPage #the_page.clear h2.cl3 { background: url(images/wcity-lights-3.jpg)  no-repeat scroll 86% -46px transparent; }
     93#theAdminPage #the_page.clear h2.cl2 { background: url(images/wcity-lights-2.jpg)  no-repeat scroll 86% -46px transparent; }
     94#theAdminPage #the_page.clear  h2 { background: url(images/wcity-lights.jpg)  no-repeat scroll 86% -46px transparent; }
     95
    6596#theAdminPage  #charlie .input { border-top: 1px solid #666; border-bottom: 0; margin-bottom:1px;}
    6697#theAdminPage  #charlie .i15 { border-top: 1px solid #666; border-bottom: 1px solid #666; margin-bottom:1px;}
     
    79110/* #theAdminPage  #the_page .content { margin-top: 0px;} */
    80111#theAdminPage #the_page #theHeader { height: 114px; min-height: 114px; max-height: 114px; }
    81 #theAdminPage .Charlies input[type="submit"] { display:block; margin:0 5px 0 auto; padding:3px 40px;}
     112#theAdminPage .Charlies input[type="submit"] { display:block; margin:5px 5px 0 auto; padding:3px 40px;}
    82113.content form.properties li, form#update ul {clear:none;}
    83 #theAdminPage .Charlies fieldset { background: transparent url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; }
     114#theAdminPage .Charlies fieldset { padding-top:0; background: transparent url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; }
     115#theAdminPage  #the_page.clear .Charlies fieldset { background: transparent url(images/f1f1f1_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; }
    84116#theAdminPage  div.none { border:0; background: transparent none; width:100%; min-width:100%; margin: 12px 5px;}
    85117.ui-tabs {padding: .2em;}
     
    97129        /*resets*/margin: 0 1px 0 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
    98130        float: left; border: 1px solid #666666; border-right: none; }
     131.clear .ui-tabs-nav li a {
     132        color: #f1f1f1;
     133}
    99134.ui-tabs-nav li a {
    100135        /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
  • extensions/charlies_content/charlies.inc.php

    r3974 r6360  
    88{
    99  global $page, $template, $charlie, $conf;
    10 
    1110  // Which player is needed?
    1211  $player = '';
     
    7675  $bg = get_root_url().'plugins/charlies_content/background.png';
    7776
    78   //var_dump($fileinfo);
     77  #     var_dump($fileinfo);
    7978
    8079  // Assign as much we can to offer different fields to display
     
    110109      )
    111110    );
    112 
    113111  $ret = $template->parse('default_content', true);
    114 //  echo $ret;
    115112  return $ret;
    116113}
  • extensions/charlies_content/charlies_config.php

    r4175 r6360  
    55if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
    66load_language('plugin.lang', CHARLIES_PATH);
    7 $x = @file_get_contents( $conf['local_data_dir'].'/plugins/'.basename(dirname(__FILE__)).'.dat');
    8 if ($x!==false) $charlie = unserialize($x); else $charlie = array();
     7
     8global $charlie;
    99$errors = array();
    1010$infos = array();
     
    1717$extensions = array();
    1818foreach ($charlie as $tpl => $ext) {
    19         if (is_array($ext)) {
     19        if (is_array($ext) and $tpl != 'all') {
    2020                $players[] = array( 'name' => $tpl, 'ext' => $ext);
    2121                $extensions = array_merge($extensions, $ext);
     
    131131}
    132132$charlie['title'] = stripslashes(htmlspecialchars(strip_tags($charlie['title'])));
     133
    133134// Submit and errors
    134135if ( $sub )
     
    140141if ( $sub and is_adviser() and count($errors) == 0 )
    141142        array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.'));
    142 
     143unset ( $charlie['all'] );
    143144// Submit and not Advisor => Update Config table
    144145if ( $sub and !is_adviser() and count($errors) == 0 )
     
    152153}
    153154// Send data
     155
    154156$template->set_filenames(array(
    155157    'plugin_admin_content' => dirname(__FILE__) . '/charlies_config.tpl'));
     
    157159if (count($infos) != 0) $template->assign('infos', $infos);
    158160if ($charlie['onclick']==0) $charlie['onclick'] =  'playpause'; // ???
     161
    159162$template->assign(array(
    160163        'Charlies' => $charlie,
     
    165168        ) );
    166169$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     170
    167171//var_dump($charlie);
    168172?>
  • extensions/charlies_content/charlies_config.tpl

    r6220 r6360  
    33</div>
    44
    5 <form method="post" action="" class="Charlies properties">
     5<form method="post" action="" class="Charlies properties{if !empty($themeconf.name)} {$themeconf.name}{/if}{if !empty($themeconf.id)} {$themeconf.id}{/if}">
    66
    77{if $page == 'templates'}
     
    3939
    4040{if $page == 'options'}
    41 <script type="text/javascript">
    42 jQuery().ready(function(){ldelim}
    43         $('#theAdminPage .titrePage h2').addClass('ct').fadeOut(10).fadeIn(2400);
    44 });
    45 </script>
    4641<fieldset>
    4742        <legend>{'Charlies players configuration'|@translate}</legend>
     
    301296{literal}
    302297<script type="text/javascript">
    303   $(document).ready(function(){
    304     $("#main-options").tabs();
     298  jQuery(document).ready(function(){
     299    jQuery("#main-options").tabs();
    305300  });
    306301</script>
     
    386381{literal}
    387382<script type="text/javascript">
    388   $(document).ready(function() {
     383  jQuery(document).ready(function() {
    389384    var f = $.farbtastic('#picker');
    390385    var p = $('#picker').css('opacity', 1);
    391386    var selected;
    392     $('.colorwell')
     387    jQuery('.colorwell')
    393388      .each(function () { f.linkTo(this); $(this).css('opacity', 0.50); })
    394389      .focus(function() {
    395390        if (selected) {
    396           $(selected).css('opacity', 0.90).removeClass('colorwell-selected');
     391          jQuery(selected).css('opacity', 0.90).removeClass('colorwell-selected');
    397392        }
    398393        f.linkTo(this);
    399394        p.css('opacity', 1);
    400         $(selected = this).css('opacity', 1).addClass('colorwell-selected');
     395        jQuery(selected = this).css('opacity', 1).addClass('colorwell-selected');
    401396      });
    402397  });
    403         $('#theAdminPage .titrePage h2').addClass('ct2').fadeOut(10).fadeIn(1800);
    404398</script>
    405399{/literal}
     
    435429
    436430<script type="text/javascript">
    437   $(document).ready(function() {ldelim}
    438                 $(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
    439                 $(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);
    440   });
     431jQuery(document).ready(function() {ldelim}
     432        jQuery(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400);
     433        jQuery(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400);
     434        jQuery('#theAdminPage #the_page').addClass('{$themeconf.name}');
     435{if $page == 'options'}
     436        jQuery('#theAdminPage #the_page h2').addClass('cl2');
     437{/if}{if $page == 'colors'}
     438        jQuery('#theAdminPage #the_page.clear h2').addClass('cl3');
     439{/if}{if $page == 'curtain'}
     440        jQuery('#theAdminPage #the_page.roma h2').addClass('cl2');
     441{/if}});
     442        jQuery('#theAdminPage #the_page h2').fadeIn(1800);
    441443</script>
    442444
     
    451453{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
    452454{known_script id="jquery.ui.tabs" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.tabs.packed.js"}
    453 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"}
    454 {known_script id="jquery.ui.tabs" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.tabs.packed.js"}
  • extensions/charlies_content/language/en_UK/plugin.lang.php

    r4223 r6360  
    123123$lang['(Adobe Systems for streaming audio, video and data)'] = '(Adobe Systems for streaming audio, video and data)';
    124124$lang['FYI: all these options might be used or NOT by the inbound player (template).'] = 'FYI: all these options might be used or NOT by the inbound player (template).';
     125$lang['Reset ALL Charlies\' configuration'] = 'Reset ALL Charlies\' configuration';
     126$lang['Reset ALL Confirmation'] = 'Reset ALL Confirmation';
    125127
    126128//Tab3 : colors
  • extensions/charlies_content/language/fr_FR/plugin.lang.php

    r4223 r6360  
    3535
    3636//File charlies_config.tpl
    37 $lang['Save Charlies\' configuration'] = 'Sauvegarde la configuration de Charlies\'';
     37$lang['Save Charlies\' configuration'] = 'Sauvegarder la configuration de Charlies\'';
    3838$lang['On'] = 'Oui';
    3939$lang['Off'] = 'Non';
     
    123123$lang['(Adobe Systems for streaming audio, video and data)'] = '(Adobe Systems pour le streaming audio, vidéo et données)';
    124124$lang['FYI: all these options might be used or NOT by the inbound player (template).'] = 'Pour information : toutes ces options peuvent être utilisées ou NON par le player (lecteur présent dans le template)'; // "inbound" dans ce contexte ... (Lecteur entrant): Chaque template propose un lecteur spécifique (entrant dans le template) lequel peut donc utiliser ou non, tout ou parties des options
    125 
     125$lang['Reset ALL Charlies\' configuration'] = 'Restauration TOTALE de la configuration par défaut';
     126$lang['Reset ALL Confirmation'] = 'Confirmez-vous le rétablissement de la configuration par défaut?';
    126127//Tab3 : Les couleurs
    127128$lang['Players colours selection'] = 'Choix des couleurs du player';
  • extensions/charlies_content/main.inc.php

    r6220 r6360  
    11<?php /*
    22Plugin Name: Charlies content
    3 Version: 2.1.a
     3Version: 2.1.b
    44Description: Charlies content is a global solution for none picture files.
    55Plugin URI: http://piwigo.org/ext/extension_view.php?eid=119
     
    1515http://flv-player.net/players/maxi/documentation/
    1616
    17 /** History ***************
    18   2010-05-18 2.1.a (The basic 2.1 version)
    19                                                  Just support 2.1.
    20   2010-02-08 2.0.f (The reset version)
    21                                                  includes Reset ALL Charlies' configuration in second tab
    22                                                  translation system (Thanks to ddtddt).
    23                                                  minor language/plugin corrections.
    24   2009-05-24 2.0.e (Called ngoc version)
    25                    buffermessage correction for flv
    26                                                  The lumenation bypass is maintain (but no longer needed with recent Piwigo versions)
    27                                                  getID3 v2.0.0-b5 not tested => Still in v2.0.0-b4
    28   2009-05-24 2.0.d (Called lumenation bypass)
    29                    some url were generated with https://
    30   2009-04-13 2.0.c
    31                    Flipflip proposal to exclude GETID3 for some extends
    32                                                  nolive proposal to support GPX extensions
    33                                                  Forced width/height are supported by flvstreamer
    34   2009-02-15 2.0.b
    35                    Admin configuration menu
    36                                                  And related changes (New version of GetID3)
    37 
    38   2008-10-30 2.0.a (Not distributed)
    39              Smarty version for Piwigo (Don't use it with PhpWebGallery 1.7.x)
    40   2008/03/26: error_reporting(E_ERROR | E_WARNING | E_PARSE);
    41              during getid3 call (Only one referenced case).             
    42   2008/02/22:
    43  * 3GP support : video streams from mobile phones.
    44    There are two different standards for this format:
    45    3gp for GSM-based Phones, or 3g2 for CDMA-based Phones.
    46  * $page['slideshow'] active/inactive support for "Pause" enhancement
    47    so Charlies won't act on active slideshow but will act on Slideshow pause
    48 
    49   2007-10-21 1.7.a First release for PhpWebGallery 1.7
    50   2006-01-06 Video Integrator and followed by Media Integrator
    51   and previously Kitof's Original MOD.
    52  **/
    53 
    5417/**
    5518 * All media file have to be broadcasted via an embedded player
     
    6225define('CHARLIES_DIR' , basename(dirname(__FILE__)));
    6326define('CHARLIES_PATH' , PHPWG_PLUGINS_PATH . CHARLIES_DIR . '/');
    64 define('CHARLIES_VER' , '2.1.a');
     27define('CHARLIES_VER' , '2.1.b');
    6528$x = @file_get_contents( $conf['local_data_dir'].'/plugins/'.basename(dirname(__FILE__)).'.dat');
    6629if ($x!==false) $charlie = unserialize($x);
    67 // Un code review s'impose grave !!!
     30
    6831if ( isset($_POST['reset']) and defined('IN_ADMIN')
    6932    and isset($_GET['section']) and $_GET['section']=='charlies_content/charlies_config.php' ) {
    70                 $charlie = array();
     33                unset( $charlie );
    7134                if (!isset($infos)) $infos = array();
    7235                array_push($infos, l10n('Your configuration configuration has been reset.'));
     
    7437if (!isset($charlie['version']) or  $charlie['version'] != CHARLIES_VER)
    7538{
    76         $charlie['version'] = CHARLIES_VER;
    77         if (!isset($charlie['FlvStreamer'])) $charlie['FlvStreamer'] = array('flv',);
     39        $default = array(
     40                        'autoload'                      => 1,
     41                        'autoplay'                      => 1,
     42                        'loop'                                  => 1,
     43                        'full'                                  => 1,
     44                        'forced_width'                  => '',
     45                        'forced_height'                 => '',
     46                        'video_default_width'   =>  320,
     47                        'video_default_height'  =>  240,
     48                        'volume'                                => 150,
     49                        'onclick'                               => 'playpause',
     50                        'onclicktarget'                 => 0,
     51                        'ondoubleclick'                 => 'fullscreen',
     52                        'ondoubleclicktarget'   => 0,
     53                        'buffer'                                => 10,
     54                        'buffermessage'                 => 'Buffering _n_',
     55                        'buffershowbg'                  => 0,
     56                        'config'                                => 0,
     57                        'configxml'                     => 0,
     58                        'margin'                                => 8,
     59                        'skin'                                  => '', /* './plugins/charlies_content/skin.jpg', */
     60                        'title'                                 => '/n/n/nCharlies\' content ',
     61                        'titlesize'                     => 26,
     62                        'start_image'                   => './plugins/charlies_content/city-lights.jpg',
     63                        'showtitleandstartimage'=> 0,
     64                        'showiconplay'                  => 0,
     65                        'iconplaybgalpha'               => 20,
     66                        'showplayer'                    => 1,
     67                        'showloading'                   => 1,
     68                        'showmouse'                     => 1,
     69                        'showtime'                      => 2,
     70                        'srt'                                   => 0,
     71                        'playeralpha'                   => 20,
     72                        'playertimeout'                 => 1500,
     73                        'showstop'                      => 1,
     74                        'showvolume'                    => 1,
     75                        'showswitchsubtitles'   => 0,
     76                        'loadonstop'                    => 0,
     77                        'shortcut'                      => 1,
     78                        'phpstream'                     => 1,
     79                        'curtain'                               => 'none',
     80                        'start_image'                   =>  CHARLIES_PATH . 'background.jpg',
     81                        'color0'                                => '#111111',
     82                        'color1'                                => '#ff7700',
     83                        'color2'                                => '#444444',
     84                        'color3'                                => '#ff3333',
     85                        'color4'                                => '#ff3363',
     86                        'color5'                                => '#ff7700',
     87                        'color6'                                => '#111111',
     88                        'color7'                                => '#ff3333',
     89                        'color8'                                => '#ff3363',
     90                        'color9'                                => '#111111',
     91                        'color10'                               => '#444444',
     92                        'color11'                               => '#ff3333',
     93                        'color12'                               => '#ff3363',
     94                        'color13'                               => '#ff7700',
     95                        'color14'                               => '#444444',
     96                        'color15'                               => '#ff3333',
     97                        'color16'                               => '#111111',
     98                );
     99        if (!isset($charlie['version'])) $charlie = $default;
     100        else $charlie = array_merge( $default, $charlie );
     101        if (!isset($charlie['FlvStreamer']))    $charlie['FlvStreamer'] = array('flv',);
    78102        if (!isset($charlie['Flash']))                  $charlie['Flash'] = array('swf',);
    79103        if (!isset($charlie['Music']))                  $charlie['Music'] = array('pls','m3u','wav','mid','au','aif',);
    80         if (!isset($charlie['mp3Player']))      $charlie['mp3Player'] = array('mp3',);
     104        if (!isset($charlie['mp3Player']))              $charlie['mp3Player'] = array('mp3',);
    81105        if (!isset($charlie['Acrobat']))                $charlie['Acrobat'] = array('pdf',);
    82         if (!isset($charlie['WMplayer']))       $charlie['WMplayer'] = array('asf','wmv','divx','xvid',);
    83         if (!isset($charlie['QuickTime']))      $charlie['QuickTime'] =
     106        if (!isset($charlie['WMplayer']))               $charlie['WMplayer'] = array('asf','wmv','divx','xvid',);
     107        if (!isset($charlie['QuickTime']))              $charlie['QuickTime'] =
    84108        array('aiff','aac','bmp','gsm','mov','mpg','mpeg','mp4','m4a','psd','qt','qtif','qif','qti','snd','tif','tiff','3g2','3pg');
    85109        if (!isset($charlie['Archive']))                $charlie['Archive'] = array('zip','rar',);
    86         if (!isset($charlie['GPS']))                            $charlie['GPS'] = array('gpx',);
    87 
    88         if (!isset($charlie['autoplay']))       $charlie['autoplay'] = 1;
    89         if (!isset($charlie['loop']))                   $charlie['loop'] = 1;
    90         if (!isset($charlie['full']))                   $charlie['full'] = 1;
    91         if (!isset($charlie['forced_width']))   $charlie['forced_width'] = '';
    92         if (!isset($charlie['forced_height']))  $charlie['forced_height'] = '';
    93         if (!isset($charlie['video_default_width']))            $charlie['video_default_width'] =  320;
    94         if (!isset($charlie['video_default_height']))           $charlie['video_default_height'] =  240;
    95         if (!isset($charlie['volume']))                 $charlie['volume'] = 150;
    96         if (!isset($charlie['onclick']))                $charlie['onclick'] = 'playpause';
    97         if (!isset($charlie['onclicktarget']))  $charlie['onclicktarget'] = 0;
    98         if (!isset($charlie['ondoubleclick']))  $charlie['ondoubleclick'] = 'fullscreen';
    99         if (!isset($charlie['ondoubleclicktarget']))            $charlie['ondoubleclicktarget'] = 0;
    100         if (!isset($charlie['buffer']))                 $charlie['buffer'] = 10;
    101         if (!isset($charlie['buffermessage']))  $charlie['buffermessage'] = 'Buffering _n_';
    102         if ($charlie['buffermessage']==1)       $charlie['buffermessage'] = 'Buffering _n_';
    103         if (!isset($charlie['buffershowbg']))   $charlie['buffershowbg'] = 0;
    104         if (!isset($charlie['config']))                 $charlie['config'] = 0;
    105         if (!isset($charlie['configxml']))      $charlie['configxml'] = 0;
    106         if (!isset($charlie['margin']))                 $charlie['margin'] = 8;
    107         if (!isset($charlie['skin']))                   $charlie['skin'] = ''; // './plugins/charlies_content/skin.jpg';
    108         if (!isset($charlie['title']))                  $charlie['title'] = '/n/n/nCharlies\' content ';
    109         if (!isset($charlie['titlesize']))      $charlie['titlesize'] = 26;
    110         if (!isset($charlie['start_image']))            $charlie['start_image'] = './plugins/charlies_content/city-lights.jpg';
    111         if (!isset($charlie['showtitleandstartimage']))         $charlie['showtitleandstartimage'] = 0;
    112         if (!isset($charlie['showiconplay']))           $charlie['showiconplay'] = 0;
    113         if (!isset($charlie['iconplaybgalpha']))        $charlie['iconplaybgalpha'] = 20;
    114         if (!isset($charlie['srt']))            $charlie['onclick'] = 0;
    115         if (!isset($charlie['showplayer']))             $charlie['showplayer'] = 1;
    116         if (!isset($charlie['showloading']))            $charlie['showloading'] = 1;
    117         if (!isset($charlie['showmouse']))              $charlie['showmouse'] = 1;
    118         if (!isset($charlie['showtime']))               $charlie['showtime'] = 2;
    119         if (!isset($charlie['playeralpha']))            $charlie['playeralpha'] = 20;
    120         if (!isset($charlie['playertimeout']))          $charlie['playertimeout'] = 1500;
    121         if (!isset($charlie['showstop']))       $charlie['showstop'] = 1;
    122         if (!isset($charlie['showvolume'])) $charlie['showvolume'] = 1;
    123         if (!isset($charlie['showswitchsubtitles']))    $charlie['showswitchsubtitles'] = 0;
    124         if (!isset($charlie['loadonstop'])) $charlie['loadonstop'] = 0;
    125         if (!isset($charlie['shortcut']))       $charlie['shortcut'] = 1;
    126         if (!isset($charlie['phpstream']))              $charlie['phpstream'] = 1;
    127         if (!isset($charlie['curtain']))                $charlie['curtain'] = 'none';
    128         if (!isset($charlie['start_image']))    $charlie['start_image'] =  CHARLIES_PATH . 'background.jpg';
    129         if (!isset($charlie['color16']))
    130         {
    131                 $charlie['color0'] = '#111111';
    132                 $charlie['color1'] = '#ff7700';
    133                 $charlie['color2'] = '#444444';
    134                 $charlie['color3'] = '#ff3333';
    135                 $charlie['color4'] = '#ff3363';
    136                 $charlie['color5'] = '#ff7700';
    137                 $charlie['color6'] = '#111111';
    138                 $charlie['color7'] = '#ff3333';
    139                 $charlie['color8'] = '#ff3363';
    140                 $charlie['color9'] = '#111111';
    141                 $charlie['color10'] = '#444444';
    142                 $charlie['color11'] = '#ff3333';
    143                 $charlie['color12'] = '#ff3363';
    144                 $charlie['color13'] = '#ff7700';
    145                 $charlie['color14'] = '#444444';
    146                 $charlie['color15'] = '#ff3333';
    147                 $charlie['color16'] = '#111111';
    148         }
     110        if (!isset($charlie['GPS']))                    $charlie['GPS'] = array('gpx',);
     111        $charlie['version'] = CHARLIES_VER;
    149112
    150113        $dir = $conf['local_data_dir'].'/plugins/';
     
    162125   */
    163126
    164 add_event_handler('render_element_content', 'render_Charlie_element_content', 40, 2 );
    165 add_event_handler('get_admin_plugin_menu_links', 'Charlie_plugin_admin_menu');
    166127$all = array();
    167128foreach ($charlie as $ext) {
    168   if ( is_array($ext)) $all = array_merge ($all, $ext);
     129  if ( is_array($ext) ) { $all = array_merge ($all, $ext); }
    169130}
    170131$conf['file_ext'] = array_merge (
    171132    $conf['file_ext'], $all, array_map('strtoupper', $all) );
     133
     134# $charlie['all'] = $all;
     135add_event_handler('render_element_content', 'render_Charlie_element_content', 40, 2 );
     136add_event_handler('get_admin_plugin_menu_links', 'Charlie_plugin_admin_menu');
    172137
    173138function Charlie_plugin_admin_menu($menu)
     
    187152  global $template, $charlie, $page, $conf;
    188153  if ( isset($page['slideshow']) and $page['slideshow'] ) return $content;
    189   if ( @$picture['is_picture'] ) return $content; 
     154  if ( @$picture['is_picture'] ) return $content;
    190155  $all = array();
    191   foreach ($charlie as $ext) { if (is_array($ext)) $all = array_merge ($all, $ext); }
    192   $charlie['all'] = $all;
     156  foreach ($charlie as $ext) {
     157        if (is_array($ext)) $all = array_merge ($all, $ext);
     158  }
    193159  $extension = strtolower(get_extension($picture['file']));
    194   if (!in_array($extension, $charlie['all']))
     160  if (!in_array($extension, $all))
    195161  { // in fact nothing to do (Lucky Charlies)
    196162    return $content; }
    197   unset($charlie['all']);
    198163  include_once(CHARLIES_PATH.'charlies.inc.php');
    199164  return Charlies_content($picture);
Note: See TracChangeset for help on using the changeset viewer.