- Timestamp:
- 07/13/08 13:52:28 (6 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 modified
-
img/flags/eu.png (added)
-
lib/action.php (modified) (5 diffs)
-
lib/main.php (modified) (11 diffs)
-
lib/settings.php (modified) (9 diffs)
-
lib/wassup.class.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
wassup.php (modified) (50 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/action.php
r145 r147 8 8 header('Cache-Control: no-store, no-cache, must-revalidate'); 9 9 */ 10 //#debug...11 //error_reporting(E_ALL | E_STRICT); //debug, E_STRICT=php5 only12 //ini_set('display_errors','On'); //debug13 10 14 11 //#check for required files and include them … … 75 72 // 76 73 // ### Begin actions that have output... 74 //#debug... 75 //error_reporting(E_ALL | E_STRICT); //debug, E_STRICT=php5 only 76 //ini_set('display_errors','On'); //debug 77 77 ?> 78 78 <html> … … 120 120 $items_pie[] = $Tot->calc_tot("count", $search, "AND searchengine='' AND (referrer LIKE '%".$this->WpUrl."%' OR referrer='') AND spam=0", "DISTINCT"); ?> 121 121 <div style="text-align: center"><img src="http://chart.apis.google.com/chart?cht=p3&chco=0000ff&chs=600x300&chl=Spam|Search%20Engine|Referrer|Direct&chd=<?php chart_data($items_pie, null, null, null, 'pie'); ?>" /></div> 122 122 123 123 124 <?php … … 307 308 //#output top 10 locales/geographic regions... 308 309 if ($top_ten['toplocale'] == 1) { 309 $top_results = $wpdb->get_results("SELECT count( UPPER(language)) as top_locale, UPPER(language) as locale FROM $table_name WHERE timestamp BETWEEN $from_date AND $to_date AND language!='' AND language NOT LIKE '%N/A%' $spamselect GROUP BY locale ORDER BY top_locale DESC LIMIT 10");310 $top_results = $wpdb->get_results("SELECT count(LOWER(language)) as top_locale, LOWER(language) as locale FROM $table_name WHERE timestamp BETWEEN $from_date AND $to_date AND language!='' $spamselect GROUP BY locale ORDER BY top_locale DESC LIMIT 10"); 310 311 $char_len = round(($max_char_len*.15)+$widthoffset,0); 311 312 … … 324 325 </td> 325 326 <?php } // end if toplocale 327 328 //#output top 10 visitors 329 if ($top_ten['topvisitor'] == 1) { 330 $result = false; 331 $char_len = round(($max_char_len*.17)+$widthoffset,0); 332 $tmptable = "top_visitor".rand(0,999); 333 if (mysql_query ("CREATE TEMPORARY TABLE {$tmptable} SELECT username as visitor, '1loggedin_user' as visitor_type, `timestamp` as visit_timestamp FROM $table_name WHERE `timestamp` BETWEEN $from_date AND $to_date AND username!='' $spamselect UNION SELECT comment_author as visitor, '2comment_author' as visitor_type, `timestamp` as visit_timestamp FROM wp_wassup WHERE `timestamp` BETWEEN $from_date AND $to_date AND username='' AND comment_author!='' $spamselect UNION SELECT hostname as visitor, '3hostname' as visitor_type, `timestamp` as visit_timestamp FROM wp_wassup WHERE `timestamp` BETWEEN $from_date AND $to_date AND username='' AND comment_author='' AND spider=''")) { 334 $numRows = mysql_affected_rows(); 335 if ($numRows > 0) { 336 $result = mysql_query ("SELECT count(visitor) as top_visitor, visitor, visitor_type FROM {$tmptable} WHERE visitor!='' GROUP BY visitor ORDER BY 1 DESC, visitor_type, visitor LIMIT 10"); 337 } 338 } //end if mysql_query 339 ?> 340 <td style="min-width:<?php echo ($char_len-5); ?>px;"> 341 <ul class="charts"> 342 <li class="chartsT"><?php _e("TOP VISITOR", "wassup"); ?></li> 343 <?php 344 if ($result) { 345 while ($top10 = mysql_fetch_array($result,MYSQL_ASSOC)) { ?> 346 <li class="charts"><?php echo $top10['top_visitor'].': '; ?> 347 <span class="top10" title="<?php echo $top10['visitor']; ?>"><?php echo stringShortener($top10['visitor'], $char_len); ?></span> 348 </li> 349 <?php } 350 mysql_free_result($result); 351 } //end if result 352 mysql_query("DROP TABLE IF EXISTS {$tmptable}"); ?> 353 </ul> 354 </td> 355 <?php } // end if topvisitor 326 356 ?> 327 357 </tr> -
trunk/lib/main.php
r146 r147 498 498 //Truncate $input string to a length of $max 499 499 function stringShortener($input, $max=0, $separator="(...)", $exceedFromEnd=0){ 500 if( true == empty($input)|| !is_string($input)){return false;};500 if(!$input || !is_string($input)){return false;}; 501 501 502 502 //Replace all %-hex chars with literals and trim the input string of whitespaces … … 504 504 $input = trim(rawurldecode($input)); 505 505 506 //Trying to use mb_ functions, if they are available. This is very important507 //for UTF-8 blogs -- Vladimir Kolesnikov, 06/01/2008508 if (function_exists('mb_strlen')) {509 $inputlen = mb_strlen($input);510 $max = (true == is_numeric($max)) ? intval($max) : $inputlen;511 if ($max >= $inputlen) {512 return $input;513 }514 515 $separator = (false == empty($separator)) ? $separator : "(...)";516 $modulus = $max & 0x01;517 $halfMax = $max >> 1;518 $begin = '';519 $end = '';520 if (0 == $modulus) {521 $begin = mb_substr($input, 0, $halfMax);522 }523 else {524 $begin = (0 == $exceedFromEnd) ? mb_substr($input, 0, $halfMax+1) : mb_substr($input, 0, $halfMax);525 }526 527 if (0 == $modulus) {528 $end = mb_substr($input, $inputlen-$halfMax);529 }530 else {531 $end = (0 != $exceedFromEnd) ? mb_substr($input, $inputlen-$halfMax-1) : mb_substr($input, $inputlen-$halfMax);532 }533 534 $extracted = mb_substr($input, mb_strpos($input, $begin) + mb_strlen($begin), $inputlen-$max);535 $outstring = $begin . $separator . $end;536 if (mb_strlen($outstring) >= $inputlen) { //Because "Fir(...)fox" is longer than "Firefox"537 $outstring = $input;538 }539 }540 else {541 506 $inputlen=strlen($input); 542 507 $max=(is_numeric($max))?(integer)$max:$inputlen; 543 508 if($max>=$inputlen){return $input;}; 544 509 $separator=($separator)?$separator:"(...)"; 545 $modulus= $max & 0x01;546 $halfMax= $max >> 1;510 $modulus=(($max%2)); 511 $halfMax=floor($max/2); 547 512 $begin=""; 548 513 if(!$modulus){$begin=substr($input, 0, $halfMax);} … … 556 521 $outstring = $input; 557 522 } 558 }559 523 //# added WP 2.x function attribute_escape to help make malicious 560 524 //# code harmless when echoed to screen... … … 572 536 $isroot = false; 573 537 //url must begin with 'http://' 574 if (strncasecmp($urltocheck,'http://',7) == 0 || 0 == strncasecmp($urltocheck, 'https://', 8)) {538 if (strncasecmp($urltocheck,'http://',7) == 0) { 575 539 $isroot = true; 576 540 $urlparts=parse_url($urltocheck); … … 588 552 //# -Helene D. 1/22/08 589 553 function wAddSiteurl($inputurl) { 590 $wpurl = get_bloginfo('wpurl');591 $siteurl = get_bloginfo('siteurl');554 $wpurl = rtrim(get_bloginfo('wpurl'),"/"); 555 $siteurl = rtrim(get_bloginfo('siteurl'),"/"); 592 556 if (strcasecmp($siteurl, $wpurl) == 0) { 593 557 $outputurl=$inputurl; 594 558 } elseif (stristr($inputurl,$siteurl) === FALSE && url_rootcheck($siteurl)) { 595 $outputurl= "$siteurl$inputurl";559 $outputurl=$siteurl."/".ltrim($inputurl,"/"); 596 560 } else { 597 561 $outputurl=$inputurl; … … 653 617 } elseif ($cv->spider != "") { 654 618 $unclass = "-spider"; 655 } ?> 619 } 620 // Start getting GEOIP info 621 /* 622 // TODO 623 $ch = curl_init("http://api.hostip.info/get_html.php?ip=".$ip[0]."&position=true"); 624 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 625 curl_setopt($ch, CURLOPT_HEADER, 0); 626 $data = curl_exec($ch); 627 curl_close($ch); 628 */ 629 ?> 656 630 <div class="sum-spy"> 631 657 632 <span class="sum-box<?php print $unclass; ?>"> 658 633 <?php print $ip[0]; ?></span> … … 662 637 print stringShortener(html_entity_decode($cv->urlrequested), round($max_char_len*.9,0)); ?> 663 638 </a></span><br /> 664 <?php 665 if ($wassup_options->wassup_time_format == 24) { 666 $timed = gmdate("H:i:s", $cv->max_timestamp); 667 } else { 668 $timed = gmdate("h:i:s a", $cv->max_timestamp); 669 } 670 ?> 671 <span class="det2"><strong><?php print $timed; ?> - </strong> 639 <span class="det2"><strong><?php print gmdate("H:i:s", $timestamp); ?> - </strong> 672 640 <?php print $referrer; ?></span> 673 641 </div></div> … … 732 700 // Chart type has two datasets 733 701 if ($charttype == "main") { 702 $label_time = ""; 734 703 for ($i = 0; $i < count($Wvisits); $i++) { 735 704 $currentValue = $Wvisits[$i]; … … 805 774 $this->ItemsType = $Type; 806 775 $this->searchString = $Search; 776 $ss = ""; 807 777 808 778 // Add the Search variable to the WHERE clause 809 if ($Search != "") { $ss = " AND (ip LIKE '%".$this->searchString."%' OR hostname LIKE '%".$this->searchString."%' OR urlrequested LIKE '%".$this->searchString."%' OR agent LIKE '%".$this->searchString."%' OR referrer LIKE '%".$this->searchString."%') "; }779 if ($Search != "") { $ss = " AND (ip LIKE '%".$this->searchString."%' OR hostname LIKE '%".$this->searchString."%' OR urlrequested LIKE '%".$this->searchString."%' OR agent LIKE '%".$this->searchString."%' OR referrer LIKE '%".$this->searchString."%') "; } 810 780 811 781 // Switch by every (global) items type (visits, pageviews, spams, etc...) … … 813 783 // This is the MAIN query to show the chronology 814 784 case "main": 815 //$qry_debug = "SELECT id, wassup_id, max(timestamp) as max_timestamp, ip, hostname, urlrequested, agent, referrer, search, searchpage, os, browser, language, screen_res, searchengine, spider, feed, username, comment_author, spam FROM ".$this->tableName." WHERE wassup_id IS NOT NULL AND timestamp BETWEEN ".$this->from_date." AND ".$this->to_date." $ss ".$this->whereis." GROUP BY wassup_id ORDER BY max_timestamp DESC ".$this->Limit."";816 785 $qry = $wpdb->get_results("SELECT id, wassup_id, max(timestamp) as max_timestamp, ip, hostname, urlrequested, agent, referrer, search, searchpage, os, browser, language, screen_res, searchengine, spider, feed, username, comment_author, spam FROM ".$this->tableName." WHERE wassup_id IS NOT NULL AND timestamp BETWEEN ".$this->from_date." AND ".$this->to_date." $ss ".$this->whereis." GROUP BY wassup_id ORDER BY max_timestamp DESC ".$this->Limit.""); 817 //$qry = $wpdb->get_results("select `michelem`.`wp_wassup`.`id` AS `id`,`michelem`.`wp_wassup`.`wassup_id` AS `wassup_id`,max(`michelem`.`wp_wassup`.`timestamp`) AS `max_timestamp`,`michelem`.`wp_wassup`.`ip` AS `ip`,`michelem`.`wp_wassup`.`hostname` AS `hostname`,`michelem`.`wp_wassup`.`urlrequested` AS `urlrequested`,`michelem`.`wp_wassup`.`agent` AS `agent`,`michelem`.`wp_wassup`.`referrer` AS `referrer`,`michelem`.`wp_wassup`.`search` AS `search`,`michelem`.`wp_wassup`.`searchpage` AS `searchpage`,`michelem`.`wp_wassup`.`os` AS `os`,`michelem`.`wp_wassup`.`browser` AS `browser`,`michelem`.`wp_wassup`.`language` AS `language`,`michelem`.`wp_wassup`.`screen_res` AS `screen_res`,`michelem`.`wp_wassup`.`searchengine` AS `searchengine`,`michelem`.`wp_wassup`.`spider` AS `spider`,`michelem`.`wp_wassup`.`feed` AS `feed`,`michelem`.`wp_wassup`.`username` AS `username`,`michelem`.`wp_wassup`.`comment_author` AS `comment_author`,`michelem`.`wp_wassup`.`spam` AS `spam` from `michelem`.`wp_wassup` where ((`michelem`.`wp_wassup`.`wassup_id` is not null) and (`michelem`.`wp_wassup`.`timestamp` between 1214138107 and 1214224507)) group by `michelem`.`wp_wassup`.`wassup_id` order by max(`michelem`.`wp_wassup`.`timestamp`) desc limit 20 ");818 786 return $qry; 819 787 break; … … 832 800 global $wpdb; 833 801 $mysqlversion=substr(mysql_get_server_info(),0,3); 834 // 802 $ss = ""; 803 835 804 //#Mysql's 'FROM_UNIXTIME' returns the local server 836 805 //# datetime from an expected UTC unix timestamp, so -
trunk/lib/settings.php
r145 r147 4 4 ?> 5 5 <?php 6 $to_date = wassup_get_time();7 if ( isset($_POST['delete_manual'])) {8 $from_date = @strtotime($_POST['delete_manual'], $to_date);9 }10 6 if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name) { 11 if ($_POST['delete_manual'] != "") { 7 if (!empty($_POST['delete_manual'])) { 8 $to_date = wassup_get_time(); 9 $from_date = @strtotime($_POST['delete_manual'], $to_date); 12 10 $wpdb->query("DELETE FROM $table_name WHERE timestamp<'$from_date'"); 13 11 $wpdb->query("OPTIMIZE TABLE $table_name"); 14 12 } 15 if ( $_POST['wassup_empty'] == "1") {13 if (!empty($_POST['wassup_empty'])) { 16 14 $wpdb->query("DELETE FROM $table_name"); 17 15 $wpdb->query("OPTIMIZE TABLE $table_name"); … … 21 19 $data_lenght = $fstatus->Data_length; 22 20 $data_rows = $fstatus->Rows; 21 $table_engine = (isset($fstatus->Engine)? $fstatus->Engine: 'unknown'); 23 22 } 24 23 $tusage = number_format(($data_lenght/1024/1024), 2, ",", " "); … … 28 27 $adminemail = get_bloginfo('admin_email'); 29 28 29 $alert_msg = ""; 30 30 if ($wassup_options->wassup_remind_flag == 2) { 31 31 $alert_msg = '<p style="color:red;font-weight:bold;">'.__('ATTENTION! Your WassUp table have reached the maximum value you set, I disabled the alert, you can re-enable it here.','wassup').'</p>'; … … 67 67 <form action="" method="post"> 68 68 <div id="tabcontainer"> 69 <ul >69 <ul style="list-style:none;"> 70 70 <li><a href="#wassup_opt_frag-1"><span><?php _e("General Setup", "wassup") ?></span></a></li> 71 71 <li<?php if ($tab == "2" || isset($_POST['submit-options2'])) { echo ' class="ui-tabs-selected"';} ?>><a href="#wassup_opt_frag-2"><span><?php _e("Statistics Recording", "wassup") ?></span></a></li> … … 131 131 <input type="checkbox" name="toplocale" value="1" <?php if($top_ten['toplocale'] == 1) print "CHECKED"; ?> /><?php _e("Top Locales", "wassup"); ?></span><br /> 132 132 </div> 133 <div style="display:none; vertical-align:top; float:left; width:225px; color:#555;"> 133 <div style="vertical-align:top; float:left; width:225px;"> 134 <input type="checkbox" name="topvisitor" value="1" <?php if($top_ten['topvisitor'] == 1) print "CHECKED"; ?> /><?php _e("Top Visitors", "wassup"); ?><br /><!-- 134 135 <input type="checkbox" name="topfeed" value="1" DISABLED /><?php _e("Top Feeds", "wassup"); ?><br /> 135 <input type="checkbox" name="topcrawler" value="1" DISABLED /><?php _e("Top Crawlers", "wassup"); ?> <br /> 136 <input type="checkbox" name="topvisitor" value="1" DISABLED /><?php _e("Top Visitors", "wassup"); ?> (<?php _e("users only","wassup"); ?>)<br /> 136 <input type="checkbox" name="topcrawler" value="1" DISABLED /><?php _e("Top Crawlers", "wassup"); ?> --><br /> 137 137 </div> 138 138 </div> … … 156 156 <input type="checkbox" name="wassup_spider" value="1" <?php if($wassup_options->wassup_spider == 1) print "CHECKED"; ?> /> <?php _e("Record spiders and bots", "wassup") ?><br /> 157 157 <input type="checkbox" name="wassup_attack" value="1" <?php if($wassup_options->wassup_attack == 1) print "CHECKED"; ?> /> <?php _e("Record attack/exploit attempts (libwww-perl agent)", "wassup") ?><br /> 158 <input type="checkbox" name="wassup_hack" value="1" <?php if($wassup_options->wassup_hack == 1) print "CHECKED"; ?> /> <?php _e("Record admin break-in/hacker attempts", "wassup") ?><br /> 158 159 </span> 159 160 </p> … … 176 177 177 178 <div id="wassup_opt_frag-3"> 179 <?php /* 178 180 <h3><?php _e('Temporary files location folder','wassup'); ?></h3> 179 181 <p><?php echo '<strong>'.__('Current "Save path" directory for storing temporary files used to track visitor activity','wassup').'</strong>:<br />'; … … 196 198 <br /> <?php echo $sessionwarn."\n"; ?> 197 199 </p><br /> 198 <?php //TODO ?> 199 <!-- 200 <br /><h3><?php _e('Rescan Old Records','wassup'); ?></h3> 200 */ ?> 201 <?php //TODO ?> 202 <!-- 203 <br /><h3><?php _e('Rescan Old Records','wassup'); ?></h3> 201 204 <p><?php _e("Statistical records collected by earlier versions of WassUp may not have the latest spider, search engine, and spam data properly identified. Click the \"Rescan\" button to retroactively scan and update old records","wassup"); ?>. 202 205 <br /><input type="button" name="rescan" value="<?php _e('Rescan Old Records','wassup'); ?>" /> 203 206 </p><br /> 204 -->207 --> 205 208 <br /><h3><?php _e('Select actions for table growth','wassup'); ?></h3> 206 209 <p><?php _e("WassUp table grows very fast (especially if your blog is frequently visited), I recommend you to delete old records sometimes. You can select any option below to reset it, delete old records automatically or manually. (If you haven't database space problems you can leave the table as is)","wassup"); ?></p> … … 231 234 <option value="-1 year"><?php _e("1 year", "wassup") ?></option> 232 235 </select></p><br /> 233 <br /> 236 237 <br /><h3><?php _e("Server Settings and Memory Resources","wassup"); ?></h3> 238 <p style="color:#555; margin-top:0; padding-top:0;"><?php _e('For information only. Some values may be adjustable in PHP startup file, php.ini or php5.ini','wassup'); ?>.</p> 239 <p><strong>WordPress <?php _e('Version','wassup'); ?></strong>: <?php echo $wp_version; ?></p> 240 <p style="padding-top:5px;"><strong>MySQL <?php _e('Version','wassup'); ?></strong>: 241 <?php $sqlversion = $wpdb->get_var("SELECT VERSION() AS version"); 242 if (!empty($sqlversion)) { echo $sqlversion; } 243 else { _e("unknown","wassup"); } 244 ?></p> 245 <p><strong>MySQL <?php _e('Engine','wassup'); ?></strong>: 246 <?php if (!empty($table_engine)) { echo $table_engine; } 247 else { _e("unknown","wassup"); } 248 ?></p> 249 <!-- 250 <p><strong>MySQL <?php _e('Query Cache Limit','wassup'); ?></strong>: 251 <?php $sqlquery = $wpdb->get_col("SHOW VARIABLES LIKE 'query_cache_limit'"); 252 if (!empty($sqlquery)) { 253 $query_cache=""; 254 foreach ($sqlquery as $fcache) { 255 $query_cache = $fcache; 256 } 257 if (is_numeric($query_cache)) { 258 echo ($query_cache/1024/1024) . "M"; 259 } else { 260 echo $query_cache; 261 } 262 } else { 263 _e("unknown","wassup"); 264 } 265 ?></p> 266 --> 267 <p style="padding-top:5px;"><strong>PHP <?php _e("Version","wassup"); ?></strong>: <?php echo PHP_VERSION; ?></p> 268 <p><strong>PHP <?php _e("Safe Mode", "wassup"); ?> : </strong> 269 <?php if (ini_get("safe_mode")) { _e("on","wassup"); } 270 else { _e("off","wassup"); } 271 ?></p> 272 <p><strong>PHP <?php _e("Memory Allocation","wassup"); ?></strong>: 273 <?php 274 $memory_use=0; 275 if (function_exists("memory_get_usage")) { 276 $memory_use=round(memory_get_usage()/1024/1024,2); 277 } 278 $memory_limit = ini_get("memory_limit"); 279 if (preg_match('/^(\d+){1,4}(\w?)/',$memory_limit,$matches) > 0) { 280 $mem=(int)$matches[1]; 281 if ( $mem < 12 && $matches[2] == "M") { 282 print '<span style="'.$alertstyle.'">'.$memory_limit."</span>"; 283 } else { 284 echo $memory_limit; 285 } 286 } else { 287 $memory_limit=0; _e("unknown","wassup"); 288 } 289 ?></p> 290 <p><strong>PHP <?php _e("Memory Usage","wassup"); ?></strong>: 291 <?php 292 if ($memory_limit >0 && ($memory_limit-$memory_use) < 2) { 293 print '<span style="'.$alertstyle.'">'.$memory_use."M</span>"; 294 } elseif ($memory_use >0) { 295 echo $memory_use."M"; 296 } else { 297 _e("unknown","wassup"); 298 } 299 ?></p> 300 <p><strong>PHP <?php _e("Script Timeout Limit","wassup"); ?></strong> (in seconds): 301 <?php $max_execute = ini_get("max_execution_time"); 302 if (!empty($max_execute)) { echo $max_execute; } 303 else { _e("unknown","wassup"); } 304 ?></p> 305 <p><strong>PHP <?php _e("Browser Capabilities File","wassup"); ?></strong> (browscap): 306 <?php $browscap = ini_get("browscap"); 307 if ( $browscap == "") { _e("not set","wassup"); } 308 else { echo basename($browscap); } 309 ?></p> 310 <br /><br /> 234 311 <p style="clear:both;padding-left:0;padding-top:15px;"><input type="submit" name="submit-options3" value="<?php _e('Save Settings','wassup'); ?>" /> <input type="reset" name="reset" value="<?php _e('Reset','wassup'); ?>" /> - <input type="submit" name="reset-to-default" value="<?php _e("Reset to Default Settings", "wassup"); ?>" /></p><br /> 235 312 </div> -
trunk/lib/wassup.class.php
r145 r147 15 15 var $wassup_default_limit = "10"; 16 16 var $wassup_top10 ; 17 var $wassup_dashboard_chart; //new17 var $wassup_dashboard_chart; 18 18 var $wassup_time_format; //new 19 19 … … 23 23 var $wassup_spider = "1"; 24 24 var $wassup_attack = "1"; 25 var $wassup_hack = "1"; //new - to identify/record break-in attempts 25 26 var $wassup_exclude; 26 27 var $wassup_exclude_url; … … 78 79 $this->wassup_spider = "1"; 79 80 $this->wassup_attack = "1"; 81 $this->wassup_hack = "1"; 80 82 $this->wassup_spamcheck = "1"; 81 83 $this->wassup_spam = "1"; … … 191 193 __("Two - two lines chart two axes","wassup")); 192 194 } elseif ($key == "wassup_default_type") { 193 $item_options = array("everything","spider s","nospider","spam","nospam","nospamspider","loggedin","comauthor","searchengine","referrer");195 $item_options = array("everything","spider","nospider","spam","nospam","nospamspider","loggedin","comauthor","searchengine","referrer"); 194 196 $item_options_meta = array( 195 197 __("Everything","wassup"), 196 __("Spider s","wassup"),198 __("Spider","wassup"), 197 199 __("No spider","wassup"), 198 200 __("Spam","wassup"), -
trunk/readme.txt
r145 r147 5 5 Requires at least: 2.2 6 6 Tested up to: 2.5 - 2.3.2 - 2.3.1 - 2.3 - 2.2 7 Stable tag: 1.6 .17 Stable tag: 1.6 8 8 9 9 Analyze your visitors traffic with real time statistics, chart, a lot of chronological information and a sidebar Widget. … … 17 17 WassUp works with two anti-spam function to detect and skip (if you want) referers spammers and akismet spammers. 18 18 19 For people with database space problem, nowWassUp has some options to manage his database table, you can empty it or delete old records to prevent reaching the size limit.19 For people with database space problem, WassUp has some options to manage his database table, you can empty it or delete old records to prevent reaching the size limit. 20 20 21 21 It comes with a nice sidebar Widget which shows current visitors online, last searched terms and last external referers. The widget is fully customizable. -
trunk/wassup.php
r146 r147 40 40 function wassup_install() { 41 41 global $wpdb; 42 $table_name = $wpdb->prefix . "wassup"; 43 $table_tmp_name = $wpdb->prefix . "wassup_tmp"; 42 44 43 45 //### Add/update wassup settings in Wordpress options table … … 77 79 if (!isset($wassup_options->wassup_chart)) { 78 80 $wassup_options->wassup_chart = 1; 79 }80 if (!isset($wassup_options->wassup_time_format)) {81 $wassup_options->wassup_time_format = 24;82 81 } 83 82 //# assign top ten items for upgrades from 1.4.9 or less … … 94 93 "topreferrer_exclude"=>"")); 95 94 } 95 //#upgrade from 1.6: new options wassup_time_format and wassup_hack 96 if (!isset($wassup_options->wassup_time_format)) { 97 $wassup_options->wassup_time_format = 24; 98 } 99 if (!isset($wassup_options->wassup_hack)) { 100 $wassup_options->wassup_hack = 1; 101 } 96 102 $wassup_options->saveSettings(); 97 103 … … 100 106 //#Check for problems with 'session_savepath' and disable 101 107 //# recording, if found. -Helene D. 2/24/08 108 /* 102 109 $sessionpath = $wassup_options->wassup_savepath; 103 110 if (empty($sessionpath)) { $sessionpath = getSessionpath(); } … … 107 114 $wassup_options->wassup_savepath = $sessionpath; 108 115 } 109 /*if ($wassup_options->isWritableFolder($sessionpath) == false) {116 if ($wassup_options->isWritableFolder($sessionpath) == false) { 110 117 if ($wassup_options->wassup_active == "1") { 111 118 $wassup_options->wassup_active = "0"; … … 114 121 $wassup_options->wassup_alert_message = __('WassUp has detected a problem with "session.save_path" setting in your Wordpress/PHP configuration. Please fix by modifying "Temporary files location folder" in admin menu, "Wassup-->Options-->Manage Files & Database".','wassup'); 115 122 } 116 } */123 } 117 124 $wassup_options->saveSettings(); 118 125 unset($sessionpath); //because "install" works in global scope 119 126 */ 120 127 //# TODO: 121 128 //###Detect known incompatible plugins like "wp_cache" and disable … … 123 130 124 131 //### Create/upgrade wassup MAIN table 125 $table_name = $wpdb->prefix . "wassup";126 132 if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { 127 CreateTable( "wassup");128 CreateTable( "wassup_tmp");133 CreateTable($table_name); 134 CreateTable($table_tmp_name); 129 135 } else {
