|
Revision 12819, 1.4 KB
(checked in by mistic100, 17 months ago)
|
|
fix detection regex and watermark position
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | load_plugin_lang('charlies_content'); |
|---|
| 3 | |
|---|
| 4 | switch ($PLUGIN_ACTION) { |
|---|
| 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 | |
|---|
| 29 | break; |
|---|
| 30 | |
|---|
| 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 | } |
|---|
| 46 | ?> |
|---|