Changeset 136
- Timestamp:
- 04/22/08 11:25:27 (3 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
lib/action.php (modified) (2 diffs)
-
lib/settings.php (modified) (2 diffs)
-
lib/wassup.class.php (modified) (2 diffs)
-
wassup.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/action.php
r131 r136 3 3 4 4 //force browser to disable caching so action.php works as an ajax request 5 header("Expires: Fri, 22 Jun 2007 05:00:00 GMT"); // Date in the past5 /* header("Expires: Fri, 22 Jun 2007 05:00:00 GMT"); // Date in the past 6 6 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified 7 7 // HTTP/1.1 8 8 header('Cache-Control: no-store, no-cache, must-revalidate'); 9 9 header('Cache-Control: post-check=0, pre-check=0', false); 10 //echo "\n"; 10 */ 11 echo "\n"; 11 12 //#debug... 12 13 //error_reporting(E_ALL | E_STRICT); //debug, E_STRICT=php5 only … … 199 200 //# exclude $wpurl from search results... 200 201 //# ...$siteurl already excluded in db query. 201 if ($wpurl == $siteurl || !eregi($wpurl,$top10->referrer)) { ?> 202 //if ($wpurl == $siteurl || !eregi($wpurl,$top10->referrer)) { 203 if (!eregi($siteurl,$top10->referrer)) { ?> 202 204 <li class="charts"><?php echo $top10->top_referrer.': '; 203 205 print '<a href="'.$top10->referrer.'" title="'.$top10->referrer.'" target="_BLANK">'; -
trunk/lib/settings.php
r134 r136 38 38 h3 { margin-bottom:0px; padding-bottom:5px; color:#333; } 39 39 form p { margin-top:0px; padding-top:0px; padding-left:15px; } 40 <?php if (version_compare($wp_version, '2.5', '<')) { ?> 41 #wassup_opt_frag-1, #wassup_opt_frag-2, 42 #wassup_opt_frag-3, #wassup_opt_frag-4 { 43 background-color: #e6eff6; 44 border-left: 1px solid #cce; 45 border-right: 1px solid #cce; 46 border-bottom: 1px solid #cce; 47 font-size: 85%; 48 } 49 #tab_container { list-style:none; } 50 #tab_container ul li { min-width:60px; display:inline;} 51 #tab_container ul li a span { font-size: 105%; } 52 <?php } else { ?> 40 53 #wassup_opt_frag-1 { height: 100%; margin:0;} 41 54 #wassup_opt_frag-2 { height: 100%; margin:0;} 42 55 #wassup_opt_frag-3 { height: 100%; margin:0;} 43 56 #wassup_opt_frag-4 { height: 100%; margin:0;} 57 <?php } //end if version_compare ?> 44 58 </style> 45 59 <h2><?php _e('Options','wassup'); ?></h2> … … 71 85 <?php $wassup_options->showFormOptions("wassup_userlevel"); ?> 72 86 </select></p><br /> 87 88 <br /><h3><?php _e('Dashboard Settings','wassup'); ?></h3> 89 <p><input type="checkbox" name="wassup_dashboard_chart" value="1" <?php if($wassup_options->wassup_dashboard_chart == 1) print "CHECKED"; ?> /> <strong><?php _e('Display small chart in the dashboard','wassup'); ?></strong> 90 </p><br /> 73 91 74 92 <br /><h3><?php _e('Visit Detail Settings','wassup'); ?></h3> -
trunk/lib/wassup.class.php
r131 r136 15 15 var $wassup_default_limit = "10"; 16 16 var $wassup_top10 ; 17 var $wassup_dashboard_chart; 17 18 18 19 /* recording settings */ … … 93 94 $this->wassup_default_type = "everything"; 94 95 $this->wassup_default_limit = "10"; 96 $this->wassup_dashboard_chart = "0"; 95 97 $this->wassup_widget_title = "Visitors Online"; 96 98 $this->wassup_widget_ulclass = "links"; -
trunk/wassup.php
r133 r136 4 4 Plugin URI: http://www.wpwp.org 5 5 Description: Wordpress plugin to analyze your visitors traffic with real time stats, chart and a lot of chronological informations. It has sidebar Widget support to show current online visitors and other statistics. 6 Version: 1.5 6 Version: 1.5.1 7 7 Author: Michele Marcucci 8 8 Author URI: http://www.michelem.org/ … … 17 17 die('Permission Denied! You are not allowed to call this page directly.'); 18 18 } 19 $version = "1.5 ";19 $version = "1.5.1"; 20 20 define('WASSUPFOLDER', dirname(plugin_basename(__FILE__)), TRUE); 21 21 require_once(dirname(__FILE__).'/lib/wassup.class.php'); … … 399 399 400 400 function WassUp() { 401 global $wpdb, $ version, $wpurl, $wassup_options, $whash;401 global $wpdb, $wp_version, $version, $wpurl, $wassup_options, $whash; 402 402 403 403 //#debug... … … 443 443 $wassup_options->wassup_refresh = $_POST['wassup_refresh']; 444 444 $wassup_options->wassup_userlevel = $_POST['wassup_userlevel']; 445 $wassup_options->wassup_dashboard_chart = $_POST['wassup_dashboard_chart']; 445 446 $wassup_options->wassup_default_type = $_POST['wassup_default_type']; 446 447 $wassup_options->wassup_default_limit = $_POST['wassup_default_limit']; … … 1392 1393 1393 1394 //### Extract useful visit information from http header... 1394 $language = @explode("-", $language); 1395 $language = @explode(",", $language[1]); 1396 $language = @explode(";", $language[0]); 1395 // 1396 //#use country code for language, if it exists in hostname 1397 if (!empty($hostname) && preg_match("/\.[a-zA-Z]{2}$/", $hostname) > 0) { 1398 $country = strtoupper(substr($hostname,-2)); 1399 if ($country == "UK") { $country = "GB"; } //change UK to GB for consistent language codes 1400 $language = array("$country"); 1401 } else { 1402 $language = @explode("-", $language); 1403 $language = @explode(",", $language[1]); 1404 $language = @explode(";", $language[0]); 1405 } 1397 1406 1398 1407 list($searchengine,$search_phrase)=explode("|",wGetSE($referrer)); … … 1651 1660 // This is the function to print out a chart's preview in the dashboard 1652 1661 function wassupDashChart() { 1653 global $wpdb; 1662 global $wpdb, $wassup_options; 1663 if ($wassup_options->wassup_dashboard_chart == 1) { 1654 1664 $table_name = $wpdb->prefix . "wassup"; 1655 1665 $to_date = wassup_get_time(); … … 1658 1668 $Chart->to_date = $to_date; 1659 1669 1660 $itemstot = $Chart->calc_tot("count", $search, null, "DISTINCT");1661 print $itemstot;1662 1663 1670 echo '<h3>WassUp Stats <cite><a href="admin.php?page=wassup">More »</a></cite></h3>'; 1664 1671 echo $Chart->TheChart(1, "400", "125", "", $wassup_options->wassup_chart_type, "bg,s,00000000", "dashboard", "left"); 1672 } 1665 1673 } //end function wassupDashChart 1666 1674
