Changeset 22253
- Timestamp:
- Apr 17, 2013, 1:34:12 PM (11 years ago)
- Location:
- extensions/bmp_description
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/bmp_description/initadmin.php
r22247 r22253 10 10 11 11 function BMPD_add_batch_manager_prefilters($prefilters) 12 { 12 {load_language('plugin.lang', BMPD_PATH); 13 13 array_push($prefilters, array( 14 14 'ID' => 'BMPD', 15 'NAME' => l10n('With outdescription'),15 'NAME' => l10n('With no description'), 16 16 )); 17 17 return $prefilters; … … 60 60 } 61 61 62 63 add_event_handler('loc_end_element_set_global', 'BMPD_loc_end_element_set_global'); 64 add_event_handler('element_set_global_action', 'BMPD_element_set_global_action', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 65 66 function BMPD_loc_end_element_set_global() 67 { 68 global $template; 69 70 $template->append('element_set_global_plugins_actions', array( 71 'ID' => 'BMPD3', 72 'NAME' => l10n('Set description'), 73 'CONTENT' => ' 74 <input type="checkbox" name="check_BMPD4"> '.l10n('remove description').'<br> 75 <textarea rows="5" cols="50" class="description" name="BMPD3" id="BMPD3">'.l10n('Type here the description').'</textarea> 76 <input type="checkbox" name="check_BMPD"> '.l10n('confirm').' 77 ', 78 )); 79 } 80 81 function BMPD_element_set_global_action($action, $collection) 82 { 83 if ($action == 'BMPD3') 84 { 85 global $page; 86 87 if (empty($_POST['check_BMPD'])) 88 { 89 array_push($page['warnings'], l10n('You need to confirm')); 90 } 91 else 92 { 93 94 if (isset($_POST['check_BMPD4'])) 95 { 96 $_POST['BMPD3'] = null; 97 } 98 99 $datas = array(); 100 foreach ($collection as $image_id) 101 { 102 array_push( 103 $datas, 104 array( 105 'id' => $image_id, 106 'comment' => $_POST['BMPD3'] 107 ) 108 ); 109 } 110 111 mass_updates( 112 IMAGES_TABLE, 113 array('primary' => array('id'), 'update' => array('comment')), 114 $datas 115 ); 116 117 } 118 } 119 } 120 62 121 ?> -
extensions/bmp_description/language/en_UK/description.txt
r22247 r22253 1 Add in Batch Manager Prefiltre with / with outdescription1 Add in Batch Manager Prefiltre with / with no description - action on description -
extensions/bmp_description/language/en_UK/plugin.lang.php
r22247 r22253 1 1 <?php 2 2 $lang['With description'] = 'With description'; 3 $lang['Without description'] = 'Without description'; 3 $lang['With no description'] = 'With no description'; 4 $lang['remove description'] = 'remove description'; 5 $lang['Type here the description'] = 'Type here the description'; 4 6 ?> -
extensions/bmp_description/language/fr_FR/description.txt
r22247 r22253 1 Ajouter dans la Gestion par lot avec description et sans description1 Ajouter dans la Gestion par lot avec description / sans description et ajouter action possible sur les descriptions -
extensions/bmp_description/language/fr_FR/plugin.lang.php
r22247 r22253 2 2 $lang['With description'] = 'Avec description'; 3 3 $lang['Without description'] = 'Sans description'; 4 $lang['remove description'] = 'supprimer la description'; 5 $lang['Type here the description'] = 'Entrez ici la description'; 4 6 ?>
Note: See TracChangeset
for help on using the changeset viewer.