Changeset 1858428
- Timestamp:
- 04/14/2018 11:33:59 PM (8 years ago)
- Location:
- org-frontpage/trunk
- Files:
-
- 5 edited
-
languages/org-frontpage-fr_FR.mo (modified) (previous)
-
languages/org-frontpage-fr_FR.po (modified) (2 diffs)
-
org-frontpage-plugin-admin.php (modified) (4 diffs)
-
org-frontpage.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
org-frontpage/trunk/languages/org-frontpage-fr_FR.po
r1578103 r1858428 1 1 msgid "" 2 2 msgstr "" 3 "Plural-Forms: nplurals=2; plural=(n > 1);\n"4 3 "Project-Id-Version: Organisation FrontPage\n" 5 "POT-Creation-Date: 2017-01-19 12:46+0100\n" 6 "PO-Revision-Date: 2017-01-19 12:52+0100\n" 4 "POT-Creation-Date: 2018-04-15 00:39+0200\n" 5 "PO-Revision-Date: 2018-04-15 00:42+0200\n" 6 "Last-Translator: \n" 7 7 "Language-Team: \n" 8 "Language: fr_FR\n" 8 9 "MIME-Version: 1.0\n" 9 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "X-Generator: Poedit 1.8.11\n" 12 "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 "X-Generator: Poedit 2.0.5\n" 12 14 "X-Poedit-Basepath: ..\n" 13 15 "X-Poedit-WPHeader: org-frontpage.php\n" … … 16 18 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 17 19 "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 18 "Last-Translator: \n"19 "Language: fr_FR\n"20 20 "X-Poedit-SearchPath-0: .\n" 21 21 "X-Poedit-SearchPathExcluded-0: *.js\n" 22 22 23 #: org-frontpage-plugin-admin.php: 823 #: org-frontpage-plugin-admin.php:35 24 24 msgid "Action denied" 25 25 msgstr "Action rejetée" 26 26 27 #: org-frontpage-plugin-admin.php: 2727 #: org-frontpage-plugin-admin.php:71 28 28 msgid "Homepage Settings" 29 29 msgstr "Paramètres de la page d’accueil" 30 30 31 #: org-frontpage-plugin-admin.php: 3031 #: org-frontpage-plugin-admin.php:74 32 32 msgid "Posts on the home page" 33 33 msgstr "Articles affichés sur la page d'accueil" 34 34 35 #: org-frontpage-plugin-admin.php: 3935 #: org-frontpage-plugin-admin.php:83 36 36 msgid "Total number of posts on the home page" 37 37 msgstr "Nombre total d'articles sur la page d'accueil" 38 38 39 #: org-frontpage-plugin-admin.php: 4239 #: org-frontpage-plugin-admin.php:86 40 40 msgid "Number of posts at the top of the home page" 41 41 msgstr "Nombre d'articles en haut de la page d'accueil" 42 42 43 #: org-frontpage-plugin-admin.php:46 43 #: org-frontpage-plugin-admin.php:90 org-frontpage-plugin-admin.php:101 44 msgid "Save changes" 45 msgstr "Sauvegarder les modifications" 46 47 #: org-frontpage-plugin-admin.php:93 48 msgid "Selection of posts" 49 msgstr "Choix des articles de la page d'accueil" 50 51 #: org-frontpage-plugin-admin.php:95 44 52 msgid "The posts displayed on the home page are summarized below" 45 53 msgstr "" 46 54 "Les articles affichés sur la page d'accueil sont récapitulés ci-dessous" 47 55 48 #: org-frontpage-plugin-admin.php: 4756 #: org-frontpage-plugin-admin.php:96 49 57 msgid "" 50 "The selection of these posts can not be done on this page: it takes place in"51 " the edit page of the post"58 "The selection of these posts can be done on this page: it also takes place " 59 "in the edit page of the post" 52 60 msgstr "" 53 "Le choix de ces articles ne peut pas être fait sur cette page : il"54 "s'effectue dans la page d'édition de l'article"61 "Le choix de ces articles peut être modifié sur cette page : il peut " 62 "s'effectuer aussi dans la page d'édition de l'article" 55 63 56 #: org-frontpage-plugin-admin.php:60 org-frontpage-plugin-admin.php:64 57 #: org-frontpage.php:135 org-frontpage.php:139 64 #: org-frontpage-plugin-admin.php:99 65 msgid "Nombre d'articles de la liste de choix" 66 msgstr "" 67 68 #: org-frontpage-plugin-admin.php:125 org-frontpage.php:166 69 #: org-frontpage.php:170 58 70 msgid "Rank" 59 71 msgstr "Rang" 60 72 61 #: org-frontpage-plugin-admin.php: 64 org-frontpage.php:13973 #: org-frontpage-plugin-admin.php:126 org-frontpage.php:170 62 74 msgid "Not set" 63 75 msgstr "Non défini" 64 76 65 #: org-frontpage-plugin-admin.php: 6966 msgid " Save changes"67 msgstr " Sauvegarder les modifications"77 #: org-frontpage-plugin-admin.php:141 78 msgid "Modify post range" 79 msgstr "Actualiser l'article de rang" 68 80 69 #: org-frontpage.php: 7581 #: org-frontpage.php:92 70 82 msgid "Not on the homepage" 71 83 msgstr "Pas sur la page d'accueil" 72 84 73 #: org-frontpage.php: 7885 #: org-frontpage.php:95 74 86 msgid "#" 75 87 msgstr "N°" 76 88 77 #: org-frontpage.php: 7889 #: org-frontpage.php:95 78 90 msgid "Home Page" 79 91 msgstr "Page d’accueil" 80 92 81 #: org-frontpage.php: 9293 #: org-frontpage.php:111 82 94 msgid "Location on home page" 83 95 msgstr "Position sur la page d'accueil" 84 96 85 #: org-frontpage.php:1 1497 #: org-frontpage.php:140 86 98 msgid "Post location" 87 99 msgstr "Position de l'article" 88 100 89 #: org-frontpage.php:1 22101 #: org-frontpage.php:148 90 102 msgid "Posts currently selected" 91 103 msgstr "Articles actuellement sélectionnés" 92 104 93 #: org-frontpage.php: 190105 #: org-frontpage.php:281 94 106 msgid "Rank / home page" 95 107 msgstr "Rang / page d'accueil" 96 108 97 #: org-frontpage.php: 218109 #: org-frontpage.php:309 98 110 msgid "Front page organization" 99 111 msgstr "Organisation de la page d'accueil" 100 112 101 #: org-frontpage.php: 218113 #: org-frontpage.php:309 102 114 msgid "Org Frontpage" 103 115 msgstr "Org Frontpage" -
org-frontpage/trunk/org-frontpage-plugin-admin.php
r1782839 r1858428 2 2 // Inclus dans org-frontpage.php 3 3 // Options de la page d'accueil (frontpage) 4 5 6 //Définir la valeur par défaut du nombre d'articles à proposer pour la front page 7 if (empty($_SESSION['nbposts'])) { 8 $_SESSION['nbposts'] = 15; 9 } 10 11 //Si on a modifié le nombre de posts à afficher dans la liste déroulante 12 if (isset($_POST['nb_posts_a_choisir'])) { 13 $_SESSION['nbposts'] = $_POST['nb_posts_a_choisir']; 14 } 15 16 // table des derniers articles 17 $p=0; 18 $arts=array(); 19 20 global $args; 21 $args = array('numberposts' => $_SESSION['nbposts']); 22 global $post; 23 24 $lesposts = get_posts( $args ); 25 foreach ( $lesposts as $post ) : setup_postdata( $post ); 26 $arts[$p]=array('ID' => $post->ID, 'Titre' => $post->post_title); 27 $p++; 28 endforeach; 29 wp_reset_postdata(); 30 4 31 5 32 // Pourquoi utiliser$_request au lieu de $_post, puisqu'on sait que la méthode est "post" ? … … 22 49 23 50 } 51 52 // On récupère le Rang de l'article éventuellement modifié 53 if (!empty($this->_nb_posts_frontpage)) { 54 $article = -1; 55 56 for ($i = 1; $i <= $this->_nb_posts_frontpage; $i++) { 57 if (isset($_POST['article-'.$i])) { 58 $article = intval(htmlspecialchars($_POST['article-'.$i])); 59 $rg = $i; 60 break; 61 } 62 } 63 if ($article > -1) { 64 update_option("ofp_post_frontpage_".$rg, $arts[$article]['ID']); 65 } 66 } 67 24 68 ?> 25 69 … … 37 81 38 82 <table class="optiontable"> 39 <tr valign=" top"><th scope="row"><?php _e("Total number of posts on the home page", 'org-frontpage'); ?>:</th><td>83 <tr valign="center"><th scope="row"><?php _e("Total number of posts on the home page", 'org-frontpage'); ?>:</th><td> 40 84 <input type="number" name="nb_posts_frontpage" id="nb_posts_frontpage" min="1" value="<?php echo $this->_nb_posts_frontpage; ?>"> 41 85 </td></tr> 42 <tr valign=" top"><th scope="row"><?php _e("Number of posts at the top of the home page", 'org-frontpage'); ?>:</th><td>86 <tr valign="center"><th scope="row"><?php _e("Number of posts at the top of the home page", 'org-frontpage'); ?>:</th><td> 43 87 <input type="number" name="nb_posts_lead" id="nb_posts_lead" min="0" value="<?php echo $this->_nb_posts_lead; ?>"> 44 88 </td></tr> 45 89 </table> 90 <p class="submit"><input name="save" type="submit" value="<?php _e("Save changes",'org-frontpage'); ?>" /></p> 91 </form> 92 93 <h3><?php _e("Selection of posts", 'org-frontpage'); ?></h3> 94 46 95 <p><?php _e("The posts displayed on the home page are summarized below",'org-frontpage'); ?><br /> 47 <?php _e("The selection of these posts cannot be done on this page: it takes place in the edit page of the post",'org-frontpage'); ?><br /></p> 48 <table class="optiontable"> 96 <?php _e("The selection of these posts can be done on this page: it also takes place in the edit page of the post",'org-frontpage'); ?><br /></p> 97 98 <form method="post"> 99 <label><?php _e("Nombre d'articles de la liste de choix") ?> </label> 100 <input type="number" name="nb_posts_a_choisir" min="3" value="<?php echo $_SESSION['nbposts']; ?>" /> 101 <input name="save_nb_choix" type="submit" value="<?php _e("Save changes",'org-frontpage'); ?>" /> 102 </form> 103 49 104 <?php 50 // Affichage des articles de la page d'accueil 105 //var_dump($arts); 106 107 // Affichage et modification des articles de la page d'accueil 51 108 for ($i=1;$i<=$this->_nb_posts_frontpage;$i++) { 52 109 $nom_option = "ofp_post_frontpage_".$i; … … 59 116 if (!empty($article)) { 60 117 $titre = $article->post_title; 61 118 } 62 119 ?> 63 120 <!--Articles --> 64 <tr valign="top"> 65 <th scope="row"><?php _e("Rank", 'org-frontpage'); echo " ".$i ; ?> : </th><td style="background-color: #FFFFFF;"><?php echo $titre; ?></td> 121 <div style="margin: 18px 0; padding: 6px 0; background-color: #CCCCCC;" > 122 <form method="post"> 123 <table class="optiontable"> 124 <tr valign="center"> 125 <th scope="row"><?php _e("Rank", 'org-frontpage'); echo " ".$i ; ?> : </th><td style="background-color: #FFFFFF;"> 126 <?php if($titre=="") { _e("Not set", 'org-frontpage'); } else { echo $titre;} ?></td> 127 <td> 128 <select id="article-<?php echo $i; ?>" name="article-<?php echo $i; ?>" style="max-width: 100%;"> 129 <?php 130 $a=0; 131 foreach($arts as $art) { 132 ?> 133 <option value="<?php echo $a; $a++; ?>"><?php echo $art['Titre'] ; ?></option> 134 <?php 135 } 136 ?> 137 </select> 138 </td> 66 139 </tr> 67 <?php } else { ?>68 < tr valign="top">69 < th scope="row"><?php _e("Rank", 'org-frontpage'); echo " ".$i ; ?> : </th><td style="background-color: #FFFFFF;"><?php _e("Not set", 'org-frontpage'); ?></td>70 </ tr>71 <?php } }?>140 </table> 141 <input name="modif-<?php echo $i; ?>" type="submit" value="<?php _e("Modify post range",'org-frontpage'); echo' '; echo $i; ?>" /> 142 </form> 143 </div> 144 <?php } ?> 72 145 73 </table>74 <p class="submit"><input name="save" type="submit" value="<?php _e("Save changes",'org-frontpage'); ?>" /></p>75 </form>76 146 147 -
org-frontpage/trunk/org-frontpage.php
r1844214 r1858428 3 3 Plugin Name: Organisation FrontPage 4 4 Description: Adding a meta box in the post editor to set the rank of post in the home page 5 Version: 1.65 Version: 2.0 6 6 Author: B Gineste 7 7 Text Domain: org-frontpage -
org-frontpage/trunk/readme.txt
r1844214 r1858428 3 3 Tags: frontpage, front page, theme, template, frontpage, magazine, post, themes, posts 4 4 Requires at least: 4.4.0 5 Tested up to: 4.9. 46 Stable tag: 1.65 Tested up to: 4.9.5 6 Stable tag: 2.0 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 16 16 **Ce plugin permet d'assigner à un post le rang qu'il doit occuper sur la page d'accueil.** 17 17 18 Pour cela, le plugin ajoute une meta box dans la page d'édition des posts 19 grâce à laquelle on peut choisir, au moyen d'une combolist, le rang du post en cours d'édition. 18 Pour cela, le plugin ajoute une page "OrgFrontpage" dans le menu "Réglages" du tableau de bord. 20 19 21 Le nombre de posts à faire figurer sur la page d'accueil est défini dans le sous-menu *Org frontpage* du menu *Réglages* 22 de l'interface d'administration. Par défaut, ce nombre est fixé à 5. 20 On peut y définir le nombre de posts à faire figurer sur la page d'accueil. Par défaut, ce nombre est fixé à 5. 23 21 Dans ce même sous-menu, il est possible de définir le nombre d'articles à mettre en évidence en tête de page. Par défaut, il y en a zéro. 24 22 (Remarque : Le nombre de posts défini pour figurer sur la page d'accueil inclut les posts d'entête). 25 23 26 Une colonne a été ajoutée dans la liste des posts de l'interface d'administration : 24 Une fois ces paramètres définis, on peut choisir dans une liste déroulante les articles à afficher sur la page d'accueil. La liste contient, par défaut, les 15 derniers articles publiées. Ce nombre est paramétrable. 25 26 De plus, le plugin ajoute une meta box dans la page d'édition des posts 27 grâce à laquelle on peut choisir, au moyen d'une combolist, le rang du post en cours d'édition. 28 29 Enfin, une colonne a été ajoutée dans la liste des posts de l'interface d'administration : 27 30 elle indique, le cas échéant, le rang des posts sur la page d'accueil. 28 31 … … 91 94 == Changelog == 92 95 96 = 2.0 = 97 * Améliartion de l'ergonomie : le chois de tous les articles à ranger sur la page d'accueil peut désormais se faire à un endroit unique, la page des réglages du plugin. 98 Toutefois, le choix de l'emplacement d'un article reste possible à partir de la page d'édition de celui-ci. 99 93 100 = 1.6 = 94 101 * Correction d'un bug : l'affichage de la liste des articles de la page d'accueil, présente sur la page d'édition d'un article, provoquait un warning lorsqu'un article de cette liste avait été supprimé.
Note: See TracChangeset
for help on using the changeset viewer.