Changeset 6360
- Timestamp:
- May 25, 2010, 10:54:34 PM (15 years ago)
- Location:
- extensions/charlies_content
- Files:
-
- 3 added
- 7 edited
- 1 copied
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/charlies_content/charlies.css
r6220 r6360 7 7 background-color: transparent; 8 8 } 9 #theImage { padding-top:5px;} 9 #theImage { 10 padding-top:5px; 11 } 10 12 #theImage #charlie { 11 13 margin:0px auto 5px auto; 12 14 padding: 0; background-color: transparent; 13 15 border: 0; 14 16 border-color: #cccccc #aaaaaa #666666 #aaaaaa; border-style: ridge; 15 17 } 16 18 #theImage #charlie .none_1 { /* none */ } … … 54 56 55 57 a.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:5 55px; background: transparent url(./expender.png) no-repeat scroll 1px 0px; }57 a.xl:hover, a.xl:active { b order: 1px solid #666; }58 padding:8px 41px; text-align:center; width:580px; background: #333 url(images/expender.png) no-repeat scroll 24px 0px; } 59 a.xl:hover, a.xl:active { background-color:#111; border:1px solid #333; } 58 60 a.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; } 62 a.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;} 60 66 .Charlies legend { padding: 0px 8px;} 61 67 .content .errors, .content .infos { position:relative;} 62 68 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 74 a.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 { 85 padding-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 65 96 #theAdminPage #charlie .input { border-top: 1px solid #666; border-bottom: 0; margin-bottom:1px;} 66 97 #theAdminPage #charlie .i15 { border-top: 1px solid #666; border-bottom: 1px solid #666; margin-bottom:1px;} … … 79 110 /* #theAdminPage #the_page .content { margin-top: 0px;} */ 80 111 #theAdminPage #the_page #theHeader { height: 114px; min-height: 114px; max-height: 114px; } 81 #theAdminPage .Charlies input[type="submit"] { display:block; margin: 05px 0 auto; padding:3px 40px;}112 #theAdminPage .Charlies input[type="submit"] { display:block; margin:5px 5px 0 auto; padding:3px 40px;} 82 113 .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; } 84 116 #theAdminPage div.none { border:0; background: transparent none; width:100%; min-width:100%; margin: 12px 5px;} 85 117 .ui-tabs {padding: .2em;} … … 97 129 /*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; 98 130 float: left; border: 1px solid #666666; border-right: none; } 131 .clear .ui-tabs-nav li a { 132 color: #f1f1f1; 133 } 99 134 .ui-tabs-nav li a { 100 135 /*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 8 8 { 9 9 global $page, $template, $charlie, $conf; 10 11 10 // Which player is needed? 12 11 $player = ''; … … 76 75 $bg = get_root_url().'plugins/charlies_content/background.png'; 77 76 78 //var_dump($fileinfo);77 # var_dump($fileinfo); 79 78 80 79 // Assign as much we can to offer different fields to display … … 110 109 ) 111 110 ); 112 113 111 $ret = $template->parse('default_content', true); 114 // echo $ret;115 112 return $ret; 116 113 } -
extensions/charlies_content/charlies_config.php
r4175 r6360 5 5 if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!'); 6 6 load_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 8 global $charlie; 9 9 $errors = array(); 10 10 $infos = array(); … … 17 17 $extensions = array(); 18 18 foreach ($charlie as $tpl => $ext) { 19 if (is_array($ext) ) {19 if (is_array($ext) and $tpl != 'all') { 20 20 $players[] = array( 'name' => $tpl, 'ext' => $ext); 21 21 $extensions = array_merge($extensions, $ext); … … 131 131 } 132 132 $charlie['title'] = stripslashes(htmlspecialchars(strip_tags($charlie['title']))); 133 133 134 // Submit and errors 134 135 if ( $sub ) … … 140 141 if ( $sub and is_adviser() and count($errors) == 0 ) 141 142 array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.')); 142 143 unset ( $charlie['all'] ); 143 144 // Submit and not Advisor => Update Config table 144 145 if ( $sub and !is_adviser() and count($errors) == 0 ) … … 152 153 } 153 154 // Send data 155 154 156 $template->set_filenames(array( 155 157 'plugin_admin_content' => dirname(__FILE__) . '/charlies_config.tpl')); … … 157 159 if (count($infos) != 0) $template->assign('infos', $infos); 158 160 if ($charlie['onclick']==0) $charlie['onclick'] = 'playpause'; // ??? 161 159 162 $template->assign(array( 160 163 'Charlies' => $charlie, … … 165 168 ) ); 166 169 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 170 167 171 //var_dump($charlie); 168 172 ?> -
extensions/charlies_content/charlies_config.tpl
r6220 r6360 3 3 </div> 4 4 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}"> 6 6 7 7 {if $page == 'templates'} … … 39 39 40 40 {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>46 41 <fieldset> 47 42 <legend>{'Charlies players configuration'|@translate}</legend> … … 301 296 {literal} 302 297 <script type="text/javascript"> 303 $(document).ready(function(){304 $("#main-options").tabs();298 jQuery(document).ready(function(){ 299 jQuery("#main-options").tabs(); 305 300 }); 306 301 </script> … … 386 381 {literal} 387 382 <script type="text/javascript"> 388 $(document).ready(function() {383 jQuery(document).ready(function() { 389 384 var f = $.farbtastic('#picker'); 390 385 var p = $('#picker').css('opacity', 1); 391 386 var selected; 392 $('.colorwell')387 jQuery('.colorwell') 393 388 .each(function () { f.linkTo(this); $(this).css('opacity', 0.50); }) 394 389 .focus(function() { 395 390 if (selected) { 396 $(selected).css('opacity', 0.90).removeClass('colorwell-selected');391 jQuery(selected).css('opacity', 0.90).removeClass('colorwell-selected'); 397 392 } 398 393 f.linkTo(this); 399 394 p.css('opacity', 1); 400 $(selected = this).css('opacity', 1).addClass('colorwell-selected');395 jQuery(selected = this).css('opacity', 1).addClass('colorwell-selected'); 401 396 }); 402 397 }); 403 $('#theAdminPage .titrePage h2').addClass('ct2').fadeOut(10).fadeIn(1800);404 398 </script> 405 399 {/literal} … … 435 429 436 430 <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 }); 431 jQuery(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); 441 443 </script> 442 444 … … 451 453 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 452 454 {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 123 123 $lang['(Adobe Systems for streaming audio, video and data)'] = '(Adobe Systems for streaming audio, video and data)'; 124 124 $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'; 125 127 126 128 //Tab3 : colors -
extensions/charlies_content/language/fr_FR/plugin.lang.php
r4223 r6360 35 35 36 36 //File charlies_config.tpl 37 $lang['Save Charlies\' configuration'] = 'Sauvegarde la configuration de Charlies\'';37 $lang['Save Charlies\' configuration'] = 'Sauvegarder la configuration de Charlies\''; 38 38 $lang['On'] = 'Oui'; 39 39 $lang['Off'] = 'Non'; … … 123 123 $lang['(Adobe Systems for streaming audio, video and data)'] = '(Adobe Systems pour le streaming audio, vidéo et données)'; 124 124 $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?'; 126 127 //Tab3 : Les couleurs 127 128 $lang['Players colours selection'] = 'Choix des couleurs du player'; -
extensions/charlies_content/main.inc.php
r6220 r6360 1 1 <?php /* 2 2 Plugin Name: Charlies content 3 Version: 2.1. a3 Version: 2.1.b 4 4 Description: Charlies content is a global solution for none picture files. 5 5 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=119 … … 15 15 http://flv-player.net/players/maxi/documentation/ 16 16 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 tab22 translation system (Thanks to ddtddt).23 minor language/plugin corrections.24 2009-05-24 2.0.e (Called ngoc version)25 buffermessage correction for flv26 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-b428 2009-05-24 2.0.d (Called lumenation bypass)29 some url were generated with https://30 2009-04-13 2.0.c31 Flipflip proposal to exclude GETID3 for some extends32 nolive proposal to support GPX extensions33 Forced width/height are supported by flvstreamer34 2009-02-15 2.0.b35 Admin configuration menu36 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" enhancement47 so Charlies won't act on active slideshow but will act on Slideshow pause48 49 2007-10-21 1.7.a First release for PhpWebGallery 1.750 2006-01-06 Video Integrator and followed by Media Integrator51 and previously Kitof's Original MOD.52 **/53 54 17 /** 55 18 * All media file have to be broadcasted via an embedded player … … 62 25 define('CHARLIES_DIR' , basename(dirname(__FILE__))); 63 26 define('CHARLIES_PATH' , PHPWG_PLUGINS_PATH . CHARLIES_DIR . '/'); 64 define('CHARLIES_VER' , '2.1. a');27 define('CHARLIES_VER' , '2.1.b'); 65 28 $x = @file_get_contents( $conf['local_data_dir'].'/plugins/'.basename(dirname(__FILE__)).'.dat'); 66 29 if ($x!==false) $charlie = unserialize($x); 67 // Un code review s'impose grave !!! 30 68 31 if ( isset($_POST['reset']) and defined('IN_ADMIN') 69 32 and isset($_GET['section']) and $_GET['section']=='charlies_content/charlies_config.php' ) { 70 $charlie = array();33 unset( $charlie ); 71 34 if (!isset($infos)) $infos = array(); 72 35 array_push($infos, l10n('Your configuration configuration has been reset.')); … … 74 37 if (!isset($charlie['version']) or $charlie['version'] != CHARLIES_VER) 75 38 { 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',); 78 102 if (!isset($charlie['Flash'])) $charlie['Flash'] = array('swf',); 79 103 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',); 81 105 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'] = 84 108 array('aiff','aac','bmp','gsm','mov','mpg','mpeg','mp4','m4a','psd','qt','qtif','qif','qti','snd','tif','tiff','3g2','3pg'); 85 109 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; 149 112 150 113 $dir = $conf['local_data_dir'].'/plugins/'; … … 162 125 */ 163 126 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');166 127 $all = array(); 167 128 foreach ($charlie as $ext) { 168 if ( is_array($ext) ) $all = array_merge ($all, $ext);129 if ( is_array($ext) ) { $all = array_merge ($all, $ext); } 169 130 } 170 131 $conf['file_ext'] = array_merge ( 171 132 $conf['file_ext'], $all, array_map('strtoupper', $all) ); 133 134 # $charlie['all'] = $all; 135 add_event_handler('render_element_content', 'render_Charlie_element_content', 40, 2 ); 136 add_event_handler('get_admin_plugin_menu_links', 'Charlie_plugin_admin_menu'); 172 137 173 138 function Charlie_plugin_admin_menu($menu) … … 187 152 global $template, $charlie, $page, $conf; 188 153 if ( isset($page['slideshow']) and $page['slideshow'] ) return $content; 189 if ( @$picture['is_picture'] ) return $content; 154 if ( @$picture['is_picture'] ) return $content; 190 155 $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 } 193 159 $extension = strtolower(get_extension($picture['file'])); 194 if (!in_array($extension, $ charlie['all']))160 if (!in_array($extension, $all)) 195 161 { // in fact nothing to do (Lucky Charlies) 196 162 return $content; } 197 unset($charlie['all']);198 163 include_once(CHARLIES_PATH.'charlies.inc.php'); 199 164 return Charlies_content($picture);
Note: See TracChangeset
for help on using the changeset viewer.