[2472] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | Piwigo - a PHP based picture gallery | |
---|
| 4 | // +-----------------------------------------------------------------------+ |
---|
[5196] | 5 | // | Copyright(C) 2008-2010 Piwigo Team http://piwigo.org | |
---|
[2472] | 6 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
| 7 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
| 8 | // +-----------------------------------------------------------------------+ |
---|
| 9 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 10 | // | it under the terms of the GNU General Public License as published by | |
---|
| 11 | // | the Free Software Foundation | |
---|
| 12 | // | | |
---|
| 13 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 14 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 15 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 16 | // | General Public License for more details. | |
---|
| 17 | // | | |
---|
| 18 | // | You should have received a copy of the GNU General Public License | |
---|
| 19 | // | along with this program; if not, write to the Free Software | |
---|
| 20 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 21 | // | USA. | |
---|
| 22 | // +-----------------------------------------------------------------------+ |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | // |
---|
[4852] | 26 | // New advice needs: |
---|
[2472] | 27 | // $lang['Adv_case'][xx] = 'Text' ==> in all plugin.lang |
---|
| 28 | // $adv['c'][xx] = Condition (default true) |
---|
| 29 | // $adv['v'][xx] = Value (if there is one (facultative)) |
---|
| 30 | // $adv['n'][xx] = Name of $conf (A new advice about blah-blah) |
---|
| 31 | // |
---|
| 32 | // prefix '**' . => Not a $conf['xxxxx'] |
---|
| 33 | |
---|
| 34 | load_language('plugin.lang', dirname(__FILE__).'/'); |
---|
| 35 | |
---|
| 36 | // No needed translation here below |
---|
| 37 | |
---|
| 38 | // Use l10n if your need a localization and update all plugin.lang |
---|
| 39 | |
---|
| 40 | $adv['n'][0] = '**' . $lang['contribute']; |
---|
| 41 | |
---|
| 42 | $adv['n'][1] = 'newcat_default_status'; |
---|
| 43 | $adv['c'][1] = ($conf['newcat_default_status'] !== 'public'); |
---|
| 44 | $adv['v'][1] = sprintf($lang['current'], 'public'); |
---|
| 45 | |
---|
| 46 | $adv['n'][2] = 'slideshow_period'; |
---|
| 47 | $adv['c'][2] = ( $conf['slideshow_period'] < 4 ); |
---|
| 48 | $adv['v'][2] = sprintf($lang['current'], $conf['slideshow_period']); |
---|
| 49 | |
---|
| 50 | $adv['n'][3] = 'file_ext'; |
---|
| 51 | $adv['c'][3] = ( in_array('php',$conf['file_ext']) ); |
---|
| 52 | $adv['v'][3] = sprintf($lang['current'], implode(', ', $conf['file_ext'])); |
---|
| 53 | |
---|
| 54 | $adv['n'][4] = 'show_iptc_mapping'; |
---|
| 55 | |
---|
| 56 | $adv['n'][5] = 'top_number'; |
---|
| 57 | $adv['c'][5] = ( $conf['top_number'] > 50 ); |
---|
| 58 | $adv['v'][5] = sprintf($lang['current'], $conf['top_number']); |
---|
| 59 | |
---|
| 60 | $adv['n'][6] = 'top_number'; |
---|
| 61 | $adv['c'][6] = ( $conf['top_number'] < 2 ) ? true : false; |
---|
| 62 | $adv['v'][6] = sprintf($lang['current'], $conf['top_number']); |
---|
| 63 | |
---|
| 64 | $adv['n'][7] = 'anti-flood_time'; |
---|
| 65 | $adv['c'][7] = ( $conf['anti-flood_time'] > 100 ) ? true : false; |
---|
| 66 | $adv['v'][7] = sprintf($lang['current'], $conf['anti-flood_time']); |
---|
| 67 | |
---|
| 68 | $adv['n'][8] = 'calendar_datefield'; |
---|
| 69 | $adv['c'][8] = ( !in_array($conf['calendar_datefield'], |
---|
| 70 | array('date_creation','date_available')) ); |
---|
| 71 | $adv['v'][8] = sprintf($lang['current'], $conf['calendar_datefield']); |
---|
| 72 | |
---|
| 73 | /* Unavailable creation date and default calendar is creation date */ |
---|
| 74 | $adv['n'][9] = 'calendar_datefield'; |
---|
| 75 | $adv['c'][9] = ( (( $conf['use_exif'] and |
---|
| 76 | isset($conf['use_exif_mapping']['date_creation']) ) |
---|
| 77 | or ( $conf['use_iptc'] and |
---|
| 78 | isset($conf['use_iptc_mapping']['date_creation']) )) |
---|
| 79 | and ( $conf['calendar_datefield'] == 'date_creation' ) ) |
---|
| 80 | ? false : true; |
---|
| 81 | $adv['v'][9] = sprintf($lang['current'], $conf['calendar_datefield']); |
---|
| 82 | |
---|
| 83 | $adv['n'][10] = 'newcat_default_visible'; |
---|
| 84 | $adv['c'][10] = !$conf['newcat_default_visible']; |
---|
| 85 | $adv['v'][10] = sprintf($lang['current'], 'false'); |
---|
| 86 | |
---|
| 87 | $adv['n'][11] = 'level_separator'; |
---|
| 88 | $adv['c'][11] = ( $conf['level_separator'] == ' / ' ); |
---|
| 89 | $adv['v'][11] = sprintf($lang['current'], $conf['level_separator']); |
---|
| 90 | |
---|
| 91 | $adv['n'][12] = 'paginate_pages_around'; |
---|
| 92 | $adv['c'][12] = (($conf['paginate_pages_around'] < 2) |
---|
| 93 | or ($conf['paginate_pages_around'] > 12)); |
---|
| 94 | $adv['v'][12] = sprintf($lang['current'], $conf['paginate_pages_around']); |
---|
| 95 | |
---|
| 96 | $adv['n'][13] = 'tn_width'; |
---|
| 97 | $adv['c'][13] = (($conf['tn_width'] < 66) |
---|
| 98 | or ($conf['tn_width'] > 180)); |
---|
| 99 | $adv['v'][13] = sprintf($lang['current'], $conf['tn_width']); |
---|
| 100 | |
---|
| 101 | $adv['n'][14] = 'tn_height'; |
---|
| 102 | $adv['c'][14] = (($conf['tn_height'] < 66) |
---|
| 103 | or ($conf['tn_height'] > 180)); |
---|
| 104 | $adv['v'][14] = sprintf($lang['current'], $conf['tn_height']); |
---|
| 105 | |
---|
| 106 | $adv['n'][15] = 'tn_height'; |
---|
| 107 | |
---|
| 108 | $adv['c'][15] = ( $conf['tn_height'] !== $conf['tn_width'] ); |
---|
| 109 | $adv['v'][15] = l10n('TN-height&width'); |
---|
| 110 | |
---|
| 111 | $adv['n'][16] = 'show_version'; |
---|
| 112 | $adv['c'][16] = $conf['show_version']; |
---|
| 113 | $adv['v'][16] = sprintf($lang['current'], 'true'); |
---|
| 114 | |
---|
| 115 | $adv['n'][17] = 'show_thumbnail_caption'; |
---|
| 116 | $adv['c'][17] = $conf['show_thumbnail_caption']; |
---|
| 117 | $adv['v'][17] = sprintf($lang['current'], 'true'); |
---|
| 118 | |
---|
| 119 | $adv['n'][18] = 'show_picture_name_on_title'; |
---|
| 120 | $adv['c'][18] = $conf['show_picture_name_on_title']; |
---|
| 121 | $adv['v'][18] = sprintf($lang['current'], 'true'); |
---|
| 122 | |
---|
[2803] | 123 | $adv['n'][19] = 'tags_default_display_mode'; |
---|
| 124 | $adv['c'][15] = ( $conf['tags_default_display_mode'] == 'cloud' ); |
---|
| 125 | $adv['v'][19] = sprintf($lang['current'], "'".$conf['tags_default_display_mode']."'"); |
---|
[2472] | 126 | |
---|
| 127 | $adv['n'][20] = 'allow_random_representative'; |
---|
| 128 | $adv['c'][20] = $conf['allow_random_representative']; |
---|
| 129 | $adv['v'][20] = sprintf($lang['current'], 'true'); |
---|
| 130 | |
---|
| 131 | $adv['n'][21] = 'prefix_thumbnail'; |
---|
| 132 | $adv['c'][21] = ( $conf['prefix_thumbnail'] !== 'TN-' ); |
---|
| 133 | $adv['v'][21] = sprintf($lang['current'], $conf['prefix_thumbnail']); |
---|
| 134 | |
---|
| 135 | $adv['n'][22] = 'users_page'; |
---|
| 136 | $adv['c'][22] = ( $conf['users_page'] < 21 ); |
---|
| 137 | $adv['v'][22] = sprintf($lang['current'], $conf['users_page']); |
---|
| 138 | |
---|
| 139 | $adv['n'][23] = 'mail_options'; |
---|
| 140 | $adv['c'][23] = $conf['mail_options']; |
---|
| 141 | $adv['v'][23] = sprintf($lang['current'], 'true'); |
---|
| 142 | |
---|
| 143 | $adv['n'][24] = 'check_upgrade_feed'; |
---|
| 144 | $adv['c'][24] = $conf['check_upgrade_feed']; |
---|
| 145 | $adv['v'][24] = sprintf($lang['current'], 'true'); |
---|
| 146 | |
---|
| 147 | $adv['n'][25] = 'rate_items'; |
---|
| 148 | $adv['c'][25] = ( count($conf['rate_items']) < 4 ); |
---|
| 149 | $adv['v'][25] = sprintf($lang['current'], $conf['rate_items']); |
---|
| 150 | |
---|
| 151 | $adv['n'][26] = 'rate_items'; |
---|
| 152 | $adv['c'][26] = ( count($conf['rate_items']) > 6 ); |
---|
| 153 | $adv['v'][26] = sprintf($lang['current'], $conf['rate_items']); |
---|
| 154 | |
---|
[2797] | 155 | $adv['n'][27] = 'show_iptc'; |
---|
[2472] | 156 | $adv['c'][27] = $conf['show_iptc']; |
---|
| 157 | $adv['v'][27] = sprintf($lang['current'], 'true'); |
---|
| 158 | |
---|
| 159 | $adv['n'][28] = 'use_iptc'; |
---|
| 160 | $adv['c'][28] = $conf['use_iptc']; |
---|
| 161 | $adv['v'][28] = sprintf($lang['current'], 'true'); |
---|
| 162 | |
---|
| 163 | $adv['n'][29] = 'use_iptc'; |
---|
| 164 | |
---|
| 165 | $adv['n'][30] = 'use_iptc_mapping'; |
---|
| 166 | |
---|
| 167 | $adv['n'][31] = 'show_exif'; |
---|
| 168 | $adv['v'][31] = sprintf($lang['current'], (($conf['show_exif'])? 'true':'false' )); |
---|
| 169 | |
---|
| 170 | $adv['n'][32] = 'use_exif'; |
---|
| 171 | $adv['v'][32] = sprintf($lang['current'], (($conf['use_exif'])? 'true':'false' )); |
---|
| 172 | |
---|
| 173 | $adv['n'][33] = '**' . $lang['navigation']; |
---|
| 174 | |
---|
[2795] | 175 | $adv['n'][34] = 'compiled_template_cache_language'; |
---|
| 176 | $adv['v'][34] = sprintf($lang['current'], (($conf['compiled_template_cache_language'])? 'true':'false' )); |
---|
| 177 | |
---|
| 178 | $adv['n'][35] = 'template_compile_check'; |
---|
| 179 | $adv['v'][35] = sprintf($lang['current'], (($conf['template_compile_check'])? 'true':'false' )); |
---|
| 180 | |
---|
[2472] | 181 | ?> |
---|