Changeset 5647


Ignore:
Timestamp:
Apr 4, 2010, 10:44:52 PM (14 years ago)
Author:
nikrou
Message:
  • Improve categories selections in admin
  • Fix some mispelling language keys
Location:
extensions/photoWidget
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • extensions/photoWidget/CHANGELOG

    r5613 r5647  
     1photoWidget 0.2.0 - 2010-04-04
     2================================
     3* Improve categories selections in admin
     4* Fix some mispelling language keys
     5
    16photoWidget 0.1.1 - 2010-04-03
    27================================
  • extensions/photoWidget/admin.php

    r5611 r5647  
    3030
    3131if (!empty($_POST['submit'])) {
    32   if (isset($_POST['pw_all_categories']) && $_POST['pw_all_categories']!=$me->pw_all_categories) {
    33     $me->pw_all_categories = $_POST['pw_all_categories'];
    34     array_push($GLOBALS['page']['infos'],
    35                l10n('You choose that mode for').' '.l10n('all categories'));
    36     $save_config = true;
    37   } else {
    38     if (!empty($_POST['pw_categories']) && $_POST['pw_categories']!=$me->pw_categories) {
    39       $me->pw_categories = $_POST['pw_categories'];
     32  if (isset($_POST['pw_all_categories'])) {
     33    if ($_POST['pw_all_categories']==1) {
    4034      array_push($GLOBALS['page']['infos'],
    41                  l10n('You choose that mode for').' '.
    42                  l10n_dec('one category',
    43                           'severals categories',
    44                           count($_POST['pw_categories'])));
     35                 l10n('You choose that mode for').' '.l10n('all categories'));
     36      $me->pw_all_categories = 1;
     37      $me->pw_categories = array();
    4538      $save_config = true;
     39    } else {
     40      if (isset($_POST['pw_categories'])) {
     41        if (count($_POST['pw_categories'])==1 && ($_POST['pw_categories'][0]=='__none__')) {
     42          array_push($GLOBALS['page']['errors'],
     43                     l10n('You must choose at least one category'));
     44          $me->pw_categories = array();
     45          $save_config = true;     
     46        } else {
     47          array_push($GLOBALS['page']['infos'],
     48                     l10n('You choose that mode for').' '.
     49                     l10n_dec('one category',
     50                              'severals categories',
     51                              count($_POST['pw_categories'])));
     52          $me->pw_all_categories = 0;
     53          $me->pw_categories = $_POST['pw_categories'];       
     54          $save_config = true;     
     55        }
     56      } else {
     57        array_push($GLOBALS['page']['errors'],
     58                   l10n('You must choose at least one category'));
     59      }
    4660    }
    4761  }
    48     if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) {
     62
     63  if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) {
    4964    $me->pw_width = intval($_POST['pw_width']);
    5065    array_push($GLOBALS['page']['infos'], l10n('Width has been updated'));
  • extensions/photoWidget/css/admin.css

    r5611 r5647  
    3535
    3636p.hide {
    37   filter: alpha(opacity=70);
    38   opacity: 0.7;
    39   -moz-opacity: 0.7;
    40   -khtml-opacity: 0.7;
    41 
     37  display: none;
    4238}
  • extensions/photoWidget/default_values.inc.php

    r5611 r5647  
    2121
    2222$default_values['pw_all_categories'] = 0;
     23$default_values['pw_categories'] = array();
    2324$default_values['pw_bgcolor'] = '000000';
    2425$default_values['pw_width'] = 600;
  • extensions/photoWidget/include/photoWidgetContent.class.php

    r5611 r5647  
    2222class photoWidgetContent
    2323{
    24   private $query_string = null;
     24  private $query_string = null, $applicable = false;
    2525 
    2626  public function __construct($config) {
  • extensions/photoWidget/language/en_UK/index.php

    r5625 r5647  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     3// | pwgPhotoWidget  - a plugin for Piwigo                                 |
    64// +-----------------------------------------------------------------------+
    7 // | file          : $Id$
    8 // | last update   : $Date$
    9 // | last modifier : $Author$
    10 // | revision      : $Revision$
     5// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
    116// +-----------------------------------------------------------------------+
    127// | This program is free software; you can redistribute it and/or modify  |
  • extensions/photoWidget/language/en_UK/plugin.lang.php

    r5613 r5647  
    2222$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = 'That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.';
    2323$lang['You can choose that mode for displaying one, severals or all categories'] = 'You can choose that mode for displaying one, severals or all categories';
     24$lang['Main configuration'] = 'Main configuration';
    2425$lang['All categories'] = 'All categories';
     26$lang['Applicable categorie(s)'] = 'Applicable categorie(s)';
    2527$lang['Animation size'] = 'Animation size';
    2628$lang['Animation background color'] = 'Animation background color';
  • extensions/photoWidget/language/es_ES/index.php

    r5624 r5647  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     3// | pwgPhotoWidget  - a plugin for Piwigo                                 |
    64// +-----------------------------------------------------------------------+
    7 // | file          : $Id$
    8 // | last update   : $Date$
    9 // | last modifier : $Author$
    10 // | revision      : $Revision$
     5// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
    116// +-----------------------------------------------------------------------+
    127// | This program is free software; you can redistribute it and/or modify  |
  • extensions/photoWidget/language/es_ES/plugin.lang.php

    r5625 r5647  
    33// | photoWidget  - a plugin for Piwigo                                    |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2010 ddtddt  |
     5// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
     6// | Copyright(C) 2010 ddtddt                                              |
    67// +-----------------------------------------------------------------------+
    78// | This program is free software; you can redistribute it and/or modify  |
     
    2122
    2223$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = 'Este plugin fija las imagettas bajo la forma de una animación flash 3D.';
    23 $lang['Vous can choose that mode for displaying one, severals or all categories'] = 'Usted puede elegir este modo de fijación como la una, varios o todas las categorías';
     24$lang['You can choose that mode for displaying one, severals or all categories'] = 'Usted puede elegir este modo de fijación como la una, varios o todas las categorías';
    2425$lang['All categories'] = 'Todas las categorías';
    2526$lang['Animation size'] = 'Talla de la animación';
  • extensions/photoWidget/language/fr_FR/index.php

    r5625 r5647  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | PhpWebGallery - a PHP based picture gallery                           |
    4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     3// | pwgPhotoWidget  - a plugin for Piwigo                                 |
    64// +-----------------------------------------------------------------------+
    7 // | file          : $Id$
    8 // | last update   : $Date$
    9 // | last modifier : $Author$
    10 // | revision      : $Revision$
     5// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
    116// +-----------------------------------------------------------------------+
    127// | This program is free software; you can redistribute it and/or modify  |
  • extensions/photoWidget/language/fr_FR/plugin.lang.php

    r5611 r5647  
    2121
    2222$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = 'Ce plugin affiche les imagettes sous la forme d\'une animation flash en 3D.';
    23 $lang['Vous can choose that mode for displaying one, severals or all categories'] = 'Vous pouvez choisir ce mode d\'affichage pour une, plusieurs ou toutes les catégories';
     23$lang['You can choose that mode for displaying one, severals or all categories'] = 'Vous pouvez choisir ce mode d\'affichage pour une, plusieurs ou toutes les catégories';
     24$lang['Main configuration'] = 'Configuration générale';
    2425$lang['All categories'] = 'Toutes les catégories';
     26$lang['Applicable categorie(s)'] = 'Choix de catégorie(s)';
    2527$lang['Animation size'] = 'Taille de l\'animation';
    2628$lang['Animation background color'] = 'Couleur de fond de l\'animation';
  • extensions/photoWidget/language/templates/plugin.lang.php

    r5611 r5647  
    2121
    2222$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = '';
    23 $lang['Vous can choose that mode for displaying one, severals or all categories'] = '';
     23$lang['You can choose that mode for displaying one, severals or all categories'] = '';
     24$lang['Main configuration'] = '';
    2425$lang['All categories'] = '';
     26$lang['Applicable categorie(s)'] = '';
    2527$lang['Animation size'] = '';
    2628$lang['Animation background color'] = '';
  • extensions/photoWidget/main.inc.php

    r5613 r5647  
    2222/*
    2323Plugin Name: photoWidget
    24 Version: 0.1.1
     24Version: 0.2.0
    2525Description: add an amazing 3D animation for pictures
    2626Plugin URI: http://piwigo.org/ext/extension_view.php?eid=370
  • extensions/photoWidget/template/admin.tpl

    r5613 r5647  
    77<script type="text/javascript">
    88$(function() {
     9$('input[name=pw_all_categories]').change(function() {
     10if ($(this).attr('value')==0) {
     11$('#pw-select-categories').removeClass('hide');
     12} else {
     13$('#pw-select-categories').addClass('hide');
     14}
     15});
     16
    917$('input.pwg-picker')
    1018  .each(function() {
     
    4755  <legend>{'Main configuration'|translate}</legend>
    4856  <p class="field radio"><span>{'All categories'|translate} ?</span>
    49     {html_radios name='pw_all_categories options=$PW_CAT_CHOICES selected=$PW_ALL_CATEGORIES}
     57    {html_radios name="pw_all_categories" options=$PW_CAT_CHOICES selected=$PW_ALL_CATEGORIES}
    5058  </p>
    5159
    52   <p class="field pw-categories">
     60  <p class="field pw-categories{if $PW_ALL_CATEGORIES==1} hide{/if}" id="pw-select-categories">
    5361    <label>{'Applicable categorie(s)'|translate}</label>
    5462    <select name="pw_categories[]" multiple="multiple" size="{$pw_categories|@count|@max:3}">
    55       <option value=""></option>
     63      <option value="__none__"></option>
    5664      {html_options options=$ALL_CATEGORIES selected=$PW_CATEGORIES}
    5765    </select>
Note: See TracChangeset for help on using the changeset viewer.