Changeset 21380


Ignore:
Timestamp:
Mar 8, 2013, 7:02:05 PM (7 years ago)
Author:
ddtddt
Message:

[extensions] - charlies_content

Location:
extensions/charlies_content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/charlies_content/charlies_config.tpl

    r21379 r21380  
    451451{/html_head}
    452452
    453 {combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
    454 {combine_script id="jquery.ui.tabs" path="themes/default/js/ui/minified/jquery.ui.tabs.min.js"}
     453{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
     454{known_script id="jquery.ui.tabs" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.tabs.packed.js"}
  • extensions/charlies_content/main.inc.php

    r21379 r21380  
    11<?php /*
    22Plugin Name: Charlies content
    3 Version: auto
     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
     
    2525define('CHARLIES_DIR' , basename(dirname(__FILE__)));
    2626define('CHARLIES_PATH' , PHPWG_PLUGINS_PATH . CHARLIES_DIR . '/');
     27define('CHARLIES_VER' , '2.1.b');
    2728$x = @file_get_contents( $conf['local_data_dir'].'/plugins/'.basename(dirname(__FILE__)).'.dat');
    2829if ($x!==false) $charlie = unserialize($x);
     
    3435                array_push($infos, l10n('Your configuration configuration has been reset.'));
    3536}
    36 
    37 $default = array(
     37if (!isset($charlie['version']) or  $charlie['version'] != CHARLIES_VER)
     38{
     39        $default = array(
    3840                        'autoload'                      => 1,
    3941                        'autoplay'                      => 1,
     
    9597                        'color16'                               => '#111111',
    9698                );
    97         $charlie = array_merge( $default, $charlie );
     99        if (!isset($charlie['version'])) $charlie = $default;
     100        else $charlie = array_merge( $default, $charlie );
    98101        if (!isset($charlie['FlvStreamer']))    $charlie['FlvStreamer'] = array('flv',);
    99102        if (!isset($charlie['Flash']))                  $charlie['Flash'] = array('swf',);
     
    106109        if (!isset($charlie['Archive']))                $charlie['Archive'] = array('zip','rar',);
    107110        if (!isset($charlie['GPS']))                    $charlie['GPS'] = array('gpx',);
     111        $charlie['version'] = CHARLIES_VER;
    108112
    109113        $dir = $conf['local_data_dir'].'/plugins/';
     
    112116        fwrite($file, serialize($charlie));
    113117        fclose( $file );
    114 
     118}
    115119  /* Note: Uppercase extensions are not requested */
    116120  /**
Note: See TracChangeset for help on using the changeset viewer.