Ignore:
Timestamp:
Jan 1, 2012, 10:09:17 PM (12 years ago)
Author:
mistic100
Message:

fix detection regex and watermark position

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PHP_Optimisateur/plugins/charlies_content/setup.php

    r10337 r12819  
    33
    44switch ($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                 }
     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    }
    2828
    29                 break;
     29    break;
    3030
    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;
     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;
    4545}
    4646?>
Note: See TracChangeset for help on using the changeset viewer.