Dotclear

Changeset 499


Ignore:
Timestamp:
09/17/08 14:15:00 (15 years ago)
Author:
Moe
Message:

Subscribe to comments 1.2.1 :

  • fixed bug with PostgreSQL
  • fixed bug with not empty $_POST array
  • fixed bugs with undefined $_ctx->posts->post_id
  • added message when there is no post_type
Location:
plugins/subscribeToComments
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/subscribeToComments/_define.php

    r489 r499  
    3030     /* Description*/                "Subscribe to comments", 
    3131     /* Author */                    "Moe (http://gniark.net/)", 
    32      /* Version */                   '1.2', 
     32     /* Version */                   '1.2.1', 
    3333     /* Permissions */               'admin' 
    3434); 
  • plugins/subscribeToComments/_public.php

    r490 r499  
    5858               # from /dotclear/inc/admin/prepend.php, modified 
    5959               # Check nonce from POST requests 
    60                if (!empty($_POST)) 
     60               if ((!empty($_POST)) AND (count($_POST) > 0)) 
    6161               { 
    6262                    # post but no nonce : when someone post a comment in a post with  
     
    430430               $checked = null; 
    431431 
    432                # if checkbox if unchecked, don't check it 
     432               # if checkbox is unchecked, don't check it 
    433433               if (isset($_POST['subscribeToComments'])) 
    434434                    {$checked = true;} 
     
    454454           
    455455          /** 
    456           display a CSS rule for defaults themes 
     456          display a CSS rule for default themes 
    457457          */ 
    458458          public static function publicHeadContent() 
    459459          { 
    460                global $_ctx; 
    461  
    462                if (subscribeToComments::getPost($_ctx->posts->post_id) == false) 
    463                {return;} 
    464  
    465460               echo '<style type="text/css" media="screen">'."\n". 
    466461               '#comment-form #subscribeToComments '. 
     
    472467          add tpl code after the <tpl:EntryIf comments_active="1">...</tpl:EntryIf> tag 
    473468          @param    core <b>core</b>    Dotclear core 
    474           @param    core <b>array</b>   b ? 
     469          @param    b    <b>array</b>   tag 
    475470          @param    attr <b>array</b>   attributes 
    476471          */ 
     
    478473          { 
    479474               global $_ctx; 
    480  
    481                if (subscribeToComments::getPost($_ctx->posts->post_id) == false) 
    482                {return;} 
    483475 
    484476               if ($core->url->type == 'feed') {return;} 
     
    487479                    && $attr['comments_active'] == 1 && !isset($attr['pings_active'])) 
    488480               { 
     481                    if ((!is_numeric($_ctx->posts->post_id)) OR 
     482                    (subscribeToComments::getPost($_ctx->posts->post_id) == false)) 
     483                    { 
     484                         return; 
     485                    } 
     486                    # else 
    489487                    return  
    490488                    '<?php if (($core->blog->settings->subscribetocomments_active) && 
  • plugins/subscribeToComments/index.php

    r490 r499  
    295295               <p><?php printf(__('Activate %s with the following post types :'), 
    296296                    __('Subscribe to comments')); ?></p> 
    297                <ul> 
    298                     <?php 
    299                          $available_post_types = subscribeToComments::getPostTypes(); 
    300                          $post_types = subscribeToComments::getAllowedPostTypes(); 
     297               <?php 
     298                    $available_post_types = subscribeToComments::getPostTypes(); 
     299                    $post_types = subscribeToComments::getAllowedPostTypes(); 
     300                    if (!empty($available_post_types)) 
     301                    { 
     302                         echo '<ul>'; 
    301303                         foreach ($available_post_types as $type) 
    302304                         { 
     
    306308                              '</label></li>'); 
    307309                         } 
    308                     ?> 
    309                </ul> 
     310                         echo '</ul>'; 
     311                    } 
     312                    else 
     313                    { 
     314                         echo('<p>'.__('No entry yet. Create a new entry.').'</p>'); 
     315                    } 
     316               ?> 
     317                
    310318               <!--<p class="checkboxes-helpers"></p>--> 
    311319 
  • plugins/subscribeToComments/lib.subscribeToComments.php

    r490 r499  
    122122          global $core; 
    123123 
    124           $rs = $core->con->select('SELECT `post_type` type '. 
     124          $rs = $core->con->select('SELECT post_type AS type '. 
    125125          'FROM '.$core->prefix.'post GROUP BY type ORDER BY type ASC;'); 
    126126 
  • plugins/subscribeToComments/locales/fr/main.po

    r489 r499  
    33"Project-Id-Version: Subscribe to comments\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2008-08-13 19:52+0100\n" 
    6 "PO-Revision-Date: 2008-08-13 19:53+0100\n" 
     5"POT-Creation-Date: 2008-09-17 14:12+0100\n" 
     6"PO-Revision-Date: 2008-09-17 14:13+0100\n" 
    77"Last-Translator: Moe <poedit@gniark.net>\n" 
    88"Language-Team: Moe <poedit@gniark.net>\n" 
     
    3535 
    3636#: _public.php:143 
    37 #: _public.php:438 
     37#: _public.php:443 
    3838msgid "Logged in" 
    3939msgstr "Connecté" 
     
    6363msgstr "Abonné au billet" 
    6464 
    65 #: _public.php:445 
    66 #: index.php:436 
    67 #: index.php:449 
    68 #: index.php:456 
     65#: _public.php:450 
     66#: index.php:453 
     67#: index.php:466 
     68#: index.php:473 
    6969msgid "Receive following comments by email" 
    7070msgstr "Recevoir les commentaires suivants par email" 
    7171 
    72 #: _public.php:496 
     72#: _public.php:509 
    7373msgid "Subscribe to receive following comments by email or manage subscriptions" 
    7474msgstr "S'abonner pour recevoir les commentaires suivants par email ou modifier les abonnements" 
    7575 
    76 #: _public.php:497 
     76#: _public.php:510 
    7777msgid "Subscribe to receive following comments by email" 
    7878msgstr "S'abonner pour recevoir les commentaires suivants par email" 
     
    8383 
    8484#: lib.subscribeToComments.php:54 
    85 #: class.subscriber.php:463 
     85#: class.subscriber.php:461 
    8686msgid "Invalid key." 
    8787msgstr "Clé invalide." 
    8888 
    89 #: lib.subscribeToComments.php:203 
     89#: lib.subscribeToComments.php:205 
    9090#, php-format 
    9191msgid "<img src=\"images/check-off.png\" alt=\"%1$s\" title=\"%1$s\" /> Notification email not sent, click on <strong>%2$s</strong>." 
    9292msgstr "<img src=\"images/check-off.png\" alt=\"%1$s\" title=\"%1$s\" /> Email de notification non envoyé, cliquez sur <strong>%2$s</strong>." 
    9393 
    94 #: lib.subscribeToComments.php:203 
     94#: lib.subscribeToComments.php:205 
    9595msgid "not sent" 
    9696msgstr "" 
    9797 
    98 #: lib.subscribeToComments.php:203 
     98#: lib.subscribeToComments.php:205 
    9999msgid "save" 
    100100msgstr "" 
    101101 
    102 #: lib.subscribeToComments.php:207 
     102#: lib.subscribeToComments.php:209 
    103103#, php-format 
    104104msgid "<img src=\"images/check-on.png\" alt=\"%1$s\" title=\"%1$s\" /> Notification email sent." 
    105105msgstr "<img src=\"images/check-on.png\" alt=\"%1$s\" title=\"%1$s\" /> Email de notification envoyé." 
    106106 
    107 #: lib.subscribeToComments.php:207 
     107#: lib.subscribeToComments.php:209 
    108108msgid "sent" 
    109109msgstr "" 
    110110 
    111 #: lib.subscribeToComments.php:209 
     111#: lib.subscribeToComments.php:211 
    112112#: _admin.php:28 
    113113#: index.php:79 
    114114#: index.php:144 
    115 #: index.php:235 
    116 #: index.php:266 
    117 #: index.php:283 
    118 #: index.php:288 
    119 #: index.php:430 
    120 #: index.php:472 
    121 #: index.php:492 
     115#: index.php:240 
     116#: index.php:274 
     117#: index.php:291 
     118#: index.php:296 
     119#: index.php:447 
     120#: index.php:489 
     121#: index.php:509 
    122122msgid "Subscribe to comments" 
    123123msgstr "Abonnement aux commentaires" 
     
    180180 
    181181#: class.subscriber.php:62 
    182 #: class.subscriber.php:310 
     182#: class.subscriber.php:308 
    183183msgid "Invalid email address or key." 
    184184msgstr "Adresse email ou clé invalide." 
    185185 
    186 #: class.subscriber.php:151 
     186#: class.subscriber.php:152 
    187187msgid "Invalid post." 
    188188msgstr "Billet invalide." 
    189189 
    190 #: class.subscriber.php:198 
    191 #: class.subscriber.php:468 
     190#: class.subscriber.php:196 
     191#: class.subscriber.php:466 
    192192msgid "This email address already exists." 
    193193msgstr "Cette adresse email existe déjà." 
    194194 
    195 #: class.subscriber.php:472 
     195#: class.subscriber.php:470 
    196196msgid "Link expired, request another email." 
    197197msgstr "Lien périmé, demandez un autre email." 
     
    206206 
    207207#: index.php:77 
    208 #: index.php:503 
     208#: index.php:520 
    209209msgid "Email address" 
    210210msgstr "Adresse email" 
     
    255255msgstr "Le plugin %s fonctionne." 
    256256 
    257 #: index.php:220 
     257#: index.php:225 
    258258msgid "Test email sent." 
    259259msgstr "Email test envoyé." 
    260260 
    261 #: index.php:224 
     261#: index.php:229 
    262262msgid "Configuration successfully updated." 
    263263msgstr "Configuration mise à jour avec succès." 
    264264 
    265 #: index.php:272 
     265#: index.php:280 
    266266msgid "Error:" 
    267267msgstr "Erreur:" 
    268268 
    269 #: index.php:273 
     269#: index.php:281 
    270270msgid "Unable to find metadata plugin" 
    271271msgstr "Impossible de trouver l'extension metadata" 
    272272 
    273 #: index.php:277 
     273#: index.php:285 
    274274msgid "Settings" 
    275275msgstr "Paramètres" 
    276276 
    277 #: index.php:283 
     277#: index.php:291 
    278278#, php-format 
    279279msgid "Activate %s" 
    280280msgstr "Activer %s" 
    281281 
    282 #: index.php:286 
     282#: index.php:294 
    283283msgid "Post types" 
    284284msgstr "Types de billets" 
    285285 
    286 #: index.php:287 
     286#: index.php:295 
    287287#, php-format 
    288288msgid "Activate %s with the following post types :" 
    289289msgstr "Activer %s pour les types de billets suivants :" 
    290290 
    291 #: index.php:303 
     291#: index.php:314 
     292msgid "No entry yet. Create a new entry." 
     293msgstr "Pas encore de billet. Créez une nouveau billet." 
     294 
     295#: index.php:320 
    292296msgid "Email formatting" 
    293297msgstr "Format des emails" 
    294298 
    295 #: index.php:304 
     299#: index.php:321 
    296300msgid "You can format the emails using the following tags." 
    297301msgstr "Vous pouvez formater les emails en utilisant les balises suivantes." 
    298302 
    299 #: index.php:305 
     303#: index.php:322 
    300304msgid "Each tag will be replaced by the associated value." 
    301305msgstr "Chaque balise sera remplacée par la valeur associée." 
    302306 
    303 #: index.php:306 
     307#: index.php:323 
    304308msgid "Tags available in all the contexts" 
    305309msgstr "Balises disponibles dans tous les contextes" 
    306310 
    307 #: index.php:310 
    308 #: index.php:344 
    309 #: index.php:369 
    310 #: index.php:394 
     311#: index.php:327 
     312#: index.php:361 
     313#: index.php:386 
     314#: index.php:411 
    311315msgid "Tag" 
    312316msgstr "Balise" 
    313317 
    314 #: index.php:310 
    315 #: index.php:344 
    316 #: index.php:369 
    317 #: index.php:394 
     318#: index.php:327 
     319#: index.php:361 
     320#: index.php:386 
     321#: index.php:411 
    318322msgid "Value" 
    319323msgstr "Valeur" 
    320324 
    321 #: index.php:318 
     325#: index.php:335 
    322326msgid "Email sent when an account is created or if a subscriber request it" 
    323327msgstr "Email envoyé quand un compte est créé ou si un abonné le demande" 
    324328 
    325 #: index.php:320 
    326 #: index.php:351 
    327 #: index.php:376 
    328 #: index.php:401 
     329#: index.php:337 
     330#: index.php:368 
     331#: index.php:393 
     332#: index.php:418 
    329333msgid "Subject" 
    330334msgstr "Sujet" 
    331335 
    332 #: index.php:326 
    333 #: index.php:357 
    334 #: index.php:382 
    335 #: index.php:407 
     336#: index.php:343 
     337#: index.php:374 
     338#: index.php:399 
     339#: index.php:424 
    336340msgid "Content" 
    337341msgstr "Contenu" 
    338342 
    339 #: index.php:334 
     343#: index.php:351 
    340344msgid "Email sent when a subscriber subscribe to the comments of a post" 
    341345msgstr "Email envoyé quand un abonné s'abonne aux commentaires d'un billet" 
    342346 
    343 #: index.php:339 
     347#: index.php:356 
    344348msgid "Send an email for each subscription to the comments of a post" 
    345349msgstr "Envoyer un email pour chaque abonnement aux commentaires d'un billet" 
    346350 
    347 #: index.php:341 
    348 #: index.php:366 
    349 #: index.php:391 
     351#: index.php:358 
     352#: index.php:383 
     353#: index.php:408 
    350354msgid "Available tags" 
    351355msgstr "Balises disponibles" 
    352356 
    353 #: index.php:365 
     357#: index.php:382 
    354358msgid "Email sent when a new comment is published" 
    355359msgstr "Email envoyé quand un nouveau commentaire est publié" 
    356360 
    357 #: index.php:390 
     361#: index.php:407 
    358362msgid "Email sent when a subscriber want to change his email address" 
    359363msgstr "Email envoyé quand un abonné veut changer d'adresse email" 
    360364 
    361 #: index.php:415 
    362 #: index.php:485 
     365#: index.php:432 
     366#: index.php:502 
    363367msgid "Save configuration" 
    364368msgstr "Enregistrer la configuration" 
    365369 
    366 #: index.php:419 
    367 #: index.php:420 
     370#: index.php:436 
     371#: index.php:437 
    368372msgid "Display" 
    369373msgstr "Affichage" 
    370374 
    371 #: index.php:422 
     375#: index.php:439 
    372376msgid "This plugin needs to add some code on the post page." 
    373377msgstr "Ce plugin a besoin d'ajouter du code sur la page du billet." 
    374378 
    375 #: index.php:423 
     379#: index.php:440 
    376380msgid "This can be done automatically by checking the following checkboxes." 
    377381msgstr "Cela peut être fait automatiquement en cochant les cases suivantes." 
    378382 
    379 #: index.php:424 
     383#: index.php:441 
    380384msgid "If you want to customize the display on the post page (the post.hml file of your theme), uncheck the following checkboxes and follow the instructions under each checkbox :" 
    381385msgstr "Si vous voulez modifier l'affichage sur la page du billet, décochez les cases suivantes et suivez les instructions sous chaque case :" 
    382386 
    383 #: index.php:425 
     387#: index.php:442 
    384388#, php-format 
    385389msgid "You can use the plugin <strong>%s</strong> to edit the file <strong>post.html</strong>." 
    386390msgstr "Vous pousez utiliser le plugin <strong>%s</strong> pour éditer le fichier <strong>post.html</strong>." 
    387391 
    388 #: index.php:426 
     392#: index.php:443 
    389393msgid "Theme Editor" 
    390394msgstr "" 
    391395 
    392 #: index.php:429 
     396#: index.php:446 
    393397#, php-format 
    394398msgid "Install %s on the post page." 
    395399msgstr "Installer %s sur la page du billet." 
    396400 
    397 #: index.php:435 
     401#: index.php:452 
    398402#, php-format 
    399403msgid "Add the <strong>%s</strong> checkbox in the comment form" 
    400404msgstr "Ajouter la case <strong>%s</strong> dans le formulaire de commentaire" 
    401405 
    402 #: index.php:440 
    403 #: index.php:460 
    404 #: index.php:476 
     406#: index.php:457 
     407#: index.php:477 
     408#: index.php:493 
    405409msgid "or" 
    406410msgstr "ou" 
    407411 
    408 #: index.php:441 
     412#: index.php:458 
    409413msgid "insert this in the comment form (suggestion : in the <code>&lt;fieldset&gt;</code> before the <code>&lt;/form&gt;</code> tag) :" 
    410414msgstr "insérez ceci dans le formulaire de commentaire (suggestion : dans le <code>&lt;fieldset&gt;</code> avant la balise <code>&lt;/form&gt;</code>) :" 
    411415 
    412 #: index.php:448 
     416#: index.php:465 
    413417#, php-format 
    414418msgid "If the <strong>%s</strong> checkbox is not displayed correctly and the blog use Blowup or Blue Silence theme, check this :" 
    415419msgstr "Si la case <strong>%s</strong> n'est pas affichée correctement et que le blog utilise le thème Blowup ou Blue Silence, cochez ceci :" 
    416420 
    417 #: index.php:455 
     421#: index.php:472 
    418422#, php-format 
    419423msgid "Add a CSS rule to style the <strong>%1$s</strong> checkbox" 
    420424msgstr "Ajouter une règle CSS pour styler la case <strong>%1$s</strong>" 
    421425 
    422 #: index.php:461 
     426#: index.php:478 
    423427msgid "add this CSS rule at the end of the file <strong>style.css</strong>" 
    424428msgstr "ajoutez cette règle CSS à la fin du fichier <strong>style.css</strong>" 
    425429 
    426 #: index.php:471 
     430#: index.php:488 
    427431#, php-format 
    428432msgid "Add a link to the <strong>%s</strong> page between the comments and the trackbacks" 
    429433msgstr "Ajouter un lien vers la page <strong>%s</strong> entre les commentaires et les rétroliens" 
    430434 
    431 #: index.php:477 
     435#: index.php:494 
    432436msgid "insert this anywhere on the page (suggestion : just after the <code>&lt;/form&gt;</code> tag) :" 
    433437msgstr "insérez ceci n'importe où dans la page (suggestion : juste après la balise <code>&lt;/form&gt;</code>) :" 
    434438 
    435 #: index.php:489 
    436 #: index.php:491 
     439#: index.php:506 
     440#: index.php:508 
    437441msgid "Help" 
    438442msgstr "" 
    439443 
    440 #: index.php:492 
     444#: index.php:509 
    441445#, php-format 
    442446msgid "%s send notification emails to the subscribers of a post when :" 
    443447msgstr "%s envoie des emails de notification aux abonnés d'un billet quand :" 
    444448 
    445 #: index.php:494 
     449#: index.php:511 
    446450msgid "a comment is posted and published immediatly" 
    447451msgstr "un commentaire est posté et publié immédiatement" 
    448452 
    449 #: index.php:495 
     453#: index.php:512 
    450454msgid "a pending comment is published" 
    451455msgstr "un commentaire en attente est publié à partir de l'interface d'administation" 
    452456 
    453 #: index.php:497 
     457#: index.php:514 
    454458msgid "If this weblog is hosted by free.fr, create a <code>/sessions/</code> directory in the root directory of the website." 
    455459msgstr "Si ce blog est hébergé chez free.fr, créez un répertoire <code>/sessions/</code> dans le répertoire racine de ce site." 
    456460 
    457 #: index.php:498 
     461#: index.php:515 
    458462msgid "To use this plugin, you have to test if the server can send emails :" 
    459463msgstr "Pour utiliser ce plugin, vous devez tester si le serveur peut envoyer des emails :" 
    460464 
    461 #: index.php:501 
     465#: index.php:518 
    462466msgid "Test" 
    463467msgstr "Test" 
    464468 
    465 #: index.php:508 
     469#: index.php:525 
    466470#, php-format 
    467471msgid "This will send a email, if you don't receive it, try to <a href=\"%s\">change the way Dotclear send emails</a>." 
    468472msgstr "Ceci enverra un email, si vous ne le recevez pas, essayez de <a href=\"%s\">changer la façon dont Dotclear envoie les emails</a>" 
    469473 
    470 #: index.php:511 
     474#: index.php:528 
    471475msgid "Try to send an email" 
    472476msgstr "Essayer d'envoyer un email" 
    473477 
    474 #: index.php:515 
     478#: index.php:532 
    475479#, php-format 
    476480msgid "Inspired by <a href=\"%1$s\">%2$s</a>" 
    477481msgstr "Inspiré par <a href=\"%1$s\">%2$s</a>" 
    478482 
    479 #: index.php:517 
     483#: index.php:534 
    480484msgid "Subscribe to comments for WordPress" 
    481485msgstr "Subscribe to comments pour WordPress" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map