Changeset 2152
- Timestamp:
- 04/01/10 00:04:32 (14 years ago)
- Location:
- plugins/enhancePostContent
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/enhancePostContent/_define.php
r2148 r2152 17 17 /* Description*/ "Add features to words in post content", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0.8 ',19 /* Version */ '0.8.1', 20 20 /* Permissions */ 'content' 21 21 ); -
plugins/enhancePostContent/_install.php
r2148 r2152 55 55 56 56 $s->put('enhancePostContent_active',false,'boolean','Enable enhancePostContent',false,true); 57 $s->put('enhancePostContent_list_sortby','epc_key','string','Admin records list field order',false,true); 58 $s->put('enhancePostContent_list_order','desc','string','Admin records list order',false,true); 59 $s->put('enhancePostContent_list_nb',20,'integer','Admin records list nb per page',false,true); 57 60 $s->put('enhancePostContent_allowedtplvalues',serialize(libEPC::defaultAllowedTplValues()),'string','List of allowed template values',false,true); 58 61 $s->put('enhancePostContent_allowedpubpages',serialize(libEPC::defaultAllowedPubPages()),'string','List of allowed template pages',false,true); -
plugins/enhancePostContent/index.php
r2148 r2152 18 18 19 19 $active = (boolean) $s->enhancePostContent_active; 20 $list_sortby = (string) $s->enhancePostContent_list_sortby; 21 $list_order = (string) $s->enhancePostContent_list_order; 22 $list_nb = (integer) $s->enhancePostContent_list_nb; 20 23 $_filters = libEPC::blogFilters(); 21 24 $allowedtplvalues = libEPC::blogAllowedTplValues(); … … 37 40 } 38 41 42 $sortby_combo = array( 43 __('Date') => 'epc_upddt', 44 __('Key') => 'epc_key', 45 __('Value') => 'epc_value', 46 __('ID') => 'epc_id' 47 ); 48 49 $order_combo = array( 50 __('Descending') => 'desc', 51 __('Ascending') => 'asc' 52 ); 53 39 54 $records = new epcRecords($core); 40 55 … … 51 66 { 52 67 $active = !empty($_POST['active']); 68 $list_sortby = in_array($_POST['list_sortby'],$sortby_combo) ? $_POST['list_sortby'] : 'epc_id'; 69 $list_order = in_array($_POST['list_order'],$order_combo) ? $_POST['list_order'] : 'desc'; 70 $list_nb = isset($_POST['list_nb']) && $_POST['list_nb'] > 0 ? $_POST['list_nb'] : 20; 53 71 54 72 $s->setNamespace('enhancePostContent'); 55 73 $s->put('enhancePostContent_active',$active); 74 $s->put('enhancePostContent_list_sortby',$list_sortby); 75 $s->put('enhancePostContent_list_order',$list_order); 76 $s->put('enhancePostContent_list_nb',$list_nb); 56 77 57 78 if ($core->auth->check('admin',$core->blog->id)) … … 173 194 dcPage::jsPageTabs($default_tab); 174 195 175 176 196 # --BEHAVIOR-- enhancePostContentAdminHeader 177 197 $core->callBehavior('enhancePostContentAdminHeader',$core); 178 179 198 180 199 echo ' … … 183 202 __('Enhance post content').'</h2>'; 184 203 204 # Filters menu 185 205 echo '<p>'; 186 187 # Filters menu188 206 foreach($filters_id as $id => $name) 189 207 { … … 191 209 } 192 210 echo '</p><hr />'; 193 194 211 195 212 # Filter content … … 227 244 228 245 echo ' 229 <h2>'.__(' Parts to be filtered').'</h2>';246 <h2>'.__('Contents to be filtered').'</h2>'; 230 247 231 248 foreach($allowedtplvalues as $k => $v) … … 285 302 if ($filter['has_list']) 286 303 { 287 288 $sortby_combo = array(289 __('Date') => 'epc_upddt',290 __('Key') => 'epc_key',291 __('Value') => 'epc_value',292 __('ID') => 'epc_id'293 );294 295 $order_combo = array(296 __('Descending') => 'desc',297 __('Ascending') => 'asc'298 );299 300 304 $params = array(); 301 305 $params['epc_filter'] = $name; 302 306 303 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'epc_key';304 $order = !empty($_GET['order']) ? $_GET['order'] : 'desc';307 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : $list_sortby; 308 $order = !empty($_GET['order']) ? $_GET['order'] : $list_order; 305 309 $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 306 $nb_per_page = 30;307 310 308 311 if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 309 if ($nb_per_page != $_GET['nb']) { 310 $show_filters = true; 311 } 312 $nb_per_page = (integer) $_GET['nb']; 313 } 314 315 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 312 $list_nb = (integer) $_GET['nb']; 313 } 314 315 $params['limit'] = array((($page-1)*$list_nb),$list_nb); 316 316 317 317 if ($sortby !== '' && in_array($sortby,$sortby_combo)) { 318 318 if ($order !== '' && in_array($order,$order_combo)) { 319 319 $params['order'] = $sortby.' '.$order; 320 }321 322 if ($sortby != 'epc_key' || $order != 'desc') {323 $show_filters = true;324 320 } 325 321 } … … 333 329 } 334 330 335 $pager = new pager($page,$counter->f(0),$ nb_per_page,10);331 $pager = new pager($page,$counter->f(0),$list_nb,10); 336 332 $pager->html_prev = __('«prev.'); 337 333 $pager->html_next = __('next»'); … … 341 337 '&part='.$default_part. 342 338 '&tab=record'. 343 '&nb='.$ nb_per_page.339 '&nb='.$list_nb. 344 340 '&sortby=%s'. 345 341 '&order='.($order == 'desc' ? 'asc' : 'desc'). … … 443 439 form::checkbox(array('active'),'1',$active).' '. 444 440 __('Enable extension').'</label></p> 445 <p class="form-note">'.__('This also actives widget').'</p>'; 441 <p class="form-note">'.__('This also actives widget').'</p> 442 <h2>'.__('Records lists').'</h2> 443 <p class="form-note">'.__('This is the default order of records lists.').'</p> 444 <p class="field"><label>'.__('Order by:'). 445 form::combo('list_sortby',$sortby_combo,$list_sortby).'</label> </p> 446 <p class="field"><label>'.__('Sort:'). 447 form::combo('list_order',$order_combo,$list_order).'</label></p> 448 <p class="field"><label>'.__('Records per page:'). 449 form::field('list_nb',3,3,$list_nb).'</label></p>'; 446 450 447 451 if ($core->auth->check('admin',$core->blog->id)) -
plugins/enhancePostContent/locales/fr/main.lang.php
r2148 r2152 1 1 <?php 2 2 // Language: français 3 // Module: enhancePostContent - 0.8 4 // Date: 2010-03-31 00:47:073 // Module: enhancePostContent - 0.8.1 4 // Date: 2010-03-31 21:59:45 5 5 // Translated with dcTranslater - 1.3 6 6 7 7 #_admin.php:19 8 8 #_widgets.php:23 9 #index.php:1 7010 #index.php: 1839 #index.php:191 10 #index.php:202 11 11 $GLOBALS['__l10n']['Enhance post content'] = 'Amélioration du contenu'; 12 12 … … 84 84 85 85 #inc/lib.epc.php:212 86 $GLOBALS['__l10n']['Link some words. First term of the list is the term to link and second term the link.'] = 'Ajouter des liens. Le premier terme de la liste est le texte à lier et le seconde terme e t l\'adresse de lien.';86 $GLOBALS['__l10n']['Link some words. First term of the list is the term to link and second term the link.'] = 'Ajouter des liens. Le premier terme de la liste est le texte à lier et le seconde terme est l\'adresse de lien.'; 87 87 88 88 #inc/lib.epc.php:231 … … 98 98 $GLOBALS['__l10n']['View this user\'s twitter page'] = 'Voir la page Twitter de cet utilisateur'; 99 99 100 #index.php:208 101 #index.php:478 100 #index.php:44 101 #index.php:364 102 $GLOBALS['__l10n']['Key'] = 'Clé'; 103 104 #index.php:225 105 #index.php:482 102 106 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 103 107 104 #index.php:2 18108 #index.php:235 105 109 $GLOBALS['__l10n']['Pages to be filtered'] = 'Pages à filtrer'; 106 110 107 #index.php:2 29108 $GLOBALS['__l10n'][' Parts to be filtered'] = 'Parties à filtrer';109 110 #index.php:2 43111 #index.php:246 112 $GLOBALS['__l10n']['Contents to be filtered'] = 'Contenus à filtrer'; 113 114 #index.php:260 111 115 $GLOBALS['__l10n']['Filtering'] = 'Filtrage'; 112 116 113 #index.php:2 46117 #index.php:263 114 118 $GLOBALS['__l10n']['Case insensitive'] = 'Insensible à la casse'; 115 119 116 #index.php:2 49120 #index.php:266 117 121 $GLOBALS['__l10n']['Also use the plural'] = 'Utiliser également le pluriel'; 118 122 119 #index.php:2 50123 #index.php:267 120 124 $GLOBALS['__l10n']['Limit the number of replacement to:'] = 'Limiter le nombre de remplacement à :'; 121 125 122 #index.php:2 53126 #index.php:270 123 127 $GLOBALS['__l10n']['Leave it blank or set it to 0 for no limit'] = 'Laisser vide ou mettre à 0 pour aucune limite'; 124 128 125 #index.php:2 60129 #index.php:277 126 130 $GLOBALS['__l10n']['Class "%s":'] = 'Class CSS "%s" :'; 127 131 128 #index.php:2 65132 #index.php:282 129 133 $GLOBALS['__l10n']['The inserted HTML tag looks like: %s'] = 'Le code HTML de la balise est le suivant: %s'; 130 134 131 #index.php:2 66135 #index.php:283 132 136 $GLOBALS['__l10n']['Ignore HTML tags:'] = 'Ignorer les balises HTML :'; 133 137 134 #index.php:2 69138 #index.php:286 135 139 $GLOBALS['__l10n']['This is the list of HTML tags where content will be ignored.'] = 'Ceci est la liste des balises HTML dont le contenu sera ignoré.'; 136 140 137 #index.php:2 70141 #index.php:287 138 142 $GLOBALS['__l10n']['Tag "%s" always be ignored.'] = 'Les balises "%s" seront toujours ignorées.'; 139 143 140 #index.php:290 141 #index.php:368 142 $GLOBALS['__l10n']['Key'] = 'Clé'; 143 144 #index.php:350 144 #index.php:346 145 145 $GLOBALS['__l10n']['Records'] = 'Enregistrements'; 146 146 147 #index.php:3 53147 #index.php:349 148 148 $GLOBALS['__l10n']['Record successfully added'] = 'Enregistrement ajouté avec succès'; 149 149 150 #index.php:352 151 $GLOBALS['__l10n']['Records successfully updated'] = 'Enregistrements mis à jour avec succès'; 152 150 153 #index.php:356 151 $GLOBALS['__l10n']['Records successfully updated'] = 'Enregistrements mis à jour avec succès';152 153 #index.php:360154 154 $GLOBALS['__l10n']['No record'] = 'Pas d\'enregistrement'; 155 155 156 #index.php:3 92157 $GLOBALS['__l10n']['In order to remove a record, leave empty its key or value.'] = 'Pour retirer un enregistrement, lais er vide sa clé ou sa valeur.';158 159 #index.php:4 11156 #index.php:388 157 $GLOBALS['__l10n']['In order to remove a record, leave empty its key or value.'] = 'Pour retirer un enregistrement, laisser vide sa clé ou sa valeur.'; 158 159 #index.php:407 160 160 $GLOBALS['__l10n']['New record'] = 'Nouvel enregistrement'; 161 161 162 #index.php:4 13162 #index.php:409 163 163 $GLOBALS['__l10n']['Key:'] = 'Clé :'; 164 164 165 #index.php:41 6165 #index.php:412 166 166 $GLOBALS['__l10n']['Value:'] = 'Valeur :'; 167 167 168 #index.php:430 169 $GLOBALS['__l10n']['Settings of enhancePostContent'] = 'Paramètres de enhancePostContent'; 170 168 171 #index.php:434 169 $GLOBALS['__l10n']['Settings of enhancePostContent'] = 'Paramètres de enhancePostContent';170 171 #index.php:438172 172 $GLOBALS['__l10n']['Configuration successfully saved'] = 'Configuration sauvegardée avec succès'; 173 173 174 #index.php:44 4174 #index.php:440 175 175 $GLOBALS['__l10n']['Enable extension'] = 'Activer l\'extension'; 176 176 177 #index.php:44 5177 #index.php:441 178 178 $GLOBALS['__l10n']['This also actives widget'] = 'Ceci active également le widget'; 179 179 180 #index.php:451 181 $GLOBALS['__l10n']['This is a special feature to edit list of allowed template values and public pages where this plugin works.'] = 'Ceci est une option sépciale pour modifier les listes des balises de template et des pages publiques ou le plugin sera actif.'; 182 183 #index.php:452 180 #index.php:442 181 $GLOBALS['__l10n']['Records lists'] = 'Listes des enregistrements'; 182 183 #index.php:443 184 $GLOBALS['__l10n']['This is the default order of records lists.'] = 'Ceci est l\'ordre de trie par défaut des listes d\'enregistrements.'; 185 186 #index.php:448 187 $GLOBALS['__l10n']['Records per page:'] = 'Enregistrements par page :'; 188 189 #index.php:455 190 $GLOBALS['__l10n']['This is a special feature to edit list of allowed template values and public pages where this plugin works.'] = 'Ceci est une option spéciale pour modifier les listes des balises de template et des pages publiques ou le plugin sera actif.'; 191 192 #index.php:456 184 193 $GLOBALS['__l10n']['Allowed DC template values:'] = 'Autoriser les balises de template :'; 185 194 186 #index.php:45 5195 #index.php:459 187 196 $GLOBALS['__l10n']['Use "readable_name1:template_value1;readable_name2:template_value2;" like "entry content:EntryContent;entry excerpt:EntryExcerpt;".'] = 'Utiliser "titre1:valeur_de_template1;titre2:valeur_de_template2;" exemple "entry content:EntreyContent;entry excerpt:EntreyExcerpt;".'; 188 197 189 #index.php:4 56198 #index.php:460 190 199 $GLOBALS['__l10n']['Allowed public pages:'] = 'Autoriser les pages publiques :'; 191 200 192 #index.php:4 59201 #index.php:463 193 202 $GLOBALS['__l10n']['Use "readable_name1:template_page1;readable_name2:template_page2;" like "post page:post.html;home page:home.html;".'] = 'Utiliser "titre1:page_de_template1;titre2:page_de_template2;" comme "post page:post.html;home page:home.html;".'; 194 203 -
plugins/enhancePostContent/locales/fr/main.po
r2148 r2152 1 1 # Language: français 2 # Module: enhancePostContent - 0.8 3 # Date: 2010-03-31 00:47:072 # Module: enhancePostContent - 0.8.1 3 # Date: 2010-03-31 21:59:45 4 4 # Translated with translater 1.3 5 5 … … 7 7 msgstr "" 8 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: enhancePostContent 0.8 \n"9 "Project-Id-Version: enhancePostContent 0.8.1\n" 10 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2010-03-31T 00:47:07+00:00\n"11 "PO-Revision-Date: 2010-03-31T21:59:45+00:00\n" 12 12 "Last-Translator: JC Denis\n" 13 13 "Language-Team: \n" … … 17 17 #: _admin.php:19 18 18 #: _widgets.php:23 19 #: index.php:1 7020 #: index.php: 18319 #: index.php:191 20 #: index.php:202 21 21 msgid "Enhance post content" 22 22 msgstr "Amélioration du contenu" … … 120 120 #: inc/lib.epc.php:212 121 121 msgid "Link some words. First term of the list is the term to link and second term the link." 122 msgstr "Ajouter des liens. Le premier terme de la liste est le texte à lier et le seconde terme e t l'adresse de lien."122 msgstr "Ajouter des liens. Le premier terme de la liste est le texte à lier et le seconde terme est l'adresse de lien." 123 123 124 124 #: inc/lib.epc.php:231 … … 138 138 msgstr "Voir la page Twitter de cet utilisateur" 139 139 140 #: index.php:208 141 #: index.php:478 140 #: index.php:44 141 #: index.php:364 142 msgid "Key" 143 msgstr "Clé" 144 145 #: index.php:225 146 #: index.php:482 142 147 msgid "Settings" 143 148 msgstr "Paramètres" 144 149 145 #: index.php:2 18150 #: index.php:235 146 151 msgid "Pages to be filtered" 147 152 msgstr "Pages à filtrer" 148 153 149 #: index.php:2 29150 msgid " Parts to be filtered"151 msgstr " Parties à filtrer"152 153 #: index.php:2 43154 #: index.php:246 155 msgid "Contents to be filtered" 156 msgstr "Contenus à filtrer" 157 158 #: index.php:260 154 159 msgid "Filtering" 155 160 msgstr "Filtrage" 156 161 157 #: index.php:2 46162 #: index.php:263 158 163 msgid "Case insensitive" 159 164 msgstr "Insensible à la casse" 160 165 161 #: index.php:2 49166 #: index.php:266 162 167 msgid "Also use the plural" 163 168 msgstr "Utiliser également le pluriel" 164 169 165 #: index.php:2 50170 #: index.php:267 166 171 msgid "Limit the number of replacement to:" 167 172 msgstr "Limiter le nombre de remplacement à :" 168 173 169 #: index.php:2 53174 #: index.php:270 170 175 msgid "Leave it blank or set it to 0 for no limit" 171 176 msgstr "Laisser vide ou mettre à 0 pour aucune limite" 172 177 173 #: index.php:2 60178 #: index.php:277 174 179 msgid "Class \"%s\":" 175 180 msgstr "Class CSS \"%s\" :" 176 181 177 #: index.php:2 65182 #: index.php:282 178 183 msgid "The inserted HTML tag looks like: %s" 179 184 msgstr "Le code HTML de la balise est le suivant: %s" 180 185 181 #: index.php:2 66186 #: index.php:283 182 187 msgid "Ignore HTML tags:" 183 188 msgstr "Ignorer les balises HTML :" 184 189 185 #: index.php:2 69190 #: index.php:286 186 191 msgid "This is the list of HTML tags where content will be ignored." 187 192 msgstr "Ceci est la liste des balises HTML dont le contenu sera ignoré." 188 193 189 #: index.php:2 70194 #: index.php:287 190 195 msgid "Tag \"%s\" always be ignored." 191 196 msgstr "Les balises \"%s\" seront toujours ignorées." 192 197 193 #: index.php:290 194 #: index.php:368 195 msgid "Key" 196 msgstr "Clé" 197 198 #: index.php:350 198 #: index.php:346 199 199 msgid "Records" 200 200 msgstr "Enregistrements" 201 201 202 #: index.php:3 53202 #: index.php:349 203 203 msgid "Record successfully added" 204 204 msgstr "Enregistrement ajouté avec succès" 205 205 206 #: index.php:35 6206 #: index.php:352 207 207 msgid "Records successfully updated" 208 208 msgstr "Enregistrements mis à jour avec succès" 209 209 210 #: index.php:3 60210 #: index.php:356 211 211 msgid "No record" 212 212 msgstr "Pas d'enregistrement" 213 213 214 #: index.php:3 92214 #: index.php:388 215 215 msgid "In order to remove a record, leave empty its key or value." 216 msgstr "Pour retirer un enregistrement, lais er vide sa clé ou sa valeur."217 218 #: index.php:4 11216 msgstr "Pour retirer un enregistrement, laisser vide sa clé ou sa valeur." 217 218 #: index.php:407 219 219 msgid "New record" 220 220 msgstr "Nouvel enregistrement" 221 221 222 #: index.php:4 13222 #: index.php:409 223 223 msgid "Key:" 224 224 msgstr "Clé :" 225 225 226 #: index.php:41 6226 #: index.php:412 227 227 msgid "Value:" 228 228 msgstr "Valeur :" 229 229 230 #: index.php:43 4230 #: index.php:430 231 231 msgid "Settings of enhancePostContent" 232 232 msgstr "Paramètres de enhancePostContent" 233 233 234 #: index.php:43 8234 #: index.php:434 235 235 msgid "Configuration successfully saved" 236 236 msgstr "Configuration sauvegardée avec succès" 237 237 238 #: index.php:44 4238 #: index.php:440 239 239 msgid "Enable extension" 240 240 msgstr "Activer l'extension" 241 241 242 #: index.php:44 5242 #: index.php:441 243 243 msgid "This also actives widget" 244 244 msgstr "Ceci active également le widget" 245 245 246 #: index.php:451 246 #: index.php:442 247 msgid "Records lists" 248 msgstr "Listes des enregistrements" 249 250 #: index.php:443 251 msgid "This is the default order of records lists." 252 msgstr "Ceci est l'ordre de trie par défaut des listes d'enregistrements." 253 254 #: index.php:448 255 msgid "Records per page:" 256 msgstr "Enregistrements par page :" 257 258 #: index.php:455 247 259 msgid "This is a special feature to edit list of allowed template values and public pages where this plugin works." 248 msgstr "Ceci est une option s épciale pour modifier les listes des balises de template et des pages publiques ou le plugin sera actif."249 250 #: index.php:45 2260 msgstr "Ceci est une option spéciale pour modifier les listes des balises de template et des pages publiques ou le plugin sera actif." 261 262 #: index.php:456 251 263 msgid "Allowed DC template values:" 252 264 msgstr "Autoriser les balises de template :" 253 265 254 #: index.php:45 5266 #: index.php:459 255 267 msgid "Use \"readable_name1:template_value1;readable_name2:template_value2;\" like \"entry content:EntryContent;entry excerpt:EntryExcerpt;\"." 256 268 msgstr "Utiliser \"titre1:valeur_de_template1;titre2:valeur_de_template2;\" exemple \"entry content:EntreyContent;entry excerpt:EntreyExcerpt;\"." 257 269 258 #: index.php:4 56270 #: index.php:460 259 271 msgid "Allowed public pages:" 260 272 msgstr "Autoriser les pages publiques :" 261 273 262 #: index.php:4 59274 #: index.php:463 263 275 msgid "Use \"readable_name1:template_page1;readable_name2:template_page2;\" like \"post page:post.html;home page:home.html;\"." 264 276 msgstr "Utiliser \"titre1:page_de_template1;titre2:page_de_template2;\" comme \"post page:post.html;home page:home.html;\"." -
plugins/enhancePostContent/release.txt
r2148 r2152 1 1 x.x xxxxxxxx 2 2 * Not added priority on filters 3 4 0.8.1 20100331 5 * Fixed some l10n 6 * Added option for default list order 3 7 4 8 0.8 20100331
Note: See TracChangeset
for help on using the changeset viewer.