Plugin Directory

Changeset 200971

Timestamp:
02/02/2010 06:07:02 AM (15 years ago)
Author:
ShaneF
Message:

fix whitespaces :-)

Location:
woopra/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • woopra/trunk/css/analytics.css

    r200367 r200971  
     1
     2
    13/*
    24 * Global
     
    79    text-align: left;
    810}
    9 
    10 /*
    11  *
    12  */
    1311
    1412.woopra_options {
     
    9593}
    9694
     95
     96
     97
     98
    9799.woopra_subtabs li {
    98100    font-size: 14px;
     
    154156
    155157span.ellipsis {
    156    white-space:nowrap;
    157    text-overflow:ellipsis;
    158    overflow:hidden;
    159    width: 450px;
    160    display:block;
     158white-space:nowrap;
     159text-overflow:ellipsis;
     160overflow:hidden;
     161width: 450px;
     162display:block;
    161163}
    162164
     
    165167    padding: 5px !important;
    166168}
    167 
    168169
    169170.tagged_renderer {
  • woopra/trunk/inc/admin.php

    r200968 r200971  
    4646     */
    4747    var $plugin_basename;
    48 
    49 
     48   
    5049    /**
    5150     * PHP 4 Style constructor which calls the below PHP5 Style Constructor
     
    186185        }
    187186    }
    188 
     187   
    189188    /**
    190189     * Whitelist the 'woopra' options
     
    268267    }
    269268   
    270    
    271269    /*** OTHER FUNCTIONS ***/
    272270   
     
    303301        return $response;
    304302    }
    305 
     303   
    306304    /**
    307305     * Upgrade options
     
    325323            $api_key = (!empty($api_key)) ? $api_key : '';
    326324            $tab = (!empty($tab)) ? $tab : 'dashboard';
    327 
     325           
    328326            $newopts = array (
    329327                'version'       =>  '1.4.1',
     
    336334                'track_admin'   =>  $trackadmin,
    337335            );
    338 
     336           
    339337            /* Delete old options */
    340338            delete_option('woopra_api_key');
     
    360358           
    361359            $woopra = get_option('woopra');
    362 
     360           
    363361            $newopts = array (
    364362                'version'       =>  '1.4.2',
     
    372370           
    373371            $woopra = get_option('woopra');
    374 
     372           
    375373            $newopts = array (
    376374                'version'           =>  '1.4.3',
     
    383381           
    384382            $woopra = get_option('woopra');
    385 
     383           
    386384            $newopts = array (
    387385                'version'   =>  '1.4.3.1',
     
    393391           
    394392            $woopra = get_option('woopra');
    395 
     393           
    396394            $newopts = array (
    397395                'use_subdomain' =>  0,
     
    404402        }
    405403    }
    406 
     404   
    407405    /**
    408406     * Return the default options
     
    429427        return $defaults;
    430428    }
    431 
     429   
    432430    /**
    433431     * Update/validate the options in the options table from the POST
     
    442440        } else {
    443441            unset($options['delete'], $options['default']);
    444 
     442           
    445443            if ( !is_numeric( $options['timeout'] ) )
    446444                $woopra_error = new WP_Error( 'timeout_not_numeric' , sprintf( __('You entred (<strong>%s</strong>) as a timeout value. This is not a vaild entry. Please enter whole numbers only!') , $options['timeout']) );
     
    477475    <input type="hidden" name="woopra[root_domain]" value="<?php echo $this->woopra_host(); ?>" />
    478476    <input type="hidden" name="woopra[date_format]" value="yyyy-MM-dd" />
    479        
     477   
    480478    <h3><? _e('Main Settings', 'woopra'); ?></h3>
    481479    <table class="form-table">
     
    563561   
    564562    <?php }
    565 
     563   
    566564    /**
    567565     * Return a pretty version of the hostname.
  • woopra/trunk/inc/analytics.php

    r200927 r200971  
    1111 */
    1212class WoopraAnalytics extends WoopraAdmin {
    13 
     13   
    1414    /**
    1515     * Your Site API Key
     
    1818     */
    1919    var $api_key;
    20        
     20   
    2121    /**
    2222     * Display a notice telling the user to fill in their Woopra details
  • woopra/trunk/inc/frontend.php

    r200968 r200971  
    124124       
    125125    }
    126 
     126   
    127127    /**
    128128     * How Woopra Detects Vistors
     
    145145   
    146146}
     147
  • woopra/trunk/inc/render.php

    r200966 r200971  
    1010 */
    1111class WoopraRender extends WoopraAdmin {
    12 
     12   
    1313    /**
    1414     * Site API Key
     
    120120                );
    121121            }
    122                        
     122           
    123123            $date_format = $_GET['date_format'];
    124124            $start_date = $_GET['from'];
     
    141141            if ( is_wp_error($xml_process) )
    142142                wp_die($xml_process->get_error_message());
    143 
     143           
    144144            // Clear up memory!
    145145            unset($xml_data, $xml_data_append);
     
    196196        return true;
    197197    }
    198 
     198   
    199199    /**
    200200     * Render the Results
     
    203203     */
    204204    function render_results() {
    205 
     205       
    206206        if ( !is_array($this->entries) )
    207207            return;
     
    330330                    <td class="wlinechart" id="linecharttd-<?php echo $hashid; ?>-<?php echo $counter ?>" colspan="4"></td>
    331331                </tr>
    332             <?php } ?>             
     332            <?php } ?>
    333333        </table>
    334334        <?php
     
    404404   
    405405    /** PRIVATE FUNCTIONS **/
    406 
     406   
    407407    /**
    408408     * Milliseconds to Mintues and Seconds
     
    558558        return "<img src=\"http://static.woopra.com/images/flags/$country.png\" />";
    559559    }
    560 
     560   
    561561    /**
    562562     * Get the broswer image.
     
    567567    function browser_icon($browser) {
    568568        $browser = strtolower($browser);
    569         if (stripos($browser, "firefox") !== false) {
    570             return $this->woopra_image("browsers/firefox");
    571         }
    572         if (stripos($browser, "explorer 7") !== false) {
    573             return $this->woopra_image("browsers/ie7");
    574         }
    575         if (stripos($browser, "explorer 8") !== false) {
    576             return $this->woopra_image("browsers/ie7"); //  should this me updated?
    577         }
    578         if (stripos($browser, "explorer") !== false) {
    579             return $this->woopra_image("browsers/ie");
    580         }
    581         if (stripos($browser, "safari") !== false) {
    582             return $this->woopra_image("browsers/safari");
    583         }
    584         if (stripos($browser, "chrome") !== false) {
    585             return $this->woopra_image("browsers/chrome");
    586         }
    587         if (stripos($browser, "opera") !== false) {
    588             return $this->woopra_image("browsers/opera");
    589         }
    590         if (stripos($browser, "mozilla") !== false) {
    591             return $this->woopra_image("browsers/mozilla");
    592         }
    593         if (stripos($browser, "netscape") !== false) {
    594             return $this->woopra_image("browsers/netscape");
    595         }
    596         if (stripos($browser, "konqueror") !== false) {
    597             return $this->woopra_image("browsers/konqueror");
    598         }
    599         if (stripos($browser, "iphone") !== false) {
     569    ) {
     570    return $this->woopra_image("browsers/firefox");
     571    }
     572    ) {
     573    $this->woopra_image("browsers/ie7");
     574    }
     575    ) {
     576    $this->woopra_image("browsers/ie7");  //  should this me updated?
     577    }
     578    ) {
     579    $this->woopra_image("browsers/ie");
     580    }
     581    ) {
     582    $this->woopra_image("browsers/safari");
     583    }
     584    ) {
     585    $this->woopra_image("browsers/chrome");
     586    }
     587    ) {
     588    $this->woopra_image("browsers/opera");
     589    }
     590    ) {
     591    $this->woopra_image("browsers/mozilla");
     592    }
     593    ) {
     594    $this->woopra_image("browsers/netscape");
     595    }
     596    ) {
     597    $this->woopra_image("browsers/konqueror");
     598    }
     599        if () {
    600600            return $this->woopra_image("os/mac");
    601         }
    602         if (stripos($browser, "unknown") !== false || stripos($browser, "other") !== false) {
    603             return $this->woopra_image("browsers/unknown");
    604         }
    605         return "";
     601    }
     602    ) {
     603    $this->woopra_image("browsers/unknown");
     604    }
     605    return "";
    606606    }
    607607   
     
    614614    function platform_icon($platform) {
    615615        $platform = strtolower($platform);
    616         if (stripos($platform, "windows") !== false) {
    617             return $this->woopra_image("os/windows");
    618         }
    619         if (stripos($platform, "mac") !== false) {
    620             return $this->woopra_image("os/mac");
    621         }
    622         if (stripos($platform, "apple") !== false) {
    623             return $this->woopra_image("os/mac");
    624         }
    625         if (stripos($platform, "ubuntu") !== false) {
    626             return $this->woopra_image("os/ubuntu");
    627         }
    628         if (stripos($platform, "redhat") !== false) {
    629             return $this->woopra_image("os/redhat");
    630         }
    631         if (stripos($platform, "suse") !== false) {
    632             return $this->woopra_image("os/suse");
    633         }
    634         if (stripos($platform, "fedora") !== false) {
    635             return $this->woopra_image("os/fedora");
    636         }
    637         if (stripos($platform, "debian") !== false) {
    638             return $this->woopra_image("os/debian");
    639         }
    640         if (stripos($platform, "linux") !== false) {
    641             return $this->woopra_image("os/linux");
    642         }
    643         if (stripos($platform, "playstation") !== false) {
    644             return $this->woopra_image("os/playstation");
    645         }
    646         if (stripos($platform, "nokia mobile") !== false) {
    647             return $this->woopra_image("browsers/unknown");
    648         }
    649         if (stripos($platform, "unknown") !== false || stripos($platform, "other") !== false) {
    650             return $this->woopra_image("browsers/unknown");
    651         }
    652         return "";
     616    ) {
     617    $this->woopra_image("os/windows");
     618    }
     619    ) {
     620    $this->woopra_image("os/mac");
     621    }
     622    ) {
     623    $this->woopra_image("os/mac");
     624    }
     625    ) {
     626    $this->woopra_image("os/ubuntu");
     627    }
     628    ) {
     629    $this->woopra_image("os/redhat");
     630    }
     631    ) {
     632    $this->woopra_image("os/suse");
     633    }
     634    ) {
     635    $this->woopra_image("os/fedora");
     636    }
     637    ) {
     638    $this->woopra_image("os/debian");
     639    }
     640    ) {
     641    $this->woopra_image("os/linux");
     642    }
     643        if () {
     644    $this->woopra_image("os/playstation");
     645    }
     646        if () {
     647    $this->woopra_image("browsers/unknown");
     648    }
     649    ) {
     650    $this->woopra_image("browsers/unknown");
     651    }
     652    return "";
    653653    }
    654654   
     
    935935        return substr(md5($value),0,4);
    936936    }
    937 
     937   
    938938    /**
    939939     * Sort Analytics
  • woopra/trunk/inc/xml.php

    r200929 r200971  
    99 * @subpackage xml
    1010 */
    11 
    1211class WoopraXML {
    1312   
     
    5150    var $area = null;
    5251   
    53     /** DATA **/   
     52    /** DATA **/
    5453   
    5554    /**
     
    5958     */
    6059    var $args = null;
    61 
     60   
    6261    /**
    6362     * Data from XML
     
    8079     */
    8180    var $current_tag = null;
    82    
    83    
    8481   
    8582    /**
     
    126123        $this->__construct();
    127124    }
    128 
     125   
    129126    /**
    130127     * Woopra XML
     
    162159     */
    163160    function set_xml($area, $xml_data) {
    164        
    165161        //  Where are we processing the data?
    166162        $this->area = $area;
     
    216212        xml_set_character_data_handler($this->parser, 'char_xml');
    217213        xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
    218 
     214       
    219215        //  ** READ THE XML RETURN! **/
    220216        if ( !xml_parse($this->parser, $woopra_request_data) ) {
     
    244240     */
    245241    function start_xml($parser, $name, $attribs) {
    246                        
     242       
    247243        if (($name == "return") && (!$this->record)) {
    248244            $this->record = true;
     
    251247        if ( !$this->record )
    252248            return;
    253            
     249       
    254250        if ( ( !$this->index_created ) && ( $name == 'items' ) )
    255251            $this->index_created = true;    //  Index is done!
    256            
     252       
    257253        $_data_global_types = array("hourElements");
    258254        $_data_other_types = array("dayElements");
     
    265261       
    266262        $this->current_tag = $name;
    267                
     263       
    268264    }
    269265   
     
    288284        if ( in_array($name, $_data_other_types) )
    289285            $this->day_Childern = false;
    290            
     286       
    291287        if ( $name == "items" )
    292288            $this->counter++;
    293 
     289       
    294290    }
    295291   
     
    305301        global $_current_hour, $_current_day;
    306302       
    307        
    308303        if ( !$this->record )
    309304            return;
    310            
     305       
    311306        if ( $this->current_tag == 'success')
    312307            if ( !$data )
     
    336331        if ( !$this->found_data && count($this->data) )
    337332            $this->found_data = true;
    338                
    339333    }
    340334   
  • woopra/trunk/js/jquery.analytics.js

    r200969 r200971  
    22   
    33    //  Exists Function
    4     jQuery.fn.exists = function () { return jQuery(this).length>0; }
     4    jQuery.fn.exists = function () { return jQuery(this).length0; }
    55   
    66    //  Get Days Previous
     
    3636    /**
    3737     * Set Current Super Tab
     38
    3839     */
    3940    function setCurrentSuperTab(id) {
     
    5556    /**
    5657     * Add Super Tab
     58
     59
    5760     */
    5861    function addSuperTab(name, id) {
     
    6972    /**
    7073     * Add Super Sub Tab
     74
     75
     76
     77
    7178     */
    7279    function addSubTab(name, id, superid, keys) {
     
    9097    /**
    9198     * Change Super View
     99
    92100     */
    93101    function setSuperView(id) {
     
    127135    /**
    128136     * Set Sub View
     137
     138
    129139     */
    130140    function setSubView(superid, id) {
     
    138148            return false;
    139149        }
    140 
     150       
    141151        if (currentSubTabId != null) {
    142152            //  Remove the class.
     
    156166   
    157167    /**
    158      *
     168     * Show the Analytics!
     169     * @param {Object} superid
     170     * @param {Object} id
    159171     */
    160172    function showWoopraAnalytics(superid, id) {
     
    186198     *          * type (For getReferrers Method)
    187199     *          * aggregate_by ()
    188      *
     200     * @param {Object} area
     201     * @param {Object} key
    189202     */
    190203    function requestData(area, key) {
     
    217230    }
    218231   
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
    219244    //  Show Date Picker
    220245    jQuery("#woopra-daterange").click(function() {
     
    361386    return false;
    362387}
    363 
  • woopra/trunk/js/jquery.tracking.js

    r200955 r200971  
    5555   *
    5656   */
    57   $.trackWoopra = function(woopra_data) {
     57$.trackWoopra = function(woopra_data) {
    5858        var script;
    5959        var src  = 'http://static.woopra.com/js/woopra.v2.js';
     
    216216        function evaluate(element, text_or_function) {
    217217            if(typeof text_or_function == 'function') {
    218             text_or_function = text_or_function(element);
    219         }
    220         return text_or_function;
     218            text_or_function = text_or_function(element);
     219        }
     220        return text_or_function;
    221221        };
    222222    };
     
    228228    function debug(message) {
    229229        if (typeof console != 'undefined' && typeof console.debug != 'undefined' && $.fn.trackEvent.defaults.debug) {
    230         console.debug(message);
    231         }   
     230        console.debug(message);
     231        }
    232232    };
    233233
     
    236236    */
    237237    $.fn.trackEvent.defaults = {
    238         title      : function(element) { return (element[0].hostname == location.hostname) ? 'internal':'external'; },
    239         skip_internal : false,
    240         event_name    : 'click',
    241         debug         : true
     238        title'external'; },
     239        skip_internal: false,
     240        event_name: 'click',
     241        debug: true
    242242    };
    243243})(jQuery);
  • woopra/trunk/woopra.php

    r200949 r200971  
    5555     */
    5656    var $version = WOOPRA_VERSION;
    57 
     57   
    5858    /**
    5959     * All the Woopra Plugin Options
     
    7171        $this->__construct();
    7272    }
    73 
     73   
    7474    /**
    7575     * Main Contructor Class
     
    105105            return false;
    106106    }
    107        
     107   
    108108}
    109109
Note: See TracChangeset for help on using the changeset viewer.