Changeset 131640
- Timestamp:
- 07/02/2009 11:53:29 PM (17 years ago)
- Location:
- wp-click-track/trunk
- Files:
-
- 4 edited
-
admin.inc.php (modified) (4 diffs)
-
click-tracker.php (modified) (13 diffs)
-
install.inc.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-click-track/trunk/admin.inc.php
r130356 r131640 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0.5 9 * @version 0.5.1 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 293 293 294 294 $message = FALSE; 295 $site_url = get_option( 'siteurl');295 $site_url = wp_click_track_get_siteurl(); 296 296 297 297 if(isset($_POST['reset_link_clicks']) && $_POST['reset_link_clicks'] == 'yes' && $link_id){ … … 548 548 549 549 550 $site_url = get_option( 'siteurl');550 $site_url = wp_click_track_get_siteurl(); 551 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/');552 open_flash_chart_object( 498, 225, $site_url .'/wp-admin/index.php?wp_ofc=true&range=30', FALSE, $site_url.'/wp-content/plugins/wp-click-track/open-flash-chart/'); 553 553 ?> 554 554 … … 564 564 //print_r($top_links); 565 565 $total = count($top_links); 566 $site_url = get_option( 'siteurl');566 $site_url = wp_click_track_get_siteurl(); 567 567 for($i=0;$i<$total;$i++){ 568 568 echo '<a href="'.$site_url.'/wp-admin/plugins.php?page=wp-click-track/click-tracker.php&link='.$top_links[$i]->link_id.'" title="'.$top_links[$i]->link_title.'">'.$top_links[$i]->link_title.'</a><br />'; -
wp-click-track/trunk/click-tracker.php
r130356 r131640 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0.5 9 * @version 0.5.1 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 15 15 Plugin URI: http://blog.ericlamb.net/projects/wp-click-track/ 16 16 Description: Tracks all links in posts. 17 Version: 0.5 17 Version: 0.5.1 18 18 Author: Eric Lamb 19 19 Author URI: http://blog.ericlamb.net … … 48 48 * @global string $click_tracker_version 49 49 */ 50 $click_tracker_version = "0.5 ";50 $click_tracker_version = "0.5.1"; 51 51 52 52 /** … … 178 178 //get the full URL to the site (0.4 fix) 179 179 180 $site_url = get_option( 'siteurl');180 $site_url = wp_click_track_get_siteurl(); 181 181 //$file = plugin_basename(__FILE__); 182 182 … … 403 403 $plugin_options['parse_the_tags'] = (int)(isset($_POST['parse_the_tags']) && $_POST['parse_the_tags'] == '1' ? $_POST['parse_the_tags'] : '0'); 404 404 $plugin_options['parse_the_category'] = (int)(isset($_POST['parse_the_category']) && $_POST['parse_the_category'] == '1' ? $_POST['parse_the_category'] : '0'); 405 406 407 405 $plugin_options['click_count'] = (int)(isset($_POST['click_count']) ? $_POST['click_count'] : $default); 408 406 $plugin_options['link_list_count'] = (int)(isset($_POST['link_list_count']) ? $_POST['link_list_count'] : $default); 409 407 $plugin_options['referrer_count'] = (int)(isset($_POST['referrer_count']) ? $_POST['referrer_count'] : $default); 410 408 $plugin_options['bypass_site_url'] = (isset($_POST['bypass_site_url']) ? $_POST['bypass_site_url'] : FALSE); 411 409 $plugin_options['track_user_clicks'] = (int)(isset($_POST['track_user_clicks']) ? $_POST['track_user_clicks'] : '0'); 412 410 $plugin_options['exclude_ips'] = (isset($_POST['exclude_ips']) ? $_POST['exclude_ips'] : FALSE); … … 461 459 <table class="form-table"> 462 460 <tr valign="top"> 463 <th scope="row"> Post</th>464 <td>< label for="parse_the_content"><input name="parse_the_content" type="checkbox" id="parse_the_content" value="1" <?php echo ($plugin_options['parse_the_content'] == '1' ? 'checked="checked"' : ''); ?> />Parse the actual content of a post. </label></td>465 </tr> 466 467 <tr valign="top"> 468 <th scope="row"> Post Excerpt</th>469 <td>< label for="parse_the_excerpt"><input name="parse_the_excerpt" type="checkbox" id="parse_the_excerpt" value="1" <?php echo ($plugin_options['parse_the_excerpt'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the excerpt portion of posts</label></td>470 </tr> 471 472 <tr valign="top"> 473 <th scope="row"> Post Meta</th>474 <td>< label for="parse_the_meta"><input name="parse_the_meta" type="checkbox" id="parse_the_meta" value="1" <?php echo ($plugin_options['parse_the_meta'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the meta portion of posts</label></td>475 </tr> 476 477 <tr valign="top"> 478 <th scope="row"> Comment Body</th>479 <td>< label for="parse_comment_text"><input name="parse_comment_text" type="checkbox" id="parse_comment_text" value="1" <?php echo ($plugin_options['parse_comment_text'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in post comments</label></td>480 </tr> 481 482 <tr valign="top"> 483 <th scope="row"> Comment Author Link</th>484 <td>< label for="parse_comment_author_link"><input name="parse_comment_author_link" type="checkbox" id="parse_comment_author_link" value="1" <?php echo ($plugin_options['parse_comment_author_link'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the comment author name (in comments) </label></td>485 </tr> 486 487 <tr valign="top"> 488 <th scope="row"> Archive Widget</th>489 <td>< label for="parse_archive"><input name="parse_archive" type="checkbox" id="parse_archive" value="1" <?php echo ($plugin_options['parse_archive'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links displayed in the Archive Sidebar Widget </label></td>490 </tr> 491 492 <tr valign="top"> 493 <th scope="row"> Blog Roll Widget</th>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>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>461 <th scope="row"><label for="parse_the_content">Post </label></th> 462 <td><input name="parse_the_content" type="checkbox" id="parse_the_content" value="1" <?php echo ($plugin_options['parse_the_content'] == '1' ? 'checked="checked"' : ''); ?> />Parse the actual content of a post.</td> 463 </tr> 464 465 <tr valign="top"> 466 <th scope="row"><label for="parse_the_excerpt">Post Excerpt</label></th> 467 <td><input name="parse_the_excerpt" type="checkbox" id="parse_the_excerpt" value="1" <?php echo ($plugin_options['parse_the_excerpt'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the excerpt portion of posts</td> 468 </tr> 469 470 <tr valign="top"> 471 <th scope="row"><label for="parse_the_meta">Post Meta</label></th> 472 <td><input name="parse_the_meta" type="checkbox" id="parse_the_meta" value="1" <?php echo ($plugin_options['parse_the_meta'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the meta portion of posts</td> 473 </tr> 474 475 <tr valign="top"> 476 <th scope="row"><label for="parse_comment_text">Comment Body</label></th> 477 <td><input name="parse_comment_text" type="checkbox" id="parse_comment_text" value="1" <?php echo ($plugin_options['parse_comment_text'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in post comments</td> 478 </tr> 479 480 <tr valign="top"> 481 <th scope="row"><label for="parse_comment_author_link">Comment Author Link</label></th> 482 <td><input name="parse_comment_author_link" type="checkbox" id="parse_comment_author_link" value="1" <?php echo ($plugin_options['parse_comment_author_link'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links used in the comment author name (in comments)</td> 483 </tr> 484 485 <tr valign="top"> 486 <th scope="row"><label for="parse_archive">Archive Widget</label></th> 487 <td><input name="parse_archive" type="checkbox" id="parse_archive" value="1" <?php echo ($plugin_options['parse_archive'] == '1' ? 'checked="checked"' : ''); ?> />Parse the links displayed in the Archive Sidebar Widget </td> 488 </tr> 489 490 <tr valign="top"> 491 <th scope="row"><label for="parse_blog_roll">Blog Roll Widget</label></th> 492 <td><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 </td> 493 </tr> 494 495 <tr valign="top"> 496 <th scope="row"><label for="parse_next_prev">Next / Prev</label></th> 497 <td><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)</td> 498 </tr> 499 500 <tr valign="top"> 501 <th scope="row"><label for="parse_the_tags">Footer Tags</label></th> 502 <td><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</td> 503 </tr> 504 505 <tr valign="top"> 506 <th scope="row"><label for="parse_the_category">Category Links</label></th> 507 <td><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</td> 510 508 </tr> 511 509 </table> … … 518 516 <table class="form-table"> 519 517 <tr valign="top"> 520 <th scope="row"> Referrer Count</th>521 <td>< label for="referrer_count"><input name="referrer_count" type="text" id="referrer_count" value="<?php echo $plugin_options['referrer_count']; ?>" class="small-text" /></label></td>522 </tr> 523 524 <tr valign="top"> 525 <th scope="row"> Click Count</th>526 <td>< label for="click_count"><input name="click_count" type="text" id="click_count" value="<?php echo $plugin_options['click_count']; ?>" class="small-text" /></label></td>527 </tr> 528 529 <tr valign="top"> 530 <th scope="row"> Link List Count</th>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>518 <th scope="row"><label for="referrer_count">Referrer Count</label></th> 519 <td><input name="referrer_count" type="text" id="referrer_count" value="<?php echo $plugin_options['referrer_count']; ?>" class="small-text" /></td> 520 </tr> 521 522 <tr valign="top"> 523 <th scope="row"><label for="click_count">Click Count</label></th> 524 <td><input name="click_count" type="text" id="click_count" value="<?php echo $plugin_options['click_count']; ?>" class="small-text" /></td> 525 </tr> 526 527 <tr valign="top"> 528 <th scope="row"><label for="link_list_count">Link List Count</label></th> 529 <td><input name="link_list_count" type="text" id="link_list_count" value="<?php echo $plugin_options['link_list_count']; ?>" class="small-text" /></td> 532 530 </tr> 533 531 </table> … … 537 535 <table class="form-table"> 538 536 <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>537 <th scope="row"><label for="track_user_clicks">User Clicks</label></th> 538 <td><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. </td> 539 </tr> 540 <th scope="row"><label for="exclude_ips">Ignore IPs</label></th> 541 <td><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.</td> 544 542 </tr> 545 543 </table> 544 545 <h3>Miscellaneous Settings</h3> 546 <p>The below is useful to over-ride some of the settings for the tracker if your blog doesn't use the "default" setup for WordPress. If you require a special setting please let me know and I'll set this up ASAP.</p> 547 548 <table class="form-table"> 549 550 <tr valign="top"> 551 <th scope="row"><label for="bypass_site_url">Bypass Site URL</label></th> 552 <td><input name="bypass_site_url" type="text" id="bypass_site_url" value="<?php echo $plugin_options['bypass_site_url']; ?>" class="large-text" size="40"/> 553 <br />Example: <code>http://blog.ericlamb.net/</code> — don’t forget the <code>http://</code></td> 554 </tr> 555 </table> 556 557 546 558 547 559 … … 765 777 <tr><td colspan="2"> 766 778 <?php 767 $site_url = get_option( 'siteurl');779 $site_url = wp_click_track_get_siteurl(); 768 780 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 769 781 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/'); … … 787 799 <td align="center"> 788 800 <?php 789 $site_url = get_option( 'siteurl');801 $site_url = wp_click_track_get_siteurl(); 790 802 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 791 803 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/'); … … 794 806 <td align="center"> 795 807 <?php 796 $site_url = get_option( 'siteurl');808 $site_url = wp_click_track_get_siteurl(); 797 809 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 798 810 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/'); … … 813 825 <tr><td colspan="2"> 814 826 <?php 815 $site_url = get_option( 'siteurl');827 $site_url = wp_click_track_get_siteurl(); 816 828 include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php'; 817 829 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/'); … … 931 943 932 944 return $link_id; 945 } 946 947 948 function wp_click_track_get_siteurl(){ 949 950 $plugin_options = get_option('click_tracker'); 951 if(array_key_exists('bypass_site_url',$plugin_options) && $plugin_options['bypass_site_url'] != ''){ 952 return $plugin_options['bypass_site_url']; 953 } else { 954 return get_option( 'siteurl' ); 955 } 956 933 957 } 934 958 -
wp-click-track/trunk/install.inc.php
r130356 r131640 7 7 * @author Eric Lamb <[email protected]> 8 8 * @package wp-click-tracker 9 * @version 0.5 9 * @version 0.5.1 10 10 * @filesource 11 11 * @copyright 2009 Eric Lamb. … … 100 100 101 101 //set the defaults 102 $options['version'] = '0.5 ';102 $options['version'] = '0.5.1'; 103 103 $options['db_version'] = '0.2'; 104 104 … … 120 120 121 121 $options['track_user_clicks'] = '1'; 122 123 $options['bypass_site_url'] = ''; 122 124 123 125 add_option("click_tracker", $options); -
wp-click-track/trunk/readme.txt
r130476 r131640 49 49 50 50 **Changelog**<br /> 51 0.5.1 :: <br /> 52 * Modification * 53 <br />Added Miscellaneous Settings (Sarah Mod) 54 <br />Changed admin widget date range to match WordPress.com Stats widget 55 <br /> 56 *Bug Fixes * 57 <br />Fixed 'label' in configure page form 58 51 59 0.5 :: <br /> 52 60 * Modification *
Note: See TracChangeset
for help on using the changeset viewer.