Plugin Directory

Changeset 131640


Ignore:
Timestamp:
07/02/2009 11:53:29 PM (17 years ago)
Author:
mithra62
Message:

Import of 0.5.1
Added custom siteurl setting
Modified admin widget to use 30 day range
Fixed form labels on config page

Location:
wp-click-track/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-click-track/trunk/admin.inc.php

    r130356 r131640  
    77 * @author Eric Lamb <[email protected]>
    88 * @package    wp-click-tracker
    9  * @version 0.5
     9 * @version 0.5.1
    1010 * @filesource
    1111 * @copyright 2009 Eric Lamb.
     
    293293
    294294    $message = FALSE;
    295     $site_url = get_option( 'siteurl' );
     295    $site_url = wp_click_track_get_siteurl();
    296296
    297297    if(isset($_POST['reset_link_clicks']) && $_POST['reset_link_clicks'] == 'yes' && $link_id){
     
    548548
    549549
    550     $site_url = get_option( 'siteurl' );
     550    $site_url = wp_click_track_get_siteurl();
    551551    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/');
    553553    ?>
    554554
     
    564564        //print_r($top_links);
    565565        $total = count($top_links);
    566         $site_url = get_option( 'siteurl' );
     566        $site_url = wp_click_track_get_siteurl();
    567567        for($i=0;$i<$total;$i++){
    568568            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  
    77 * @author Eric Lamb <[email protected]>
    88 * @package    wp-click-tracker
    9  * @version 0.5
     9 * @version 0.5.1
    1010 * @filesource
    1111 * @copyright 2009 Eric Lamb.
     
    1515Plugin URI: http://blog.ericlamb.net/projects/wp-click-track/
    1616Description: Tracks all links in posts.
    17 Version: 0.5
     17Version: 0.5.1
    1818Author: Eric Lamb
    1919Author URI: http://blog.ericlamb.net
     
    4848 * @global string   $click_tracker_version
    4949 */
    50 $click_tracker_version = "0.5";
     50$click_tracker_version = "0.5.1";
    5151
    5252/**
     
    178178    //get the full URL to the site (0.4 fix)
    179179   
    180     $site_url = get_option( 'siteurl' );
     180    $site_url = wp_click_track_get_siteurl();
    181181    //$file = plugin_basename(__FILE__);
    182182   
     
    403403        $plugin_options['parse_the_tags'] = (int)(isset($_POST['parse_the_tags']) && $_POST['parse_the_tags'] == '1' ? $_POST['parse_the_tags'] : '0');
    404404        $plugin_options['parse_the_category'] = (int)(isset($_POST['parse_the_category']) && $_POST['parse_the_category'] == '1' ? $_POST['parse_the_category'] : '0');
    405        
    406 
    407405        $plugin_options['click_count'] = (int)(isset($_POST['click_count']) ? $_POST['click_count'] : $default);
    408406        $plugin_options['link_list_count'] = (int)(isset($_POST['link_list_count']) ? $_POST['link_list_count'] : $default);
    409407        $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);
    411409        $plugin_options['track_user_clicks'] = (int)(isset($_POST['track_user_clicks']) ? $_POST['track_user_clicks'] : '0');
    412410        $plugin_options['exclude_ips'] = (isset($_POST['exclude_ips']) ? $_POST['exclude_ips'] : FALSE);
     
    461459            <table class="form-table">
    462460            <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>
    510508            </tr>           
    511509            </table>
     
    518516            <table class="form-table">
    519517            <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>
    532530            </tr>
    533531            </table>
     
    537535            <table class="form-table">
    538536            <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>
    544542            </tr>
    545543            </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> &#8212; don&#8217;t forget the <code>http://</code></td>
     554            </tr>
     555            </table>
     556
     557           
    546558
    547559
     
    765777        <tr><td colspan="2">
    766778        <?php
    767             $site_url = get_option( 'siteurl' );
     779            $site_url = wp_click_track_get_siteurl();
    768780            include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php';
    769781            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/');
     
    787799            <td align="center">
    788800                <?php 
    789                 $site_url = get_option( 'siteurl' );
     801                $site_url = wp_click_track_get_siteurl();
    790802                include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php';
    791803                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/');
     
    794806            <td align="center">
    795807                <?php 
    796                 $site_url = get_option( 'siteurl' );
     808                $site_url = wp_click_track_get_siteurl();
    797809                include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php';
    798810                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/');
     
    813825        <tr><td colspan="2">
    814826        <?php
    815             $site_url = get_option( 'siteurl' );
     827            $site_url = wp_click_track_get_siteurl();
    816828            include_once dirname(__FILE__).'/open-flash-chart/php-ofc-library/open_flash_chart_object.php';
    817829            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/');
     
    931943
    932944    return $link_id;
     945}
     946
     947
     948function 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
    933957}
    934958
  • wp-click-track/trunk/install.inc.php

    r130356 r131640  
    77 * @author Eric Lamb <[email protected]>
    88 * @package    wp-click-tracker
    9  * @version 0.5
     9 * @version 0.5.1
    1010 * @filesource
    1111 * @copyright 2009 Eric Lamb.
     
    100100   
    101101    //set the defaults
    102     $options['version'] = '0.5';
     102    $options['version'] = '0.5.1';
    103103    $options['db_version'] = '0.2';
    104104
     
    120120
    121121    $options['track_user_clicks'] = '1';
     122
     123    $options['bypass_site_url'] = '';
    122124
    123125    add_option("click_tracker", $options);
  • wp-click-track/trunk/readme.txt

    r130476 r131640  
    4949
    5050**Changelog**<br />
     510.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
    51590.5 :: <br />
    5260* Modification *
Note: See TracChangeset for help on using the changeset viewer.