- Timestamp:
- Jan 1, 2012, 10:09:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/plugins/charlies_content/setup.php
r10337 r12819 3 3 4 4 switch ($PLUGIN_ACTION) { 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 5 // Affichage simple de la configuration 6 case 'read_config': 7 // vérifie que ffmpeg est bien présent 8 if (!file_exists('include/ffmpeg.exe') AND $plugin_config['active']) { 9 $ERRORS['fatal'][] = 'charlies_content.error_ffmpeg'; 10 } 11 12 $PAGE['content'] .= ' 13 <table> 14 <tr> 15 <td>'.l10n('charlies_content.video_time').' :</td> 16 <td>'.bool_to_string($plugin_config['video_time']).($plugin_config['video_time']!=='rand' ? ' sec':'om').'</td> 17 </tr> 18 </table>'; 19 break; 20 21 22 // Actions avant enregistrement 23 case 'save_config': 24 if (!is_decimal($_POST['Plugins']['charlies_content']['video_time']) AND $_POST['Plugins']['charlies_content']['video_time'] != 'rand') { 25 $_POST['Plugins']['charlies_content']['video_time'] = 'rand'; 26 $ERRORS['conf'][] = array(l10n('charlies_content.video_time'), 'must_be_integer'); 27 } 28 28 29 29 break; 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 31 32 // Formulaire d'édition 33 case 'edit_config': 34 $PAGE['content'] .=' 35 <table> 36 <tr> 37 <td>'.l10n('charlies_content.video_time').' :</td> 38 <td> 39 <input type="text" name="Plugins[charlies_content][video_time]" value="'.$plugin_config['video_time'].'" size="3"/>sec 40 <i>'.l10n('charlies_content.rand').'</i> 41 </td> 42 </tr> 43 </table>'; 44 break; 45 45 } 46 46 ?>
Note: See TracChangeset
for help on using the changeset viewer.