Changeset 200971
- Timestamp:
- 02/02/2010 06:07:02 AM (15 years ago)
- Location:
- woopra/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
woopra/trunk/css/analytics.css
r200367 r200971 1 2 1 3 /* 2 4 * Global … … 7 9 text-align: left; 8 10 } 9 10 /*11 *12 */13 11 14 12 .woopra_options { … … 95 93 } 96 94 95 96 97 98 97 99 .woopra_subtabs li { 98 100 font-size: 14px; … … 154 156 155 157 span.ellipsis { 156 157 158 159 160 158 white-space:nowrap; 159 text-overflow:ellipsis; 160 overflow:hidden; 161 width: 450px; 162 display:block; 161 163 } 162 164 … … 165 167 padding: 5px !important; 166 168 } 167 168 169 169 170 .tagged_renderer { -
woopra/trunk/inc/admin.php
r200968 r200971 46 46 */ 47 47 var $plugin_basename; 48 49 48 50 49 /** 51 50 * PHP 4 Style constructor which calls the below PHP5 Style Constructor … … 186 185 } 187 186 } 188 187 189 188 /** 190 189 * Whitelist the 'woopra' options … … 268 267 } 269 268 270 271 269 /*** OTHER FUNCTIONS ***/ 272 270 … … 303 301 return $response; 304 302 } 305 303 306 304 /** 307 305 * Upgrade options … … 325 323 $api_key = (!empty($api_key)) ? $api_key : ''; 326 324 $tab = (!empty($tab)) ? $tab : 'dashboard'; 327 325 328 326 $newopts = array ( 329 327 'version' => '1.4.1', … … 336 334 'track_admin' => $trackadmin, 337 335 ); 338 336 339 337 /* Delete old options */ 340 338 delete_option('woopra_api_key'); … … 360 358 361 359 $woopra = get_option('woopra'); 362 360 363 361 $newopts = array ( 364 362 'version' => '1.4.2', … … 372 370 373 371 $woopra = get_option('woopra'); 374 372 375 373 $newopts = array ( 376 374 'version' => '1.4.3', … … 383 381 384 382 $woopra = get_option('woopra'); 385 383 386 384 $newopts = array ( 387 385 'version' => '1.4.3.1', … … 393 391 394 392 $woopra = get_option('woopra'); 395 393 396 394 $newopts = array ( 397 395 'use_subdomain' => 0, … … 404 402 } 405 403 } 406 404 407 405 /** 408 406 * Return the default options … … 429 427 return $defaults; 430 428 } 431 429 432 430 /** 433 431 * Update/validate the options in the options table from the POST … … 442 440 } else { 443 441 unset($options['delete'], $options['default']); 444 442 445 443 if ( !is_numeric( $options['timeout'] ) ) 446 444 $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']) ); … … 477 475 <input type="hidden" name="woopra[root_domain]" value="<?php echo $this->woopra_host(); ?>" /> 478 476 <input type="hidden" name="woopra[date_format]" value="yyyy-MM-dd" /> 479 477 480 478 <h3><? _e('Main Settings', 'woopra'); ?></h3> 481 479 <table class="form-table"> … … 563 561 564 562 <?php } 565 563 566 564 /** 567 565 * Return a pretty version of the hostname. -
woopra/trunk/inc/analytics.php
r200927 r200971 11 11 */ 12 12 class WoopraAnalytics extends WoopraAdmin { 13 13 14 14 /** 15 15 * Your Site API Key … … 18 18 */ 19 19 var $api_key; 20 20 21 21 /** 22 22 * Display a notice telling the user to fill in their Woopra details -
woopra/trunk/inc/frontend.php
r200968 r200971 124 124 125 125 } 126 126 127 127 /** 128 128 * How Woopra Detects Vistors … … 145 145 146 146 } 147 -
woopra/trunk/inc/render.php
r200966 r200971 10 10 */ 11 11 class WoopraRender extends WoopraAdmin { 12 12 13 13 /** 14 14 * Site API Key … … 120 120 ); 121 121 } 122 122 123 123 $date_format = $_GET['date_format']; 124 124 $start_date = $_GET['from']; … … 141 141 if ( is_wp_error($xml_process) ) 142 142 wp_die($xml_process->get_error_message()); 143 143 144 144 // Clear up memory! 145 145 unset($xml_data, $xml_data_append); … … 196 196 return true; 197 197 } 198 198 199 199 /** 200 200 * Render the Results … … 203 203 */ 204 204 function render_results() { 205 205 206 206 if ( !is_array($this->entries) ) 207 207 return; … … 330 330 <td class="wlinechart" id="linecharttd-<?php echo $hashid; ?>-<?php echo $counter ?>" colspan="4"></td> 331 331 </tr> 332 <?php } ?> 332 <?php } ?> 333 333 </table> 334 334 <?php … … 404 404 405 405 /** PRIVATE FUNCTIONS **/ 406 406 407 407 /** 408 408 * Milliseconds to Mintues and Seconds … … 558 558 return "<img src=\"http://static.woopra.com/images/flags/$country.png\" />"; 559 559 } 560 560 561 561 /** 562 562 * Get the broswer image. … … 567 567 function browser_icon($browser) { 568 568 $browser = strtolower($browser); 569 if (stripos($browser, "firefox") !== false) {570 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 () { 600 600 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 601 } 602 ) { 603 $this->woopra_image("browsers/unknown"); 604 } 605 return ""; 606 606 } 607 607 … … 614 614 function platform_icon($platform) { 615 615 $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 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 ""; 653 653 } 654 654 … … 935 935 return substr(md5($value),0,4); 936 936 } 937 937 938 938 /** 939 939 * Sort Analytics -
woopra/trunk/inc/xml.php
r200929 r200971 9 9 * @subpackage xml 10 10 */ 11 12 11 class WoopraXML { 13 12 … … 51 50 var $area = null; 52 51 53 /** DATA **/ 52 /** DATA **/ 54 53 55 54 /** … … 59 58 */ 60 59 var $args = null; 61 60 62 61 /** 63 62 * Data from XML … … 80 79 */ 81 80 var $current_tag = null; 82 83 84 81 85 82 /** … … 126 123 $this->__construct(); 127 124 } 128 125 129 126 /** 130 127 * Woopra XML … … 162 159 */ 163 160 function set_xml($area, $xml_data) { 164 165 161 // Where are we processing the data? 166 162 $this->area = $area; … … 216 212 xml_set_character_data_handler($this->parser, 'char_xml'); 217 213 xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); 218 214 219 215 // ** READ THE XML RETURN! **/ 220 216 if ( !xml_parse($this->parser, $woopra_request_data) ) { … … 244 240 */ 245 241 function start_xml($parser, $name, $attribs) { 246 242 247 243 if (($name == "return") && (!$this->record)) { 248 244 $this->record = true; … … 251 247 if ( !$this->record ) 252 248 return; 253 249 254 250 if ( ( !$this->index_created ) && ( $name == 'items' ) ) 255 251 $this->index_created = true; // Index is done! 256 252 257 253 $_data_global_types = array("hourElements"); 258 254 $_data_other_types = array("dayElements"); … … 265 261 266 262 $this->current_tag = $name; 267 263 268 264 } 269 265 … … 288 284 if ( in_array($name, $_data_other_types) ) 289 285 $this->day_Childern = false; 290 286 291 287 if ( $name == "items" ) 292 288 $this->counter++; 293 289 294 290 } 295 291 … … 305 301 global $_current_hour, $_current_day; 306 302 307 308 303 if ( !$this->record ) 309 304 return; 310 305 311 306 if ( $this->current_tag == 'success') 312 307 if ( !$data ) … … 336 331 if ( !$this->found_data && count($this->data) ) 337 332 $this->found_data = true; 338 339 333 } 340 334 -
woopra/trunk/js/jquery.analytics.js
r200969 r200971 2 2 3 3 // Exists Function 4 jQuery.fn.exists = function () { return jQuery(this).length >0; }4 jQuery.fn.exists = function () { return jQuery(this).length0; } 5 5 6 6 // Get Days Previous … … 36 36 /** 37 37 * Set Current Super Tab 38 38 39 */ 39 40 function setCurrentSuperTab(id) { … … 55 56 /** 56 57 * Add Super Tab 58 59 57 60 */ 58 61 function addSuperTab(name, id) { … … 69 72 /** 70 73 * Add Super Sub Tab 74 75 76 77 71 78 */ 72 79 function addSubTab(name, id, superid, keys) { … … 90 97 /** 91 98 * Change Super View 99 92 100 */ 93 101 function setSuperView(id) { … … 127 135 /** 128 136 * Set Sub View 137 138 129 139 */ 130 140 function setSubView(superid, id) { … … 138 148 return false; 139 149 } 140 150 141 151 if (currentSubTabId != null) { 142 152 // Remove the class. … … 156 166 157 167 /** 158 * 168 * Show the Analytics! 169 * @param {Object} superid 170 * @param {Object} id 159 171 */ 160 172 function showWoopraAnalytics(superid, id) { … … 186 198 * * type (For getReferrers Method) 187 199 * * aggregate_by () 188 * 200 * @param {Object} area 201 * @param {Object} key 189 202 */ 190 203 function requestData(area, key) { … … 217 230 } 218 231 232 233 234 235 236 237 238 239 240 241 242 243 219 244 // Show Date Picker 220 245 jQuery("#woopra-daterange").click(function() { … … 361 386 return false; 362 387 } 363 -
woopra/trunk/js/jquery.tracking.js
r200955 r200971 55 55 * 56 56 */ 57 57 $.trackWoopra = function(woopra_data) { 58 58 var script; 59 59 var src = 'http://static.woopra.com/js/woopra.v2.js'; … … 216 216 function evaluate(element, text_or_function) { 217 217 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; 221 221 }; 222 222 }; … … 228 228 function debug(message) { 229 229 if (typeof console != 'undefined' && typeof console.debug != 'undefined' && $.fn.trackEvent.defaults.debug) { 230 console.debug(message);231 } 230 console.debug(message); 231 } 232 232 }; 233 233 … … 236 236 */ 237 237 $.fn.trackEvent.defaults = { 238 title : function(element) { return (element[0].hostname == location.hostname) ? 'internal':'external'; },239 skip_internal 240 event_name 241 debug 238 title'external'; }, 239 skip_internal: false, 240 event_name: 'click', 241 debug: true 242 242 }; 243 243 })(jQuery); -
woopra/trunk/woopra.php
r200949 r200971 55 55 */ 56 56 var $version = WOOPRA_VERSION; 57 57 58 58 /** 59 59 * All the Woopra Plugin Options … … 71 71 $this->__construct(); 72 72 } 73 73 74 74 /** 75 75 * Main Contructor Class … … 105 105 return false; 106 106 } 107 107 108 108 } 109 109
Note: See TracChangeset
for help on using the changeset viewer.