Plugin Directory

Changeset 2023306


Ignore:
Timestamp:
02/01/2019 12:06:00 PM (7 years ago)
Author:
websupporter
Message:

2.9.1

Location:
antispam-bee
Files:
20 added
6 edited

Legend:

Unmodified
Added
Removed
  • antispam-bee/trunk/antispam_bee.php

    r1942159 r2023306  
    1010 * License:     GPLv2 or later
    1111 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    12  * Version:     2.9.0
     12 * Version:     2.9.1
    1313 *
    1414 * @package Antispam Bee
     
    5353
    5454    /**
     55     * Which internal datastructure version we are running on.
     56     *
     57     * @var int
     58     */
     59    private static $db_version = 1;
     60
     61    /**
    5562     * The base.
    5663     *
     
    6572     */
    6673    private static $_salt;
    67 
    6874
    6975    /**
     
    183189                    )
    184190                );
     191                add_action(
     192                    'admin_init',
     193                    array(
     194                        __CLASS__,
     195                        'update_database',
     196                    )
     197                );
    185198
    186199            } elseif ( self::_current_page( 'admin-post' ) ) {
     
    803816        $html .= "<tfoot><tr>\n";
    804817        foreach ( $items as $date => $count ) {
    805             $html .= '<th>' . $date . "</th>\n";
     818            $html .= '<th>' . date_i18n( 'j. F Y', $date ) . "</th>\n";
    806819        }
    807820        $html .= "</tr></tfoot>\n";
     
    11521165                )
    11531166                (?P<after>[^>]*)                                                    (?# match any additional optional attributes )
    1154                 ><\/textarea>                                                       (?# the closing of the textarea )
     1167                >                                                                   (?# the closing of the textarea opening tag )
     1168                (?s)(?P<content>.*?)                                                (?# any textarea content )
     1169                <\/textarea>                                                        (?# the closing textarea tag )
    11551170            )/x',
    11561171            array( 'Antispam_Bee', 'replace_comment_field_callback' ),
     
    11841199        if ( ! empty( $matches['id1'] ) || ! empty( $matches['id2'] ) ) {
    11851200            $output   .= 'id="' . self::get_secret_id_for_post( self::$_current_post_id ) . '" ';
    1186             $id_script = '<script type="text/javascript">document.getElementById("comment").setAttribute( "id", "' . esc_js( md5( time() ) ) . '" );document.getElementById("' . esc_js( self::get_secret_id_for_post( self::$_current_post_id ) ) . '").setAttribute( "id", "comment" );</script>';
     1201            $id_script = '<script type="text/javascript">document.getElementById("comment").setAttribute( "id", "a' . substr( esc_js( md5( time() ) ), 0, 31 ) . '" );document.getElementById("' . esc_js( self::get_secret_id_for_post( self::$_current_post_id ) ) . '").setAttribute( "id", "comment" );</script>';
    11871202        }
    11881203
     
    11901205        $output .= $matches['between1'] . $matches['between2'] . $matches['between3'];
    11911206        $output .= $matches['after'] . '>';
     1207        $output .= $matches['content'];
    11921208        $output .= '</textarea><textarea id="comment" aria-hidden="true" name="comment" autocomplete="nope" style="padding:0;clip:rect(1px, 1px, 1px, 1px);position:absolute !important;white-space:nowrap;height:1px;width:1px;overflow:hidden;" tabindex="-1"></textarea>';
    11931209
     
    16221638        global $wpdb;
    16231639
    1624         // phpcs:disable WordPress.WP.PreparedSQL.NotPrepared
    1625         $sql        = '
    1626             select
    1627                 meta_value as ip
    1628             from
    1629                 ' . $wpdb->commentmeta . ' as meta,
    1630                 ' . $wpdb->comments . ' as comments
    1631             where
    1632                 comments.comment_ID = meta.comment_id
    1633                 AND meta.meta_key = "antispam_bee_iphash"
    1634                 AND comments.comment_approved="spam"';
    1635         $hashed_ips = $wpdb->get_col( $sql );
    1636         if ( ! empty( $hashed_ips ) ) {
    1637             foreach ( $hashed_ips as $hash ) {
    1638                 if ( wp_check_password( $ip, $hash ) ) {
    1639                     return true;
    1640                 }
    1641             }
    1642         }
    1643 
    16441640        $params = array();
    16451641        $filter = array();
     
    16481644            $params[] = wp_unslash( $url );
    16491645        }
     1646        if ( ! empty( $ip ) ) {
     1647            $filter[] = '`comment_author_IP` = %s';
     1648            $params[] = wp_unslash( $ip );
     1649        }
    16501650
    16511651        if ( ! empty( $email ) ) {
     
    16571657        }
    16581658
     1659        // phpcs:disable WordPress.WP.PreparedSQL.NotPrepared
    16591660        // phpcs:disable WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber
    1660         // ToDo: Have a closer look on this SQL Query.
    16611661        $filter_sql = implode( ' OR ', $filter );
    16621662
     
    18521852        }
    18531853
    1854         if ( mb_strlen( $comment_text ) < 10 ) {
     1854        $word_count = 0;
     1855        $text       = trim( preg_replace( "/[\n\r\t ]+/", ' ', $comment_text ), ' ' );
     1856
     1857        /*
     1858         * translators: If your word count is based on single characters (e.g. East Asian characters),
     1859         * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
     1860         * Do not translate into your own language.
     1861         */
     1862        if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
     1863            preg_match_all( '/./u', $text, $words_array );
     1864            if ( isset( $words_array[0] ) ) {
     1865                $word_count = count( $words_array[0] );
     1866            }
     1867        } else {
     1868            $words_array = preg_split( "/[\n\r\t ]+/", $text, -1, PREG_SPLIT_NO_EMPTY );
     1869            $word_count  = count( $words_array );
     1870        }
     1871
     1872        if ( $word_count < 10 ) {
    18551873            return false;
    18561874        }
     
    20742092            'aym' => 'ay',
    20752093            'aze' => 'az',
     2094            'nds' => 'de',
    20762095        );
    20772096
     
    26662685        }
    26672686
     2687        $secret = self::ensure_secret_starts_with_letter( $secret );
     2688
    26682689        /**
    26692690         * Filters the secret for a post, which is used in the textarea name attribute.
     
    26972718        }
    26982719
     2720        $secret = self::ensure_secret_starts_with_letter( $secret );
     2721
    26992722        /**
    27002723         * Filters the secret for a post, which is used in the textarea id attribute.
     
    27132736
    27142737    /**
     2738     * Ensures that the secret starts with a letter.
     2739     *
     2740     * @param string $secret The secret.
     2741     *
     2742     * @return string
     2743     */
     2744    public static function ensure_secret_starts_with_letter( $secret ) {
     2745
     2746        $first_char = substr( $secret, 0, 1 );
     2747        if ( is_numeric( $first_char ) ) {
     2748            return chr( $first_char + 97 ) . substr( $secret, 1 );
     2749        } else {
     2750            return $secret;
     2751        }
     2752    }
     2753
     2754    /**
    27152755     * Returns 'spam'
    27162756     *
     
    27382778        $parts = wp_parse_url( $url );
    27392779        return ( is_array( $parts ) && isset( $parts[ $component ] ) ) ? $parts[ $component ] : '';
     2780    }
     2781
     2782    /**
     2783     * Updates the database structure if necessary
     2784     */
     2785    public static function update_database() {
     2786        if ( self::db_version_is_current() ) {
     2787            return;
     2788        }
     2789
     2790        global $wpdb;
     2791
     2792        /**
     2793         * In Version 2.9 the IP of the commenter was saved as a hash. We reverted this solution.
     2794         * Therefore, we need to delete this unused data.
     2795         */
     2796        //phpcs:disable WordPress.WP.PreparedSQL.NotPrepared
     2797        $sql = 'delete from `' . $wpdb->commentmeta . '` where `meta_key` IN ("antispam_bee_iphash")';
     2798        $wpdb->query( $sql );
     2799        //phpcs:enable WordPress.WP.PreparedSQL.NotPrepared
     2800
     2801        update_option( 'antispambee_db_version', self::$db_version );
     2802    }
     2803
     2804    /**
     2805     * Whether the database structure is up to date.
     2806     *
     2807     * @return bool
     2808     */
     2809    private static function db_version_is_current() {
     2810
     2811        $current_version = absint( get_option( 'antispambee_db_version', 0 ) );
     2812        return $current_version === self::$db_version;
     2813
    27402814    }
    27412815}
  • antispam-bee/trunk/css/styles.css

    r1879121 r2023306  
    99    outline: 0;
    1010    -webkit-box-sizing: border-box;
    11     -moz-box-sizing:    border-box;
    12     box-sizing:         border-box;
    13 }
    14 
    15 /* @end group */
    16 
     11    -moz-box-sizing: border-box;
     12    box-sizing: border-box;
     13}
     14
     15/* @end group */
    1716
    1817/* @group Browse Happy */
     
    2726/* @end group */
    2827
    29 
    3028/* @group Columns */
    3129
     
    3533    text-rendering: optimizeLegibility;
    3634}
     35
    3736.ab-column {
    3837    float: left;
     
    4342/* @end group */
    4443
    45 
    4644/* @group Headlines + Icons */
    4745
    4846.ab-column h3 {
    4947    margin: 0;
    50     font-size: 14px;
     48    font-size: 18px;
    5149    font-weight: normal;
    5250    line-height: 20px;
    53     text-transform: uppercase;
    54 }
     51    color: #23282d;
     52}
     53
    5554.ab-column h3.icon:before {
    5655    font: normal 30px/30px Dashicons;
     
    6564    -moz-osx-font-smoothing: grayscale;
    6665}
     66
    6767.ab-column.ab-arrow h3.icon:before {
    6868    content: '\f536';
    6969}
     70
    7071.ab-column.ab-join h3.icon:before {
    7172    content: '\f108';
    7273}
     74
    7375.ab-column.ab-diff h3.icon:before {
    7476    content: '\f237';
     
    7779.ab-column h6 {
    7880    clear: both;
    79     color: #8e959c;
     81    color: #555d66;
    8082    margin: 0 0 20px;
    81     font-size: 10px;
    8283    font-weight: normal;
    83     text-transform: uppercase;
    84 }
    85 
    86 /* @end group */
    87 
     84    font-size: 13px;
     85}
     86
     87/* @end group */
    8888
    8989/* @group Form */
     
    9292.ab-column input[type="number"],
    9393.ab-column select {
    94     font-size: 12px;
     94    font-size: 13px;
    9595    text-align: center;
    9696    background: #f8f8f9;
    9797}
     98
    9899.ab-column input[type="number"] {
    99100    padding: 0;
    100101}
     102
    101103.ab-column select[multiple] {
    102104    width: 175px;
    103105    min-height: 60px;
    104106}
     107
    105108.ab-column input.ab-mini-field {
    106109    width: 40px;
    107110}
     111
    108112.ab-column .ab-medium-field {
    109113    width: 100%;
    110     max-width :285px;
    111 }
     114    max-width: 285px;
     115}
     116
    112117.ab-column input[type="text"] + label,
    113118.ab-column select + label {
     
    120125/* @end group */
    121126
    122 
    123127/* @group Column contents */
    124128
     
    126130    padding: 0 20px 0 0;
    127131}
     132
    128133.ab-column:last-of-type > ul {
    129134    border: 0;
    130135}
     136
    131137.ab-column > ul > li {
    132138    width: 330px;
     
    138144
    139145.ab-column > ul > li a {
    140     text-decoration: none;
    141     border-bottom: 1px dotted #e0e5e9;
    142 }
     146    text-decoration: underline;
     147}
     148
    143149.ab-column > ul > li a:hover {
    144150    border-color: inherit;
     
    148154    cursor: default;
    149155    display: inline-block;
    150     line-height: 24px;
     156    font-size: 14px;
    151157    max-width: 286px;
    152 }
     158    color: #23282d;
     159}
     160
    153161.ab-column > ul > li label span {
    154     color: #8e959c;
     162    color: #555d66;
    155163    display: block;
    156     font-size: 12px;
     164    font-size: 13px;
    157165    line-height: 16px;
    158 }
    159 
    160 /* @end group */
    161 
     166    margin-top: 5px;
     167}
     168
     169/* @end group */
    162170
    163171/* @group Separator */
     
    176184    border-style: solid;
    177185}
     186
    178187.ab-column.ab-arrow > ul > li:before {
    179188    bottom: -24px;
    180189    border-color: #fff transparent;
    181190}
     191
    182192.ab-column.ab-arrow > ul > li:after {
    183193    bottom: -22px;
     
    202212/* @end group */
    203213
    204 
    205214/* @group Submit & Service */
    206215
     
    208217    width: 342px;
    209218    margin-top: 20px;
    210     padding-right:20px;
    211    
    212 }
     219    padding-right: 20px;
     220}
     221
    213222.ab-column--submit-service p {
    214223    padding: 5px 0;
     
    217226    width: 100%;
    218227}
     228
    219229.ab-column--submit-service p:first-of-type {
    220230    border-top: 1px solid #e0e5e9;
    221231}
     232
    222233.ab-column--submit-service p:last-of-type {
    223234    border-bottom: 1px solid #e0e5e9;
    224235}
     236
    225237.ab-column--submit-service .button {
    226238    width: 100%;
     
    230242/* @end group */
    231243
    232 
    233244/* @group 2nd level */
    234245
     
    242253    display: none;
    243254}
     255
    244256.ab-column > ul > li > ul li {
    245257    padding: 2px 0;
    246258}
     259
    247260.ab-column > ul > li > ul label {
    248261    margin: 0 0 0 7px;
    249262}
     263
    250264.ab-column > ul > li > input[type="checkbox"]:checked ~ ul {
    251265    display: block;
  • antispam-bee/trunk/css/styles.min.css

    r1879121 r2023306  
    1 .ab-main *,.ab-main :after,.ab-main :before{border:0;margin:0;padding:0;outline:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.browsehappy{margin:0 0 20px;padding:10px;border:1px solid #e66f00;text-align:center}.ab-wrap{margin:0 0 0 -10px;padding:20px 0 0;text-rendering:optimizeLegibility}.ab-column{float:left;margin:0 0 0 10px;position:relative}.ab-column h3{margin:0;font-size:14px;font-weight:400;line-height:20px;text-transform:uppercase}.ab-column h3.icon:before{font:normal 30px/30px Dashicons;top:4px;right:20px;speak:none;width:1em;color:#8e959c;position:absolute;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ab-column.ab-arrow h3.icon:before{content:'\f536'}.ab-column.ab-join h3.icon:before{content:'\f108'}.ab-column.ab-diff h3.icon:before{content:'\f237'}.ab-column h6{clear:both;color:#8e959c;margin:0 0 20px;font-size:10px;font-weight:400;text-transform:uppercase}.ab-column input[type="text"],.ab-column input[type="number"],.ab-column select{font-size:12px;text-align:center;background:#f8f8f9}.ab-column input[type="number"]{padding:0}.ab-column select[multiple]{width:175px;min-height:60px}.ab-column input.ab-mini-field{width:40px}.ab-column .ab-medium-field{width:100%;max-width:285px}.ab-column input[type="text"] + label,.ab-column select + label{color:#8e959c;margin:0 0 0 7px;display:inline-block;text-transform:uppercase}.ab-column > ul{padding:0 20px 0 0}.ab-column:last-of-type > ul{border:0}.ab-column > ul > li{width:330px;margin:0 0 36px;padding:10px 0 12px 12px;position:relative;background:#fff}.ab-column > ul > li a{text-decoration:none;border-bottom:1px dotted #e0e5e9}.ab-column > ul > li a:hover{border-color:inherit}.ab-column > ul > li label{cursor:default;display:inline-block;line-height:24px;max-width:286px}.ab-column > ul > li label span{color:#8e959c;display:block;font-size:12px;line-height:16px}.ab-column > ul > li:after,.ab-column > ul > li:before{width:0;content:'';position:absolute}.ab-column.ab-arrow > ul > li:before,.ab-column.ab-arrow > ul > li:after{left:157px;border-width:10px 10px 0;border-style:solid}.ab-column.ab-arrow > ul > li:before{bottom:-24px;border-color:#fff transparent}.ab-column.ab-arrow > ul > li:after{bottom:-22px;border-color:#f1f1f1 transparent}.ab-column.ab-join > ul > li:before{left:171px;bottom:-27px;height:18px;border-right:2px solid #fff}.ab-column.ab-diff > ul > li:before{left:162px;bottom:-19px;width:18px;height:0;border-bottom:2px solid #fff}.ab-column--submit-service{width:342px;margin-top:20px;padding-right:20px}.ab-column--submit-service p{padding:5px 0;margin:0;text-align:center;width:100%}.ab-column--submit-service p:first-of-type{border-top:1px solid #e0e5e9}.ab-column--submit-service p:last-of-type{border-bottom:1px solid #e0e5e9}.ab-column--submit-service .button{width:100%;margin:35px 0 10px}.ab-column > ul > li:last-of-type:after,.ab-column > ul > li:last-of-type:before{display:none}.ab-column > ul > li > ul{margin:10px 10px 0 26px;display:none}.ab-column > ul > li > ul li{padding:2px 0}.ab-column > ul > li > ul label{margin:0 0 0 7px}.ab-column > ul > li > input[type="checkbox"]:checked ~ ul{display:block}
     1.ab-main *,.ab-main :after,.ab-main :before{border:0;margin:0;padding:0;outline:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.browsehappy{margin:0 0 20px;padding:10px;border:1px solid #e66f00;text-align:center}.ab-wrap{margin:0 0 0 -10px;padding:20px 0 0;text-rendering:optimizeLegibility}.ab-column{float:left;margin:0 0 0 10px;position:relative}.ab-column h3{margin:0;font-size:18px;font-weight:400;line-height:20px;color:#23282d}.ab-column h3.icon:before{font:400 30px/30px Dashicons;top:4px;right:20px;speak:none;width:1em;color:#8e959c;position:absolute;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ab-column.ab-arrow h3.icon:before{content:'\f536'}.ab-column.ab-join h3.icon:before{content:'\f108'}.ab-column.ab-diff h3.icon:before{content:'\f237'}.ab-column h6{clear:both;color:#555d66;margin:0 0 20px;font-weight:400;font-size:13px}.ab-column input[type=text],.ab-column input[type=number],.ab-column select{font-size:13px;text-align:center;background:#f8f8f9}.ab-column input[type=number]{padding:0}.ab-column select[multiple]{width:175px;min-height:60px}.ab-column input.ab-mini-field{width:40px}.ab-column .ab-medium-field{width:100%;max-width:285px}.ab-column input[type=text]+label,.ab-column select+label{color:#8e959c;margin:0 0 0 7px;display:inline-block;text-transform:uppercase}.ab-column>ul{padding:0 20px 0 0}.ab-column:last-of-type>ul{border:0}.ab-column>ul>li{width:330px;margin:0 0 36px;padding:10px 0 12px 12px;position:relative;background:#fff}.ab-column>ul>li a{text-decoration:underline}.ab-column>ul>li a:hover{border-color:inherit}.ab-column>ul>li label{cursor:default;display:inline-block;font-size:14px;max-width:286px;color:#23282d}.ab-column>ul>li label span{color:#555d66;display:block;font-size:13px;line-height:16px;margin-top:5px}.ab-column>ul>li:after,.ab-column>ul>li:before{width:0;content:'';position:absolute}.ab-column.ab-arrow>ul>li:after,.ab-column.ab-arrow>ul>li:before{left:157px;border-width:10px 10px 0;border-style:solid}.ab-column.ab-arrow>ul>li:before{bottom:-24px;border-color:#fff transparent}.ab-column.ab-arrow>ul>li:after{bottom:-22px;border-color:#f1f1f1 transparent}.ab-column.ab-join>ul>li:before{left:171px;bottom:-27px;height:18px;border-right:2px solid #fff}.ab-column.ab-diff>ul>li:before{left:162px;bottom:-19px;width:18px;height:0;border-bottom:2px solid #fff}.ab-column--submit-service{width:342px;margin-top:20px;padding-right:20px}.ab-column--submit-service p{padding:5px 0;margin:0;text-align:center;width:100%}.ab-column--submit-service p:first-of-type{border-top:1px solid #e0e5e9}.ab-column--submit-service p:last-of-type{border-bottom:1px solid #e0e5e9}.ab-column--submit-service .button{width:100%;margin:35px 0 10px}.ab-column>ul>li:last-of-type:after,.ab-column>ul>li:last-of-type:before{display:none}.ab-column>ul>li>ul{margin:10px 10px 0 26px;display:none}.ab-column>ul>li>ul li{padding:2px 0}.ab-column>ul>li>ul label{margin:0 0 0 7px}.ab-column>ul>li>input[type=checkbox]:checked~ul{display:block}
  • antispam-bee/trunk/js/dashboard.js

    r1594807 r2023306  
    4141        leave_timer,
    4242        blanket = r.set();
    43     label.push(r.text(60, 12, "24× Spam").attr(txt));
    44     label.push(r.text(60, 27, "23.12.2013").attr(txt).attr({fill: color}));
     43    label.push(r.text(60, 12, "").attr(txt));
     44    label.push(r.text(60, 27, "").attr(txt).attr({fill: color}));
    4545    label.hide();
    4646    var frame = r.popup(100, 100, label, "right").attr({fill: "#fff", stroke: "#444", "stroke-width": 1}).hide();
     
    6666        blanket.push(r.rect(leftgutter + X * i, 0, X, height - bottomgutter).attr({stroke: "none", fill: '#fff', opacity: .2}));
    6767        var rect = blanket[blanket.length - 1];
    68         (function (x, y, data, lbl, dot) {
     68        (function (x, y, data, date, dot) {
    6969            var timer, i = 0;
    7070            rect.hover(function () {
     
    7474                    side = "left";
    7575                }
     76                // set label content to determine correct dimensions
     77                label[0].attr({text: date });
     78                label[1].attr({text: data + "× Spam"});
    7679                var ppp = r.popup(x, y, label, side, 1),
    7780                    anim = Raphael.animation({
     
    8386                frame.show().stop().animate(anim);
    8487
    85                 var date = new Date(lbl * 1000),
    86                     day = ( date.getDate() < 10 ? '0' : '' ) + date.getDate(),
    87                     month = ( date.getMonth() + 1 < 10 ? '0' : '' ) + (date.getMonth() + 1),
    88                     year = date.getFullYear();
    89 
    90                 label[0].attr({text: data + "× Spam"}).show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
    91                 label[1].attr({text: ( day + '.' + month + '.' + year ) }).show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
     88                label[0].show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
     89                label[1].show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
    9290                dot.attr("r", 6);
    9391                is_label_visible = true;
  • antispam-bee/trunk/js/dashboard.min.js

    r1142916 r2023306  
    1 (function(){var r=[],h=[];jQuery("#ab_chart_data tfoot th").each(function(){r.push(jQuery(this).text())});jQuery("#ab_chart_data tbody td").each(function(){h.push(jQuery(this).text())});var v=jQuery("#ab_chart").parent().width()+8,g=Raphael("ab_chart",v,140),a={font:'bold 12px "Open Sans", sans-serif',fill:"#32373c"},e=(v-0)/r.length,t=Math.max.apply(Math,h),w=96/t;g.text(16,16,t).attr({font:'normal 10px "Open Sans", sans-serif',fill:"#b4b9be"});var t=g.path().attr({stroke:"#0073aa","stroke-width":2,"stroke-linejoin":"round"}),
    2 B=g.path().attr({stroke:"none",opacity:.3,fill:"#0073aa"}),f=g.set(),x=0,y=0,q=!1,z,u=g.set();f.push(g.text(60,12,"24\u00d7 Spam").attr(a));f.push(g.text(60,27,"23.12.2013").attr(a).attr({fill:"#0073aa"}));f.hide();for(var n=g.popup(100,100,f,"right").attr({fill:"#fff",stroke:"#444","stroke-width":1}).hide(),k,p,a=0,A=r.length;a<A;a++){var c=Math.round(118-w*h[a]),b=Math.round(0+e*(a+.5));a||(k=["M",b,c,"C",b,c],p=["M",0+.5*e,118,"L",b,c,"C",b,c]);if(a&&a<A-1){var d=Math.round(118-w*h[a-1]),C=Math.round(0+
    3 e*(a-.5)),D=Math.round(118-w*h[a+1]),E=Math.round(0+e*(a+1.5)),d=getAnchors(C,d,b,c,E,D);k=k.concat([d.x1,d.y1,b,c,d.x2,d.y2]);p=p.concat([d.x1,d.y1,b,c,d.x2,d.y2])}d=g.circle(b,c,4).attr({fill:"#fff",stroke:"#0073aa","stroke-width":1});u.push(g.rect(0+e*a,0,e,118).attr({stroke:"none",fill:"#fff",opacity:.2}));var F=u[u.length-1];(function(a,b,c,d,h){F.hover(function(){clearTimeout(z);var e="right";a+n.getBBox().width>v&&(e="left");var l=g.popup(a,b,f,e,1),e=Raphael.animation({path:l.path,transform:["t",
    4 l.dx,l.dy]},200*q);x=f[0].transform()[0][1]+l.dx;y=f[0].transform()[0][2]+l.dy;n.show().stop().animate(e);var m=new Date(1E3*d),l=(10>m.getDate()?"0":"")+m.getDate(),k=(10>m.getMonth()+1?"0":"")+(m.getMonth()+1),m=m.getFullYear();f[0].attr({text:c+"\u00d7 Spam"}).show().stop().animateWith(n,e,{transform:["t",x,y]},200*q);f[1].attr({text:l+"."+k+"."+m}).show().stop().animateWith(n,e,{transform:["t",x,y]},200*q);h.attr("r",6);q=!0},function(){h.attr("r",4);z=setTimeout(function(){n.hide();f[0].hide();
    5 f[1].hide();q=!1},1)})})(b,c,h[a],r[a],d)}k=k.concat([b,c,b,c]);p=p.concat([b,c,b,c,"L",b,118,"z"]);t.attr({path:k});B.attr({path:p});n.toFront();f[0].toFront();f[1].toFront();u.toFront()})();
     1(function(){var labels=[],data=[];jQuery("#ab_chart_data tfoot th").each(function(){labels.push(jQuery(this).text())});jQuery("#ab_chart_data tbody td").each(function(){data.push(jQuery(this).text())});var width=jQuery('#ab_chart').parent().width()+8,height=140,leftgutter=0,bottomgutter=22,topgutter=22,color='#0073aa',r=Raphael("ab_chart",width,height),txt={font:'bold 12px "Open Sans", sans-serif',fill:"#32373c"},X=(width-leftgutter*2)/labels.length,max=Math.max.apply(Math,data),Y=(height-bottomgutter-topgutter)/max;r.text(16,16,max).attr({'font':'normal 10px "Open Sans", sans-serif',fill:"#b4b9be"});var path=r.path().attr({stroke:color,"stroke-width":2,"stroke-linejoin":"round"}),bgp=r.path().attr({stroke:"none",opacity:.3,fill:color}),label=r.set(),lx=0,ly=0,is_label_visible=!1,leave_timer,blanket=r.set();label.push(r.text(60,12,"").attr(txt));label.push(r.text(60,27,"").attr(txt).attr({fill:color}));label.hide();var frame=r.popup(100,100,label,"right").attr({fill:"#fff",stroke:"#444","stroke-width":1}).hide();var p,bgpp;for(var i=0,ii=labels.length;i<ii;i++){var y=Math.round(height-bottomgutter-Y*data[i]),x=Math.round(leftgutter+X*(i+.5));if(!i){p=["M",x,y,"C",x,y];bgpp=["M",leftgutter+X*.5,height-bottomgutter,"L",x,y,"C",x,y]}
     2if(i&&i<ii-1){var Y0=Math.round(height-bottomgutter-Y*data[i-1]),X0=Math.round(leftgutter+X*(i-.5)),Y2=Math.round(height-bottomgutter-Y*data[i+1]),X2=Math.round(leftgutter+X*(i+1.5));var a=getAnchors(X0,Y0,x,y,X2,Y2);p=p.concat([a.x1,a.y1,x,y,a.x2,a.y2]);bgpp=bgpp.concat([a.x1,a.y1,x,y,a.x2,a.y2])}
     3var dot=r.circle(x,y,4).attr({fill:"#fff",stroke:color,"stroke-width":1});blanket.push(r.rect(leftgutter+X*i,0,X,height-bottomgutter).attr({stroke:"none",fill:'#fff',opacity:.2}));var rect=blanket[blanket.length-1];(function(x,y,data,date,dot){var timer,i=0;rect.hover(function(){clearTimeout(leave_timer);var side="right";if(x+frame.getBBox().width>width){side="left"}
     4label[0].attr({text:date});label[1].attr({text:data+"× Spam"});var ppp=r.popup(x,y,label,side,1),anim=Raphael.animation({path:ppp.path,transform:["t",ppp.dx,ppp.dy]},200*is_label_visible);lx=label[0].transform()[0][1]+ppp.dx;ly=label[0].transform()[0][2]+ppp.dy;frame.show().stop().animate(anim);label[0].show().stop().animateWith(frame,anim,{transform:["t",lx,ly]},200*is_label_visible);label[1].show().stop().animateWith(frame,anim,{transform:["t",lx,ly]},200*is_label_visible);dot.attr("r",6);is_label_visible=!0},function(){dot.attr("r",4);leave_timer=setTimeout(function(){frame.hide();label[0].hide();label[1].hide();is_label_visible=!1},1)})})(x,y,data[i],labels[i],dot)}
     5p=p.concat([x,y,x,y]);bgpp=bgpp.concat([x,y,x,y,"L",x,height-bottomgutter,"z"]);path.attr({path:p});bgp.attr({path:bgpp});frame.toFront();label[0].toFront();label[1].toFront();blanket.toFront()})()
  • antispam-bee/trunk/readme.txt

    r1942159 r2023306  
    44* Donate link:       https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
    55* Requires at least: 4.5
    6 * Tested up to:      4.9
    7 * Stable tag:        2.9.0
     6* Tested up to:      5.0
     7* Stable tag:        2.9.1
    88* License:           GPLv2 or later
    99* License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    3434### Support ###
    3535* Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/antispam-bee)
     36* Read [the documentation](https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation)
    3637* We don’t handle support via e-mail, Twitter, GitHub issues etc.
    3738
     
    7677### Antispam Bee with Varnish? ###
    7778If WordPress is operated with Apache + Varnish, the actual IP address of the visitors does not appear in WordPress. Accordingly the Antispam-Plugin lacks the base for the correct functionality. An adaptation in the Varnish configuration file /etc/varnish/default.vcl provides a remedy and forwards the original (not from Apache) IP address in the HTTP header X-Forwarded-For:
    78 `if (req.restarts == 0) {`
    79     `set req.http.X-Forwarded-For = client.ip;`
    80 `}`
     79
     80```
     81if (req.restarts == 0) {
     82    set req.http.X-Forwarded-For = client.ip;
     83}
     84```
    8185
    8286### Are there some paid services or limitations? ###
     
    8690
    8791## Changelog ##
     92
     93### 2.9.1 ###
     94  * Improved backend accessibility
     95  * Prefilled comment textareas do now work with the honeypot
     96  * AMP compatibility
     97  * Improved dashboard tooltips
     98  * Improvements for the language detection API
     99  * Scalable IP look up for local spam database
    88100
    89101### 2.9.0 ###
     
    97109  * Add option to delete Antispam Bee related data when plugin gets deleted via the admin interface.
    98110  * Save a hashed + salted IP for every comment
    99   * New check for incoming Trackbacks.
     111  * New check for incoming trackbacks.
    100112  * Introduction of behat tests.
    101113  * Updates the used JavaScript library for the statistics widget.
Note: See TracChangeset for help on using the changeset viewer.