Changeset 136

Show
Ignore:
Timestamp:
04/22/08 11:25:27 (3 months ago)
Author:
root
Message:

1.5.1 almost ready

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/action.php

    r131 r136  
    33 
    44//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 past 
     5/* header("Expires: Fri, 22 Jun 2007 05:00:00 GMT"); // Date in the past 
    66header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified 
    77// HTTP/1.1 
    88header('Cache-Control: no-store, no-cache, must-revalidate'); 
    99header('Cache-Control: post-check=0, pre-check=0', false); 
    10 //echo "\n"; 
     10*/ 
     11echo "\n"; 
    1112//#debug... 
    1213//error_reporting(E_ALL | E_STRICT);    //debug, E_STRICT=php5 only 
     
    199200                        //# exclude $wpurl from search results... 
    200201                        //# ...$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)) { ?> 
    202204                        <li class="charts"><?php echo $top10->top_referrer.': '; 
    203205                           print '<a href="'.$top10->referrer.'" title="'.$top10->referrer.'" target="_BLANK">'; 
  • trunk/lib/settings.php

    r134 r136  
    3838          h3 { margin-bottom:0px; padding-bottom:5px; color:#333; } 
    3939          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 { ?> 
    4053          #wassup_opt_frag-1 { height: 100%; margin:0;} 
    4154          #wassup_opt_frag-2 { height: 100%; margin:0;} 
    4255          #wassup_opt_frag-3 { height: 100%; margin:0;} 
    4356          #wassup_opt_frag-4 { height: 100%; margin:0;} 
     57        <?php } //end if version_compare ?> 
    4458        </style> 
    4559        <h2><?php _e('Options','wassup'); ?></h2> 
     
    7185                <?php $wassup_options->showFormOptions("wassup_userlevel"); ?> 
    7286                </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 /> 
    7391 
    7492                <br /><h3><?php _e('Visit Detail Settings','wassup'); ?></h3> 
  • trunk/lib/wassup.class.php

    r131 r136  
    1515        var $wassup_default_limit = "10"; 
    1616        var $wassup_top10 ; 
     17        var $wassup_dashboard_chart; 
    1718 
    1819        /* recording settings */ 
     
    9394                $this->wassup_default_type = "everything"; 
    9495                $this->wassup_default_limit = "10"; 
     96                $this->wassup_dashboard_chart = "0"; 
    9597                $this->wassup_widget_title = "Visitors Online"; 
    9698                $this->wassup_widget_ulclass = "links"; 
  • trunk/wassup.php

    r133 r136  
    44Plugin URI: http://www.wpwp.org 
    55Description: 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 
     6Version: 1.5.1 
    77Author: Michele Marcucci 
    88Author URI: http://www.michelem.org/ 
     
    1717        die('Permission Denied! You are not allowed to call this page directly.'); 
    1818} 
    19 $version = "1.5"; 
     19$version = "1.5.1"; 
    2020define('WASSUPFOLDER', dirname(plugin_basename(__FILE__)), TRUE); 
    2121require_once(dirname(__FILE__).'/lib/wassup.class.php'); 
     
    399399 
    400400function WassUp() { 
    401         global $wpdb, $version, $wpurl, $wassup_options, $whash; 
     401        global $wpdb, $wp_version, $version, $wpurl, $wassup_options, $whash; 
    402402 
    403403        //#debug... 
     
    443443                $wassup_options->wassup_refresh = $_POST['wassup_refresh']; 
    444444                $wassup_options->wassup_userlevel = $_POST['wassup_userlevel']; 
     445                $wassup_options->wassup_dashboard_chart = $_POST['wassup_dashboard_chart']; 
    445446                $wassup_options->wassup_default_type = $_POST['wassup_default_type']; 
    446447                $wassup_options->wassup_default_limit = $_POST['wassup_default_limit']; 
     
    13921393 
    13931394           //### 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           } 
    13971406 
    13981407           list($searchengine,$search_phrase)=explode("|",wGetSE($referrer)); 
     
    16511660// This is the function to print out a chart's preview in the dashboard 
    16521661function wassupDashChart() { 
    1653         global $wpdb; 
     1662        global $wpdb, $wassup_options; 
     1663        if ($wassup_options->wassup_dashboard_chart == 1) { 
    16541664        $table_name = $wpdb->prefix . "wassup"; 
    16551665        $to_date = wassup_get_time(); 
     
    16581668        $Chart->to_date = $to_date; 
    16591669 
    1660         $itemstot = $Chart->calc_tot("count", $search, null, "DISTINCT"); 
    1661         print $itemstot; 
    1662  
    16631670        echo '<h3>WassUp Stats <cite><a href="admin.php?page=wassup">More &raquo;</a></cite></h3>'; 
    16641671        echo $Chart->TheChart(1, "400", "125", "", $wassup_options->wassup_chart_type, "bg,s,00000000", "dashboard", "left"); 
     1672        } 
    16651673} //end function wassupDashChart 
    16661674