Changeset 130356
- Timestamp:
- 06/29/2009 04:44:51 AM (17 years ago)
- Location:
- wp-click-track/trunk
- Files:
-
- 81 added
- 8 edited
-
activation-client.php (modified) (1 diff)
-
admin.inc.php (modified) (28 diffs)
-
ajax.js (modified) (1 diff)
-
click-tracker.php (modified) (34 diffs)
-
contextual_help.php (modified) (1 diff)
-
install.inc.php (modified) (3 diffs)
-
license.txt (modified) (1 diff)
-
open-flash-chart (added)
-
open-flash-chart/README.txt (added)
-
open-flash-chart/data-files (added)
-
open-flash-chart/data-files/1.html (added)
-
open-flash-chart/data-files/2.html (added)
-
open-flash-chart/data-files/3.html (added)
-
open-flash-chart/data-files/4.html (added)
-
open-flash-chart/data-files/5.html (added)
-
open-flash-chart/data-files/6.html (added)
-
open-flash-chart/data-files/7.html (added)
-
open-flash-chart/data-files/8.html (added)
-
open-flash-chart/data-files/data-1.txt (added)
-
open-flash-chart/data-files/data-10.txt (added)
-
open-flash-chart/data-files/data-11.txt (added)
-
open-flash-chart/data-files/data-12.txt (added)
-
open-flash-chart/data-files/data-13.txt (added)
-
open-flash-chart/data-files/data-14.txt (added)
-
open-flash-chart/data-files/data-15.txt (added)
-
open-flash-chart/data-files/data-16.txt (added)
-
open-flash-chart/data-files/data-17.txt (added)
-
open-flash-chart/data-files/data-18.txt (added)
-
open-flash-chart/data-files/data-19.txt (added)
-
open-flash-chart/data-files/data-2.txt (added)
-
open-flash-chart/data-files/data-20.txt (added)
-
open-flash-chart/data-files/data-21.txt (added)
-
open-flash-chart/data-files/data-22.txt (added)
-
open-flash-chart/data-files/data-23.txt (added)
-
open-flash-chart/data-files/data-24.txt (added)
-
open-flash-chart/data-files/data-25.txt (added)
-
open-flash-chart/data-files/data-26.txt (added)
-
open-flash-chart/data-files/data-27.txt (added)
-
open-flash-chart/data-files/data-28.txt (added)
-
open-flash-chart/data-files/data-29.txt (added)
-
open-flash-chart/data-files/data-3.txt (added)
-
open-flash-chart/data-files/data-30.txt (added)
-
open-flash-chart/data-files/data-31.txt (added)
-
open-flash-chart/data-files/data-32.txt (added)
-
open-flash-chart/data-files/data-33.txt (added)
-
open-flash-chart/data-files/data-34.txt (added)
-
open-flash-chart/data-files/data-35.txt (added)
-
open-flash-chart/data-files/data-36.txt (added)
-
open-flash-chart/data-files/data-37.txt (added)
-
open-flash-chart/data-files/data-38.txt (added)
-
open-flash-chart/data-files/data-39.txt (added)
-
open-flash-chart/data-files/data-4.txt (added)
-
open-flash-chart/data-files/data-40.txt (added)
-
open-flash-chart/data-files/data-41.txt (added)
-
open-flash-chart/data-files/data-42.txt (added)
-
open-flash-chart/data-files/data-43.txt (added)
-
open-flash-chart/data-files/data-44.txt (added)
-
open-flash-chart/data-files/data-45.txt (added)
-
open-flash-chart/data-files/data-46.txt (added)
-
open-flash-chart/data-files/data-47.txt (added)
-
open-flash-chart/data-files/data-48.txt (added)
-
open-flash-chart/data-files/data-49.txt (added)
-
open-flash-chart/data-files/data-5.txt (added)
-
open-flash-chart/data-files/data-50.txt (added)
-
open-flash-chart/data-files/data-51.txt (added)
-
open-flash-chart/data-files/data-52.txt (added)
-
open-flash-chart/data-files/data-53.txt (added)
-
open-flash-chart/data-files/data-54.txt (added)
-
open-flash-chart/data-files/data-55.txt (added)
-
open-flash-chart/data-files/data-6.txt (added)
-
open-flash-chart/data-files/data-7.txt (added)
-
open-flash-chart/data-files/data-8.txt (added)
-
open-flash-chart/data-files/data-9.txt (added)
-
open-flash-chart/data-files/data-HLC-01.txt (added)
-
open-flash-chart/data-files/data-HLC-02.txt (added)
-
open-flash-chart/data-files/data-HLC-03.txt (added)
-
open-flash-chart/data-files/data.txt (added)
-
open-flash-chart/data-files/logo.png (added)
-
open-flash-chart/data-files/raw_data_output (added)
-
open-flash-chart/js (added)
-
open-flash-chart/js/README.txt (added)
-
open-flash-chart/js/swfobject.js (added)
-
open-flash-chart/open-flash-chart.swf (added)
-
open-flash-chart/php-ofc-library (added)
-
open-flash-chart/php-ofc-library/README.txt (added)
-
open-flash-chart/php-ofc-library/open-flash-chart.php (added)
-
open-flash-chart/php-ofc-library/open_flash_chart_object.php (added)
-
readme.txt (modified) (2 diffs)
-
reporting.php (added)
Legend:
- Unmodified
- Added
- Removed
-
wp-click-track/trunk/activation-client.php
r107117 r130356 1 1 <?php 2 3 2 /** 4 5 3 * Activation Client 6 7 4 * 8 9 5 * Performs the POST notification. 10 11 6 * Should be placed in the same directory as the wp plugin you want to monitor. 12 13 7 * 14 15 8 * @author Eric Lamb <[email protected]> 16 17 9 * @package wp-activation-counter 18 19 10 * @version 0.1 20 21 11 * @filesource 22 23 12 * @copyright 2009 Eric Lamb. 24 25 13 */ 26 14 27 28 29 15 if(!function_exists('activation_counter_send_notice')){ 30 31 16 /** 32 33 17 * Sends the activation notice 34 35 18 * 36 37 19 * @param string $url fully resolved URI to notify activation to 38 39 20 * @param string $name plugin name activation is for 40 41 21 * @param string $version version of the plugin activation is for 42 43 22 * @param string $db_version database version for the plugin notice 44 45 23 * @param int $type notice type. 1 = activation, 2 = deactivation 46 47 24 * @return void 48 49 25 */ 50 51 26 function activation_counter_send_notice($url, $plugin, $version, $db_version = FALSE, $type = 1){ 52 53 27 54 55 28 $date = date('r'); 56 57 29 $ident = md5(get_option('siteurl')); 58 59 30 $blogname = get_option('blogname'); 60 61 31 $blogurl = get_option('siteurl'); 62 63 32 $email = get_option('admin_email'); 64 65 33 //return TRUE; 66 67 34 68 69 35 $post_data = array ( 70 71 36 'headers' => null, 72 73 37 'body' => array( 74 75 38 'ident' => $ident, 76 77 39 'blogname' => base64_encode($blogname), 78 79 40 'blogurl' => base64_encode($blogurl), 80 81 41 'email' => base64_encode($email), 82 83 42 'type' => $type, 84 85 43 'plugin' => base64_encode($plugin), 86 87 44 'db_version' => $db_version, 88 89 45 'version' => $version 90 91 46 ), 92 93 47 ); 94 48 95 96 97 49 wp_remote_post($url, $post_data); 98 99 50 } 100 101 51 } 102 103 52 ?> -
wp-click-track/trunk/admin.inc.php
r111387 r130356 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0. 4.19 * @version 0.5 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 24 24 25 25 return $errors; 26 27 26 } 28 27 … … 118 117 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_value; ?>" /></p> 119 118 </form> 120 <? 121 } 122 123 124 /** 125 * Displays the pie chart for the hour clicks 126 * 127 * @param aray $result array() of clicks 128 * @return void 129 */ 130 function wp_click_track_display_pie_hour_chart($result){ 131 132 if(!isset($result) || !$result){ 133 return FALSE; 134 } 135 $total = count($result); 136 $js = ''; 137 for($i=0;$i<$total;$i++){ 138 $Hour = ($result[$i]->Hour > 12 ? ($result[$i]->Hour-12).' PM' : $result[$i]->Hour.' AM'); 139 if($Hour == '12 AM'){ $Hour = '12 PM'; } 140 if($Hour == '0 AM'){ $Hour = '12 AM'; } 141 $js .= "data.setValue($i, 0, '$Hour');\ndata.setValue($i, 1, ".$result[$i]->Clicks.");\n"; 142 } 143 ?> 144 145 <script type="text/javascript"> 146 google.load("visualization", "1", {packages:["piechart"]}); 147 google.setOnLoadCallback(drawChart); 148 function drawChart() { 149 var data = new google.visualization.DataTable(); 150 data.addColumn('string', 'Hour'); 151 data.addColumn('number', 'Clicks'); 152 data.addRows(<?php echo $total; ?>); 153 <?php echo $js; ?> 154 155 var chart = new google.visualization.PieChart(document.getElementById('chart_div')); 156 chart.draw(data, {width: 500, height: 400, is3D: true, title: 'Clicks By Hour', backgroundColor: '#f9f9f9', legend: 'top', legendBackgroundColor: '#f1f1f1'}); 157 } 158 </script> 159 <div id="chart_div"></div> 160 <? 161 } 162 163 /** 164 * Displays the pie chart for the day clicks 165 * 166 * @param aray $result array() of clicks 167 * @return void 168 */ 169 function wp_click_track_display_pie_day_chart($result){ 170 171 if(!isset($result) || !$result){ 172 return FALSE; 173 } 174 175 $js = ''; 176 $total = count($result); 177 for($i=0;$i<$total;$i++){ 178 $Day = wp_click_track_date_by_num($i); 179 $js .= "data.setValue($i, 0, '$Day');\ndata.setValue($i, 1, ".$result[$i].");\n"; 180 } 181 ?> 182 183 <script type="text/javascript"> 184 google.load("visualization", "1", {packages:["piechart"]}); 185 google.setOnLoadCallback(drawChart); 186 function drawChart() { 187 var data = new google.visualization.DataTable(); 188 data.addColumn('string', 'Day'); 189 data.addColumn('number', 'Clicks'); 190 data.addRows(<?php echo $total; ?>); 191 <?php echo $js; ?> 192 193 var chart = new google.visualization.PieChart(document.getElementById('day_chart_div')); 194 chart.draw(data, {width: 500, height: 400, is3D: true, title: 'Clicks By Day', backgroundColor: '#f9f9f9', legend: 'top', legendBackgroundColor: '#f1f1f1'}); 195 } 196 </script> 197 <div id="day_chart_div"></div> 198 <? 119 <?php 199 120 } 200 121 … … 209 130 <strong><p><?php echo $message; ?></p></strong> 210 131 </div> 211 <? 132 <?php 212 133 } 213 134 … … 258 179 <th nowrap>Total Clicks</th> 259 180 <th nowrap>Unique Clicks</th> 260 <? 181 <?php 261 182 if($date_ranges){ 262 183 ?> 263 184 <th nowrap>First Click</th> 264 185 <th nowrap>Last Click</th> 265 <? } ?>186 <?php } ?> 266 187 </thead> 267 <? 188 <?php 268 189 269 190 for($i=0;$i<$total;$i++){ … … 271 192 </tr> 272 193 <tr> 273 <td><a href="<? =$_SERVER['PHP_SELF'];?>?page=<?=$_REQUEST['page'];?>&link=<?=$result[$i]->link_id; ?>"><?php echo $result[$i]->link_title;?></a></td>194 <td><a href="<?php echo $_SERVER['PHP_SELF'];?>?page=<?php echo $_REQUEST['page'];?>&link=<?php echo $result[$i]->link_id; ?>"><?php echo $result[$i]->link_title;?></a></td> 274 195 <td><a href="<?php echo $result[$i]->link_destination;?>" target="_blank" title="<?php echo $result[$i]->link_title;?>"> 275 <? =(strlen($result[$i]->link_destination) >= 50 ? substr($result[$i]->link_destination,0,50).'...' : $result[$i]->link_destination);?></a></td>196 <?php echo (strlen($result[$i]->link_destination) >= 50 ? substr($result[$i]->link_destination,0,50).'...' : $result[$i]->link_destination);?></a></td> 276 197 <td><?php echo number_format_i18n($result[$i]->link_total_clicks);?></td> 277 198 <td><?php echo number_format_i18n($result[$i]->link_unique_clicks);?></td> 278 <? 199 <?php 279 200 if($date_ranges){ 280 201 ?> 281 202 <td nowrap><?php echo $date_ranges['first_click'];?></td> 282 203 <td nowrap><?php echo $date_ranges['last_click'];?></td> 283 <? } ?>204 <?php } ?> 284 205 </tr> 285 <? 206 <?php 286 207 } 287 208 ?> … … 290 211 </tbody> 291 212 </table> 292 <? 213 <?php 293 214 if($display_message){ 294 215 ?> 295 216 NOTE: Only links that have been clicked are above. 296 <? 217 <?php 297 218 } 298 219 } … … 306 227 307 228 if(substr($_SERVER['PHP_SELF'],-18) == 'wp-admin/index.php' || isset($_REQUEST['page']) && $_REQUEST['page'] == 'wp-click-track/click-tracker.php'){ 308 echo '<script type="text/javascript" src="http://www.google.com/jsapi"></script>';229 //echo '<script type="text/javascript" src="http://www.google.com/jsapi"></script>'; 309 230 } 310 231 } … … 332 253 $referr_data = $wpdb->get_results($sql); 333 254 $count = count($referr_data); 334 335 $page_links = paginate_links( array( 336 'base' => add_query_arg( 'ref_paged', '%#%#in_refer' ), 337 'format' => '', 338 'prev_text' => __('«'), 339 'next_text' => __('»'), 340 'total' => $numofpages, 341 'current' => $ref_paged 342 )); 343 344 if ( $page_links ) { 345 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 346 number_format_i18n( ( $ref_paged - 1 ) * $link_page_total + 1 ), 347 number_format_i18n( min( $ref_paged * $link_page_total, $total_refer ) ), 348 number_format_i18n( $total_refer ), 349 $page_links 350 ); 351 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 352 } 255 256 wp_click_track_pagination($numofpages, $ref_paged, $link_page_total, $total_refer, 'refer_data', 'ref_paged'); 257 353 258 ?> 354 259 </td></tr></table> … … 360 265 <th>Referrer</th> 361 266 <th>Date</th> 362 <? 267 <?php 363 268 if($count >= '1'){ 364 269 for($i=0;$i<$count;$i++){ … … 366 271 </tr> 367 272 <tr> 368 <td><a href=""><? =$referr_data[$i]->link_title;?></a></td>369 <td><a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><? =(strlen($referr_data[$i]->click_refer) >= 100 ? substr($referr_data[$i]->click_refer,0,100).'...' : $referr_data[$i]->click_refer);?></a></a></td>370 <td><? =mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->click_date);?></td>371 <? 273 <td><a href=""><?php echo $referr_data[$i]->link_title;?></a></td> 274 <td><a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><?php echo (strlen($referr_data[$i]->click_refer) >= 100 ? substr($referr_data[$i]->click_refer,0,100).'...' : $referr_data[$i]->click_refer);?></a></a></td> 275 <td><?php echo mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->click_date);?></td> 276 <?php 372 277 } 373 278 } else { … … 380 285 381 286 <?php 382 if ( $page_links ) { 383 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 384 number_format_i18n( ( $ref_paged - 1 ) * $link_page_total + 1 ), 385 number_format_i18n( min( $ref_paged * $link_page_total, $total_refer ) ), 386 number_format_i18n( $total_refer ), 387 $page_links 388 ); 389 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 390 } 287 wp_click_track_pagination($numofpages, $ref_paged, $link_page_total, $total_refer, 'refer_data', 'ref_paged'); 391 288 392 289 } … … 394 291 function wp_click_track_admin_list_link_page($link_id, $req, $page, $paged, $ref_paged) { 395 292 global $wpdb, $click_tracker_dist_get; 293 294 $message = FALSE; 295 $site_url = get_option( 'siteurl' ); 296 297 if(isset($_POST['reset_link_clicks']) && $_POST['reset_link_clicks'] == 'yes' && $link_id){ 298 299 $sql = "DELETE FROM ".$wpdb->prefix . "tracking_clicks WHERE link_id = '$link_id'"; 300 $wpdb->query($sql); 301 302 $sql = "UPDATE ".$wpdb->prefix . "tracking_links SET link_total_clicks = '0', link_unique_clicks = '0', last_modified = NOW() WHERE link_id = '$link_id'"; 303 $wpdb->query($sql); 304 305 $form_updated = TRUE; 306 $message = __('Clicks Deleted!','default'); 307 } 308 309 if(isset($_POST['reset_single_link']) && $_POST['reset_single_link'] == 'yes' && $link_id){ 310 311 $sql = "DELETE FROM ".$wpdb->prefix . "tracking_links WHERE link_id = '$link_id'"; 312 $wpdb->query($sql); 313 314 $sql = "DELETE FROM ".$wpdb->prefix . "tracking_clicks WHERE link_id = '$link_id'"; 315 $wpdb->query($sql); 316 317 $form_updated = TRUE; 318 $message = __('Link Deleted!','default'); 319 320 echo '<script type="text/javascript">window.location.replace("'.$site_url.$_SERVER['PHP_SELF'].'?page='.$_GET['page'].'&link_deleted=yes"); </script>'; 321 exit; 322 } 396 323 397 324 //base url for the admin page (build new links on top of) … … 409 336 410 337 $total = count($result); 411 412 $site_url = get_option( 'siteurl' );413 338 $dist_link = $site_url.'?'.$click_tracker_dist_get.'='.$link_id; 414 339 340 if($form_updated && $message){ 341 wp_click_track_admin_message( $message ); 342 } 415 343 ?> 416 344 … … 430 358 </tbody> 431 359 </table> 432 <? 360 <?php 433 361 echo '<h3>Link Data</h3>'; 434 362 wp_click_track_list_links($result, $total, $date_ranges, FALSE); 363 364 wp_click_track_admin_stats($link_id, 30); 435 365 436 366 echo '<table width="100%"><tr><td><a name="in_refer"></a><h3>Top Referrers</h3></td><td>'; … … 451 381 $count = count($referr_data); 452 382 453 $page_links = paginate_links( array( 454 'base' => add_query_arg( 'ref_paged', '%#%#in_refer' ), 455 'format' => '', 456 'prev_text' => __('«'), 457 'next_text' => __('»'), 458 'total' => $numofpages, 459 'current' => $ref_paged 460 )); 461 462 if ( $page_links ) { 463 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 464 number_format_i18n( ( $ref_paged - 1 ) * $link_page_total + 1 ), 465 number_format_i18n( min( $ref_paged * $link_page_total, $total_refer ) ), 466 number_format_i18n( $total_refer ), 467 $page_links 468 ); 469 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 470 } 383 wp_click_track_pagination($numofpages, $ref_paged, $link_page_total, $total_refer, 'in_refer', 'ref_paged'); 471 384 ?> 472 385 </td></tr></table> … … 477 390 <th>Count</th> 478 391 <th>Referrer</th> 479 <? 392 <?php 480 393 if($count >= '1'){ 481 394 for($i=0;$i<$count;$i++){ … … 483 396 </tr> 484 397 <tr> 485 <td><? =$referr_data[$i]->REFERCNT;?></td>486 <td><a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><? =(strlen($referr_data[$i]->click_refer) >= 125 ? substr($referr_data[$i]->click_refer,0,125).'...' : $referr_data[$i]->click_refer);?></a></a></td>487 <? 398 <td><?php echo $referr_data[$i]->REFERCNT;?></td> 399 <td><a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><?php echo (strlen($referr_data[$i]->click_refer) >= 125 ? substr($referr_data[$i]->click_refer,0,125).'...' : $referr_data[$i]->click_refer);?></a></a></td> 400 <?php 488 401 } 489 402 } else { … … 496 409 497 410 <?php 498 if ( $page_links ) { 499 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 500 number_format_i18n( ( $ref_paged - 1 ) * $link_page_total + 1 ), 501 number_format_i18n( min( $ref_paged * $link_page_total, $total_refer ) ), 502 number_format_i18n( $total_refer ), 503 $page_links 504 ); 505 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 506 } 411 wp_click_track_pagination($numofpages, $ref_paged, $link_page_total, $total_refer, 'in_refer', 'ref_paged'); 507 412 ?> 508 413 … … 524 429 $numofpages = ceil($total_clicks / $link_page_total); 525 430 526 527 $referr_data = $wpdb->get_results( "SELECT COUNT(click_ip) AS IPCNT,click_refer,MIN(click_date) AS min_date, MAX(click_date) AS max_date,click_ip FROM ".$wpdb->prefix."tracking_clicks WHERE link_id = '".$wpdb->escape($link_id)."' GROUP BY click_ip ORDER BY IPCNT DESC LIMIT $limitvalue,$link_page_total");431 $sql = "SELECT COUNT(click_ip) AS IPCNT,click_refer,MIN(click_date) AS min_date, MAX(click_date) AS max_date,click_ip FROM ".$wpdb->prefix."tracking_clicks WHERE link_id = '".$wpdb->escape($link_id)."' GROUP BY click_ip ORDER BY IPCNT DESC LIMIT $limitvalue,$link_page_total"; 432 $referr_data = $wpdb->get_results($sql); 528 433 $count = count($referr_data); 529 434 530 $page_links = paginate_links( array( 531 'base' => add_query_arg( 'paged', '%#%#in_clicks' ), 532 'format' => '', 533 'prev_text' => __('«'), 534 'next_text' => __('»'), 535 'total' => $numofpages, 536 'current' => $paged 537 )); 538 539 if ( $page_links ) { 540 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 541 number_format_i18n( ( $paged - 1 ) * $link_page_total + 1 ), 542 number_format_i18n( min( $paged * $link_page_total, $total_clicks ) ), 543 number_format_i18n( $total_clicks ), 544 $page_links 545 ); 546 547 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 548 } 435 436 wp_click_track_pagination($numofpages, $paged, $link_page_total, $total_clicks, 'in_clicks', 'paged'); 549 437 echo '</td></tr></table>'; 550 438 ?> … … 557 445 <th>Last Click</th> 558 446 <th>Referrer</th> 559 <? 447 <?php 560 448 if($count >= '1'){ 561 449 for($i=0;$i<$count;$i++){ … … 563 451 </tr> 564 452 <tr> 565 <td><? =$referr_data[$i]->IPCNT;?></td>566 <td><a href="<?php echo $page_url.'&ip='.ip2long($referr_data[$i]->click_ip); ?>"><? =$referr_data[$i]->click_ip;?></a></td>567 <td><? =mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->min_date);?></td>568 <td><? =mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->max_date);?></td>569 <td><?php if($referr_data[$i]->click_refer == ''){ echo 'N/A'; } else { ?> <a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><? =(strlen($referr_data[$i]->click_refer) >= 70 ? substr($referr_data[$i]->click_refer,0,70).'...' : $referr_data[$i]->click_refer);?></a><?} ?></td>453 <td><?php echo $referr_data[$i]->IPCNT;?></td> 454 <td><a href="<?php echo $page_url.'&ip='.ip2long($referr_data[$i]->click_ip); ?>"><?php echo $referr_data[$i]->click_ip;?></a></td> 455 <td><?php echo mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->min_date);?></td> 456 <td><?php echo mysql2date(get_option('date_format').' '.get_option('time_format'),$referr_data[$i]->max_date);?></td> 457 <td><?php if($referr_data[$i]->click_refer == ''){ echo 'N/A'; } else { ?> <a href="<?php echo $referr_data[$i]->click_refer;?>" target="_blank" title=""><?php echo (strlen($referr_data[$i]->click_refer) >= 70 ? substr($referr_data[$i]->click_refer,0,70).'...' : $referr_data[$i]->click_refer);?></a><?php } ?></td> 570 458 571 <? 459 <?php 572 460 } 573 461 } else { … … 578 466 </tbody> 579 467 </table> 580 <? 581 582 if ( $page_links ) { 583 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 584 number_format_i18n( ( $paged - 1 ) * $link_page_total + 1 ), 585 number_format_i18n( min( $paged * $link_page_total, $total_clicks ) ), 586 number_format_i18n( $total_clicks ), 587 $page_links 588 ); 589 590 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 591 } 592 593 $sql = "SELECT weekday(click_date) AS Day,COUNT(weekday(click_date)) AS CLICKCOUNT FROM `wp_tracking_clicks` WHERE link_id = '".$wpdb->escape($link_id)."' GROUP BY Day ORDER BY Day"; 594 $result = $wpdb->get_results($sql); 595 $total_days = count($result); 596 //unset($result); 597 598 echo '<h3>Clicks by Day</h3>'; 599 600 ?> 601 <table class="widefat comments-box " cellspacing="0"> 602 <thead> 603 <tr> 604 <th>Monday</th> 605 <th>Tuesday</th> 606 <th>Wednesday</th> 607 <th>Thursay</th> 608 <th>Friday</th> 609 <th>Saturday</th> 610 <th>Sunday</th> 611 </tr> 612 </thead> 613 <tr> 614 <?php 615 $day_results = array(); 616 for($i=0;$i<7;$i++){ 617 if(isset($result[$i]->Day)){ 618 $day_results[$result[$i]->Day] = $result[$i]->CLICKCOUNT; 619 } 620 } 621 for($i=0;$i<7;$i++){ 622 if(!array_key_exists($i,$day_results)){ 623 $day_results[$i] = 0; 624 } 625 echo '<td>'.number_format_i18n($day_results[$i]).'</td>'; 626 } ?> 627 </tr> 628 <tbody id="the-comment-list" class="list:comment"> 629 </tbody> 630 </table> 631 632 <? 633 634 $sql = "SELECT HOUR(click_date) AS Hour,COUNT(HOUR(click_date)) AS Clicks FROM `wp_tracking_clicks` WHERE link_id = '".$wpdb->escape($link_id)."' GROUP BY Hour ORDER BY Hour"; 635 $result = $wpdb->get_results($sql); 636 $total_hours = count($result); 637 //unset($result); 638 639 echo '<h3>Clicks by Hour</h3>'; 640 641 ?> 642 <table class="widefat comments-box " cellspacing="0"> 643 <thead> 644 <tr> 645 <? 646 $append = 'AM'; 647 for($i=0;$i<12;$i++){ 648 $hour = ($i == '0' ? '12' : $i); 649 echo "<th>$hour $append</th>"; 650 } 651 ?> 652 </tr> 653 <tr> 654 <? 655 for($i=0;$i<12;$i++){ 656 //check for hour ending 657 $Clicks = 0; 658 foreach($result AS $key => $value){ 659 if($i > 12){ 660 break; 661 } 662 663 if($value->Hour == $i){ 664 $Clicks = $value->Clicks; 665 } 666 } 667 ?> 668 <td><?=number_format_i18n($Clicks);?></td> 468 <?php 469 470 wp_click_track_pagination($numofpages, $paged, $link_page_total, $total_clicks, 'in_clicks', 'paged'); 471 472 ?> 473 <br /> 474 <table width="200" ><tr><td> 669 475 670 <? 671 } 672 ?> 673 </tr> 674 675 <tbody id="the-comment-list" class="list:comment"> 676 </tbody> 476 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>&link=<?php echo $link_id; ?>"> 477 <input type="hidden" name="reset_link_clicks" value="yes" \> 478 <input type="hidden" name="link" value="<?php echo $link_id; ?>" \> 479 <input type="submit" name="Submit" class="button-primary" value="Reset All Clicks" onclick="javascript: return confirm('Are you sure you want to reset all the clicks for this link? \nThis deletes all click records...')"/> 480 </form> 481 </td> 482 <td> 483 484 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>"> 485 <input type="hidden" name="reset_single_link" value="yes" \> 486 <input type="hidden" name="link" value="<?php echo $link_id; ?>" \> 487 <input type="submit" name="Submit" class="button-primary" value="Delete Link" onclick="javascript: return confirm('Are you sure you want to delete this link? \nThis can not be undone...')"/> 488 </form> 489 </td> 490 </tr> 677 491 </table> 678 679 <br \> 680 681 682 <table class="widefat comments-box " cellspacing="0"> 683 <thead> 684 <tr> 685 <? 686 $append = 'PM'; 687 for($i=0;$i<12;$i++){ 688 $hour = ($i == '0' ? '12' : $i); 689 echo "<th>$hour $append</th>"; 690 } 691 ?> 692 </tr> 693 <tr> 694 <? 695 for($i=0;$i<12;$i++){ 696 //check for hour ending 697 $Clicks = 0; 698 foreach($result AS $key => $value){ 699 700 if($value->Hour == $i+12){ 701 $Clicks = $value->Clicks; 702 } 703 } 704 ?> 705 <td><?=number_format_i18n($Clicks);?></td> 706 707 <? 708 } 709 ?> 710 </tr> 711 712 <tbody id="the-comment-list" class="list:comment"> 713 </tbody> 714 </table> 715 716 <table width="100%" align="center"> 717 <tr> 718 <td align="center"><? wp_click_track_display_pie_hour_chart($result); ?></td> 719 <td align="center"><? wp_click_track_display_pie_day_chart($day_results); ?></td> 720 </td> 721 </table> 722 723 <? 492 <br /> 493 <?php 724 494 } 725 495 … … 750 520 echo '</td><td align="right">'; 751 521 752 $page_links = paginate_links( array( 753 'base' => add_query_arg( 'paged', '%#%' ), 754 'format' => '', 755 'prev_text' => __('«'), 756 'next_text' => __('»'), 757 'total' => $numofpages, 758 'current' => $paged 759 )); 760 761 if ( $page_links ) { 762 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 763 number_format_i18n( ( $paged - 1 ) * $link_page_total + 1 ), 764 number_format_i18n( min( $paged * $link_page_total, $total_links ) ), 765 number_format_i18n( $total_links ), 766 $page_links 767 ); 768 769 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 770 } 522 wp_click_track_pagination($numofpages, $paged, $link_page_total, $total_links, '', 'paged'); 771 523 echo '</td></tr></table>'; 772 524 773 525 wp_click_track_list_links($result, $select_total,FALSE,FALSE); 774 526 775 if ( $page_links ) { 776 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 777 number_format_i18n( ( $paged - 1 ) * $link_page_total + 1 ), 778 number_format_i18n( min( $paged * $link_page_total, $total_links ) ), 779 number_format_i18n( $total_links ), 780 $page_links 781 ); 782 783 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 784 } 527 wp_click_track_pagination($numofpages, $paged, $link_page_total, $total_links, '', 'paged'); 785 528 786 529 } else { … … 794 537 </div> 795 538 796 <?797 798 $date = date("Y-m-d",mktime(0, 0, 0, date("m") , date("d")-30, date("Y")));799 $sql = "SELECT COUNT(tc.link_id) AS click_count, date_format(click_date,\"%Y-%m-%d\") AS click_date_f FROM wp_tracking_clicks tc, wp_tracking_links tl WHERE tc.link_id = tl.link_id AND date_format(click_date,\"%Y-%m-%d\") >= '$date' GROUP BY click_date_f ORDER BY click_date ";800 801 $result = $wpdb->get_results($sql);802 $total = count($result);803 $dates = array();804 $clicks = array();805 for($i=0;$i<$total;$i++){806 $dates[$i] = "data.setCell($i, 0, '".mysql2date(get_option('date_format'),$result[$i]->click_date_f)."');";807 $clicks[$i] = "data.setCell($i, 1, ".$result[$i]->click_count.");";808 }809 810 ?>811 <script type="text/javascript">812 google.load("visualization", "1", {packages:["linechart"]});813 google.setOnLoadCallback(drawChart);814 function drawChart() {815 var data = new google.visualization.DataTable();816 data.addColumn('string', 'Date');817 data.addColumn('number', 'Clicks');818 data.addRows(<?php echo $total; ?>);819 <?php echo implode("\n",$dates); ?>820 <?php echo implode("\n",$clicks); ?>821 822 823 var chart = new google.visualization.LineChart(document.getElementById('click_chart_div'));824 chart.draw(data, {width: 950, height: 300, legend: 'bottom', title: 'Click Tracks by Date'});825 }826 </script>827 828 <div id='click_chart_div' style='width: 650px; height: 240px;' align="center"></div>829 830 539 <div style="height:100px"></div> 831 <? 540 <?php 832 541 } 833 542 … … 838 547 global $wpdb; 839 548 840 $date = date("Y-m-d",mktime(0, 0, 0, date("m") , date("d")-14, date("Y"))); 841 $sql = "SELECT COUNT(tc.link_id) AS click_count, date_format(click_date,\"%Y-%m-%d\") AS click_date_f FROM wp_tracking_clicks tc, wp_tracking_links tl WHERE tc.link_id = tl.link_id AND date_format(click_date,\"%Y-%m-%d\") >= '$date' GROUP BY click_date_f ORDER BY click_date "; 842 843 $result = $wpdb->get_results($sql); 844 $total = count($result); 845 $dates = array(); 846 $clicks = array(); 847 for($i=0;$i<$total;$i++){ 848 $dates[$i] = "data.setCell($i, 0, '".mysql2date(get_option('date_format'),$result[$i]->click_date_f)."');"; 849 $clicks[$i] = "data.setCell($i, 1, ".$result[$i]->click_count.");"; 850 } 851 852 ?> 853 <script type="text/javascript"> 854 google.load("visualization", "1", {packages:["linechart"]}); 855 google.setOnLoadCallback(drawChart); 856 function drawChart() { 857 var data = new google.visualization.DataTable(); 858 data.addColumn('string', 'Date'); 859 data.addColumn('number', 'Clicks'); 860 data.addRows(<?php echo $total; ?>); 861 <?php echo implode("\n",$dates); ?> 862 <?php echo implode("\n",$clicks); ?> 863 864 865 var chart = new google.visualization.LineChart(document.getElementById('click_chart_div')); 866 chart.draw(data, {width: 500, height: 240, legend: 'bottom', title: 'Click Tracks by Date'}); 867 } 868 </script> 869 870 <div id='click_chart_div' style='width: 650px; height: 240px;'></div> 549 550 $site_url = get_option( 'siteurl' ); 551 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 552 open_flash_chart_object( 498, 225, $site_url .'/wp-admin/index.php?wp_ofc=true&range=14', FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 553 ?> 871 554 872 555 <div id="stats-info"> … … 890 573 <td width="50%" valign="top"><h4 class="heading">Todays Clicks</h4> 891 574 <?php 892 $sql = "SELECT COUNT(click_id) AS click_count, wp_tracking_clicks.link_id AS link_id, date_format(click_date,\"%Y-%m-%d\") AS click_date, link_title, link_destination, click_refer FROM wp_tracking_links,wp_tracking_clicks WHERE wp_tracking_links.link_id = wp_tracking_clicks.link_id AND date_format(click_date,\"%Y-%m-%d\") = '$date' AND click_refer != '' GROUP BY wp_tracking_clicks.link_id ORDER BY click_countLIMIT 8";575 $sql = "SELECT COUNT(click_id) AS click_count,".$wpdb->prefix."tracking_clicks.link_id AS link_id, date_format(click_date,\"%Y-%m-%d\") AS click_date, link_title, link_destination, click_refer FROM ".$wpdb->prefix."tracking_links,".$wpdb->prefix."tracking_clicks WHERE ".$wpdb->prefix."tracking_links.link_id = ".$wpdb->prefix."tracking_clicks.link_id AND date_format(click_date,\"%Y-%m-%d\") = '$date' AND click_refer != '' GROUP BY ".$wpdb->prefix."tracking_clicks.link_id ORDER BY click_count DESC LIMIT 8"; 893 576 894 577 $result = $wpdb->get_results($sql); … … 912 595 </div> 913 596 </div> 914 915 <? 916 //$clicks = wp_click_track_get_clicks(" tc, ".$wpdb->prefix."tracking_links tl WHERE tl.link_id = tc.link_id AND click_date " 597 <?php 598 } 599 600 function wp_click_track_apply_data_hack(){ 601 global $wpdb; 602 603 //check if hack has been applied yet. Get rid of user if it has... 604 $plugin_options = get_option('click_tracker'); 605 if(!array_key_exists('data_hack_applied',$plugin_options)){ 606 607 //grab all the unique links 608 //0 = unique; should be 1 609 $sql = "SELECT click_id FROM ".$wpdb->prefix."tracking_clicks WHERE unique_click = '0' "; 610 $result = $wpdb->get_results($sql); 611 $total = count($result); 612 613 //update all rows to be unique clicks 614 $sql = "UPDATE ".$wpdb->prefix."tracking_clicks SET unique_click = '0'"; 615 $execute = $wpdb->get_results($sql); 616 617 //now update the links in memory to be 618 for($i=0;$i<$total;$i++){ 619 $sql = "UPDATE ".$wpdb->prefix."tracking_clicks SET unique_click = '1' WHERE click_id = '".$result[$i]->click_id."'"; 620 621 //echo $sql.'<br>'; 622 $change_result = $wpdb->get_results($sql); 623 } 624 //exit; 625 } 917 626 } 918 627 -
wp-click-track/trunk/ajax.js
r107117 r130356 1 1 /* Simple AJAX Code-Kit (SACK) v1.6.1 */ 2 3 2 /* ©2005 Gregory Wild-Smith */ 4 5 3 /* www.twilightuniverse.com */ 6 7 4 /* Software licenced under a modified X11 licence, 8 9 5 see documentation or authors website for more details */ 10 6 11 12 13 7 function sack(file) { 14 15 8 this.xmlhttp = null; 16 9 17 18 19 10 this.resetData = function() { 20 21 11 this.method = "POST"; 22 23 12 this.queryStringSeparator = "?"; 24 25 13 this.argumentSeparator = "&"; 26 27 14 this.URLString = ""; 28 29 15 this.encodeURIString = true; 30 31 16 this.execute = false; 32 33 17 this.element = null; 34 35 18 this.elementObj = null; 36 37 19 this.requestFile = file; 38 39 20 this.vars = new Object(); 40 41 21 this.responseStatus = new Array(2); 42 43 22 }; 44 23 45 46 47 24 this.resetFunctions = function() { 48 49 25 this.onLoading = function() { }; 50 51 26 this.onLoaded = function() { }; 52 53 27 this.onInteractive = function() { }; 54 55 28 this.onCompletion = function() { }; 56 57 29 this.onError = function() { }; 58 59 30 this.onFail = function() { }; 60 61 31 }; 62 32 63 64 65 33 this.reset = function() { 66 67 34 this.resetFunctions(); 68 69 35 this.resetData(); 70 71 36 }; 72 37 38 this.createAJAX = function() { 39 try { 40 this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 41 } catch (e1) { 42 try { 43 this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 44 } catch (e2) { 45 this.xmlhttp = null; 46 } 47 } 73 48 49 if (! this.xmlhttp) { 50 if (typeof XMLHttpRequest != "undefined") { 51 this.xmlhttp = new XMLHttpRequest(); 52 } else { 53 this.failed = true; 54 } 55 } 56 }; 74 57 75 this.createAJAX = function() { 58 this.setVar = function(name, value){ 59 this.vars[name] = Array(value, false); 60 }; 76 61 77 try { 62 this.encVar = function(name, value, returnvars) { 63 if (true == returnvars) { 64 return Array(encodeURIComponent(name), encodeURIComponent(value)); 65 } else { 66 this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true); 67 } 68 } 78 69 79 this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 70 this.processURLString = function(string, encode) { 71 encoded = encodeURIComponent(this.argumentSeparator); 72 regexp = new RegExp(this.argumentSeparator + "|" + encoded); 73 varArray = string.split(regexp); 74 for (i = 0; i < varArray.length; i++){ 75 urlVars = varArray[i].split("="); 76 if (true == encode){ 77 this.encVar(urlVars[0], urlVars[1]); 78 } else { 79 this.setVar(urlVars[0], urlVars[1]); 80 } 81 } 82 } 80 83 81 } catch (e1) { 84 this.createURLString = function(urlstring) { 85 if (this.encodeURIString && this.URLString.length) { 86 this.processURLString(this.URLString, true); 87 } 82 88 83 try { 89 if (urlstring) { 90 if (this.URLString.length) { 91 this.URLString += this.argumentSeparator + urlstring; 92 } else { 93 this.URLString = urlstring; 94 } 95 } 84 96 85 this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 97 // prevents caching of URLString 98 this.setVar("rndval", new Date().getTime()); 86 99 87 } catch (e2) { 88 89 this.xmlhttp = null; 90 100 urlstringtemp = new Array(); 101 for (key in this.vars) { 102 if (false == this.vars[key][1] && true == this.encodeURIString) { 103 encoded = this.encVar(key, this.vars[key][0], true); 104 delete this.vars[key]; 105 this.vars[encoded[0]] = Array(encoded[1], true); 106 key = encoded[0]; 91 107 } 92 108 109 urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0]; 93 110 } 111 if (urlstring){ 112 this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator); 113 } else { 114 this.URLString += urlstringtemp.join(this.argumentSeparator); 115 } 116 } 94 117 118 this.runResponse = function() { 119 eval(this.response); 120 } 95 121 122 this.runAJAX = function(urlstring) { 123 if (this.failed) { 124 this.onFail(); 125 } else { 126 this.createURLString(urlstring); 127 if (this.element) { 128 this.elementObj = document.getElementById(this.element); 129 } 130 if (this.xmlhttp) { 131 var self = this; 132 if (this.method == "GET") { 133 totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString; 134 this.xmlhttp.open(this.method, totalurlstring, true); 135 } else { 136 this.xmlhttp.open(this.method, this.requestFile, true); 137 try { 138 this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") 139 } catch (e) { } 140 } 96 141 97 if (! this.xmlhttp) { 142 this.xmlhttp.onreadystatechange = function() { 143 switch (self.xmlhttp.readyState) { 144 case 1: 145 self.onLoading(); 146 break; 147 case 2: 148 self.onLoaded(); 149 break; 150 case 3: 151 self.onInteractive(); 152 break; 153 case 4: 154 self.response = self.xmlhttp.responseText; 155 self.responseXML = self.xmlhttp.responseXML; 156 self.responseStatus[0] = self.xmlhttp.status; 157 self.responseStatus[1] = self.xmlhttp.statusText; 98 158 99 if (typeof XMLHttpRequest != "undefined") { 159 if (self.execute) { 160 self.runResponse(); 161 } 100 162 101 this.xmlhttp = new XMLHttpRequest(); 163 if (self.elementObj) { 164 elemNodeName = self.elementObj.nodeName; 165 elemNodeName.toLowerCase(); 166 if (elemNodeName == "input" 167 || elemNodeName == "select" 168 || elemNodeName == "option" 169 || elemNodeName == "textarea") { 170 self.elementObj.value = self.response; 171 } else { 172 self.elementObj.innerHTML = self.response; 173 } 174 } 175 if (self.responseStatus[0] == "200") { 176 self.onCompletion(); 177 } else { 178 self.onError(); 179 } 102 180 103 } else { 181 self.URLString = ""; 182 break; 183 } 184 }; 104 185 105 this.failed = true; 106 186 this.xmlhttp.send(this.URLString); 107 187 } 108 109 188 } 110 111 189 }; 112 190 113 114 115 this.setVar = function(name, value){116 117 this.vars[name] = Array(value, false);118 119 };120 121 122 123 this.encVar = function(name, value, returnvars) {124 125 if (true == returnvars) {126 127 return Array(encodeURIComponent(name), encodeURIComponent(value));128 129 } else {130 131 this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);132 133 }134 135 }136 137 138 139 this.processURLString = function(string, encode) {140 141 encoded = encodeURIComponent(this.argumentSeparator);142 143 regexp = new RegExp(this.argumentSeparator + "|" + encoded);144 145 varArray = string.split(regexp);146 147 for (i = 0; i < varArray.length; i++){148 149 urlVars = varArray[i].split("=");150 151 if (true == encode){152 153 this.encVar(urlVars[0], urlVars[1]);154 155 } else {156 157 this.setVar(urlVars[0], urlVars[1]);158 159 }160 161 }162 163 }164 165 166 167 this.createURLString = function(urlstring) {168 169 if (this.encodeURIString && this.URLString.length) {170 171 this.processURLString(this.URLString, true);172 173 }174 175 176 177 if (urlstring) {178 179 if (this.URLString.length) {180 181 this.URLString += this.argumentSeparator + urlstring;182 183 } else {184 185 this.URLString = urlstring;186 187 }188 189 }190 191 192 193 // prevents caching of URLString194 195 this.setVar("rndval", new Date().getTime());196 197 198 199 urlstringtemp = new Array();200 201 for (key in this.vars) {202 203 if (false == this.vars[key][1] && true == this.encodeURIString) {204 205 encoded = this.encVar(key, this.vars[key][0], true);206 207 delete this.vars[key];208 209 this.vars[encoded[0]] = Array(encoded[1], true);210 211 key = encoded[0];212 213 }214 215 216 217 urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];218 219 }220 221 if (urlstring){222 223 this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);224 225 } else {226 227 this.URLString += urlstringtemp.join(this.argumentSeparator);228 229 }230 231 }232 233 234 235 this.runResponse = function() {236 237 eval(this.response);238 239 }240 241 242 243 this.runAJAX = function(urlstring) {244 245 if (this.failed) {246 247 this.onFail();248 249 } else {250 251 this.createURLString(urlstring);252 253 if (this.element) {254 255 this.elementObj = document.getElementById(this.element);256 257 }258 259 if (this.xmlhttp) {260 261 var self = this;262 263 if (this.method == "GET") {264 265 totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;266 267 this.xmlhttp.open(this.method, totalurlstring, true);268 269 } else {270 271 this.xmlhttp.open(this.method, this.requestFile, true);272 273 try {274 275 this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")276 277 } catch (e) { }278 279 }280 281 282 283 this.xmlhttp.onreadystatechange = function() {284 285 switch (self.xmlhttp.readyState) {286 287 case 1:288 289 self.onLoading();290 291 break;292 293 case 2:294 295 self.onLoaded();296 297 break;298 299 case 3:300 301 self.onInteractive();302 303 break;304 305 case 4:306 307 self.response = self.xmlhttp.responseText;308 309 self.responseXML = self.xmlhttp.responseXML;310 311 self.responseStatus[0] = self.xmlhttp.status;312 313 self.responseStatus[1] = self.xmlhttp.statusText;314 315 316 317 if (self.execute) {318 319 self.runResponse();320 321 }322 323 324 325 if (self.elementObj) {326 327 elemNodeName = self.elementObj.nodeName;328 329 elemNodeName.toLowerCase();330 331 if (elemNodeName == "input"332 333 || elemNodeName == "select"334 335 || elemNodeName == "option"336 337 || elemNodeName == "textarea") {338 339 self.elementObj.value = self.response;340 341 } else {342 343 self.elementObj.innerHTML = self.response;344 345 }346 347 }348 349 if (self.responseStatus[0] == "200") {350 351 self.onCompletion();352 353 } else {354 355 self.onError();356 357 }358 359 360 361 self.URLString = "";362 363 break;364 365 }366 367 };368 369 370 371 this.xmlhttp.send(this.URLString);372 373 }374 375 }376 377 };378 379 380 381 191 this.reset(); 382 383 192 this.createAJAX(); 384 385 193 } 386 -
wp-click-track/trunk/click-tracker.php
r111387 r130356 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0. 4.29 * @version 0.5 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 13 13 /* 14 14 Plugin Name: WP-Click-Tracker 15 Plugin URI: http://blog.ericlamb.net/ wp-click-track/15 Plugin URI: http://blog.ericlamb.net/projects/wp-click-track/ 16 16 Description: Tracks all links in posts. 17 Version: 0. 4.217 Version: 0.5 18 18 Author: Eric Lamb 19 19 Author URI: http://blog.ericlamb.net … … 36 36 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 37 37 */ 38 38 ///error_reporting(E_ALL); 39 39 /* 40 40 … … 48 48 * @global string $click_tracker_version 49 49 */ 50 $click_tracker_version = "0. 4.2";50 $click_tracker_version = "0.5"; 51 51 52 52 /** … … 90 90 function wp_click_tracker_extract_urls($content){ 91 91 92 preg_match_all('/<a[^>]+>/i',$content,$links_html); 92 preg_match_all('/<a (.*?)href=[\'\"](.*?)\/\/([^\'\"]+?)[\'\"](.*?)>(.*?)<\/a>/i',$content,$links_html); 93 //print_r($links_html); 93 94 $total = count($links_html['0']); 94 95 $links = array(); … … 107 108 $links[$i]['title'] = str_replace(array('"','\''),'',$link_meta['2']['0']); 108 109 } 110 111 //check if title is blank and try and extract the content 112 if(trim($links[$i]['title']) == ''){ 113 $links[$i]['title'] = strip_tags($links_html['0'][$i]); 114 } 109 115 } 110 116 return $links; … … 118 124 */ 119 125 function wp_click_tracker_replace_uris($content){ 126 global $click_tracker_dist_get; 120 127 121 128 $links = wp_click_tracker_extract_urls($content); … … 143 150 $parse_ok = FALSE; 144 151 } 152 153 if(strpos($_links[$i]['href'], $click_tracker_dist_get.'=') === TRUE){ //check if link is external click track 154 $parse_ok = FALSE; 155 } 145 156 146 157 if($parse_ok){ 147 $_new_links = $_links[$i]['href'].'" onclick=" javascript:TrackClick(\''.urlencode(trim($_links[$i]['href'])).'\',\''.urlencode(trim($_links[$i]['title'])).'\')"';158 $_new_links = $_links[$i]['href'].'" onclick="return TrackClick(\''.urlencode(trim($_links[$i]['href'])).'\',\''.urlencode(trim($_links[$i]['title'])).'\')"'; 148 159 $new_content = str_replace($_links[$i]['href'].'"',$_new_links,$new_content); 149 160 $new_content = str_replace($_links[$i]['href']."'",$_new_links,$new_content); … … 183 194 ajax[index].onCompletion = null; 184 195 ajax[index].runAJAX(); 185 return true; 196 197 //alert(ajax[index].requestFile); 198 return FALSE; 186 199 } 187 200 </script> … … 201 214 //$_GET['wp_click_tracked'] is used for internally created links 202 215 $forward_to_url = FALSE; 216 $track_click = TRUE; 203 217 if(isset($_GET['wp_click_tracked']) || isset($_GET[$click_tracker_dist_get])){ //looks like we have a tracking link... 204 218 205 if(isset($_GET[$click_tracker_dist_get])){ 219 if(isset($_GET[$click_tracker_dist_get]) ){ 220 221 206 222 207 223 $link_id = (int)$_GET[$click_tracker_dist_get]; … … 243 259 } 244 260 245 $click_refer = $_SERVER['HTTP_REFERER']; 246 $stat_ip = $_SERVER['REMOTE_ADDR']; 247 248 if(isset($_COOKIE["el_$link_id"])){ 249 250 $sql = "INSERT INTO ".$wpdb->prefix."tracking_clicks SET link_id = '".$wpdb->escape($link_id)."' , click_refer = '".$wpdb->escape($click_refer)."', unique_click = '1', click_date = now(), click_ip = '".$wpdb->escape($stat_ip)."'"; 251 $wpdb->query($sql); 252 253 $sql = "UPDATE ".$wpdb->prefix."tracking_links SET link_total_clicks = link_total_clicks+1 WHERE link_id = '".$wpdb->escape($link_id)."' "; 254 $wpdb->query($sql); 255 256 } else { 257 258 setcookie("el_$link_id", $link_id, time()+86400); 259 $sql = "UPDATE ".$wpdb->prefix."tracking_links SET link_total_clicks = link_total_clicks+1, link_unique_clicks = link_unique_clicks+1 WHERE link_id = '".$wpdb->escape($link_id)."' "; 260 $wpdb->query($sql); 261 262 $sql = "INSERT INTO ".$wpdb->prefix."tracking_clicks SET link_id = '".$wpdb->escape($link_id)."' , click_refer = '".$wpdb->escape($click_refer)."', unique_click = '0', click_date = now(), click_ip = '".$wpdb->escape($stat_ip)."'"; 263 $wpdb->query($sql); 264 261 $click_refer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : FALSE); 262 $stat_ip = (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : FALSE); 263 264 $plugin_options = get_option('click_tracker'); 265 266 if($plugin_options['track_user_clicks'] == '0'){ //check if we're supposed to track user clicks 267 if(is_user_logged_in()) { 268 $track_click = FALSE; 269 } 270 } 271 272 //check the IP address white listing 273 $wl_ips = array_map('trim',explode("\n", $plugin_options['exclude_ips'])); 274 if(in_array($stat_ip,$wl_ips)){ 275 $track_click = FALSE; 276 } 277 278 if($track_click){ 279 if(isset($_COOKIE["el_{$link_id}"])){ 280 281 $sql = "INSERT INTO ".$wpdb->prefix."tracking_clicks SET link_id = '".$wpdb->escape($link_id)."' , click_refer = '".$wpdb->escape($click_refer)."', unique_click = '0', click_date = now(), click_ip = '".$wpdb->escape($stat_ip)."'"; 282 $wpdb->query($sql); 283 284 $sql = "UPDATE ".$wpdb->prefix."tracking_links SET link_total_clicks = link_total_clicks+1 WHERE link_id = '".$wpdb->escape($link_id)."' "; 285 $wpdb->query($sql); 286 287 } else { 288 289 setcookie("el_$link_id", $link_id, time()+86400, SITECOOKIEPATH, COOKIE_DOMAIN, false, true); 290 291 $sql = "UPDATE ".$wpdb->prefix."tracking_links SET link_total_clicks = link_total_clicks+1, link_unique_clicks = link_unique_clicks+1 WHERE link_id = '".$wpdb->escape($link_id)."' "; 292 $wpdb->query($sql); 293 294 $sql = "INSERT INTO ".$wpdb->prefix."tracking_clicks SET link_id = '".$wpdb->escape($link_id)."' , click_refer = '".$wpdb->escape($click_refer)."', unique_click = '1', click_date = now(), click_ip = '".$wpdb->escape($stat_ip)."'"; 295 $wpdb->query($sql); 296 297 } 265 298 } 266 299 … … 297 330 <div class="inside"> 298 331 299 <? 332 <?php 300 333 $post_links = wp_click_tracker_extract_urls($result['0']->post_content); 301 334 $_check_urls = array(); … … 322 355 </div> 323 356 324 <? 357 <?php 325 358 } 326 359 … … 344 377 */ 345 378 function wp_click_tracker_options(){ 346 global $click_tracker_page_default ;379 global $click_tracker_page_default, $wpdb; 347 380 348 381 $plugin_data = get_plugin_data(__FILE__); 349 382 $plugin_options = get_option('click_tracker'); 383 350 384 $default = $click_tracker_page_default; 351 385 $form_updated = FALSE; 386 $reset_clicks = FALSE; 387 $reset_links = FALSE; 388 389 //exit; 352 390 $page = (isset($_REQUEST['page']) ? $_REQUEST['page'] : FALSE); 353 391 … … 355 393 356 394 357 $plugin_options['parse_the_content'] = (isset($_POST['parse_the_content']) && $_POST['parse_the_content'] == '1' ? $_POST['parse_the_content'] : '0'); 358 $plugin_options['parse_archive'] = (isset($_POST['parse_archive']) && $_POST['parse_archive'] == '1' ? $_POST['parse_archive'] : '0'); 359 $plugin_options['parse_blog_roll'] = (isset($_POST['parse_blog_roll']) && $_POST['parse_blog_roll'] == '1' ? $_POST['parse_blog_roll'] : '0'); 360 $plugin_options['parse_comment_author_link'] = (isset($_POST['parse_comment_author_link']) && $_POST['parse_comment_author_link'] == '1' ? $_POST['parse_comment_author_link'] : '0'); 361 $plugin_options['parse_the_excerpt'] = (isset($_POST['parse_the_excerpt']) && $_POST['parse_the_excerpt'] == '1' ? $_POST['parse_the_excerpt'] : '0'); 362 $plugin_options['parse_the_meta'] = (isset($_POST['parse_the_meta']) && $_POST['parse_the_meta'] == '1' ? $_POST['parse_the_meta'] : '0'); 363 $plugin_options['parse_comment_text'] = (isset($_POST['parse_comment_text']) && $_POST['parse_comment_text'] == '1' ? $_POST['parse_comment_text'] : '0'); 395 $plugin_options['parse_the_content'] = (int)(isset($_POST['parse_the_content']) && $_POST['parse_the_content'] == '1' ? $_POST['parse_the_content'] : '0'); 396 $plugin_options['parse_archive'] = (int)(isset($_POST['parse_archive']) && $_POST['parse_archive'] == '1' ? $_POST['parse_archive'] : '0'); 397 $plugin_options['parse_blog_roll'] = (int)(isset($_POST['parse_blog_roll']) && $_POST['parse_blog_roll'] == '1' ? $_POST['parse_blog_roll'] : '0'); 398 $plugin_options['parse_comment_author_link'] = (int)(isset($_POST['parse_comment_author_link']) && $_POST['parse_comment_author_link'] == '1' ? $_POST['parse_comment_author_link'] : '0'); 399 $plugin_options['parse_the_excerpt'] = (int)(isset($_POST['parse_the_excerpt']) && $_POST['parse_the_excerpt'] == '1' ? $_POST['parse_the_excerpt'] : '0'); 400 $plugin_options['parse_the_meta'] = (int)(isset($_POST['parse_the_meta']) && $_POST['parse_the_meta'] == '1' ? $_POST['parse_the_meta'] : '0'); 401 $plugin_options['parse_comment_text'] = (int)(isset($_POST['parse_comment_text']) && $_POST['parse_comment_text'] == '1' ? $_POST['parse_comment_text'] : '0'); 402 $plugin_options['parse_next_prev'] = (int)(isset($_POST['parse_next_prev']) && $_POST['parse_next_prev'] == '1' ? $_POST['parse_next_prev'] : '0'); 403 $plugin_options['parse_the_tags'] = (int)(isset($_POST['parse_the_tags']) && $_POST['parse_the_tags'] == '1' ? $_POST['parse_the_tags'] : '0'); 404 $plugin_options['parse_the_category'] = (int)(isset($_POST['parse_the_category']) && $_POST['parse_the_category'] == '1' ? $_POST['parse_the_category'] : '0'); 364 405 365 406 366 $plugin_options['click_count'] = (isset($_POST['click_count']) ? $_POST['click_count'] : $default); 367 $plugin_options['link_list_count'] = (isset($_POST['link_list_count']) ? $_POST['link_list_count'] : $default); 368 $plugin_options['referrer_count'] = (isset($_POST['referrer_count']) ? $_POST['referrer_count'] : $default); 407 $plugin_options['click_count'] = (int)(isset($_POST['click_count']) ? $_POST['click_count'] : $default); 408 $plugin_options['link_list_count'] = (int)(isset($_POST['link_list_count']) ? $_POST['link_list_count'] : $default); 409 $plugin_options['referrer_count'] = (int)(isset($_POST['referrer_count']) ? $_POST['referrer_count'] : $default); 410 411 $plugin_options['track_user_clicks'] = (int)(isset($_POST['track_user_clicks']) ? $_POST['track_user_clicks'] : '0'); 412 $plugin_options['exclude_ips'] = (isset($_POST['exclude_ips']) ? $_POST['exclude_ips'] : FALSE); 369 413 370 414 update_option('click_tracker', $plugin_options); 371 415 $plugin_options = get_option('click_tracker'); 372 416 $form_updated = TRUE; 417 $message = __($plugin_data['Name'].' settings updated!','default'); 418 } 419 420 if(isset($_POST['reset_clicks']) && $_POST['reset_clicks'] == 'yes'){ 421 $sql = "TRUNCATE ".$wpdb->prefix . "tracking_clicks"; 422 $wpdb->query($sql); 423 424 $sql = "UPDATE ".$wpdb->prefix . "tracking_links SET link_total_clicks = '0', link_unique_clicks = '0', last_modified = NOW()"; 425 $wpdb->query($sql); 426 427 $form_updated = TRUE; 428 $message = __('Clicks Reset!','default'); 429 } 430 431 if(isset($_POST['reset_links']) && $_POST['reset_links'] == 'yes'){ 432 $sql = "TRUNCATE ".$wpdb->prefix . "tracking_links"; 433 $wpdb->query($sql); 434 435 $sql = "TRUNCATE ".$wpdb->prefix . "tracking_clicks"; 436 $wpdb->query($sql); 437 438 $form_updated = TRUE; 439 $message = __('Links Reset!','default'); 373 440 } 374 441 375 442 ?> 376 443 <div class="wrap" id="sm_div"> 377 <form method="post" action="<? =$_SERVER['PHP_SELF']; ?>?page=<?=$_REQUEST['page'];?>">444 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>"> 378 445 <div id="icon-options-general" class="icon32"><br /></div> 379 446 … … 381 448 382 449 <?php 383 if($form_updated ){384 wp_click_track_admin_message( __($plugin_data['Name'].' settings updated!','default'));450 if($form_updated && $message){ 451 wp_click_track_admin_message( $message); 385 452 } 386 453 echo '<div align="right"> <a href="'.dirname($_SERVER['PHP_SELF']).'/plugins.php?page='.$page.'" class="button">'.__('View Links').'</a> <a href="'.dirname($_SERVER['PHP_SELF']).'/plugins.php?page='.$page.'&req=add" class="button">'.__('Add Link').'</a></div>'; … … 388 455 389 456 <h3>Parse Settings</h3> 390 <p>You can set <?php echo $plugin_data['Name']; ?> to automatically parse your posts and convert all links to click trackable links. It's pretty memory intensive and rigid though, so if you have poorly formed links it may cause your Wordpress setup to become unstable (it's still a beta afterall :).</p>457 <p>You can set <?php echo $plugin_data['Name']; ?> to automatically parse your posts and convert all links to click trackable links. </p> 391 458 392 459 <p>You can choose the individual areas you want to convert below: </p> … … 427 494 <td><label for="parse_blog_roll"><input name="parse_blog_roll" type="checkbox" id="parse_blog_roll" value="1" <?php echo ($plugin_options['parse_blog_roll'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links displayed in the Blog Roll Sidebar Widget </label></td> 428 495 </tr> 496 497 <tr valign="top"> 498 <th scope="row">Next / Prev</th> 499 <td><label for="parse_next_prev"><input name="parse_next_prev" type="checkbox" id="parse_next_prev" value="1" <?php echo ($plugin_options['parse_next_prev'] == '1' ? 'checked="checked"' : ''); ?> />Parse the Next and Previous links in the template (<code>previous_post_link()</code> and <code>next_post_link()</code> template functions)</label></td> 500 </tr> 501 502 <tr valign="top"> 503 <th scope="row">Footer Tags</th> 504 <td><label for="parse_the_tags"><input name="parse_the_tags" type="checkbox" id="parse_the_tags" value="1" <?php echo ($plugin_options['parse_the_tags'] == '1' ? 'checked="checked"' : ''); ?> />Parse the tags links on posts and pages</label></td> 505 </tr> 506 507 <tr valign="top"> 508 <th scope="row">Category Links</th> 509 <td><label for="parse_the_category"><input name="parse_the_category" type="checkbox" id="parse_the_category" value="1" <?php echo ($plugin_options['parse_the_category'] == '1' ? 'checked="checked"' : ''); ?> />Parse the category links on posts and pages as well as sidebar widget</label></td> 510 </tr> 429 511 </table> 430 512 … … 432 514 <p>Choose how many items you want displayed in the admin for <?php echo $plugin_data['Name']; ?>. This REALLY helps when you have a lot of items to display.</p> 433 515 434 <p>NOTE: Anything but a positive number will result in the default of <?php $default; ?> being used.</p>516 <p>NOTE: Anything but a positive number will result in the default of <?php echo $default; ?> being used.</p> 435 517 436 518 <table class="form-table"> … … 448 530 <th scope="row">Link List Count</th> 449 531 <td><label for="link_list_count"><input name="link_list_count" type="text" id="link_list_count" value="<?php echo $plugin_options['link_list_count']; ?>" class="small-text" /></label></td> 532 </tr> 533 </table> 534 535 <h3>Tracking Settings</h3> 536 <p>The below settings only affect how the tracking system works.</p> 537 <table class="form-table"> 538 <tr valign="top"> 539 <th scope="row">User Clicks</th> 540 <td><label for="track_user_clicks"><input name="track_user_clicks" type="checkbox" id="track_user_clicks" value="1" <?php echo ($plugin_options['track_user_clicks'] == '1' ? 'checked="checked"' : ''); ?> /> Track clicks of logged in members. </label></td> 541 </tr> 542 <th scope="row">Ignore IPs</th> 543 <td><label for="exclude_ips"><textarea name="exclude_ips" rows="8" cols="40"><?php echo $plugin_options['exclude_ips']; ?></textarea><br />Put 1 IP address per line. These IP addresses won't be tracked.</label></td> 450 544 </tr> 451 545 </table> … … 459 553 460 554 </form> 555 556 <h3>System Reset</h3> 557 <p>Use these functions at your own risk; there is no way to recover the data if you change your mind later.</p> 558 <table width="200" ><tr><td> 559 560 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>"> 561 <input type="hidden" name="reset_clicks" value="yes" \> 562 <input type="submit" name="Submit" class="button-primary" value="Reset All Clicks" onclick="javascript: return confirm('Are you sure you want to reset all the clicks? \nThis deletes all click records for all links...')"/> 563 </form> 564 </td> 565 <td> 566 567 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>"> 568 <input type="hidden" name="reset_links" value="yes" \> 569 <input type="submit" name="Submit" class="button-primary" value="Delete All Links" onclick="javascript: return confirm('Are you sure you want to delete all the links? \nThis deletes the clicks as well so you\'ll lose everything...')"/> 570 </form> 571 </td> 572 </tr> 573 </table> 574 461 575 </div> 462 576 463 <? 577 <?php 464 578 } 465 579 … … 471 585 function wp_click_tracker_admin_module() { 472 586 global $click_tracker_db_version,$wpdb,$link_page_total; 587 473 588 $new_version = TRUE; 474 589 $plugin_data = get_plugin_data(__FILE__); … … 489 604 ?> 490 605 <div class="wrap" id="sm_div"> 491 <form method="post" action="<? =$_SERVER['PHP_SELF']; ?>?page=<?=$_REQUEST['page'];?>">606 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo $_REQUEST['page'];?>"> 492 607 <div id="icon-link-manager" class="icon32"><br /></div> 493 608 <h2><?php echo $plugin_data['Name']; ?> <?php echo $plugin_data['Version']; ?></h2> 494 <? 609 <?php 495 610 496 611 //check if an update has been issued … … 510 625 $google_options = get_option('GoogleAnalyticsPP'); 511 626 if(isset($google_options['trackoutbound']) && $google_options['trackoutbound'] == '1'){ 512 wp_click_track_admin_message( __('It looks like you have Google Analytics for WordPress installed with Track Outbound links enabled. This can cause issues with '.$plugin_data['Name'].' '.$plugin_data['Version'].'. < /p><p>Click <a href="'.$_SERVER['PHP_SELF'].'?page='.$_REQUEST['page'].'&req=ga_outbound">here</a> to disable.','default'));627 wp_click_track_admin_message( __('It looks like you have Google Analytics for WordPress installed with Track Outbound links enabled. This can cause issues with '.$plugin_data['Name'].' '.$plugin_data['Version'].'. <p>Click <a href="'.$_SERVER['PHP_SELF'].'?page='.$_REQUEST['page'].'&req=ga_outbound">here</a> to disable.','default')); 513 628 } 514 629 … … 529 644 break; 530 645 531 } 646 case 'data_hack_done': 647 wp_click_track_admin_message( __('Data Hack Applied.','wp_click_tracker')); 648 break; 649 650 } 651 } 652 653 //check if the data has been fixed yet. 654 $plugin_options = get_option('click_tracker'); 655 if(!array_key_exists('data_hack_applied',$plugin_options)){ 656 wp_click_track_admin_message( __('It looks like your data hasn\'t been updated to match the new system. Click <a href="'.$_SERVER['PHP_SELF'].'?page='.$_REQUEST['page'].'&req=apply_data_hack">here</a> to do that now.','default')); 532 657 } 533 658 … … 535 660 echo '<div align="right">'; 536 661 537 if($link_id || $req == 'add' || $req == 'edit'){538 echo ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'" class="button">'.__('List Links').'</a> '; 539 }662 echo ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&req=main" class="button">'.__('Main').'</a> '; 663 664 echo ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&req=list_links" class="button">'.__('List Links').'</a> '; 540 665 541 666 if($link_id && $req != 'edit'){ … … 547 672 } 548 673 674 549 675 echo ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&req=add" class="button">'.__('Add Link').'</a> <a href="'.dirname($_SERVER['PHP_SELF']).'/options-general.php?page='.$page.'" class="button">'.__('Configure').'</a></div>'; 550 676 … … 571 697 break; 572 698 699 case 'list_links': 700 701 wp_click_track_admin_list_links($req, $page, $paged, $ref_paged); 702 703 break; 704 573 705 default: 574 706 … … 586 718 } else { 587 719 588 wp_click_track_admin_list_links($req, $page, $paged, $ref_paged); 720 wp_click_track_admin_main($req, $page, $paged, $ref_paged); 721 //wp_click_track_admin_list_links($req, $page, $paged, $ref_paged); 589 722 590 723 } … … 594 727 } 595 728 729 730 function wp_click_track_admin_main($req, $page, $paged, $ref_paged){ 731 global $wpdb; 732 733 $date = (isset($_GET['date']) ? $_GET['date'] : date("Y-m-d")); 734 echo '<h3>Clicks on '.mysql2date(get_option('date_format'),$date).'</h3>'; 735 736 $sql = "SELECT COUNT(click_id) AS link_total_clicks,".$wpdb->prefix."tracking_clicks.link_id AS link_id, date_format(click_date,\"%Y-%m-%d\") AS click_date, link_title, link_destination, click_refer FROM ".$wpdb->prefix."tracking_links,".$wpdb->prefix."tracking_clicks WHERE ".$wpdb->prefix."tracking_links.link_id = ".$wpdb->prefix."tracking_clicks.link_id AND date_format(click_date,\"%Y-%m-%d\") = '$date' GROUP BY ".$wpdb->prefix."tracking_clicks.link_id ORDER BY link_total_clicks DESC "; 737 738 $result = $wpdb->get_results($sql); 739 $total = count($result); 740 741 $sql = "SELECT COUNT(click_id) AS link_unique_clicks FROM ".$wpdb->prefix."tracking_clicks WHERE date_format(click_date,\"%Y-%m-%d\") = '$date' AND unique_click = '1' GROUP BY ".$wpdb->prefix."tracking_clicks.link_id ORDER BY link_unique_clicks DESC "; 742 743 $uniques = $wpdb->get_results($sql); 744 for($i=0;$i<$total;$i++){ 745 $result[$i]->link_unique_clicks = $uniques[$i]->link_unique_clicks; 746 } 747 748 wp_click_track_list_links($result, $total, FALSE, FALSE); 749 750 wp_click_track_admin_stats(FALSE, $range = 30); 751 } 752 753 function wp_click_track_admin_stats($link_id = FALSE, $range = 30) { 754 755 ?> 756 <h3>Statistics</h3> 757 <table class="widefat comments-box " cellspacing="0"> 758 <thead> 759 <tr> 760 <th>Recent</th> 761 </tr> 762 <tr> 763 <td> 764 <table width="100%" align="center"> 765 <tr><td colspan="2"> 766 <?php 767 $site_url = get_option( 'siteurl' ); 768 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 769 open_flash_chart_object( '100%', 225, $site_url .'/wp-admin/index.php?wp_ofc=true&range='.$range.'&link='.$link_id, FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 770 ?> 771 </td></tr> 772 </table> 773 </tr> 774 775 <tbody id="the-comment-list" class="list:comment"> 776 </tbody> 777 </table> 778 779 <br /> 780 <table class="widefat comments-box " cellspacing="0"> 781 <thead> 782 <tr> 783 <th width="50%">Clicks By Hour</th> 784 <th width="50%">Clicks By Day</th> 785 </tr> 786 <tr> 787 <td align="center"> 788 <?php 789 $site_url = get_option( 'siteurl' ); 790 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 791 open_flash_chart_object( '500', '400', $site_url .'/wp-admin/index.php?wp_ofc=pie&type=hour&link='.$link_id, FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 792 ?> 793 </td> 794 <td align="center"> 795 <?php 796 $site_url = get_option( 'siteurl' ); 797 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 798 open_flash_chart_object( '500', '400', $site_url .'/wp-admin/index.php?wp_ofc=pie&type=day&link='.$link_id, FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 799 ?> 800 </td> 801 </td> 802 </table> 803 804 <br /> 805 <table class="widefat comments-box " cellspacing="0"> 806 <thead> 807 <tr> 808 <th>History</th> 809 </tr> 810 <tr> 811 <td> 812 <table width="100%" align="center"> 813 <tr><td colspan="2"> 814 <?php 815 $site_url = get_option( 'siteurl' ); 816 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 817 open_flash_chart_object( '100%', 225, $site_url .'/wp-admin/index.php?wp_ofc=bar_3d&range='.$range.'&link='.$link_id, FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 818 ?> 819 </td></tr> 820 </table> 821 </tr> 822 823 <tbody id="the-comment-list" class="list:comment"> 824 </tbody> 825 </table> 826 827 <?php 828 829 } 596 830 /** 597 831 * Returns the clicks … … 664 898 } 665 899 } 900 901 //we might also be doing a data upgrade from the STUPID bungling I did on the data format. Fuck I'm sorry... 902 if(isset($_REQUEST['req']) && $_REQUEST['req'] == 'apply_data_hack'){ 903 904 wp_click_track_apply_data_hack(); 905 $plugin_options = get_option('click_tracker'); 906 $plugin_options['data_hack_applied'] = 'yes'; 907 update_option('click_tracker', $plugin_options); 908 909 header('Location: '.$_SERVER['PHP_SELF'].'?page='.$_REQUEST['page'].'&msg=data_hack_done'); 910 exit; 911 } 912 } 913 914 function wp_click_tracker_get_graph_stats(){ 915 global $wpdb; 916 917 if(isset($_GET['wp_ofc'])){ 918 $reporting_included = TRUE; 919 include 'reporting.php'; 920 exit; 921 } 922 666 923 } 667 924 … … 676 933 } 677 934 935 function wp_click_track_pagination($numofpages = 1, $ref_paged = 1, $link_page_total = 1, $total = 1, $anchor = FALSE, $paging_var = 'ref_paged'){ 936 937 $page_links = paginate_links( array( 938 'base' => add_query_arg( $paging_var, '%#%#'.$anchor ), 939 'format' => '', 940 'prev_text' => __('«'), 941 'next_text' => __('»'), 942 'total' => $numofpages, 943 'current' => $ref_paged 944 )); 945 946 if ( $page_links ) { 947 $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s', 948 number_format_i18n( ( $ref_paged - 1 ) * $link_page_total + 1 ), 949 number_format_i18n( min( $ref_paged * $link_page_total, $total ) ), 950 number_format_i18n( $total ), 951 $page_links 952 ); 953 echo "<div class='tablenav'><div class='tablenav-pages'>$page_links_text</div></div>"; 954 } 955 956 } 678 957 register_activation_hook(__FILE__,'wp_click_tracker_install'); 679 958 register_deactivation_hook(__FILE__, 'wp_click_tracker_deactivate'); … … 689 968 add_action('init','wp_click_tracker_go'); 690 969 add_action('admin_init','wp_click_tracker_mod_go'); 970 add_action('admin_init','wp_click_tracker_get_graph_stats'); 691 971 692 972 $ct_options = get_option('click_tracker'); … … 718 998 add_filter('comment_text', 'wp_click_tracker_filter', 9); 719 999 } 1000 1001 if(array_key_exists('parse_next_prev',$ct_options) && $ct_options['parse_next_prev'] == '1'){ 1002 add_filter('next_post_link', 'wp_click_tracker_filter', 9); 1003 add_filter('previous_post_link', 'wp_click_tracker_filter', 9); 1004 } 1005 1006 if(array_key_exists('parse_the_tags',$ct_options) && $ct_options['parse_the_tags'] == '1'){ 1007 add_filter('the_tags', 'wp_click_tracker_filter', 9); 1008 } 1009 1010 if(array_key_exists('parse_the_category',$ct_options) && $ct_options['parse_the_category'] == '1'){ 1011 add_filter('the_category', 'wp_click_tracker_filter', 9); 1012 add_filter('wp_list_categories', 'wp_click_tracker_filter', 9); 1013 } 1014 720 1015 unset($ct_options); 721 1016 -
wp-click-track/trunk/contextual_help.php
r111387 r130356 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0. 4.19 * @version 0.5 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. -
wp-click-track/trunk/install.inc.php
r111392 r130356 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0. 49 * @version 0.5 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 100 100 101 101 //set the defaults 102 $options['version'] = '0. 4.2';102 $options['version'] = '0.5'; 103 103 $options['db_version'] = '0.2'; 104 104 … … 115 115 $options['parse_the_meta'] = '1'; 116 116 $options['parse_comment_text'] = '1'; 117 $options['parse_next_prev'] = '1'; 118 $options['parse_the_tags'] = '1'; 119 $options['parse_the_category'] = '1'; 120 121 $options['track_user_clicks'] = '1'; 117 122 118 123 add_option("click_tracker", $options); -
wp-click-track/trunk/license.txt
r107117 r130356 1 1 GNU GENERAL PUBLIC LICENSE 2 3 2 Version 2, June 1991 4 3 5 6 7 4 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 8 9 5 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 10 6 11 12 13 7 Everyone is permitted to copy and distribute verbatim copies 14 15 8 of this license document, but changing it is not allowed. 16 9 17 18 19 10 Preamble 20 11 21 22 23 12 The licenses for most software are designed to take away your 24 25 13 freedom to share and change it. By contrast, the GNU General Public 26 27 14 License is intended to guarantee your freedom to share and change free 28 29 15 software--to make sure the software is free for all its users. This 30 31 16 General Public License applies to most of the Free Software 32 33 17 Foundation's software and to any other program whose authors commit to 34 35 18 using it. (Some other Free Software Foundation software is covered by 36 37 19 the GNU Library General Public License instead.) You can apply it to 38 39 20 your programs, too. 40 21 41 42 43 22 When we speak of free software, we are referring to freedom, not 44 45 23 price. Our General Public Licenses are designed to make sure that you 46 47 24 have the freedom to distribute copies of free software (and charge for 48 49 25 this service if you wish), that you receive source code or can get it 50 51 26 if you want it, that you can change the software or use pieces of it 52 53 27 in new free programs; and that you know you can do these things. 54 28 55 56 57 29 To protect your rights, we need to make restrictions that forbid 58 59 30 anyone to deny you these rights or to ask you to surrender the rights. 60 61 31 These restrictions translate to certain responsibilities for you if you 62 63 32 distribute copies of the software, or if you modify it. 64 33 65 66 67 34 For example, if you distribute copies of such a program, whether 68 69 35 gratis or for a fee, you must give the recipients all the rights that 70 71 36 you have. You must make sure that they, too, receive or can get the 72 73 37 source code. And you must show them these terms so they know their 74 75 38 rights. 76 39 77 78 79 40 We protect your rights with two steps: (1) copyright the software, and 80 81 41 (2) offer you this license which gives you legal permission to copy, 82 83 42 distribute and/or modify the software. 84 43 85 86 87 44 Also, for each author's protection and ours, we want to make certain 88 89 45 that everyone understands that there is no warranty for this free 90 91 46 software. If the software is modified by someone else and passed on, we 92 93 47 want its recipients to know that what they have is not the original, so 94 95 48 that any problems introduced by others will not reflect on the original 96 97 49 authors' reputations. 98 50 99 100 101 51 Finally, any free program is threatened constantly by software 102 103 52 patents. We wish to avoid the danger that redistributors of a free 104 105 53 program will individually obtain patent licenses, in effect making the 106 107 54 program proprietary. To prevent this, we have made it clear that any 108 109 55 patent must be licensed for everyone's free use or not licensed at all. 110 56 111 112 113 57 The precise terms and conditions for copying, distribution and 114 115 58 modification follow. 116 59 117 118 119 60 GNU GENERAL PUBLIC LICENSE 120 121 61 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 122 62 123 124 125 63 0. This License applies to any program or other work which contains 126 127 64 a notice placed by the copyright holder saying it may be distributed 128 129 65 under the terms of this General Public License. The "Program", below, 130 131 66 refers to any such program or work, and a "work based on the Program" 132 133 67 means either the Program or any derivative work under copyright law: 134 135 68 that is to say, a work containing the Program or a portion of it, 136 137 69 either verbatim or with modifications and/or translated into another 138 139 70 language. (Hereinafter, translation is included without limitation in 140 141 71 the term "modification".) Each licensee is addressed as "you". 142 72 143 144 145 73 Activities other than copying, distribution and modification are not 146 147 74 covered by this License; they are outside its scope. The act of 148 149 75 running the Program is not restricted, and the output from the Program 150 151 76 is covered only if its contents constitute a work based on the 152 153 77 Program (independent of having been made by running the Program). 154 155 78 Whether that is true depends on what the Program does. 156 79 157 158 159 80 1. You may copy and distribute verbatim copies of the Program's 160 161 81 source code as you receive it, in any medium, provided that you 162 163 82 conspicuously and appropriately publish on each copy an appropriate 164 165 83 copyright notice and disclaimer of warranty; keep intact all the 166 167 84 notices that refer to this License and to the absence of any warranty; 168 169 85 and give any other recipients of the Program a copy of this License 170 171 86 along with the Program. 172 87 173 174 175 88 You may charge a fee for the physical act of transferring a copy, and 176 177 89 you may at your option offer warranty protection in exchange for a fee. 178 90 179 180 181 91 2. You may modify your copy or copies of the Program or any portion 182 183 92 of it, thus forming a work based on the Program, and copy and 184 185 93 distribute such modifications or work under the terms of Section 1 186 187 94 above, provided that you also meet all of these conditions: 188 95 189 190 191 96 a) You must cause the modified files to carry prominent notices 192 193 97 stating that you changed the files and the date of any change. 194 98 195 196 197 99 b) You must cause any work that you distribute or publish, that in 198 199 100 whole or in part contains or is derived from the Program or any 200 201 101 part thereof, to be licensed as a whole at no charge to all third 202 203 102 parties under the terms of this License. 204 103 205 206 207 104 c) If the modified program normally reads commands interactively 208 209 105 when run, you must cause it, when started running for such 210 211 106 interactive use in the most ordinary way, to print or display an 212 213 107 announcement including an appropriate copyright notice and a 214 215 108 notice that there is no warranty (or else, saying that you provide 216 217 109 a warranty) and that users may redistribute the program under 218 219 110 these conditions, and telling the user how to view a copy of this 220 221 111 License. (Exception: if the Program itself is interactive but 222 223 112 does not normally print such an announcement, your work based on 224 225 113 the Program is not required to print an announcement.) 226 114 227 228 229 115 These requirements apply to the modified work as a whole. If 230 231 116 identifiable sections of that work are not derived from the Program, 232 233 117 and can be reasonably considered independent and separate works in 234 235 118 themselves, then this License, and its terms, do not apply to those 236 237 119 sections when you distribute them as separate works. But when you 238 239 120 distribute the same sections as part of a whole which is a work based 240 241 121 on the Program, the distribution of the whole must be on the terms of 242 243 122 this License, whose permissions for other licensees extend to the 244 245 123 entire whole, and thus to each and every part regardless of who wrote it. 246 247 124 Thus, it is not the intent of this section to claim rights or contest 248 249 125 your rights to work written entirely by you; rather, the intent is to 250 251 126 exercise the right to control the distribution of derivative or 252 253 127 collective works based on the Program. 254 128 255 256 257 129 In addition, mere aggregation of another work not based on the Program 258 259 130 with the Program (or with a work based on the Program) on a volume of 260 261 131 a storage or distribution medium does not bring the other work under 262 263 132 the scope of this License. 264 133 265 266 267 134 3. You may copy and distribute the Program (or a work based on it, 268 269 135 under Section 2) in object code or executable form under the terms of 270 271 136 Sections 1 and 2 above provided that you also do one of the following: 272 137 273 274 275 138 a) Accompany it with the complete corresponding machine-readable 276 277 139 source code, which must be distributed under the terms of Sections 278 279 140 1 and 2 above on a medium customarily used for software interchange; or, 280 141 281 282 283 142 b) Accompany it with a written offer, valid for at least three 284 285 143 years, to give any third party, for a charge no more than your 286 287 144 cost of physically performing source distribution, a complete 288 289 145 machine-readable copy of the corresponding source code, to be 290 291 146 distributed under the terms of Sections 1 and 2 above on a medium 292 293 147 customarily used for software interchange; or, 294 148 295 296 297 149 c) Accompany it with the information you received as to the offer 298 299 150 to distribute corresponding source code. (This alternative is 300 301 151 allowed only for noncommercial distribution and only if you 302 303 152 received the program in object code or executable form with such 304 305 153 an offer, in accord with Subsection b above.) 306 154 307 308 309 155 The source code for a work means the preferred form of the work for 310 311 156 making modifications to it. For an executable work, complete source 312 313 157 code means all the source code for all modules it contains, plus any 314 315 158 associated interface definition files, plus the scripts used to 316 317 159 control compilation and installation of the executable. However, as a 318 319 160 special exception, the source code distributed need not include 320 321 161 anything that is normally distributed (in either source or binary 322 323 162 form) with the major components (compiler, kernel, and so on) of the 324 325 163 operating system on which the executable runs, unless that component 326 327 164 itself accompanies the executable. 328 165 329 330 331 166 If distribution of executable or object code is made by offering 332 333 167 access to copy from a designated place, then offering equivalent 334 335 168 access to copy the source code from the same place counts as 336 337 169 distribution of the source code, even though third parties are not 338 339 170 compelled to copy the source along with the object code. 340 171 341 342 343 172 4. You may not copy, modify, sublicense, or distribute the Program 344 345 173 except as expressly provided under this License. Any attempt 346 347 174 otherwise to copy, modify, sublicense or distribute the Program is 348 349 175 void, and will automatically terminate your rights under this License. 350 351 176 However, parties who have received copies, or rights, from you under 352 353 177 this License will not have their licenses terminated so long as such 354 355 178 parties remain in full compliance. 356 179 357 358 359 180 5. You are not required to accept this License, since you have not 360 361 181 signed it. However, nothing else grants you permission to modify or 362 363 182 distribute the Program or its derivative works. These actions are 364 365 183 prohibited by law if you do not accept this License. Therefore, by 366 367 184 modifying or distributing the Program (or any work based on the 368 369 185 Program), you indicate your acceptance of this License to do so, and 370 371 186 all its terms and conditions for copying, distributing or modifying 372 373 187 the Program or works based on it. 374 188 375 376 377 189 6. Each time you redistribute the Program (or any work based on the 378 379 190 Program), the recipient automatically receives a license from the 380 381 191 original licensor to copy, distribute or modify the Program subject to 382 383 192 these terms and conditions. You may not impose any further 384 385 193 restrictions on the recipients' exercise of the rights granted herein. 386 387 194 You are not responsible for enforcing compliance by third parties to 388 389 195 this License. 390 196 391 392 393 197 7. If, as a consequence of a court judgment or allegation of patent 394 395 198 infringement or for any other reason (not limited to patent issues), 396 397 199 conditions are imposed on you (whether by court order, agreement or 398 399 200 otherwise) that contradict the conditions of this License, they do not 400 401 201 excuse you from the conditions of this License. If you cannot 402 403 202 distribute so as to satisfy simultaneously your obligations under this 404 405 203 License and any other pertinent obligations, then as a consequence you 406 407 204 may not distribute the Program at all. For example, if a patent 408 409 205 license would not permit royalty-free redistribution of the Program by 410 411 206 all those who receive copies directly or indirectly through you, then 412 413 207 the only way you could satisfy both it and this License would be to 414 415 208 refrain entirely from distribution of the Program. 416 209 417 418 419 210 If any portion of this section is held invalid or unenforceable under 420 421 211 any particular circumstance, the balance of the section is intended to 422 423 212 apply and the section as a whole is intended to apply in other 424 425 213 circumstances. 426 214 427 428 429 215 It is not the purpose of this section to induce you to infringe any 430 431 216 patents or other property right claims or to contest validity of any 432 433 217 such claims; this section has the sole purpose of protecting the 434 435 218 integrity of the free software distribution system, which is 436 437 219 implemented by public license practices. Many people have made 438 439 220 generous contributions to the wide range of software distributed 440 441 221 through that system in reliance on consistent application of that 442 443 222 system; it is up to the author/donor to decide if he or she is willing 444 445 223 to distribute software through any other system and a licensee cannot 446 447 224 impose that choice. 448 225 449 450 451 226 This section is intended to make thoroughly clear what is believed to 452 453 227 be a consequence of the rest of this License. 454 228 455 456 457 229 8. If the distribution and/or use of the Program is restricted in 458 459 230 certain countries either by patents or by copyrighted interfaces, the 460 461 231 original copyright holder who places the Program under this License 462 463 232 may add an explicit geographical distribution limitation excluding 464 465 233 those countries, so that distribution is permitted only in or among 466 467 234 countries not thus excluded. In such case, this License incorporates 468 469 235 the limitation as if written in the body of this License. 470 236 471 472 473 237 9. The Free Software Foundation may publish revised and/or new versions 474 475 238 of the General Public License from time to time. Such new versions will 476 477 239 be similar in spirit to the present version, but may differ in detail to 478 479 240 address new problems or concerns. 480 241 481 482 483 242 Each version is given a distinguishing version number. If the Program 484 485 243 specifies a version number of this License which applies to it and "any 486 487 244 later version", you have the option of following the terms and conditions 488 489 245 either of that version or of any later version published by the Free 490 491 246 Software Foundation. If the Program does not specify a version number of 492 493 247 this License, you may choose any version ever published by the Free Software 494 495 248 Foundation. 496 249 497 498 499 250 10. If you wish to incorporate parts of the Program into other free 500 501 251 programs whose distribution conditions are different, write to the author 502 503 252 to ask for permission. For software which is copyrighted by the Free 504 505 253 Software Foundation, write to the Free Software Foundation; we sometimes 506 507 254 make exceptions for this. Our decision will be guided by the two goals 508 509 255 of preserving the free status of all derivatives of our free software and 510 511 256 of promoting the sharing and reuse of software generally. 512 257 513 514 515 258 NO WARRANTY 516 259 517 518 519 260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 520 521 261 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 522 523 262 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 524 525 263 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 526 527 264 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 528 529 265 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 530 531 266 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 532 533 267 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 534 535 268 REPAIR OR CORRECTION. 536 269 537 538 539 270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 540 541 271 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 542 543 272 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 544 545 273 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 546 547 274 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 548 549 275 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 550 551 276 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 552 553 277 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 554 555 278 POSSIBILITY OF SUCH DAMAGES. 556 279 557 558 559 280 END OF TERMS AND CONDITIONS 560 281 561 562 -
wp-click-track/trunk/readme.txt
r111390 r130356 38 38 * export data<br /> 39 39 * search link data<br /> 40 * view IP address click path report<br />41 40 * link list sorting<br /> 42 41 * referrer link list grouping<br /> 43 42 * link stat reset<br /> 44 * system data reset<br />45 43 46 44 **Bugs**<br /> … … 50 48 51 49 **Changelog**<br /> 50 0.5 :: <br /> 51 * Modification * 52 <br />Added settings to disable user clicks 53 <br />Added ignore IP address for click tracking 54 <br />Added link statistics reset 55 <br />Changed graphs to Open Flash Chart 56 <br />Added additional line chart vectors to display unique clicks 57 <br />Added link parsing of next and prev template tags 58 <br />Added link parsing of categories in posts/pages as well as sidebar widget 59 <br />Added link parsing of tags links template 60 <br />Improved title extraction to reduce No Name Given auto-label 61 <br />Added global history and report page 62 * Bug Fixes * 63 <br />Click graph date descrepancy issue 64 <br />Added bypass for external links being double tracked when entered in page 65 <br />Fixed backwards tracking flags 66 <br />Changed admin widget ordering to list most clicked to least click 67 <br /> 68 52 69 0.4.2 :: <br /> 53 70 * Modification *
Note: See TracChangeset
for help on using the changeset viewer.