- Timestamp:
- 02/15/08 15:35:58 (11 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
lib/settings.php (modified) (1 diff)
-
wassup.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/settings.php
r79 r81 127 127 <br /><span style="padding-left:10px;display:block;clear:left;"> 128 128 <textarea name="wassup_exclude" rows="4" cols="40"><?php print $wassup_settings['wassup_exclude']; ?></textarea></span><?php _e("comma separated value (ex: 127.0.0.1, 10.0.0.1, etc...)", "wassup") ?></p> 129 <br /><p><strong><?php _e('Enter requested URLs to exclude from recording','wassup'); ?></strong>: 130 <br /><span style="padding-left:10px;display:block;clear:left;"> 131 <textarea name="wassup_exclude_url" rows="4" cols="40"><?php print $wassup_settings['wassup_exclude_url']; ?></textarea></span><?php _e("comma separated value, don't put the entire url, only the last path or some word to exclude (ex: /category/wordpress, 2007, etc...)", "wassup") ?></p> 129 132 <br /><br /> 130 133 <?php $tab=2; -
trunk/wassup.php
r79 r81 57 57 'wassup_refspam' => "0", 58 58 'wassup_exclude' => "", 59 'wassup_exclude_url' => "", 59 60 'wassup_savepath' => null, 60 61 'wassup_chart' => "1", … … 402 403 $wassup_settings['wassup_refspam'] = $_POST['wassup_refspam']; 403 404 $wassup_settings['wassup_exclude'] = $_POST['wassup_exclude']; 405 $wassup_settings['wassup_exclude_url'] = $_POST['wassup_exclude_url']; 404 406 $wassup_settings['delete_auto'] = $_POST['delete_auto']; 405 407 $wassup_settings['delete_auto_size'] = $_POST['delete_auto_size']; … … 656 658 $markedtot = $Tot->calc_tot("count", $search, "AND ip LIKE '%".$wassup_settings['wip']."%'", "DISTINCT"); 657 659 } 660 // Check if some records was searched 661 if (!empty($search)) { 662 $searchtot = $Tot->calc_tot("count", $search, null, "DISTINCT"); 663 } 658 664 659 665 … … 729 735 <li><span style="border-bottom:2px dashed #FF6D06;"><?php echo $pagestot; ?></span> <small><?php _e('Pageviews','wassup'); ?></small></li> 730 736 <li><span><?php echo @number_format(($pagestot/$itemstot), 2); ?></span> <small><?php _e('Pages/Visits','wassup'); ?></small></li> 731 <li><span><a href="#TB_inline?height= 55&width=400&inlineId=hiddenspam" class="thickbox"><?php echo $spamtot; ?></a></span> <span>(<?php echo @number_format(($spamtot*100/$pagestot), 2); ?>%)</span> <small><?php _e('Spams','wassup'); ?></small></li>737 <li><span><a href="#TB_inline?height=180&width=300&inlineId=hiddenspam" class="thickbox"><?php echo $spamtot; ?></a></span> <span>(<?php echo @number_format(($spamtot*100/$pagestot), 2); ?>%)</span> <small><?php _e('Spams','wassup'); ?></small></li> 732 738 </ul> 733 739 <?php … … 778 784 <td align="left" style="font-size: 11px;"> 779 785 <?php 780 if ($wassup_settings['wmark'] == 1) echo '<a href="?'.$_SERVER['QUERY_STRING'].'&search='.$wassup_settings['wip'].'" title="'.__('Filter by marked IP','wassup').'"><strong>'.$markedtot.'</strong> '.__(' visits marked','wassup').'</a> - ';781 if ( $search != "") print__('Searched for','wassup').": <strong>$search</strong> - ";786 if ($wassup_settings['wmark'] == 1) echo '<a href="?'.$_SERVER['QUERY_STRING'].'&search='.$wassup_settings['wip'].'" title="'.__('Filter by marked IP','wassup').'"><strong>'.$markedtot.'</strong> '.__('show marked items','wassup').'</a> - '; 787 if (!empty($search)) print "<strong>$searchtot</strong>".__('Searched for','wassup').": <strong>$search</strong> - "; 782 788 echo __('Auto refresh in','wassup').' <span id="CountDownPanel"></span> '.__('seconds','wassup'); ?> 783 789 </td> … … 1095 1101 if (empty($wassup_settings['wassup_exclude']) || 1096 1102 strstr($wassup_settings['wassup_exclude'],$ipAddress) == FALSE) { 1097 1103 1104 //## check if url requested is not on exclusion list... 1105 if (!empty($wassup_settings['wassup_exclude_url'])) { 1106 $exclude_url_list = explode(",", $wassup_settings['wassup_exclude_url']); 1107 foreach ($exclude_url_list as $exclude_url) { 1108 if (stristr($urlRequested, trim($exclude_url)) !== FALSE) { 1109 $flag_exclude_url = 1; 1110 } 1111 } 1112 } 1113 if ($flag_exclude_url != 1) { 1114 1098 1115 //### Exclude requests for themes, plugins, and favicon from recordings 1099 1116 if (stristr($urlRequested,"favicon.ico") === FALSE) { //moved … … 1292 1309 $akismet = new Akismet($wpurl, $akismet_key, $Acomment); 1293 1310 1294 // Check if it's spam 1295 if ( $akismet->isSpam() ) { 1296 $spam = 1; 1311 // Check if it's Akismet spam but before continuing 1312 // double check if there is some errors connecting with Akismet 1313 if($akismet->errorsExist()) { 1314 // returns true if any errors exist 1315 if($akismet->isError('AKISMET_INVALID_KEY')) { 1316 unset($spamresult); 1317 } elseif($akismet->isError('AKISMET_RESPONSE_FAILED')) { 1318 unset($spamresult); 1319 } elseif($akismet->isError('AKISMET_SERVER_NOT_FOUND')) { 1320 unset($spamresult); 1321 } 1322 } else { 1323 // ok no errors connecting to Akismet, go on check for spam 1324 if ( $akismet->isSpam() ) { 1325 $spam = 1; 1326 } 1327 $spamresult = $spam; 1297 1328 } 1298 1329 // test for errors 1299 1330 //#error means don't record Akismet result in session... 1300 if($akismet->errorsExist()) {1301 unset($spamresult);1302 1303 // no need to alter spam for errors...spam=0 already set by default1304 // returns true if any errors exist1305 //if($akismet->isError('AKISMET_INVALID_KEY')) {1306 // $spam = 0;1307 //} elseif($akismet->isError('AKISMET_RESPONSE_FAILED')) {1308 // $spam = 0;1309 //} elseif($akismet->isError('AKISMET_SERVER_NOT_FOUND')) {1310 // $spam = 0;1311 //}1312 } else {1313 $spamresult = $spam;1314 }1315 1331 //end if akismet_key 1316 1332 } else { … … 1428 1444 1429 1445 } //end if wassup_exclude 1446 } //end if wassup_exclude_url 1430 1447 } //end if wassup_active 1431 1448 } //end if !is_admin
