Plugin Directory

Changeset 1058712


Ignore:
Timestamp:
01/02/2015 11:22:50 PM (11 years ago)
Author:
zhykos
Message:

Version 2.3.0: see readme.txt for changelog

Location:
comment-contest/trunk
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • comment-contest/trunk/comment-contest.php

    r980446 r1058712  
    33  Plugin Name: Comment Contest
    44  Plugin URI: http://wp-comment-contest.zhyweb.org/
    5   Description: If you create a contest on your website, you can draw all comments in a specific post
     5  Description: Comment Contest allows you to manage contests on your website. This plug-in draws all comments in a specific post and show you the winners.
    66  Author: Thomas "Zhykos" Cicognani
    7   Version: 2.2.3
     7  Version: 2.3.0
    88  Author URI: http://www.zhyweb.org/
    99 */
    1010
    1111/*
    12   Copyright 2009 - 2014 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
     12  Copyright 2009 - 2015 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
    1313
    1414  This program is free software; you can redistribute it and/or modify
     
    2727 */
    2828
    29 define(ORG_ZHYWEB_WP_COMMENT_CONTEST_PAGE_ID, "orgZhyweb-wpCommentContest");
     29define("ORG_ZHYWEB_WP_COMMENT_CONTEST_PAGE_ID", "orgZhyweb-wpCommentContest");
    3030
    3131require_once 'php/OrgZhyweb_WPCommentContest_MainUI.php';
     
    3434
    3535class CommentContest {
    36     private $localizationName = "comment-contest";
     36    private $pluginName = "comment-contest";
    3737   
    3838    private $pluginDir = '';
     39    private $pluginSystemPath = '';
    3940   
    4041    public function __construct() {
    41         $pluginPath = "/plugins/$this->localizationName";
     42        $pluginPath = "/plugins/$this->pluginName";
    4243       
    4344         // Initialization
    4445        $this->pluginDir = WP_CONTENT_URL . $pluginPath;
     46        $this->pluginSystemPath = plugin_dir_path( __FILE__ );
    4547       
    46         load_plugin_textdomain($this->localizationName, false, dirname(plugin_basename(__FILE__)).'/lang/');
     48        load_plugin_textdomain($this->pluginName, false, dirname(plugin_basename(__FILE__)).'/lang/');
    4749       
    4850        add_action('init', array($this, 'init'));
    4951       
    5052        // Add plug-in system in Wordpress
     53        // Add a new column in posts admin page
    5154        add_filter('manage_post_posts_columns', array($this, 'orgZhyweb_wpCommentContest_column_header'), 10);
    5255        add_action('manage_post_posts_custom_column', array($this, 'orgZhyweb_wpCommentContest_column_content'), 10, 2);
     56       
     57        // Add a new column in pages admin page
     58        add_filter('manage_pages_columns', array($this, 'orgZhyweb_wpCommentContest_column_header'), 10);
     59        add_action('manage_pages_custom_column', array($this, 'orgZhyweb_wpCommentContest_column_content'), 10, 2);
     60       
    5361       
    5462        // Add menu
     
    9098     */
    9199    public function orgZhyweb_wpCommentContest_addPluginMenu() {
    92         add_comments_page(__("Comment Contest", "comment-contest"), __("Comment Contest", "comment-contest"), 10, ORG_ZHYWEB_WP_COMMENT_CONTEST_PAGE_ID, array(new OrgZhyweb_WPCommentContest_MainUI($this->pluginDir), 'display'));
     100        add_comments_page(__("Comment Contest", "comment-contest"), __("Comment Contest", "comment-contest"), 10, ORG_ZHYWEB_WP_COMMENT_CONTEST_PAGE_ID, array(new OrgZhyweb_WPCommentContest_MainUI($this->pluginDir, $this->pluginSystemPath), 'display'));
    93101    }
    94102
     
    126134    }
    127135}
    128 ?>
  • comment-contest/trunk/css/comment-contest.css

    r845716 r1058712  
    1 /*  Copyright 2009 - 2014 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
     1/*  Copyright 2009 - 2015 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
    22
    33  This program is free software; you can redistribute it and/or modify
     
    4444}
    4545
    46 #mainHelp {
    47     margin-top: 15px;
     46.subsubsub {
     47    clear: both;
    4848}
    4949
    50 .subsubsub {
    51     clear: both;
     50.help {
     51    vertical-align: sub;
    5252}
    5353
  • comment-contest/trunk/css/comment-contest.min.css

    r828725 r1058712  
    1 .removedComment{background-color:#ffe5eb}.cheatComment{background-color:#ddffc9}.restoreLink{color:#006905;display:none}.cheatLink{color:#006905}.stopCheatLink{color:#bc0b0b;display:none}.help{height:15px;vertical-align:middle;margin-left:10px}#mainHelp{margin-top:15px}.subsubsub{clear:both}#filters{border-left:1px dotted black;padding-left:10px;margin-bottom:20px}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;text-shadow:0 0 2px #000;padding:4px 8px;border:1px solid rgba(255,255,255,0.25);background-color:#191919;background-color:rgba(25,25,25,0.92);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),to(#000));border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:0 0 3px #555;-webkit-box-shadow:0 0 3px #555;-moz-box-shadow:0 0 3px #555}#tiptip_content code{background:#1d94cf;color:#fff;text-shadow:none;padding:2px;font-size:12px}#tiptip_content a{color:#0CF}#tiptip_content a:hover{color:#F93}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border:6px solid transparent;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow{border-top-color:#fff;border-top-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_bottom #tiptip_arrow{border-bottom-color:#fff;border-bottom-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_right #tiptip_arrow{border-right-color:#fff;border-right-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_left #tiptip_arrow{border-left-color:#fff;border-left-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}
     1.removedComment{background-color:#FFE5EB}.cheatComment{background-color:#DDFFC9}.restoreLink{color:#006905;display:none}.cheatLink{color:#006905}.stopCheatLink{color:#BC0B0B;display:none}.help{height:15px;margin-left:10px}.subsubsub{clear:both}.help{vertical-align:sub}#filters{border-left:1px dotted #000;padding-left:10px;margin-bottom:20px}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;text-shadow:0 0 2px #000;padding:4px 8px;border:1px solid rgba(255,255,255,.25);background-color:#191919;background-color:rgba(25,25,25,.92);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),to(#000));border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:0 0 3px #555;-webkit-box-shadow:0 0 3px #555;-moz-box-shadow:0 0 3px #555}#tiptip_content code{background:#1d94cf;color:#fff;text-shadow:none;padding:2px;font-size:12px}#tiptip_content a{color:#0CF}#tiptip_content a:hover{color:#F93}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border:6px solid transparent;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow{border-top-color:#fff;border-top-color:rgba(255,255,255,.35)}#tiptip_holder.tip_bottom #tiptip_arrow{border-bottom-color:#fff;border-bottom-color:rgba(255,255,255,.35)}#tiptip_holder.tip_right #tiptip_arrow{border-right-color:#fff;border-right-color:rgba(255,255,255,.35)}#tiptip_holder.tip_left #tiptip_arrow{border-left-color:#fff;border-left-color:rgba(255,255,255,.35)}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,.92)}
  • comment-contest/trunk/js/OrgZhyweb_WPCommentContest_jQuery.js

    r845716 r1058712  
    1 /*  Copyright 2009 - 2014 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
     1/*  Copyright 2009 - 2015 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
    22
    33  This program is free software; you can redistribute it and/or modify
     
    1919 * Selected comment won't be used for contest
    2020 * @param commentID Comment ID
    21  * @since 2.0
    2221 */
    2322function commentContestDelete(commentID) {
     
    3433 * Selected comment must be used for contest
    3534 * @param commentID Comment ID
    36  * @since 2.0
    3735 */
    3836function commentContestRestore(commentID) {
     
    4543 * Selected comment will win (if winners number greater than cheating comments number)
    4644 * @param commentID Comment ID
    47  * @since 2.1
    4845 */
    4946function commentContestCheat(commentID) {
     
    6057 * Selected comment won't win anymore (except if it will be randomly choosen during the contest last step)
    6158 * @param commentID Comment ID
    62  * @since 2.1
    6359 */
    6460function commentContestStopCheat(commentID) {
     
    7066/*
    7167 * Select all comments in the table which have the role "roleID"
    72  * @since 2.1
    7368 */
    7469function selectRole(roleID) {
     
    9590 * @param myArray Array to shuffle
    9691 * @see http://sedition.com/perl/javascript-fy.html
    97  * @since 2.0
    9892 */
    9993function fisherYates(myArray) {
     
    112106/**
    113107 * Open / Hide filters DIV component
    114  * @since 2.2
    115108 */
    116109function toggleFilters(pluginURL) {
     
    126119}
    127120
    128 /**
    129  * Select duplicated lines in the table.
    130  * Lines are duplicated when a certain line parameter is the same in two lines.
    131  * @param cssClassParameter [string] CSS class name for the searched parameter
    132  * @since 2.2
    133  */
    134 function selectDuplicates(cssClassParameter) {
    135     var line1nb = 0;
    136     jQuery('#contestForm tr').each(function() {
    137         // Browse all table lines
    138         var line1 = jQuery(this);
    139        
    140         var line2nb = 0;
     121// -----------------------------------------------------------------------------
     122// jQuery ready document
     123
     124jQuery(document).ready(function() {
     125   
     126    function checkInputsOfWrongComments(testFunction, useName, useEmail, useIP, selectDuplicates, nbAuthEntries) {
     127        var duplicates = [];
     128        var line1nb = 0;
     129
    141130        jQuery('#contestForm tr').each(function() {
    142131            // Browse all table lines
    143             var line2 = jQuery(this);
    144             if (line1nb != line2nb) { // Compare two different lines
    145                 var data1 = line1.find('.' + cssClassParameter).text();
    146                 var data2 = line2.find('.' + cssClassParameter).text();
    147                 if (data1 == data2 && data1 != "") {
    148                     // If data are equal => check both lines
    149                     line1.find('input[id^="cb-select"]').each(function() {
    150                         jQuery(this).attr("checked", true);
    151                     });
    152                     line2.find('input[id^="cb-select"]').each(function() {
    153                         jQuery(this).attr("checked", true);
    154                     });
    155                 }
    156             }
    157            
    158             line2nb++;
     132            var line1 = jQuery(this);
     133            var line1Name = null;
     134            if (useName) {
     135                line1Name = line1.find('.zhyweb_comment_contest_alias').text();
     136            }
     137           
     138            var line1Email = null;
     139            if (useEmail) {
     140                line1Email = line1.find('.zhyweb_comment_contest_email').text();
     141            }
     142           
     143            var line1IP = null;
     144            if (useIP) {
     145                line1IP = line1.find('.zhyweb_comment_contest_ip').text();
     146            }
     147
     148            if (line1Name || line1Email || line1IP) { // With this condition, we are sure we are not on header/footer line of the table
     149                var line2nb = 0;
     150                // Browse all table lines
     151                jQuery('#contestForm tr').each(function() {
     152                    // Compare two different lines and do not compare previously compared lines
     153                    if (line2nb > line1nb) {
     154                        var line2 = jQuery(this);
     155
     156                        var line2Name = null;
     157                        if (useName) {
     158                            line2Name = line2.find('.zhyweb_comment_contest_alias').text();
     159                        }
     160
     161                        var line2Email = null;
     162                        if (useEmail) {
     163                            line2Email = line2.find('.zhyweb_comment_contest_email').text();
     164                        }
     165
     166                        var line2IP = null;
     167                        if (useIP) {
     168                            line2IP = line2.find('.zhyweb_comment_contest_ip').text();
     169                        }
     170
     171                        if (line1Name === line2Name && line1Email === line2Email && line1IP === line2IP) {
     172                            // Both lines are the same
     173                            if (testFunction.call(null, line1, line2)) {
     174                                if (selectDuplicates) {
     175                                    line1.find('input[id^="cb-select"]').each(function() {
     176                                        var input = jQuery(this).val();
     177                                        if (jQuery.inArray(input, duplicates) === -1) {
     178                                            duplicates.push(input);
     179                                        }
     180                                    });
     181                                }
     182                               
     183                                line2.find('input[id^="cb-select"]').each(function() {
     184                                    var input = jQuery(this).val();
     185                                    if (jQuery.inArray(input, duplicates) === -1) {
     186                                        duplicates.push(input);
     187                                    }
     188                                });
     189                            }
     190                        }
     191                    }
     192                    line2nb++;
     193                });
     194            }
     195            line1nb++;
    159196        });
    160197       
    161         line1nb++;
    162     });
    163 }
    164 
    165 // -----------------------------------------------------------------------------
    166 // jQuery ready document
    167 
    168 jQuery(document).ready(function() {
    169    
    170     // ------------------------ IP address filter ------------------------------
    171    
    172     jQuery('#ipAddressFilter').click(function() {
    173         selectDuplicates("zhyweb_comment_contest_ip");
    174     });
    175    
    176     // ------------------------ end IP address filter --------------------------
    177    
    178     // ------------------------ Email filter -----------------------------------
    179    
    180     jQuery('#emailAddressFilter').click(function() {
    181         selectDuplicates("zhyweb_comment_contest_email");
    182     });
    183    
    184     // ------------------------ end Email filter -------------------------------
     198        // Sort numbers in case of they are not
     199        duplicates.sort(function(a, b) {
     200            return a - b;
     201        });
     202   
     203        for (var i = 0; i < duplicates.length; i++) {
     204            var inputID = duplicates[i];
     205            if (i >= nbAuthEntries) {
     206                jQuery('#contestForm #cb-select-' + inputID).attr("checked", true);
     207            }
     208        }
     209    }
     210   
     211    // ------------------------ Filter action ----------------------------------
     212   
     213    function addFilterAction(actionID) {
     214        var useName = ('alias' === actionID);
     215        var useEmail = ('email' === actionID);
     216        var useIP = ('ip' === actionID);
     217       
     218        jQuery('#' + actionID + 'AddressFilter').click(function() {
     219            // Clean
     220            jQuery('#zwpcc_' + actionID + 'Filter_error_message').hide();
     221            removeCSSErrorElementID(actionID + 'Config');
     222
     223            // Check input format and launch the process if it's ok
     224            var inputValue = jQuery('#' + actionID + 'Config').val();
     225            if (jQuery.isNumeric(inputValue) && inputValue >= 0) {
     226                checkInputsOfWrongComments(function(line1, line2) {
     227                    var data1 = line1.find('.zhyweb_comment_contest_' + actionID).text();
     228                    var data2 = line2.find('.zhyweb_comment_contest_' + actionID).text();
     229                    return data1 === data2;
     230                }, useName, useEmail, useIP, true, inputValue);
     231            } else {
     232                jQuery('#zwpcc_' + actionID + 'Filter_error_message').show();
     233                addCSSErrorElementID(actionID + 'Config');
     234            }
     235        });
     236    }
     237   
     238    addFilterAction("ip");
     239    addFilterAction("email");
     240    addFilterAction("alias");
     241   
     242    // ------------------------ end Filter action ------------------------------
     243   
     244    // ------------------------ Time Between Two Comments action ---------------
     245   
     246    jQuery('#timeBetweenFilter').click(function() {
     247        // Clean
     248        jQuery('#zwpcc_timeBetweenFilter_error_message').hide();
     249        removeCSSErrorElementID('timeBetween');
     250
     251        // Check input format and launch the process if it's ok
     252        var inputValue = jQuery('#timeBetween').val();
     253        if (jQuery.isNumeric(inputValue) && inputValue > 0) {
     254            var useName = jQuery('#timeBetweenFilterName').is(':checked');
     255            var useEmail = jQuery('#timeBetweenFilterEmail').is(':checked');
     256            var useIP = jQuery('#timeBetweenFilterIP').is(':checked');
     257           
     258            if (useName || useEmail || useIP) {
     259                var diffTime = inputValue * 60; // Difference time in seconds
     260                checkInputsOfWrongComments(function(line1, line2) {
     261                    var time1 = line1.find('.zhyweb_comment_contest_timestamp').text();
     262                    var time2 = line2.find('.zhyweb_comment_contest_timestamp').text();
     263                    var testTime = Math.abs(time1 - time2) - diffTime;
     264                    return testTime <= 0;
     265                }, useName, useEmail, useIP, false, 0);
     266            } else {
     267                jQuery('#zwpcc_timeBetweenFilter_error_message').show();
     268            }
     269        } else {
     270            jQuery('#zwpcc_timeBetweenFilter_error_message').show();
     271            addCSSErrorElementID('timeBetween');
     272        }
     273    });
     274   
     275    // ------------------------ end Time Between Two Comments action -----------
    185276   
    186277    // ------------------------ Date filter ------------------------------------
     
    191282        // Clear error messages
    192283        jQuery('#zwpcc_dateFilter_error_message').hide();
    193         jQuery('#datepicker').css("border", "1px solid rgb(223,223,223)");
    194         jQuery('#dateHours').css("border", "1px solid rgb(223,223,223)");
    195         jQuery('#dateMinutes').css("border", "1px solid rgb(223,223,223)");
     284        removeCSSErrorElementID("datepicker");
     285        removeCSSErrorElementID("dateHours");
     286        removeCSSErrorElementID("dateMinutes");
    196287       
    197288        // Check date format
     
    216307            var dateHours = jQuery('#dateHours').val();
    217308            var dateMinutes = jQuery('#dateMinutes').val();
    218             if (dateHours != "" && dateHours >= 0 && dateHours < 24 && dateMinutes != "" && dateMinutes >= 0 && dateMinutes < 60) {
     309            if (dateHours !== "" && dateHours >= 0 && dateHours < 24 && dateMinutes !== "" && dateMinutes >= 0 && dateMinutes < 60) {
    219310                // Date OK => Launch selection
    220311                jQuery('#contestForm tr').each(function() {
     
    222313                    var line = jQuery(this);
    223314
    224                     // Search for span tag with class "zhyweb_comment_contest_timestamp"
    225                     var timestampComment = line.find('.zhyweb_comment_contest_timestamp').text();
    226                     if (timestampComment != "") {
     315                    // Search for span tag with class "zhyweb_comment_contest_date"
     316                    var timestampComment = line.find('.zhyweb_comment_contest_date').text();
     317                    if (timestampComment !== "") {
    227318                        var wantedTimestamp = year + month + day + dateHours + dateMinutes;
    228319                        if (timestampComment > wantedTimestamp) {
     
    236327            } else {
    237328                jQuery('#zwpcc_dateFilter_error_message').show();
    238                 jQuery('#dateHours').css("border", "2px solid red");
    239                 jQuery('#dateMinutes').css("border", "2px solid red");
     329                addCSSErrorElementID("dateHours");
     330                addCSSErrorElementID("dateMinutes");
    240331            }
    241332        } else {
    242333            jQuery('#zwpcc_dateFilter_error_message').show();
    243             jQuery('#datepicker').css("border", "2px solid red");
     334            addCSSErrorElementID("datepicker");
    244335        }
    245336    });
    246337   
    247338    // ------------------------ END Date filter --------------------------------
     339   
     340    // ------------------------ Words filter -----------------------------------
     341   
     342    function selectLinesWithoutWords(all) {
     343        var wordsStr = jQuery('#words').val();
     344        var wordsArray = wordsStr.split(',');
     345       
     346        if (wordsArray.length > 0) { // Optimization test
     347            for (var i = 0; i < wordsArray.length; i++) {
     348                wordsArray[i] = wordsArray[i].trim().toLowerCase();
     349            }
     350            jQuery('#contestForm tr').each(function() {
     351                var comment = jQuery(this).find('.comment p').html();
     352                var found = all;
     353                for (var i = 0; i < wordsArray.length && comment != null; i++) {
     354                    var wordToFind = wordsArray[i];
     355                    var wordIndex = comment.toLowerCase().indexOf(wordToFind);
     356                    if (all) {
     357                        if (wordIndex === -1) {
     358                            // At least one word not found => check the input box
     359                            found = false;
     360                            break;
     361                        }
     362                    } else {
     363                        if (wordIndex >= 0) {
     364                            // At least one word found => do not check the input box
     365                            found = true;
     366                            break;
     367                        }
     368                    }
     369                }
     370                if (!found) {
     371                    jQuery(this).find('input[id^="cb-select"]').attr("checked", true);
     372                }
     373            });
     374        }
     375    }
     376   
     377    jQuery('#wordsFilter').click(function() {
     378        selectLinesWithoutWords(false);
     379    });
     380   
     381    jQuery('#allWordsFilter').click(function() {
     382        selectLinesWithoutWords(true);
     383    });
     384
     385    // ------------------------ end Words filter -------------------------------
    248386   
    249387    // ------------------------ Tooltips (Help) --------------------------------
     
    269407    /**
    270408     * Remove all checked comments
    271      * @since 2.0
    272409     */
    273410    function deleteSelectedComments() {
    274411        jQuery('#contestForm input[id^="cb-select"]:checked').each(function(index, domElem) {
    275             if (domElem.id.indexOf("-all-") == -1) {
     412            if (domElem.id.indexOf("-all-") === -1) {
    276413                commentContestDelete(jQuery(this).val());
    277414            } else {
     
    282419   
    283420    jQuery("#contestForm #doaction").click(function() {
    284         if (jQuery('#contestForm select[name="action"]').val() == 'delete') {
     421        if (jQuery('#contestForm select[name="action"]').val() === 'delete') {
    285422            deleteSelectedComments();
    286423        }
     
    288425   
    289426    jQuery("#contestForm #doaction2").click(function() {
    290         if (jQuery('#contestForm select[name="action2"]').val() == 'delete') {
     427        if (jQuery('#contestForm select[name="action2"]').val() === 'delete') {
    291428            deleteSelectedComments();
    292429        }
     
    298435    /**
    299436     * Restore all checked comments
    300      * @since 2.0
    301437     */
    302438    function restoreSelectedComments() {
    303439        jQuery('#contestForm input[id^="cb-select"]:checked').each(function(index, domElem) {
    304             if (domElem.id.indexOf("-all-") == -1) {
     440            if (domElem.id.indexOf("-all-") === -1) {
    305441                commentContestRestore(jQuery(this).val());
    306442            } else {
     
    311447   
    312448    jQuery("#contestForm #doaction").click(function() {
    313         if (jQuery('#contestForm select[name="action"]').val() == 'restore') {
     449        if (jQuery('#contestForm select[name="action"]').val() === 'restore') {
    314450            restoreSelectedComments();
    315451        }
     
    317453   
    318454    jQuery("#contestForm #doaction2").click(function() {
    319         if (jQuery('#contestForm select[name="action2"]').val() == 'restore') {
     455        if (jQuery('#contestForm select[name="action2"]').val() === 'restore') {
    320456            restoreSelectedComments();
    321457        }
     
    346482
    347483                    // Don't get table header and footer
    348                     if (commentID != null && commentID != "") {                       
     484                    if (commentID != null && commentID !== "") {                       
    349485                        if (line.hasClass("cheatComment")) {
    350486                            commentsCheat.push(commentID);
     
    387523        jQuery("#zwpcc_nbWinners_error_message").hide();
    388524        jQuery(this).find('input').each(function() {
    389             jQuery(this).css('border', '1px solid rgb(223,223,223)');
     525            removeCSSErrorElement(jQuery(this));
    390526        });
    391527       
     
    395531        if (!jQuery.isNumeric(nbWinners) || nbWinners <= 0) {
    396532            launch = false;
    397             jQuery("#zwpcc_nb_winners").css('border', '2px solid red');
     533            addCSSErrorElementID("zwpcc_nb_winners");
    398534            jQuery("#zwpcc_nbWinners_error_message").show();
    399535        }
     
    408544    // ------------------------ end RESULT TABLE -------------------------------
    409545   
     546    // ------------------------ CSS Functions ----------------------------------
     547   
     548    function addCSSErrorElementID(elementID) {
     549        jQuery("#" + elementID).css('border', '2px solid red');
     550    }
     551   
     552    function removeCSSErrorElement(element) {
     553        element.css('border', '1px solid rgb(223,223,223)');
     554    }
     555   
     556    function removeCSSErrorElementID(elementID) {
     557        removeCSSErrorElement(jQuery("#" + elementID));
     558    }
     559   
     560    // ------------------------ end CSS Functions ------------------------------
     561   
    410562});
  • comment-contest/trunk/js/OrgZhyweb_WPCommentContest_jQuery.min.js

    r828725 r1058712  
    1 function commentContestDelete(a){jQuery("#comment-contest-"+a).removeClass("cheatComment");jQuery("#comment-contest-"+a).addClass("removedComment");jQuery("#restoreLink-"+a).show();jQuery("#deleteLink-"+a).hide();jQuery("#stopCheatLink-"+a).hide();jQuery("#cheatLink-"+a).show()}function commentContestRestore(a){jQuery("#comment-contest-"+a).removeClass("removedComment");jQuery("#deleteLink-"+a).show();jQuery("#restoreLink-"+a).hide()}function commentContestCheat(a){jQuery("#comment-contest-"+a).removeClass("removedComment");jQuery("#comment-contest-"+a).addClass("cheatComment");jQuery("#stopCheatLink-"+a).show();jQuery("#cheatLink-"+a).hide();jQuery("#deleteLink-"+a).show();jQuery("#restoreLink-"+a).hide()}function commentContestStopCheat(a){jQuery("#comment-contest-"+a).removeClass("cheatComment");jQuery("#stopCheatLink-"+a).hide();jQuery("#cheatLink-"+a).show()}function selectRole(a){jQuery("#contestForm tr").each(function(){var c=jQuery(this);var b=c.find(".zhyweb_comment_contest_role").text();var d=b.split("|");if(jQuery.inArray(a,d)>=0&&b.length>0){c.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",true)})}})}function fisherYates(c){var b=c.length;if(b>0){while(--b){var a=Math.floor(Math.random()*(b+1));var e=c[b];var d=c[a];c[b]=d;c[a]=e}}}function toggleFilters(a){var b=jQuery("#filters");b.fadeToggle("slow","linear",function(){if(b.is(":visible")){jQuery("#filtersImg").attr("src",a+"/img/minus.png")}else{jQuery("#filtersImg").attr("src",a+"/img/plus.png")}})}function selectDuplicates(b){var a=0;jQuery("#contestForm tr").each(function(){var c=jQuery(this);var d=0;jQuery("#contestForm tr").each(function(){var f=jQuery(this);if(a!=d){var e=c.find("."+b).text();var g=f.find("."+b).text();if(e==g&&e!=""){c.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",true)});f.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",true)})}}d++});a++})}jQuery(document).ready(function(){jQuery("#ipAddressFilter").click(function(){selectDuplicates("zhyweb_comment_contest_ip")});jQuery("#emailAddressFilter").click(function(){selectDuplicates("zhyweb_comment_contest_email")});jQuery("#datepicker").datepicker();jQuery("#dateSubmit").click(function(){jQuery("#zwpcc_dateFilter_error_message").hide();jQuery("#datepicker").css("border","1px solid rgb(223,223,223)");jQuery("#dateHours").css("border","1px solid rgb(223,223,223)");jQuery("#dateMinutes").css("border","1px solid rgb(223,223,223)");var f=false;var d=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/;var e=jQuery("#datepicker").val();var h="";var j="";var i="";if(d.test(e)){var g=d.exec(e);h=g[1];j=g[2];i=g[3];if(h>0&&h<13&&j>0&&j<32&&i>0){f=true}}if(f){var c=jQuery("#dateHours").val();var k=jQuery("#dateMinutes").val();if(c!=""&&c>=0&&c<24&&k!=""&&k>=0&&k<60){jQuery("#contestForm tr").each(function(){var m=jQuery(this);var n=m.find(".zhyweb_comment_contest_timestamp").text();if(n!=""){var l=i+h+j+c+k;if(n>l){m.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",true)})}}})}else{jQuery("#zwpcc_dateFilter_error_message").show();jQuery("#dateHours").css("border","2px solid red");jQuery("#dateMinutes").css("border","2px solid red")}}else{jQuery("#zwpcc_dateFilter_error_message").show();jQuery("#datepicker").css("border","2px solid red")}});jQuery(".help").tipTip({attribute:"title",fadeIn:50,fadeOut:50,keepAlive:true,activation:"hover",maxWidth:400});jQuery(".help").tipTip();function b(){jQuery('#contestForm input[id^="cb-select"]:checked').each(function(c,d){if(d.id.indexOf("-all-")==-1){commentContestDelete(jQuery(this).val())}else{jQuery(this).attr("checked",false)}})}jQuery("#contestForm #doaction").click(function(){if(jQuery('#contestForm select[name="action"]').val()=="delete"){b()}});jQuery("#contestForm #doaction2").click(function(){if(jQuery('#contestForm select[name="action2"]').val()=="delete"){b()}});function a(){jQuery('#contestForm input[id^="cb-select"]:checked').each(function(c,d){if(d.id.indexOf("-all-")==-1){commentContestRestore(jQuery(this).val())}else{jQuery(this).attr("checked",false)}})}jQuery("#contestForm #doaction").click(function(){if(jQuery('#contestForm select[name="action"]').val()=="restore"){a()}});jQuery("#contestForm #doaction2").click(function(){if(jQuery('#contestForm select[name="action2"]').val()=="restore"){a()}});jQuery("#dialog-modal-winners").dialog({height:500,width:800,modal:true,autoOpen:false,dialogClass:"wp-dialog",open:function(){var e=jQuery("#zwpcc_nb_winners").val();var d=new Array();var c=new Array();jQuery("#contestForm tr").each(function(){var h=jQuery(this);if(!h.hasClass("removedComment")){var i=h.find(".zhyweb_comment_contest_id").html();if(i!=null&&i!=""){if(h.hasClass("cheatComment")){c.push(i)}else{d.push(i)}}}});jQuery('#dialog-modal-winners tr[id^="result-comment-contest"]').each(function(){jQuery(this).hide()});fisherYates(c);if(c.length<e){fisherYates(d)}var g=jQuery.merge(c,d);for(var f=0;f<e&&f<g.length;f++){jQuery("#result-comment-contest-"+g[f]).show();if(f>=1){jQuery("#result-comment-contest-"+g[f-1]).after(jQuery("#result-comment-contest-"+g[f]))}}}});jQuery("#zwpcc_form").submit(function(){launch=true;jQuery("#zwpcc_nbWinners_error_message").hide();jQuery(this).find("input").each(function(){jQuery(this).css("border","1px solid rgb(223,223,223)")});var c=jQuery("#zwpcc_nb_winners").val();if(!jQuery.isNumeric(c)||c<=0){launch=false;jQuery("#zwpcc_nb_winners").css("border","2px solid red");jQuery("#zwpcc_nbWinners_error_message").show()}if(launch){jQuery("#dialog-modal-winners").dialog("open")}return false})});
     1function commentContestDelete(e){jQuery("#comment-contest-"+e).removeClass("cheatComment"),jQuery("#comment-contest-"+e).addClass("removedComment"),jQuery("#restoreLink-"+e).show(),jQuery("#deleteLink-"+e).hide(),jQuery("#stopCheatLink-"+e).hide(),jQuery("#cheatLink-"+e).show()}function commentContestRestore(e){jQuery("#comment-contest-"+e).removeClass("removedComment"),jQuery("#deleteLink-"+e).show(),jQuery("#restoreLink-"+e).hide()}function commentContestCheat(e){jQuery("#comment-contest-"+e).removeClass("removedComment"),jQuery("#comment-contest-"+e).addClass("cheatComment"),jQuery("#stopCheatLink-"+e).show(),jQuery("#cheatLink-"+e).hide(),jQuery("#deleteLink-"+e).show(),jQuery("#restoreLink-"+e).hide()}function commentContestStopCheat(e){jQuery("#comment-contest-"+e).removeClass("cheatComment"),jQuery("#stopCheatLink-"+e).hide(),jQuery("#cheatLink-"+e).show()}function selectRole(e){jQuery("#contestForm tr").each(function(){var t=jQuery(this),r=t.find(".zhyweb_comment_contest_role").text(),n=r.split("|");jQuery.inArray(e,n)>=0&&r.length>0&&t.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",!0)})})}function fisherYates(e){var t=e.length;if(t>0)for(;--t;){var r=Math.floor(Math.random()*(t+1)),n=e[t],i=e[r];e[t]=i,e[r]=n}}function toggleFilters(e){var t=jQuery("#filters");t.fadeToggle("slow","linear",function(){t.is(":visible")?jQuery("#filtersImg").attr("src",e+"/img/minus.png"):jQuery("#filtersImg").attr("src",e+"/img/plus.png")})}jQuery(document).ready(function(){function e(e,t,r,n,i,c){var o=[],s=0;jQuery("#contestForm tr").each(function(){var c=jQuery(this),a=null;t&&(a=c.find(".zhyweb_comment_contest_alias").text());var u=null;r&&(u=c.find(".zhyweb_comment_contest_email").text());var l=null;if(n&&(l=c.find(".zhyweb_comment_contest_ip").text()),a||u||l){var m=0;jQuery("#contestForm tr").each(function(){if(m>s){var h=jQuery(this),d=null;t&&(d=h.find(".zhyweb_comment_contest_alias").text());var y=null;r&&(y=h.find(".zhyweb_comment_contest_email").text());var j=null;n&&(j=h.find(".zhyweb_comment_contest_ip").text()),a===d&&u===y&&l===j&&e.call(null,c,h)&&(i&&c.find('input[id^="cb-select"]').each(function(){var e=jQuery(this).val();-1===jQuery.inArray(e,o)&&o.push(e)}),h.find('input[id^="cb-select"]').each(function(){var e=jQuery(this).val();-1===jQuery.inArray(e,o)&&o.push(e)}))}m++})}s++}),o.sort(function(e,t){return e-t});for(var a=0;a<o.length;a++){var u=o[a];a>=c&&jQuery("#contestForm #cb-select-"+u).attr("checked",!0)}}function t(t){var r="alias"===t,n="email"===t,i="ip"===t;jQuery("#"+t+"AddressFilter").click(function(){jQuery("#zwpcc_"+t+"Filter_error_message").hide(),s(t+"Config");var o=jQuery("#"+t+"Config").val();jQuery.isNumeric(o)&&o>=0?e(function(e,r){var n=e.find(".zhyweb_comment_contest_"+t).text(),i=r.find(".zhyweb_comment_contest_"+t).text();return n===i},r,n,i,!0,o):(jQuery("#zwpcc_"+t+"Filter_error_message").show(),c(t+"Config"))})}function r(e){var t=jQuery("#words").val(),r=t.split(",");if(r.length>0){for(var n=0;n<r.length;n++)r[n]=r[n].trim().toLowerCase();jQuery("#contestForm tr").each(function(){for(var t=jQuery(this).find(".comment p").html(),n=e,i=0;i<r.length&&null!=t;i++){var c=r[i],o=t.toLowerCase().indexOf(c);if(e){if(-1===o){n=!1;break}}else if(o>=0){n=!0;break}}n||jQuery(this).find('input[id^="cb-select"]').attr("checked",!0)})}}function n(){jQuery('#contestForm input[id^="cb-select"]:checked').each(function(e,t){-1===t.id.indexOf("-all-")?commentContestDelete(jQuery(this).val()):jQuery(this).attr("checked",!1)})}function i(){jQuery('#contestForm input[id^="cb-select"]:checked').each(function(e,t){-1===t.id.indexOf("-all-")?commentContestRestore(jQuery(this).val()):jQuery(this).attr("checked",!1)})}function c(e){jQuery("#"+e).css("border","2px solid red")}function o(e){e.css("border","1px solid rgb(223,223,223)")}function s(e){o(jQuery("#"+e))}t("ip"),t("email"),t("alias"),jQuery("#timeBetweenFilter").click(function(){jQuery("#zwpcc_timeBetweenFilter_error_message").hide(),s("timeBetween");var t=jQuery("#timeBetween").val();if(jQuery.isNumeric(t)&&t>0){var r=jQuery("#timeBetweenFilterName").is(":checked"),n=jQuery("#timeBetweenFilterEmail").is(":checked"),i=jQuery("#timeBetweenFilterIP").is(":checked");if(r||n||i){var o=60*t;e(function(e,t){var r=e.find(".zhyweb_comment_contest_timestamp").text(),n=t.find(".zhyweb_comment_contest_timestamp").text(),i=Math.abs(r-n)-o;return 0>=i},r,n,i,!1,0)}else jQuery("#zwpcc_timeBetweenFilter_error_message").show()}else jQuery("#zwpcc_timeBetweenFilter_error_message").show(),c("timeBetween")}),jQuery("#datepicker").datepicker(),jQuery("#dateSubmit").click(function(){jQuery("#zwpcc_dateFilter_error_message").hide(),s("datepicker"),s("dateHours"),s("dateMinutes");var e=!1,t=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,r=jQuery("#datepicker").val(),n="",i="",o="";if(t.test(r)){var a=t.exec(r);n=a[1],i=a[2],o=a[3],n>0&&13>n&&i>0&&32>i&&o>0&&(e=!0)}if(e){var u=jQuery("#dateHours").val(),l=jQuery("#dateMinutes").val();""!==u&&u>=0&&24>u&&""!==l&&l>=0&&60>l?jQuery("#contestForm tr").each(function(){var e=jQuery(this),t=e.find(".zhyweb_comment_contest_date").text();if(""!==t){var r=o+n+i+u+l;t>r&&e.find('input[id^="cb-select"]').each(function(){jQuery(this).attr("checked",!0)})}}):(jQuery("#zwpcc_dateFilter_error_message").show(),c("dateHours"),c("dateMinutes"))}else jQuery("#zwpcc_dateFilter_error_message").show(),c("datepicker")}),jQuery("#wordsFilter").click(function(){r(!1)}),jQuery("#allWordsFilter").click(function(){r(!0)}),jQuery(".help").tipTip({attribute:"title",fadeIn:50,fadeOut:50,keepAlive:!0,activation:"hover",maxWidth:400}),jQuery(".help").tipTip(),jQuery("#contestForm #doaction").click(function(){"delete"===jQuery('#contestForm select[name="action"]').val()&&n()}),jQuery("#contestForm #doaction2").click(function(){"delete"===jQuery('#contestForm select[name="action2"]').val()&&n()}),jQuery("#contestForm #doaction").click(function(){"restore"===jQuery('#contestForm select[name="action"]').val()&&i()}),jQuery("#contestForm #doaction2").click(function(){"restore"===jQuery('#contestForm select[name="action2"]').val()&&i()}),jQuery("#dialog-modal-winners").dialog({height:500,width:800,modal:!0,autoOpen:!1,dialogClass:"wp-dialog",open:function(){var e=jQuery("#zwpcc_nb_winners").val(),t=new Array,r=new Array;jQuery("#contestForm tr").each(function(){var e=jQuery(this);if(!e.hasClass("removedComment")){var n=e.find(".zhyweb_comment_contest_id").html();null!=n&&""!==n&&(e.hasClass("cheatComment")?r.push(n):t.push(n))}}),jQuery('#dialog-modal-winners tr[id^="result-comment-contest"]').each(function(){jQuery(this).hide()}),fisherYates(r),r.length<e&&fisherYates(t);for(var n=jQuery.merge(r,t),i=0;e>i&&i<n.length;i++)jQuery("#result-comment-contest-"+n[i]).show(),i>=1&&jQuery("#result-comment-contest-"+n[i-1]).after(jQuery("#result-comment-contest-"+n[i]))}}),jQuery("#zwpcc_form").submit(function(){launch=!0,jQuery("#zwpcc_nbWinners_error_message").hide(),jQuery(this).find("input").each(function(){o(jQuery(this))});var e=jQuery("#zwpcc_nb_winners").val();return(!jQuery.isNumeric(e)||0>=e)&&(launch=!1,c("zwpcc_nb_winners"),jQuery("#zwpcc_nbWinners_error_message").show()),launch&&jQuery("#dialog-modal-winners").dialog("open"),!1})});
  • comment-contest/trunk/lang/comment-contest-fr_FR.po

    r828725 r1058712  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Comment Contest v2.2\n"
     3"Project-Id-Version: Comment Contest v2.3.0\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-12-26 18:23+0100\n"
    6 "PO-Revision-Date: 2013-12-26 18:26+0100\n"
     5"POT-Creation-Date: 2015-01-02 19:30+0100\n"
     6"PO-Revision-Date: 2015-01-02 19:45+0100\n"
    77"Last-Translator: Thomas \"Zhykos\" Cicognani <tcicognani@zhyweb.org>\n"
    88"Language-Team: \n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=n>1;\n"
    14 "X-Generator: Poedit 1.5.5\n"
     14"X-Generator: Poedit 1.7.1\n"
    1515"X-Poedit-SourceCharset: UTF-8\n"
    16 "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
    17 "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
    18 "X-Poedit-Basepath: D:\\www\\zhyweb\\wordpress\\wp-content\\plugins\\comment-"
    19 "contest\n"
     16"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;"
     17"_nx_noop:4c,1,2\n"
     18"X-Poedit-Basepath: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/\n"
    2019"X-Textdomain-Support: yes\n"
    21 "X-Poedit-SearchPath-0: .\n"
    22 
    23 # @ comment-contest
    24 #: comment-contest.php:92 php/OrgZhyweb_WPCommentContest_MainUI.php:64
     20"X-Poedit-SearchPath-0: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest\n"
     21
     22# @ comment-contest
     23#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/comment-contest.php:100
     24#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:67
    2525msgid "Comment Contest"
    2626msgstr "Comment Contest"
    2727
    2828# @ comment-contest
    29 #: comment-contest.php:103
     29#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/comment-contest.php:111
    3030msgid "Contest"
    3131msgstr "Concours"
    3232
    3333# @ comment-contest
    34 #: comment-contest.php:121 php/OrgZhyweb_WPCommentContest_MainUI.php:73
     34#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/comment-contest.php:129
     35#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:76
    3536msgid "Launch contest"
    3637msgstr "Lancer le concours"
    3738
    3839# @ comment-contest
    39 #: comment-contest.php:123
     40#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/comment-contest.php:131
    4041msgid "No comment"
    4142msgstr "Aucun commentaire"
    4243
    4344# @ comment-contest
    44 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:65
    45 #: php/OrgZhyweb_WPCommentContest_TableResults.php:33
     45#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:65
     46#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableResults.php:33
    4647msgid "Author"
    4748msgstr "Auteur"
    4849
    4950# @ comment-contest
    50 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:66
    51 #: php/OrgZhyweb_WPCommentContest_TableResults.php:34
     51#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:66
     52#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableResults.php:34
     53#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:54
    5254msgid "Comment"
    5355msgstr "Commentaire"
    5456
    5557# @ comment-contest
    56 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:102
     58#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:102
    5759#, php-format
    5860msgid "Select: %s"
     
    6062
    6163# @ comment-contest
    62 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:135
     64#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:135
    6365msgid "Select comment"
    6466msgstr "Sélectionner le commentaire"
    6567
    6668# @ comment-contest
    67 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:230
     69#. translators: 2: comment date, 3: comment time
     70#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:237
    6871#, php-format
    6972msgid "Submitted on <a href=\"%1$s\">%2$s at %3$s</a>"
     
    7174
    7275# @ comment-contest
    73 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:231
     76#. translators: comment date format. See http://php.net/date
     77#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:238
    7478msgid "Y/m/d"
    7579msgstr "d / m / Y"
    7680
    7781# @ comment-contest
    78 #: php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:238
     82#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php:245
    7983#, php-format
    8084msgid "In reply to <a href=\"%1$s\">%2$s</a>."
     
    8286
    8387# @ comment-contest
    84 #: php/OrgZhyweb_WPCommentContest_MainUI.php:47
     88#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:50
    8589msgid "URL must have 'post' parameter as integer"
    8690msgstr "Le paramètre 'post' dans l'URL doit être un nombre entier"
    8791
    8892# @ comment-contest
    89 #: php/OrgZhyweb_WPCommentContest_MainUI.php:50
     93#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:53
    9094msgid "You have to be administrator to access this page"
    91 msgstr ""
    92 "Vous devez disposer de droits d'administrateur pour accéder à cette page"
    93 
    94 # @ comment-contest
    95 #: php/OrgZhyweb_WPCommentContest_MainUI.php:67
     95msgstr "Vous devez disposer de droits d'administrateur pour accéder à cette page"
     96
     97# @ comment-contest
     98#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:70
    9699#, php-format
    97100msgid "Contest on post \"%s\""
     
    99102
    100103# @ comment-contest
    101 #: php/OrgZhyweb_WPCommentContest_MainUI.php:70
     104#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:73
    102105msgid "Number of winners error"
    103106msgstr "Erreur pour le nombre de gagnants"
    104107
    105108# @ comment-contest
    106 #: php/OrgZhyweb_WPCommentContest_MainUI.php:71
     109#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:74
    107110msgid "Number of winners:"
    108111msgstr "Nombre de gagnants :"
    109112
    110 #: php/OrgZhyweb_WPCommentContest_MainUI.php:72
     113#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:75
    111114msgid "Number of comments used to determine winners"
    112115msgstr "Nombre de commentaires utilisés pour déterminer les gagnants"
    113116
    114117# @ comment-contest
    115 #: php/OrgZhyweb_WPCommentContest_MainUI.php:78
     118#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:81
    116119msgid "Winners"
    117120msgstr "Gagnants"
    118121
    119122# @ comment-contest
    120 #: php/OrgZhyweb_WPCommentContest_MainUI.php:107
     123#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:110
    121124msgid "Comments used for the contest:"
    122125msgstr "Commentaires utilisés pour le concours :"
    123126
    124 #: php/OrgZhyweb_WPCommentContest_MainUI.php:110
    125 msgid ""
    126 "The table below shows all available comments. You have to choose which ones "
    127 "you want for the contest.<br /> - You can select users who have the same "
    128 "Wordpress role (see User page).<br /> - You can remove comments from contest "
    129 "(don't be used to determine winners). Removed comments still are visible "
    130 "with red background color.<br /> - You can also cheat by adding comments "
    131 "into a cheating list. All cheating comments will always win! (only if the "
    132 "cheating list length is less than the winners number). Cheating comments "
    133 "still are visible with green background color.<br /> - The other comments "
    134 "(white/grey background) are only used if there isn't enough cheating "
     127#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:113
     128msgid ""
     129"The table below shows all available comments. You have to choose which ones you want for the contest.<br /> - You can select users who "
     130"have the same Wordpress role (see User page).<br /> - You can remove comments from contest (don't be used to determine winners). "
     131"Removed comments still are visible with red background color.<br /> - You can also cheat by adding comments into a cheating list. All "
     132"cheating comments will always win! (only if the cheating list length is less than the winners number). Cheating comments still are "
     133"visible with green background color.<br /> - The other comments (white/grey background) are only used if there isn't enough cheating "
    135134"comments."
    136135msgstr ""
    137 "Le tableau ci-dessous affiche tous les commentaires disponibles. Vous devez "
    138 "choisir ceux à utiliser pour le concours.<br /> - Vous pouvez choisir des "
    139 "utilisateurs ayant le même rôle Wordpress (voir la page des Utilisateurs)."
    140 "<br /> - Vous pouvez supprimer un commentaire du concours (ne sera donc pas "
    141 "utilisé pour déterminer les gagnants). Les commentaires supprimés seront "
    142 "toujours visibles mais affichés avec un fond rouge.<br /> - Vous pouvez "
    143 "aussi tricher en ajoutant des commentaires dans la liste de triche. Tous les "
    144 "commentaires de triche gagnent ! (seulement si la liste de triche est plus "
    145 "petite que le nombre de gagnants). Les commentaires de triche sont affichés "
    146 "avec un fond vert.<br /> - Les autres comentaires (fond blanc/gris) ne sont "
    147 "utilisés que s'il n'a pas assez de commentaire de triche."
    148 
    149 #: php/OrgZhyweb_WPCommentContest_MainUI.php:120
     136"Le tableau ci-dessous affiche tous les commentaires disponibles. Vous devez choisir ceux à utiliser pour le concours.<br /> - Vous "
     137"pouvez choisir des utilisateurs ayant le même rôle Wordpress (voir la page des Utilisateurs).<br /> - Vous pouvez supprimer un "
     138"commentaire du concours (ne sera donc pas utilisé pour déterminer les gagnants). Les commentaires supprimés seront toujours visibles "
     139"mais affichés avec un fond rouge.<br /> - Vous pouvez aussi tricher en ajoutant des commentaires dans la liste de triche. Tous les "
     140"commentaires de triche gagnent ! (seulement si la liste de triche est plus petite que le nombre de gagnants). Les commentaires de "
     141"triche sont affichés avec un fond vert.<br /> - Les autres comentaires (fond blanc/gris) ne sont utilisés que s'il n'a pas assez de "
     142"commentaire de triche."
     143
     144# @ comment-contest
     145#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:135
     146msgid "URL 'post' parameter has to be valid"
     147msgstr "Le paramètre 'post' dans l'URL n'est pas valide"
     148
     149#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:148
     150#, php-format
     151msgid ""
     152"To use the plug-in, go to the <a href=\"%s\">articles page</a> or <a href=\"%s\">pages page</a> then you'll find a link to launch "
     153"contests"
     154msgstr ""
     155"Pour utiliser ce plug-in, allez à la <a href=\"%s\">page des articles</a> ou la <a href=\"%s\">page des pages</a> puis vous trouverez "
     156"un lien afin de lancer les concours."
     157
     158#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:150
     159msgid "A question, a bug, an idea, a contribution? Ask me anything on the support page:"
     160msgstr "Une question, un bug, une idée, une contribution ? Posez vos questions sur la page support :"
     161
     162#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:151
     163msgid ""
     164"In case of a bug, for a quicker answer, please give my all the information about your website or generate a report file with the "
     165"following link (no personal data is exported):"
     166msgstr ""
     167"En cas de bug, pour accélérer la réponse, veuillez fournir toutes les informations à propos de votre site ou générez un fichier de "
     168"rapport grâce au lien suivant (aucune information personnelle n'est exportée) :"
     169
     170#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:152
     171msgid "My email:"
     172msgstr "Mon email :"
     173
     174# @ comment-contest
     175#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:153
     176msgid "Official page:"
     177msgstr "Page officielle :"
     178
     179#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:154
     180msgid "My French blog:"
     181msgstr "Mon blog en Français :"
     182
     183# @ comment-contest
     184#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_MainUI.php:158
     185msgid "Debug:"
     186msgstr "Debug :"
     187
     188# @ comment-contest
     189#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:41
     190#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:50
     191msgid "Delete"
     192msgstr "Supprimer"
     193
     194# @ comment-contest
     195#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:42
     196#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:51
     197msgid "Restore"
     198msgstr "Restaurer"
     199
     200#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:43
     201msgid "Cheat"
     202msgstr "Tricher"
     203
     204#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/php/OrgZhyweb_WPCommentContest_TableUI.php:44
     205msgid "Stop cheating"
     206msgstr "Ne plus tricher"
     207
     208#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:25
    150209msgid "Filters"
    151210msgstr "Filtres"
    152211
    153212# @ comment-contest
    154 #: php/OrgZhyweb_WPCommentContest_MainUI.php:123
     213#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:28
    155214msgid "Contest deadline"
    156215msgstr "Date limite du concours"
    157216
    158 #: php/OrgZhyweb_WPCommentContest_MainUI.php:124
     217#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:29
    159218msgid "Wrong date format!"
    160219msgstr "Mauvais format de date !"
    161220
    162 #: php/OrgZhyweb_WPCommentContest_MainUI.php:125
     221#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:30
    163222msgid "Date:"
    164223msgstr "Date :"
    165224
    166 #: php/OrgZhyweb_WPCommentContest_MainUI.php:126
     225#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:31
    167226msgid "Hour (24h format):"
    168227msgstr "Heure (format 24h) :"
    169228
    170 #: php/OrgZhyweb_WPCommentContest_MainUI.php:126
     229#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:31
    171230msgid "h"
    172231msgstr "h"
    173232
    174 #: php/OrgZhyweb_WPCommentContest_MainUI.php:126
     233#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:31
    175234msgid "min"
    176235msgstr "min"
    177236
    178 #: php/OrgZhyweb_WPCommentContest_MainUI.php:127
     237#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:32
    179238msgid "Select comments after this deadline"
    180239msgstr "Sélectionner tous les commentaires postés après cette date"
    181240
    182 #: php/OrgZhyweb_WPCommentContest_MainUI.php:130
     241#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:35
     242#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:64
     243msgid "Name"
     244msgstr "Nom"
     245
     246#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:35
     247msgid ""
     248"You can allow people with the same alias to post several comments for the contest. This filter limits the maximum number of comments "
     249"for the same person.<br />(ex. 0 means a person is not allowed to post more than one time; 2 means only two comments from the same "
     250"person will be kept for the contest)"
     251msgstr ""
     252"Vous pouvez autoriser des personnes, avec le même pseudo, de poster plusieurs commentaires pour le concours. Ce filtre limite le "
     253"nombre maximum de commentaires pour la même personnes.<br />(ex. 0 signifie qu'une personne n'a pas le droit de poster plus d'une "
     254"fois ; 2 signifie que seulement deux commentaires de la même personnes seront gardés pour le concours)"
     255
     256#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:36
     257#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:42
     258#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:49
     259msgid "Wrong configuration! This number must be equals or greater than zero"
     260msgstr "Mauvaise configuration ! Ce nombre doit être supérieur ou égal à zéro"
     261
     262#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:37
     263msgid "Same name maximum use:"
     264msgstr "Maximum d'utilisation du même pseudo :"
     265
     266#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:38
     267msgid "Select comments with the same name"
     268msgstr "Sélectionner les commentaires avec le même pseudo"
     269
     270#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:41
     271msgid "Email address"
     272msgstr "Adresses email"
     273
     274#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:41
     275msgid ""
     276"You can allow people with the same email to post several comments for the contest. This filter limits the maximum number of comments "
     277"for the same email.<br />(ex. 0 means an email is not allowed to post more than one time; 2 means only two comments from the same "
     278"email will be kept for the contest)"
     279msgstr ""
     280"Vous pouvez autoriser des personnes, avec le même email, de poster plusieurs commentaires pour le concours. Ce filtre limite le nombre "
     281"maximum de commentaires pour la même personnes.<br />(ex. 0 signifie qu'un email n'a pas le droit de poster plus d'une fois ; 2 "
     282"signifie que seulement deux commentaires du même email seront gardés pour le concours)"
     283
     284#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:43
     285msgid "Same email maximum use:"
     286msgstr "Maximum d'utilisation du même email :"
     287
     288#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:44
     289msgid "Select comments with the same email"
     290msgstr "Sélectionner les commentaires avec le même email"
     291
     292#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:48
     293#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:66
    183294msgid "IP address"
    184295msgstr "Adresse IP"
    185296
    186 #: php/OrgZhyweb_WPCommentContest_MainUI.php:131
    187 msgid "Select all comments with the same IP address"
    188 msgstr ""
    189 "Sélectionner tous les commentaires ayant été postés avec la même adresse IP"
    190 
    191 #: php/OrgZhyweb_WPCommentContest_MainUI.php:134
    192 msgid "Email address"
    193 msgstr "Adresses email"
    194 
    195 #: php/OrgZhyweb_WPCommentContest_MainUI.php:135
    196 msgid "Select all comments with the same email"
    197 msgstr "Sélectionner tous les commentaires ayant été postés avec le même email"
    198 
    199 # @ comment-contest
    200 #: php/OrgZhyweb_WPCommentContest_MainUI.php:151
    201 msgid "URL 'post' parameter has to be valid"
    202 msgstr "Le paramètre 'post' dans l'URL n'est pas valide"
    203 
    204 # @ comment-contest
    205 #: php/OrgZhyweb_WPCommentContest_MainUI.php:163
    206 #, php-format
    207 msgid ""
    208 "To use the plug-in, go to <a href=\"%s\">articles page</a> then you'll find "
    209 "a link to launch contests"
    210 msgstr ""
    211 "Pour utiliser le plug-in, aller à la <a href=\"%s\">page des articles</a> "
    212 "puis cliquez sur le lien dédié au lancement de concours"
    213 
    214 # @ comment-contest
    215 #: php/OrgZhyweb_WPCommentContest_MainUI.php:165
    216 msgid "Support:"
    217 msgstr "Support :"
    218 
    219 # @ comment-contest
    220 #: php/OrgZhyweb_WPCommentContest_MainUI.php:166
    221 #: php/OrgZhyweb_WPCommentContest_MainUI.php:167
    222 msgid "Official page:"
    223 msgstr "Page officielle :"
    224 
    225 # @ comment-contest
    226 #: php/OrgZhyweb_WPCommentContest_MainUI.php:171
    227 msgid "Debug:"
    228 msgstr "Debug :"
    229 
    230 # @ comment-contest
    231 #: php/OrgZhyweb_WPCommentContest_TableUI.php:41
    232 #: php/OrgZhyweb_WPCommentContest_TableUI.php:50
    233 msgid "Delete"
    234 msgstr "Supprimer"
    235 
    236 # @ comment-contest
    237 #: php/OrgZhyweb_WPCommentContest_TableUI.php:42
    238 #: php/OrgZhyweb_WPCommentContest_TableUI.php:51
    239 msgid "Restore"
    240 msgstr "Restaurer"
    241 
    242 #: php/OrgZhyweb_WPCommentContest_TableUI.php:43
    243 msgid "Cheat"
    244 msgstr "Tricher"
    245 
    246 #: php/OrgZhyweb_WPCommentContest_TableUI.php:44
    247 msgid "Stop cheating"
    248 msgstr "Ne plus tricher"
     297#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:48
     298msgid ""
     299"You can allow people with the same IP address to post several comments for the contest. This filter limits the maximum number of "
     300"comments for the same IP address.<br />(ex. 0 means a IP address is not allowed to post more than one time; 2 means only two comments "
     301"from the same IP address will be kept for the contest)"
     302msgstr ""
     303"Vous pouvez autoriser des personnes, avec la même adresse IP, de poster plusieurs commentaires pour le concours. Ce filtre limite le "
     304"nombre maximum de commentaires pour la même personnes.<br />(ex. 0 signifie qu'une adresse IP n'a pas le droit de poster plus d'une "
     305"fois ; 2 signifie que seulement deux commentaires de la même adresse IP seront gardés pour le concours)"
     306
     307#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:50
     308msgid "Same IP address maximum use:"
     309msgstr "Maximum d'utilisation de la même adresse IP :"
     310
     311#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:51
     312msgid "Select comments with the same IP address"
     313msgstr "Sélectionner les commentaires avec la même adresse IP"
     314
     315#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:55
     316msgid "Words (comma separated):"
     317msgstr "Mots (séparés par une virgule) :"
     318
     319#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:56
     320msgid "Select comments which don't contain one of these words"
     321msgstr "Sélectionner les commentaires qui ne contiennent pas l'un de ces mots"
     322
     323#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:57
     324msgid "Select comments which don't contain all these words"
     325msgstr "Sélectionner les commentaires qui ne contiennent pas tous ces mots"
     326
     327#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:60
     328msgid "Time between two comments"
     329msgstr "Temps entre deux commentaires"
     330
     331#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:60
     332msgid ""
     333"You can allow people to post several comments in your contest. Between two comments the person must wait some times. This filter allow "
     334"you to get all comments (from a person who has the same name/email/IP address) which don't respect your configuration"
     335msgstr ""
     336"Vous pouvez autoriser des personnes de poster plusieurs commentaires pour le concours. Entre deux commentaires, la personne doit "
     337"attendre un certain temps. Ce filtre permet de sélectionner tous les commentaires (d'une personne ayant le même nom/email/adresse IP) "
     338"qui ne respectent pas votre configuration"
     339
     340#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:61
     341msgid "Wrong configuration! This number must be greater than zero and at least one criterion must be checked!"
     342msgstr "Mauvaise configuration ! Ce nombre doit être supérieur à zéro et au moins un critère doit être choisi !"
     343
     344#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:62
     345msgid "Time (in minutes [1 day = 1440 min]):"
     346msgstr "Temps (en minutes [1 jour = 1440 min]) :"
     347
     348#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:63
     349msgid "Criteria:"
     350msgstr "Critères :"
     351
     352#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:65
     353msgid "Email"
     354msgstr "Email"
     355
     356#: /Users/Zhykos/Documents/www/Zhyweb/wordpress/wp-content/plugins/comment-contest/views/filters.php:67
     357msgid "Select comments posted too soon"
     358msgstr "Sélectionner les commentaires postés trop tôt"
     359
     360#~ msgid "Select all comments with the same IP address"
     361#~ msgstr "Sélectionner tous les commentaires ayant été postés avec la même adresse IP"
     362
     363#~ msgid "Select all comments with the same email"
     364#~ msgstr "Sélectionner tous les commentaires ayant été postés avec le même email"
     365
     366# @ comment-contest
     367#~ msgid "To use the plug-in, go to <a href=\"%s\">articles page</a> then you'll find a link to launch contests"
     368#~ msgstr ""
     369#~ "Pour utiliser le plug-in, aller à la <a href=\"%s\">page des articles</a> puis cliquez sur le lien dédié au lancement de concours"
     370
     371# @ comment-contest
     372#~ msgid "Support:"
     373#~ msgstr "Support :"
  • comment-contest/trunk/php/OrgZhyweb_WPCommentContest_AbstractTableUI.php

    r845716 r1058712  
    11<?php
    2 /*  Copyright 2009 - 2014 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
     2/*  Copyright 2009 - 2015 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
    33
    44  This program is free software; you can redistribute it and/or modify
     
    182182        comment_author($comment->comment_ID);
    183183        echo '</strong><br />';
     184       
    184185        if (!empty($author_url)) {
    185186            echo "<a title='$author_url' href='$author_url'>$author_url_display</a><br />";
     
    209210        echo '<span style="display:none" class="zhyweb_comment_contest_id">' . $comment->comment_ID . '</span>';
    210211       
     212        // Add comment date post
     213        echo '<span style="display:none" class="zhyweb_comment_contest_date">' . get_comment_date('YmdHi', $comment->comment_ID) . '</span>';
     214       
    211215        // Add comment timestamp post
    212         echo '<span style="display:none" class="zhyweb_comment_contest_timestamp">' . get_comment_date('YmdHi', $comment->comment_ID) . '</span>';
     216        echo '<span style="display:none" class="zhyweb_comment_contest_timestamp">' . get_comment_date('U', $comment->comment_ID) . '</span>';
    213217       
    214218        // Add comment IP address
     
    217221        // Add comment email
    218222        echo '<span style="display:none" class="zhyweb_comment_contest_email">' . $comment->comment_author_email . '</span>';
     223       
     224        // Add comment alias
     225        echo '<span style="display:none" class="zhyweb_comment_contest_alias">' . get_comment_author($comment->comment_ID) . '</span>';
    219226    }
    220227   
     
    266273    }   
    267274}
    268 ?>
  • comment-contest/trunk/php/OrgZhyweb_WPCommentContest_MainUI.php

    r845716 r1058712  
    11<?php
    2 /*  Copyright 2009 - 2014 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
     2/*  Copyright 2009 - 2015 Comment Contest plug-in for Wordpress by Thomas "Zhykos" Cicognani  (email : tcicognani@zhyweb.org)
    33
    44  This program is free software; you can redistribute it and/or modify
     
    2525 */
    2626class OrgZhyweb_WPCommentContest_MainUI {
    27     /** Plug-in directory */
     27    /** Plug-in URL directory */
    2828    private $pluginDir;
    2929   
    30     public function __construct($pluginDir) {
     30    /** Plug-in directory (on the server) */
     31    private $pluginSystemPath;
     32   
     33    public function __construct($pluginDir, $pluginSystemPath) {
    3134        $this->pluginDir = $pluginDir;
     35        $this->pluginSystemPath = $pluginSystemPath;
    3236    }
    3337   
     
    3842     */
    3943    public function display() {
    40         $getPostID = $_GET['postID'];
    41         if (isset($getPostID)) {
     44        if (isset($_GET['postID'])) {
    4245            $postID = intval($_GET['postID']);
    4346            if (current_user_can(10)) {
     
    105108            $this->displayHeaderPage($postID);
    106109           
    107             echo "<br /><br /><hr /><h3 style=\"float: left;\">" . __('Comments used for the contest:', "comment-contest") . "</h3>";
     110            echo "<br /><br /><hr /><h3 style=\"float: left;\">" . __('Comments used for the contest:', "comment-contest");
    108111           
    109112            // Help image
    110             echo "<img src=\"$this->pluginDir/img/help.png\" alt=\"Help\" class=\"help\" id=\"mainHelp\" title=\"". __("The table below shows all available comments. You have to choose which ones you want for the contest.<br />"
     113            echo " <img src=\"$this->pluginDir/img/help.png\" alt=\"Help\" class=\"help\" title=\"". __("The table below shows all available comments. You have to choose which ones you want for the contest.<br />"
    111114                . " - You can select users who have the same Wordpress role (see User page).<br />"
    112115                . " - You can remove comments from contest (don't be used to determine winners). Removed comments still are visible with red background color.<br />"
     
    114117                . " - The other comments (white/grey background) are only used if there isn't enough cheating comments.", "comment-contest") . "\" />";
    115118               
     119            echo "</h3>";
    116120            // Filters
    117             echo "<div style='clear:both;'>
    118                     <span>
    119                         <a href='javascript:;' onclick='toggleFilters(\"$this->pluginDir\")'><img src='$this->pluginDir/img/plus.png' alt='expand/collapse' id='filtersImg' style='vertical-align: middle;' /></a>
    120                         <a href='javascript:;' onclick='toggleFilters(\"$this->pluginDir\")'>" . __('Filters', "comment-contest") . "</a>
    121                     </span>
    122                     <div id='filters' style='display: none;'>
    123                         <h4>" . __('Contest deadline', "comment-contest") . "</h4>
    124                         <div id='zwpcc_dateFilter_error_message' style='color: red; display: none;'>" . __('Wrong date format!', "comment-contest") . "</div>
    125                         " . __('Date:', "comment-contest") . " <input type='text' id='datepicker' /><br />
    126                         " . __('Hour (24h format):', "comment-contest") . " <input type='text' id='dateHours' maxlength='2' size='3' />" . __('h', "comment-contest") . " <input type='text' id='dateMinutes' maxlength='2' size='3' />" . __('min', "comment-contest") . "<br />
    127                         <br /><input type='button' class='button action' id='dateSubmit' value='" . __('Select comments after this deadline', "comment-contest") . "' />
    128                        
    129                         <br /><br />
    130                         <h4>" . __('IP address', "comment-contest") . "</h4>
    131                         <input type='button' class='button action' id='ipAddressFilter' value='" . __('Select all comments with the same IP address', "comment-contest") . "' />
    132                            
    133                         <br /><br />
    134                         <h4>" . __('Email address', "comment-contest") . "</h4>
    135                         <input type='button' class='button action' id='emailAddressFilter' value='" . __('Select all comments with the same email', "comment-contest") . "' />
    136                     </div>
    137                 </div>";
     121            $this->displayTemplate("filters");
    138122           
    139123            // Table
     
    160144    private function displayInfoPage($debug = NULL) {
    161145        $this->displayHeaderPage(NULL);
     146        $editPage = admin_url('edit.php');
    162147       
    163         echo    "<h3>" . sprintf(__("To use the plug-in, go to <a href=\"%s\">articles page</a> then you'll find a link to launch contests", "comment-contest"), admin_url('edit.php')) . "</h3>
    164                     <br />
    165                     " . __("Support:", "comment-contest") . " tcicognani@zhyweb.org<br />
    166                     " . __("Official page:", "comment-contest") . " <a href=\"http://wordpress.org/plugins/comment-contest/\">http://wordpress.org/plugins/comment-contest/</a><br />
    167                     " . __("Official page:", "comment-contest") . " <a href=\"http://wp-comment-contest.zhyweb.org/\">http://wp-comment-contest.zhyweb.org/</a>";
     148        echo    "<h3>" . sprintf(__("To use the plug-in, go to the <a href=\"%s\">articles page</a> or <a href=\"%s\">pages page</a> then you'll find a link to launch contests", "comment-contest"), $editPage, "$editPage?post_type=page") . "</h3>
     149                <br />"
     150                . __("A question, a bug, an idea, a contribution? Ask me anything on the support page:", "comment-contest") . " <a href=\"https://wordpress.org/support/plugin/comment-contest\">https://wordpress.org/support/plugin/comment-contest</a><br />"
     151                . __("In case of a bug, for a quicker answer, please give my all the information about your website or generate a report file with the following link (no personal data is exported):", "comment-contest") . " <a href=\"$this->pluginDir/php/OrgZhyweb_WPCommentContest_GenerateDebugReport.php\">Report generator</a><br /><br />"
     152                . __("My email:") . " tcicognani@zhyweb.org<br /><br />"
     153                . __("Official page:", "comment-contest") . " <a href=\"http://wordpress.org/plugins/comment-contest/\">http://wordpress.org/plugins/comment-contest/</a><br />"
     154                . __("My French blog:", "comment-contest") . " <a href=\"http://wp-comment-contest.zhyweb.org/\">http://wp-comment-contest.zhyweb.org/</a>";
    168155       
    169156        if ($debug != NULL) {
     
    174161        $this->displayFooterPage();
    175162    }
     163   
     164    /**
     165     * Include and display a page (PHP speaking)
     166     * @param string $name Page name
     167     */
     168    private function displayTemplate($name) {
     169        $file = $this->pluginSystemPath . '/views/' . $name . '.php';
     170        require($file);
     171    }
    176172}
    177 ?>
  • comment-contest/trunk/readme.txt

    r980446 r1058712  
    22Contributors: zhykos
    33Donate link: http://wp-comment-contest.zhyweb.org/
    4 Tags: comments, contest, concours, commentaire, zhykos, zhyweb
     4Tags: comments, contest, draw, concours, commentaire, zhykos, zhyweb
    55Requires at least: 3.3
    6 Tested up to: 4.0
     6Tested up to: 4.1
    77Stable tag: trunk
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 If you create a contest on your website, you can draw all comments in a specific post.
     11Comment Contest allows you to manage contests on your website. This plug-in draws all comments in a specific post and show you the winners.
    1212
    1313== Description ==
    1414
    15 If you want to organize a contest on your blog (some goodies, games ... to win), use this plugin. Comment Contest works only with comments.
    16 You choose some comments, set some features (winners' number ...) and the system chooses the winners.
     15If you want to organize a contest on your blog (some goodies, games... to win), use this plugin. Comment Contest works only with comments.
     16You choose some comments, set some features (winners' number ...) and the system chooses the winners for you.
    1717
    1818== Installation ==
     
    5151
    5252== Changelog ==
     53
     54= 2.3.0 =
     55* New: Contest can be launch from pages (before only posts could)
     56* New: Add new filters
     57* Update: Change the main plug-in page with my contact info and a system to send me info when a bug occurs
     58* Misc: Check compatibility with Wordpress 4.1
     59* Update: A lot of internal improvements
    5360
    5461= 2.2.3 =
Note: See TracChangeset for help on using the changeset viewer.