[9201] | 1 | <?php |
---|
| 2 | switch ($PLUGIN_ACTION) { |
---|
| 3 | // Affichage simple de la configuration |
---|
| 4 | case 'read_config': |
---|
| 5 | load_plugin_lang('convert_pan'); |
---|
| 6 | $PAGE_CONTENT[0] .= '<table> |
---|
| 7 | <tr> |
---|
| 8 | <td>'.l10n('convert_pan.NAMEpanorama').' :</td> |
---|
| 9 | <td>'.$plugin_config['NAMEpanorama'].'</td> |
---|
| 10 | </tr> |
---|
| 11 | <tr> |
---|
| 12 | <td>'.l10n('convert_pan.DIMpanorama').' :</td> |
---|
| 13 | <td>'.$plugin_config['DIMpanorama'].'px</td> |
---|
| 14 | </tr> |
---|
| 15 | <tr> |
---|
| 16 | <td>'.l10n('convert_pan.RatioPanThumb').' :</td> |
---|
| 17 | <td>'.$plugin_config['RatioPanThumb'].'</td> |
---|
| 18 | </tr> |
---|
| 19 | </table>'; |
---|
| 20 | break; |
---|
| 21 | |
---|
| 22 | // Actions avant enregistrement |
---|
| 23 | case 'save_config': |
---|
| 24 | $_POST['Plugins']['convert_pan']['NAMEpanorama'] = delete_special_car($_POST['Plugins']['convert_pan']['NAMEpanorama']); |
---|
| 25 | |
---|
| 26 | if (!is_decimal($_POST['Plugins']['convert_pan']['DIMpanorama'])) { |
---|
| 27 | $_POST['Plugins']['convert_pan']['DIMpanorama'] = 500; |
---|
| 28 | $Errors['ErrorConfig'] = 'notice'; |
---|
| 29 | } |
---|
| 30 | if (!is_decimal($_POST['Plugins']['convert_pan']['RatioPanThumb'])) { |
---|
| 31 | $_POST['Plugins']['convert_pan']['RatioPanThumb'] = 1.7; |
---|
| 32 | $$Errors['ErrorConfig'] = 'notice'; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | break; |
---|
| 36 | |
---|
| 37 | // Formulaire d'édition |
---|
| 38 | case 'edit_config': |
---|
| 39 | load_plugin_lang('convert_pan'); |
---|
| 40 | $PAGE_CONTENT[0] .= '<table> |
---|
| 41 | <tr> |
---|
| 42 | <td>'.l10n('convert_pan.NAMEpanorama').' :</td> |
---|
| 43 | <td><input type="text" name="Plugins[convert_pan][NAMEpanorama]" value="'.$plugin_config['NAMEpanorama'].'" size="6"/></td> |
---|
| 44 | </tr> |
---|
| 45 | <tr> |
---|
| 46 | <td>'.l10n('convert_pan.DIMpanorama').' :</td> |
---|
| 47 | <td> |
---|
| 48 | <input type="text" name="Plugins[convert_pan][DIMpanorama]" value="'.$plugin_config['DIMpanorama'].'" size="3"/>px |
---|
| 49 | <i>'.l10n('convert_pan.unactive').'</i> |
---|
| 50 | </td> |
---|
| 51 | </tr> |
---|
| 52 | <tr> |
---|
| 53 | <td>'.l10n('convert_pan.RatioPanThumb').' :</td> |
---|
| 54 | <td> |
---|
| 55 | <input type="text" name="Plugins[convert_pan][RatioPanThumb]" value="'.$plugin_config['RatioPanThumb'].'" size="3"/> |
---|
| 56 | <i>'.l10n('convert_pan.unactive').'</i> |
---|
| 57 | </td> |
---|
| 58 | </tr> |
---|
| 59 | </table>'; |
---|
| 60 | break; |
---|
| 61 | } |
---|
| 62 | ?> |
---|