Changeset 2023306
- Timestamp:
- 02/01/2019 12:06:00 PM (7 years ago)
- Location:
- antispam-bee
- Files:
-
- 20 added
- 6 edited
-
tags/2.9.1 (added)
-
tags/2.9.1/LICENSE.txt (added)
-
tags/2.9.1/antispam_bee.php (added)
-
tags/2.9.1/css (added)
-
tags/2.9.1/css/dashboard.css (added)
-
tags/2.9.1/css/dashboard.min.css (added)
-
tags/2.9.1/css/styles.css (added)
-
tags/2.9.1/css/styles.min.css (added)
-
tags/2.9.1/inc (added)
-
tags/2.9.1/inc/columns.class.php (added)
-
tags/2.9.1/inc/gui.class.php (added)
-
tags/2.9.1/js (added)
-
tags/2.9.1/js/dashboard.js (added)
-
tags/2.9.1/js/dashboard.min.js (added)
-
tags/2.9.1/js/raphael.helper.js (added)
-
tags/2.9.1/js/raphael.helper.min.js (added)
-
tags/2.9.1/js/raphael.min.js (added)
-
tags/2.9.1/js/scripts.js (added)
-
tags/2.9.1/js/scripts.min.js (added)
-
tags/2.9.1/readme.txt (added)
-
trunk/antispam_bee.php (modified) (17 diffs)
-
trunk/css/styles.css (modified) (17 diffs)
-
trunk/css/styles.min.css (modified) (1 diff)
-
trunk/js/dashboard.js (modified) (4 diffs)
-
trunk/js/dashboard.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
antispam-bee/trunk/antispam_bee.php
r1942159 r2023306 10 10 * License: GPLv2 or later 11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 * Version: 2.9. 012 * Version: 2.9.1 13 13 * 14 14 * @package Antispam Bee … … 53 53 54 54 /** 55 * Which internal datastructure version we are running on. 56 * 57 * @var int 58 */ 59 private static $db_version = 1; 60 61 /** 55 62 * The base. 56 63 * … … 65 72 */ 66 73 private static $_salt; 67 68 74 69 75 /** … … 183 189 ) 184 190 ); 191 add_action( 192 'admin_init', 193 array( 194 __CLASS__, 195 'update_database', 196 ) 197 ); 185 198 186 199 } elseif ( self::_current_page( 'admin-post' ) ) { … … 803 816 $html .= "<tfoot><tr>\n"; 804 817 foreach ( $items as $date => $count ) { 805 $html .= '<th>' . $date. "</th>\n";818 $html .= '<th>' . date_i18n( 'j. F Y', $date ) . "</th>\n"; 806 819 } 807 820 $html .= "</tr></tfoot>\n"; … … 1152 1165 ) 1153 1166 (?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 ) 1155 1170 )/x', 1156 1171 array( 'Antispam_Bee', 'replace_comment_field_callback' ), … … 1184 1199 if ( ! empty( $matches['id1'] ) || ! empty( $matches['id2'] ) ) { 1185 1200 $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>'; 1187 1202 } 1188 1203 … … 1190 1205 $output .= $matches['between1'] . $matches['between2'] . $matches['between3']; 1191 1206 $output .= $matches['after'] . '>'; 1207 $output .= $matches['content']; 1192 1208 $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>'; 1193 1209 … … 1622 1638 global $wpdb; 1623 1639 1624 // phpcs:disable WordPress.WP.PreparedSQL.NotPrepared1625 $sql = '1626 select1627 meta_value as ip1628 from1629 ' . $wpdb->commentmeta . ' as meta,1630 ' . $wpdb->comments . ' as comments1631 where1632 comments.comment_ID = meta.comment_id1633 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 1644 1640 $params = array(); 1645 1641 $filter = array(); … … 1648 1644 $params[] = wp_unslash( $url ); 1649 1645 } 1646 if ( ! empty( $ip ) ) { 1647 $filter[] = '`comment_author_IP` = %s'; 1648 $params[] = wp_unslash( $ip ); 1649 } 1650 1650 1651 1651 if ( ! empty( $email ) ) { … … 1657 1657 } 1658 1658 1659 // phpcs:disable WordPress.WP.PreparedSQL.NotPrepared 1659 1660 // phpcs:disable WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber 1660 // ToDo: Have a closer look on this SQL Query.1661 1661 $filter_sql = implode( ' OR ', $filter ); 1662 1662 … … 1852 1852 } 1853 1853 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 ) { 1855 1873 return false; 1856 1874 } … … 2074 2092 'aym' => 'ay', 2075 2093 'aze' => 'az', 2094 'nds' => 'de', 2076 2095 ); 2077 2096 … … 2666 2685 } 2667 2686 2687 $secret = self::ensure_secret_starts_with_letter( $secret ); 2688 2668 2689 /** 2669 2690 * Filters the secret for a post, which is used in the textarea name attribute. … … 2697 2718 } 2698 2719 2720 $secret = self::ensure_secret_starts_with_letter( $secret ); 2721 2699 2722 /** 2700 2723 * Filters the secret for a post, which is used in the textarea id attribute. … … 2713 2736 2714 2737 /** 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 /** 2715 2755 * Returns 'spam' 2716 2756 * … … 2738 2778 $parts = wp_parse_url( $url ); 2739 2779 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 2740 2814 } 2741 2815 } -
antispam-bee/trunk/css/styles.css
r1879121 r2023306 9 9 outline: 0; 10 10 -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 */ 17 16 18 17 /* @group Browse Happy */ … … 27 26 /* @end group */ 28 27 29 30 28 /* @group Columns */ 31 29 … … 35 33 text-rendering: optimizeLegibility; 36 34 } 35 37 36 .ab-column { 38 37 float: left; … … 43 42 /* @end group */ 44 43 45 46 44 /* @group Headlines + Icons */ 47 45 48 46 .ab-column h3 { 49 47 margin: 0; 50 font-size: 1 4px;48 font-size: 18px; 51 49 font-weight: normal; 52 50 line-height: 20px; 53 text-transform: uppercase; 54 } 51 color: #23282d; 52 } 53 55 54 .ab-column h3.icon:before { 56 55 font: normal 30px/30px Dashicons; … … 65 64 -moz-osx-font-smoothing: grayscale; 66 65 } 66 67 67 .ab-column.ab-arrow h3.icon:before { 68 68 content: '\f536'; 69 69 } 70 70 71 .ab-column.ab-join h3.icon:before { 71 72 content: '\f108'; 72 73 } 74 73 75 .ab-column.ab-diff h3.icon:before { 74 76 content: '\f237'; … … 77 79 .ab-column h6 { 78 80 clear: both; 79 color: # 8e959c;81 color: #555d66; 80 82 margin: 0 0 20px; 81 font-size: 10px;82 83 font-weight: normal; 83 text-transform: uppercase; 84 } 85 86 /* @end group */ 87 84 font-size: 13px; 85 } 86 87 /* @end group */ 88 88 89 89 /* @group Form */ … … 92 92 .ab-column input[type="number"], 93 93 .ab-column select { 94 font-size: 1 2px;94 font-size: 13px; 95 95 text-align: center; 96 96 background: #f8f8f9; 97 97 } 98 98 99 .ab-column input[type="number"] { 99 100 padding: 0; 100 101 } 102 101 103 .ab-column select[multiple] { 102 104 width: 175px; 103 105 min-height: 60px; 104 106 } 107 105 108 .ab-column input.ab-mini-field { 106 109 width: 40px; 107 110 } 111 108 112 .ab-column .ab-medium-field { 109 113 width: 100%; 110 max-width :285px; 111 } 114 max-width: 285px; 115 } 116 112 117 .ab-column input[type="text"] + label, 113 118 .ab-column select + label { … … 120 125 /* @end group */ 121 126 122 123 127 /* @group Column contents */ 124 128 … … 126 130 padding: 0 20px 0 0; 127 131 } 132 128 133 .ab-column:last-of-type > ul { 129 134 border: 0; 130 135 } 136 131 137 .ab-column > ul > li { 132 138 width: 330px; … … 138 144 139 145 .ab-column > ul > li a { 140 text-decoration: none;141 border-bottom: 1px dotted #e0e5e9; 142 } 146 text-decoration: underline; 147 } 148 143 149 .ab-column > ul > li a:hover { 144 150 border-color: inherit; … … 148 154 cursor: default; 149 155 display: inline-block; 150 line-height: 24px;156 font-size: 14px; 151 157 max-width: 286px; 152 } 158 color: #23282d; 159 } 160 153 161 .ab-column > ul > li label span { 154 color: # 8e959c;162 color: #555d66; 155 163 display: block; 156 font-size: 1 2px;164 font-size: 13px; 157 165 line-height: 16px; 158 } 159 160 /* @end group */ 161 166 margin-top: 5px; 167 } 168 169 /* @end group */ 162 170 163 171 /* @group Separator */ … … 176 184 border-style: solid; 177 185 } 186 178 187 .ab-column.ab-arrow > ul > li:before { 179 188 bottom: -24px; 180 189 border-color: #fff transparent; 181 190 } 191 182 192 .ab-column.ab-arrow > ul > li:after { 183 193 bottom: -22px; … … 202 212 /* @end group */ 203 213 204 205 214 /* @group Submit & Service */ 206 215 … … 208 217 width: 342px; 209 218 margin-top: 20px; 210 padding-right: 20px;211 212 } 219 padding-right: 20px; 220 } 221 213 222 .ab-column--submit-service p { 214 223 padding: 5px 0; … … 217 226 width: 100%; 218 227 } 228 219 229 .ab-column--submit-service p:first-of-type { 220 230 border-top: 1px solid #e0e5e9; 221 231 } 232 222 233 .ab-column--submit-service p:last-of-type { 223 234 border-bottom: 1px solid #e0e5e9; 224 235 } 236 225 237 .ab-column--submit-service .button { 226 238 width: 100%; … … 230 242 /* @end group */ 231 243 232 233 244 /* @group 2nd level */ 234 245 … … 242 253 display: none; 243 254 } 255 244 256 .ab-column > ul > li > ul li { 245 257 padding: 2px 0; 246 258 } 259 247 260 .ab-column > ul > li > ul label { 248 261 margin: 0 0 0 7px; 249 262 } 263 250 264 .ab-column > ul > li > input[type="checkbox"]:checked ~ ul { 251 265 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:1 4px;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 41 41 leave_timer, 42 42 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})); 45 45 label.hide(); 46 46 var frame = r.popup(100, 100, label, "right").attr({fill: "#fff", stroke: "#444", "stroke-width": 1}).hide(); … … 66 66 blanket.push(r.rect(leftgutter + X * i, 0, X, height - bottomgutter).attr({stroke: "none", fill: '#fff', opacity: .2})); 67 67 var rect = blanket[blanket.length - 1]; 68 (function (x, y, data, lbl, dot) {68 (function (x, y, data, date, dot) { 69 69 var timer, i = 0; 70 70 rect.hover(function () { … … 74 74 side = "left"; 75 75 } 76 // set label content to determine correct dimensions 77 label[0].attr({text: date }); 78 label[1].attr({text: data + "× Spam"}); 76 79 var ppp = r.popup(x, y, label, side, 1), 77 80 anim = Raphael.animation({ … … 83 86 frame.show().stop().animate(anim); 84 87 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); 92 90 dot.attr("r", 6); 93 91 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]} 2 if(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])} 3 var 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"} 4 label[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)} 5 p=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 4 4 * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW 5 5 * Requires at least: 4.5 6 * Tested up to: 4.97 * Stable tag: 2.9. 06 * Tested up to: 5.0 7 * Stable tag: 2.9.1 8 8 * License: GPLv2 or later 9 9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 34 34 ### Support ### 35 35 * 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) 36 37 * We don’t handle support via e-mail, Twitter, GitHub issues etc. 37 38 … … 76 77 ### Antispam Bee with Varnish? ### 77 78 If 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 ``` 81 if (req.restarts == 0) { 82 set req.http.X-Forwarded-For = client.ip; 83 } 84 ``` 81 85 82 86 ### Are there some paid services or limitations? ### … … 86 90 87 91 ## 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 88 100 89 101 ### 2.9.0 ### … … 97 109 * Add option to delete Antispam Bee related data when plugin gets deleted via the admin interface. 98 110 * Save a hashed + salted IP for every comment 99 * New check for incoming Trackbacks.111 * New check for incoming trackbacks. 100 112 * Introduction of behat tests. 101 113 * Updates the used JavaScript library for the statistics widget.
Note: See TracChangeset
for help on using the changeset viewer.