Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin - Version 1.4.52

Version Description

  • Fixed bugs related to the cloaking and pretty bar redirection changes
Download this release

Release Info

Developer supercleanse
Plugin Icon 128x128 Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin
Version 1.4.52
Comparing to
See all releases

Code changes from version 1.4.51 to 1.4.52

classes/models/PrliUtils.php CHANGED
@@ -205,7 +205,7 @@ class PrliUtils
205
  // This is where the magic happens!
206
  function track_link($slug,$values)
207
  {
208
- global $wpdb, $prli_click, $prli_link;
209
 
210
  $query = "SELECT * FROM ".$prli_link->table_name." WHERE slug='$slug' LIMIT 1";
211
  $pretty_link = $wpdb->get_row($query);
@@ -294,30 +294,22 @@ class PrliUtils
294
 
295
  switch($pretty_link->redirect_type)
296
  {
297
- /*
298
- case 'pixel':
299
- header("HTTP/1.1 200 OK");
300
- break;
301
- case 'prettybar':
302
- global $prli_blogurl;
303
- header("HTTP/1.1 200 OK");
304
- require_once PRLI_VIEWS_PATH . '/prli-links/bar.php';
305
- break;
306
- case 'cloak':
307
- header("HTTP/1.1 200 OK");
308
- require_once PRLI_VIEWS_PATH . '/prli-links/ultra-cloak.php';
309
- break;
310
- */
311
  case '301':
312
  header("HTTP/1.1 301 Moved Permanently");
313
  header('Location: '.$pretty_link_url.$param_string);
314
  break;
315
  default:
316
- if($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0')
317
- header("HTTP/1.1 302 Found");
 
 
 
 
 
 
 
318
  else
319
- header("HTTP/1.1 307 Temporary Redirect");
320
- header('Location: '.$pretty_link_url.$param_string);
321
  }
322
  }
323
 
205
  // This is where the magic happens!
206
  function track_link($slug,$values)
207
  {
208
+ global $wpdb, $prli_click, $prli_link, $prli_update;
209
 
210
  $query = "SELECT * FROM ".$prli_link->table_name." WHERE slug='$slug' LIMIT 1";
211
  $pretty_link = $wpdb->get_row($query);
294
 
295
  switch($pretty_link->redirect_type)
296
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  case '301':
298
  header("HTTP/1.1 301 Moved Permanently");
299
  header('Location: '.$pretty_link_url.$param_string);
300
  break;
301
  default:
302
+ if( $pretty_link->redirect_type == '307' or
303
+ !$prli_update->pro_is_installed_and_authorized() )
304
+ {
305
+ if($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0')
306
+ header("HTTP/1.1 302 Found");
307
+ else
308
+ header("HTTP/1.1 307 Temporary Redirect");
309
+ header('Location: '.$pretty_link_url.$param_string);
310
+ }
311
  else
312
+ do_action('prli_issue_cloaked_redirect', $pretty_link->redirect_type, $pretty_link_url, $param_string);
 
313
  }
314
  }
315
 
classes/views/prli-links/form.php CHANGED
@@ -49,13 +49,13 @@
49
  <select id="redirect_type" name="redirect_type" style="padding: 0px; margin: 0px;">
50
  <option value="307"<?php echo $values['redirect_type']['307']; ?>>307 (Temporary)&nbsp;</option>
51
  <option value="301"<?php echo $values['redirect_type']['301']; ?>>301 (Permanent)&nbsp;</option>
52
- <!--
53
- <option value="prettybar"<?php echo $values['redirect_type']['prettybar']; ?>>Pretty Bar&nbsp;</option>
54
- <option value="cloak"<?php echo $values['redirect_type']['cloak']; ?>>Cloaked&nbsp;</option>
55
- <option value="pixel"<?php echo $values['redirect_type']['pixel']; ?>>Pixel&nbsp;</option>
56
- -->
57
  </select><a class="toggle">&nbsp;[?]</a>
58
  <div class="toggle_pane description"><strong>307 Redirection</strong> is the best option if your Target URL could possibly change or need accurate reporting for this link.<br/><br/><strong>301 Redirection</strong> is the best option if you're <strong>NOT</strong> planning on changing your Target URL. Traditionally this option is considered to be the best approach to use for your SEO/SEM efforts but since Pretty Link uses your domain name either way this notion isn't necessarily true for Pretty Links. Also, this option may not give you accurate reporting since proxy and caching servers may go directly to your Target URL once it's cached.<br/><br/><strong>Pretty Bar Redirection</strong> is the best option if you want to show the Pretty Bar at the top of the page when redirecting to the Target URL.<br/><br/><strong>Cloak Redirection</strong> is the best option if you don't want your Target URL to be visible even after the redirection. This way, if a Target URL doesn't redirect to a URL you want to show then this will mask it.<br/><br/><strong>Pixel Redirection</strong> is the option you should select if you want this link to behave like a tracking pixel instead of as a link. This option is useful if you want to track the number of times a page or email is opened. If you place your Pretty Link inside an img tag on the page (Example: <code>&lt;img src="<?php echo $prli_blogurl . "/yourslug"; ?>" /&gt;</code>) then the page load will be tracked as a click and then displayed. Note: If this option is selected your Target URL will simply be ignored if there's a value in it.</div>
 
 
 
 
59
  </div>
60
  <br/>
61
  <h3>SEO Options</h3>
@@ -82,10 +82,12 @@
82
  <input type="radio" name="param_forwarding" value="on" <?php echo $values['param_forwarding']['on']; ?> />&nbsp;Standard Parameter Forwarding <a class="toggle">&nbsp;[?]</a>
83
  <div class="toggle_pane description">Select this option if you want to forward parameters through your pretty link to your Target URL. This will allow you to pass parameters in the standard syntax for example the pretty link <code>http://yoururl.com/coollink?product_id=4&sku=5441</code> will forward to the target URL and append the same parameters like so: <code>http://anotherurl.com?product_id=4&sku=5441</code>.</div>
84
  </li>
 
85
  <li>
86
  <input type="radio" name="param_forwarding" value="custom" <?php echo $values['param_forwarding']['custom']; ?> />&nbsp;Custom Parameter Forwarding&nbsp;&nbsp;<input type="text" name="param_struct" value="<?php echo $values['param_struct'] ?>" size="25"/> <a class="toggle">&nbsp;[?]</a>
87
  <div class="toggle_pane description">Select this option if you want to forward parameters through your Pretty Link to your Target URL and write the parameters in a custom format. For example, say I wanted to to have my links look like this: <code>http://yourdomain.com/products/14/4</code> and I wanted this to forward to <code>http://anotherurl.com?product_id=14&dock=4</code> you'd just select this option and enter the following string into the text field <code>/products/%product_id%/%dock%</code>. This will tell Pretty Link where each variable will be located in the URL and what each variable name is.</div>
88
  </li>
 
89
  </ul>
90
  </td>
91
  </tr>
49
  <select id="redirect_type" name="redirect_type" style="padding: 0px; margin: 0px;">
50
  <option value="307"<?php echo $values['redirect_type']['307']; ?>>307 (Temporary)&nbsp;</option>
51
  <option value="301"<?php echo $values['redirect_type']['301']; ?>>301 (Permanent)&nbsp;</option>
52
+ <?php do_action('prli_redirection_types', $values); ?>
 
 
 
 
53
  </select><a class="toggle">&nbsp;[?]</a>
54
  <div class="toggle_pane description"><strong>307 Redirection</strong> is the best option if your Target URL could possibly change or need accurate reporting for this link.<br/><br/><strong>301 Redirection</strong> is the best option if you're <strong>NOT</strong> planning on changing your Target URL. Traditionally this option is considered to be the best approach to use for your SEO/SEM efforts but since Pretty Link uses your domain name either way this notion isn't necessarily true for Pretty Links. Also, this option may not give you accurate reporting since proxy and caching servers may go directly to your Target URL once it's cached.<br/><br/><strong>Pretty Bar Redirection</strong> is the best option if you want to show the Pretty Bar at the top of the page when redirecting to the Target URL.<br/><br/><strong>Cloak Redirection</strong> is the best option if you don't want your Target URL to be visible even after the redirection. This way, if a Target URL doesn't redirect to a URL you want to show then this will mask it.<br/><br/><strong>Pixel Redirection</strong> is the option you should select if you want this link to behave like a tracking pixel instead of as a link. This option is useful if you want to track the number of times a page or email is opened. If you place your Pretty Link inside an img tag on the page (Example: <code>&lt;img src="<?php echo $prli_blogurl . "/yourslug"; ?>" /&gt;</code>) then the page load will be tracked as a click and then displayed. Note: If this option is selected your Target URL will simply be ignored if there's a value in it.</div>
55
+ <?php global $prli_update; ?>
56
+ <?php if(!$prli_update->pro_is_installed_and_authorized()) { ?>
57
+ <p class="description">To Enable Cloaking &amp; Pretty Bar<br/>Upgrade to <a href="http://prettylinkpro.com">Pretty Link Pro</a></p>
58
+ <?php } ?>
59
  </div>
60
  <br/>
61
  <h3>SEO Options</h3>
82
  <input type="radio" name="param_forwarding" value="on" <?php echo $values['param_forwarding']['on']; ?> />&nbsp;Standard Parameter Forwarding <a class="toggle">&nbsp;[?]</a>
83
  <div class="toggle_pane description">Select this option if you want to forward parameters through your pretty link to your Target URL. This will allow you to pass parameters in the standard syntax for example the pretty link <code>http://yoururl.com/coollink?product_id=4&sku=5441</code> will forward to the target URL and append the same parameters like so: <code>http://anotherurl.com?product_id=4&sku=5441</code>.</div>
84
  </li>
85
+ <!--
86
  <li>
87
  <input type="radio" name="param_forwarding" value="custom" <?php echo $values['param_forwarding']['custom']; ?> />&nbsp;Custom Parameter Forwarding&nbsp;&nbsp;<input type="text" name="param_struct" value="<?php echo $values['param_struct'] ?>" size="25"/> <a class="toggle">&nbsp;[?]</a>
88
  <div class="toggle_pane description">Select this option if you want to forward parameters through your Pretty Link to your Target URL and write the parameters in a custom format. For example, say I wanted to to have my links look like this: <code>http://yourdomain.com/products/14/4</code> and I wanted this to forward to <code>http://anotherurl.com?product_id=14&dock=4</code> you'd just select this option and enter the following string into the text field <code>/products/%product_id%/%dock%</code>. This will tell Pretty Link where each variable will be located in the URL and what each variable name is.</div>
89
  </li>
90
+ -->
91
  </ul>
92
  </td>
93
  </tr>
classes/views/prli-options/form.php CHANGED
@@ -37,116 +37,12 @@ if(!$permalink_structure or empty($permalink_structure))
37
  <select name="<?php echo $link_redirect_type; ?>">
38
  <option value="307" <?php echo (($prli_options->link_redirect_type == '307')?' selected="selected"':''); ?>/>Temporary (307)</option>
39
  <option value="301" <?php echo (($prli_options->link_redirect_type == '301')?' selected="selected"':''); ?>/>Permanent (301)</option>
40
- <!--
41
- <option value="prettybar" <?php echo (($prli_options->link_redirect_type == 'prettybar')?' selected="selected"':''); ?>/>Pretty Bar</option>
42
- <option value="cloak" <?php echo (($prli_options->link_redirect_type == 'cloak')?' selected="selected"':''); ?>/>Cloak</option>
43
- <option value="pixel" <?php echo (($prli_options->link_redirect_type == 'pixel')?' selected="selected"':''); ?>/>Pixel</option>
44
- -->
45
  </select>
46
  <br/><span class="description">Select the type of redirection you want your newly created links to have.</span>
47
  </li>
48
  </ul>
49
- <!--
50
- <h3><a class="toggle prettybar-toggle-button">PrettyBar Options <span class="prettybar-expand" style="display: none;">[+]</span><span class="prettybar-collapse">[-]</span></a></h3>
51
- <table class="prettybar-toggle-pane form-table">
52
- <tr class="form-field">
53
- <td valign="top" width="15%"><?php _e("Image URL:", $prettybar_image_url ); ?> </td>
54
- <td width="85%">
55
- <input type="text" name="<?php echo $prettybar_image_url; ?>" value="<?php echo $prli_options->prettybar_image_url; ?>"/>
56
- <br/><span class="description">If set, this will replace the logo image on the PrettyBar. The image that this URL references should be 48x48 Pixels to fit.</span>
57
- </td>
58
- </tr>
59
- <tr class="form-field">
60
- <td valign="top" width="15%"><?php _e("Background Image URL:", $prettybar_background_image_url ); ?> </td>
61
- <td width="85%">
62
- <input type="text" name="<?php echo $prettybar_background_image_url; ?>" value="<?php echo $prli_options->prettybar_background_image_url; ?>"/>
63
- <br/><span class="description">If set, this will replace the background image on PrettyBar. The image that this URL references should be 65px tall - this image will be repeated horizontally across the bar.</span>
64
- </td>
65
- </tr>
66
- <tr>
67
- <td valign="top" width="15%"><?php _e("Background Color:", $prettybar_color ); ?> </td>
68
- <td width="85%">
69
- #<input type="text" name="<?php echo $prettybar_color; ?>" value="<?php echo $prli_options->prettybar_color; ?>" size="6"/>
70
- <br/><span class="description">This will alter the background color of the PrettyBar if you haven't specified a PrettyBar background image.</span>
71
- </td>
72
- </tr>
73
- <tr>
74
- <td valign="top" width="15%"><?php _e("Text Color:", $prettybar_text_color ); ?> </td>
75
- <td width="85%">
76
- #<input type="text" name="<?php echo $prettybar_text_color; ?>" value="<?php echo $prli_options->prettybar_text_color; ?>" size="6"/>
77
- <br/><span class="description">If not set, this defaults to black (RGB value <code>#000000</code>) but you can change it to whatever color you like.</span>
78
- </td>
79
- </tr>
80
- <tr>
81
- <td valign="top" width="15%"><?php _e("Link Color:", $prettybar_link_color ); ?> </td>
82
- <td width="85%">
83
- #<input type="text" name="<?php echo $prettybar_link_color; ?>" value="<?php echo $prli_options->prettybar_link_color; ?>" size="6"/>
84
- <br/><span class="description">If not set, this defaults to blue (RGB value <code>#0000ee</code>) but you can change it to whatever color you like.</span>
85
- </td>
86
- </tr>
87
- <tr>
88
- <td valign="top" width="15%"><?php _e("Link Hover Color:", $prettybar_hover_color ); ?> </td>
89
- <td width="85%">
90
- #<input type="text" name="<?php echo $prettybar_hover_color; ?>" value="<?php echo $prli_options->prettybar_hover_color; ?>" size="6"/>
91
- <br/><span class="description">If not set, this defaults to RGB value <code>#ababab</code> but you can change it to whatever color you like.</span>
92
- </td>
93
- </tr>
94
- <tr>
95
- <td valign="top" width="15%"><?php _e("Visited Link Color:", $prettybar_visited_color ); ?> </td>
96
- <td width="85%">
97
- #<input type="text" name="<?php echo $prettybar_visited_color; ?>" value="<?php echo $prli_options->prettybar_visited_color; ?>" size="6"/>
98
- <br/><span class="description">If not set, this defaults to RGB value <code>#551a8b</code> but you can change it to whatever color you like.</span>
99
- </td>
100
- </tr>
101
- <tr>
102
- <td valign="top" width="15%"><?php _e("Title Char Limit*:", $prettybar_title_limit ); ?> </td>
103
- <td width="85%">
104
- <input type="text" name="<?php echo $prettybar_title_limit; ?>" value="<?php echo $prli_options->prettybar_title_limit; ?>" size="4"/>
105
- <br/><span class="description">If your Website has a long title then you may need to adjust this value so that it will all fit on the PrettyBar. It is recommended that you keep this value to <code>30</code> characters or less so the PrettyBar's format looks good across different browsers and screen resolutions.</span>
106
- </td>
107
- </tr>
108
- <tr>
109
- <td valign="top" width="15%"><?php _e("Description Char Limit*:", $prettybar_desc_limit ); ?> </td>
110
- <td width="85%">
111
- <input type="text" name="<?php echo $prettybar_desc_limit; ?>" value="<?php echo $prli_options->prettybar_desc_limit; ?>" size="4"/>
112
- <br/><span class="description">If your Website has a long Description (tagline) then you may need to adjust this value so that it will all fit on the PrettyBar. It is recommended that you keep this value to <code>40</code> characters or less so the PrettyBar's format looks good across different browsers and screen resolutions.</span>
113
- </td>
114
- </tr>
115
- <tr>
116
- <td valign="top" width="15%"><?php _e("Target URL Char Limit*:", $prettybar_link_limit ); ?> </td>
117
- <td width="85%">
118
- <input type="text" name="<?php echo $prettybar_link_limit; ?>" value="<?php echo $prli_options->prettybar_link_limit; ?>" size="4"/>
119
- <br/><span class="description">If you link to a lot of large Target URLs you may want to adjust this value. It is recommended that you keep this value to <code>40</code> or below so the PrettyBar's format looks good across different browsers and URL sizes</span>
120
- </td>
121
- </tr>
122
- <tr>
123
- <td colspan="2">
124
- <input type="checkbox" name="<?php echo $prettybar_show_title; ?>" <?php echo (($prli_options->prettybar_show_title != 0)?'checked="true"':''); ?>/>&nbsp; Show Pretty Bar Title
125
- <br/><span class="description">Make sure this is checked if you want the title of your blog (and link) to show up on the PrettyBar.</span>
126
- </td>
127
- </tr>
128
- <tr>
129
- <td colspan="2">
130
- <input type="checkbox" name="<?php echo $prettybar_show_description; ?>" <?php echo (($prli_options->prettybar_show_description != 0)?'checked="true"':''); ?>/>&nbsp; Show Pretty Bar Description
131
- <br/><span class="description">Make sure this is checked if you want your site description to show up on the PrettyBar.</span>
132
- </td>
133
- </tr>
134
- <tr>
135
- <td colspan="2">
136
- <input type="checkbox" name="<?php echo $prettybar_show_share_links; ?>" <?php echo (($prli_options->prettybar_show_share_links != 0)?'checked="true"':''); ?>/>&nbsp; Show Pretty Bar Share Links
137
- <br/><span class="description">Make sure this is checked if you want "share links" to show up on the PrettyBar.</span>
138
- </td>
139
- </tr>
140
- <tr>
141
- <td colspan="2">
142
- <input type="checkbox" name="<?php echo $prettybar_show_target_url_link; ?>" <?php echo (($prli_options->prettybar_show_target_url_link != 0)?'checked="true"':''); ?>/>&nbsp; Show Pretty Bar Target URL
143
- <br/><span class="description">Make sure this is checked if you want a link displaying the Target URL to show up on the PrettyBar.</span>
144
- </td>
145
- </tr>
146
-
147
- <?php do_action('prli-prettybar-options'); ?>
148
- </table>
149
- -->
150
  <h3><a class="toggle reporting-toggle-button">Reporting Options <span class="reporting-expand" style="display: none;">[+]</span><span class="reporting-collapse">[-]</span></a></h3>
151
  <table class="reporting-toggle-pane form-table">
152
  <tr class="form-field">
@@ -159,14 +55,14 @@ if(!$permalink_structure or empty($permalink_structure))
159
  </tr>
160
  <tr>
161
  <td colspan="2">
162
- <input type="checkbox" class="filter-robots-checkbox" name="<?php echo $filter_robots; ?>" <?php echo (($prli_options->filter_robots != 0)?'checked="true"':''); ?>/>&nbsp; Filter Robots
163
- <br/><span class="description">Filter known Robots and unidentifiable browser clients from your hit data, stats and reports. <code>IMPORTANT: Any robot hits recorded with any version of Pretty Link before 1.4.22 won't be filtered by this setting.</code></span>
164
  <table class="option-pane whitelist-ips">
165
  <tr class="form-field">
166
- <td valign="top">Whitelist IP Addresses: </td>
167
  <td>
168
  <input type="text" name="<?php echo $whitelist_ips; ?>" value="<?php echo $prli_options->whitelist_ips; ?>">
169
- <br/><span class="description">Enter IP Addresses or IP Ranges you want to always include in your Hit data and Stats even if they are flagged as robots. Each IP Address should be separated by commas. Example: <code>192.168.0.1, 192.168.2.1, 192.168.3.4 or 192.168.*.*</code></span>
170
  </td>
171
  </tr>
172
  </table>
37
  <select name="<?php echo $link_redirect_type; ?>">
38
  <option value="307" <?php echo (($prli_options->link_redirect_type == '307')?' selected="selected"':''); ?>/>Temporary (307)</option>
39
  <option value="301" <?php echo (($prli_options->link_redirect_type == '301')?' selected="selected"':''); ?>/>Permanent (301)</option>
40
+ <?php do_action('prli_default_redirection_types',$prli_options->link_redirect_type); ?>
 
 
 
 
41
  </select>
42
  <br/><span class="description">Select the type of redirection you want your newly created links to have.</span>
43
  </li>
44
  </ul>
45
+ <?php do_action('prli_custom_option_pane'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  <h3><a class="toggle reporting-toggle-button">Reporting Options <span class="reporting-expand" style="display: none;">[+]</span><span class="reporting-collapse">[-]</span></a></h3>
47
  <table class="reporting-toggle-pane form-table">
48
  <tr class="form-field">
55
  </tr>
56
  <tr>
57
  <td colspan="2">
58
+ <input type="checkbox" class="filter-robots-checkbox" name="<?php echo $filter_robots; ?>" <?php echo (($prli_options->filter_robots != 0)?'checked="true"':''); ?>/>&nbsp; <?php _e('Filter Robots'); ?>
59
+ <br/><span class="description"><?php _e('Filter known Robots and unidentifiable browser clients from your hit data, stats and reports. <code>IMPORTANT: Any robot hits recorded with any version of Pretty Link before 1.4.22 won\'t be filtered by this setting.</code>'); ?></span>
60
  <table class="option-pane whitelist-ips">
61
  <tr class="form-field">
62
+ <td valign="top"><?php _e('Whitelist IP Addresses:'); ?>&nbsp;</td>
63
  <td>
64
  <input type="text" name="<?php echo $whitelist_ips; ?>" value="<?php echo $prli_options->whitelist_ips; ?>">
65
+ <br/><span class="description"><?php _e('Enter IP Addresses or IP Ranges you want to always include in your Hit data and Stats even if they are flagged as robots. Each IP Address should be separated by commas. Example: <code>192.168.0.1, 192.168.2.1, 192.168.3.4 or 192.168.*.*</code>'); ?></span>
66
  </td>
67
  </tr>
68
  </table>
classes/views/prli-options/head.php CHANGED
@@ -1,13 +1,6 @@
1
  <script type="text/javascript">
2
  jQuery(document).ready(function() {
3
- jQuery('.prettybar-expand').show();
4
- jQuery('.prettybar-collapse').hide();
5
- jQuery('.prettybar-toggle-pane').hide();
6
- jQuery('.prettybar-toggle-button').click(function() {
7
- jQuery('.prettybar-toggle-pane').toggle();
8
- jQuery('.prettybar-expand').toggle();
9
- jQuery('.prettybar-collapse').toggle();
10
- });
11
 
12
  jQuery('.reporting-expand').show();
13
  jQuery('.reporting-collapse').hide();
1
  <script type="text/javascript">
2
  jQuery(document).ready(function() {
3
+ <?php do_action('prli_options_js'); ?>
 
 
 
 
 
 
 
4
 
5
  jQuery('.reporting-expand').show();
6
  jQuery('.reporting-collapse').hide();
pretty-link.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Pretty Link (Lite Version)
4
  Plugin URI: http://blairwilliams.com/pretty-link
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
- Version: 1.4.51
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2009-2010, Caseproof, LLC
3
  Plugin Name: Pretty Link (Lite Version)
4
  Plugin URI: http://blairwilliams.com/pretty-link
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
+ Version: 1.4.52
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2009-2010, Caseproof, LLC
prli-options.php CHANGED
@@ -8,20 +8,6 @@ $errors = array();
8
  $prli_exclude_ips = 'prli_exclude_ips';
9
  $whitelist_ips = 'prli_whitelist_ips';
10
  $filter_robots = 'prli_filter_robots';
11
- $prettybar_image_url = 'prli_prettybar_image_url';
12
- $prettybar_background_image_url = 'prli_prettybar_background_image_url';
13
- $prettybar_color = 'prli_prettybar_color';
14
- $prettybar_text_color = 'prli_prettybar_text_color';
15
- $prettybar_link_color = 'prli_prettybar_link_color';
16
- $prettybar_hover_color = 'prli_prettybar_hover_color';
17
- $prettybar_visited_color = 'prli_prettybar_visited_color';
18
- $prettybar_show_title = 'prli_prettybar_show_title';
19
- $prettybar_show_description = 'prli_prettybar_show_description';
20
- $prettybar_show_share_links = 'prli_prettybar_show_share_links';
21
- $prettybar_show_target_url_link = 'prli_prettybar_show_target_url_link';
22
- $prettybar_title_limit = 'prli_prettybar_title_limit';
23
- $prettybar_desc_limit = 'prli_prettybar_desc_limit';
24
- $prettybar_link_limit = 'prli_prettybar_link_limit';
25
 
26
  $link_track_me = 'prli_link_track_me';
27
  $link_prefix = 'prli_link_prefix';
@@ -36,71 +22,18 @@ $update_message = false;
36
  if( $_POST[ $hidden_field_name ] == 'Y' )
37
  {
38
  // Validate This
39
- if( !empty($_POST[$prettybar_image_url]) and !preg_match('/^http.?:\/\/.*\..*$/', $_POST[$prettybar_image_url] ) )
40
- $errors[] = "Logo Image URL must be a correctly formatted URL";
41
-
42
- if( !empty($_POST[$prettybar_background_image_url]) and !preg_match('/^http.?:\/\/.*\..*$/', $_POST[$prettybar_background_image_url] ) )
43
- $errors[] = "Background Image URL must be a correctly formatted URL";
44
-
45
  if( !empty($_POST[ $prli_exclude_ips ]) and !preg_match( "#^[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*))([ \t]*,[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*)))*$#", $_POST[ $prli_exclude_ips ] ) )
46
  $errors[] = "Excluded IP Addresses must be a comma separated list of IPv4 or IPv6 addresses or ranges.";
47
 
48
  if( !empty($_POST[ $whitelist_ips ]) and !preg_match( "#^[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*))([ \t]*,[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*)))*$#", $_POST[ $whitelist_ips ] ) )
49
  $errors[] = "Whitlist IP Addresses must be a comma separated list of IPv4 or IPv6 addresses or ranges.";
50
 
51
- if( !empty($_POST[ $prettybar_color ]) and !preg_match( "#^[0-9a-fA-F]{6}$#", $_POST[ $prettybar_color ] ) )
52
- $errors[] = "PrettyBar Background Color must be an actual RGB Value";
53
-
54
- if( !empty($_POST[ $prettybar_text_color ]) and !preg_match( "#^[0-9a-fA-F]{6}$#", $_POST[ $prettybar_text_color ] ) )
55
- $errors[] = "PrettyBar Text Color must be an actual RGB Value";
56
-
57
- if( !empty($_POST[ $prettybar_link_color ]) and !preg_match( "#^[0-9a-fA-F]{6}$#", $_POST[ $prettybar_link_color ] ) )
58
- $errors[] = "PrettyBar Link Color must be an actual RGB Value";
59
-
60
- if( !empty($_POST[ $prettybar_hover_color ]) and !preg_match( "#^[0-9a-fA-F]{6}$#", $_POST[ $prettybar_hover_color ] ) )
61
- $errors[] = "PrettyBar Hover Color must be an actual RGB Value";
62
-
63
- if( !empty($_POST[ $prettybar_visited_color ]) and !preg_match( "#^[0-9a-fA-F]{6}$#", $_POST[ $prettybar_visited_color ] ) )
64
- $errors[] = "PrettyBar Hover Color must be an actual RGB Value";
65
-
66
- if( empty($_POST[ $prettybar_title_limit ]) )
67
- $errors[] = "PrettyBar Title Character Limit must not be blank";
68
-
69
- if( empty($_POST[ $prettybar_desc_limit ]) )
70
- $errors[] = "PrettyBar Description Character Limit must not be blank";
71
-
72
- if( empty($_POST[ $prettybar_link_limit ]) )
73
- $errors[] = "PrettyBar Link Character Limit must not be blank";
74
-
75
- if( !empty($_POST[ $prettybar_title_limit ]) and !preg_match( "#^[0-9]*$#", $_POST[ $prettybar_title_limit ] ) )
76
- $errors[] = "PrettyBar Title Character Limit must be a number";
77
-
78
- if( !empty($_POST[ $prettybar_desc_limit ]) and !preg_match( "#^[0-9]*$#", $_POST[ $prettybar_desc_limit ] ) )
79
- $errors[] = "PrettyBar Description Character Limit must be a number";
80
-
81
- if( !empty($_POST[ $prettybar_link_limit ]) and !preg_match( "#^[0-9]*$#", $_POST[ $prettybar_link_limit ] ) )
82
- $errors[] = "PrettyBar Link Character Limit must be a number";
83
-
84
  $errors = apply_filters('prli-validate-options',$errors);
85
 
86
  // Read their posted value
87
  $prli_options->prli_exclude_ips = stripslashes($_POST[ $prli_exclude_ips ]);
88
  $prli_options->whitelist_ips = stripslashes($_POST[ $whitelist_ips ]);
89
  $prli_options->filter_robots = (int)isset($_POST[ $filter_robots ]);
90
- $prli_options->prettybar_image_url = stripslashes($_POST[ $prettybar_image_url ]);
91
- $prli_options->prettybar_background_image_url = stripslashes($_POST[ $prettybar_background_image_url ]);
92
- $prli_options->prettybar_color = stripslashes($_POST[ $prettybar_color ]);
93
- $prli_options->prettybar_text_color = stripslashes($_POST[ $prettybar_text_color ]);
94
- $prli_options->prettybar_link_color = stripslashes($_POST[ $prettybar_link_color ]);
95
- $prli_options->prettybar_hover_color = stripslashes($_POST[ $prettybar_hover_color ]);
96
- $prli_options->prettybar_visited_color = stripslashes($_POST[ $prettybar_visited_color ]);
97
- $prli_options->prettybar_show_title = (int)isset($_POST[ $prettybar_show_title ]);
98
- $prli_options->prettybar_show_description = (int)isset($_POST[ $prettybar_show_description ]);
99
- $prli_options->prettybar_show_share_links = (int)isset($_POST[ $prettybar_show_share_links ]);
100
- $prli_options->prettybar_show_target_url_link = (int)isset($_POST[ $prettybar_show_target_url_link ]);
101
- $prli_options->prettybar_title_limit = stripslashes($_POST[ $prettybar_title_limit ]);
102
- $prli_options->prettybar_desc_limit = stripslashes($_POST[ $prettybar_desc_limit ]);
103
- $prli_options->prettybar_link_limit = stripslashes($_POST[ $prettybar_link_limit ]);
104
  $prli_options->link_track_me = (int)isset($_POST[ $link_track_me ]);
105
  $prli_options->link_prefix = (int)isset($_POST[ $link_prefix ]);
106
  $prli_options->link_nofollow = (int)isset($_POST[ $link_nofollow ]);
8
  $prli_exclude_ips = 'prli_exclude_ips';
9
  $whitelist_ips = 'prli_whitelist_ips';
10
  $filter_robots = 'prli_filter_robots';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  $link_track_me = 'prli_link_track_me';
13
  $link_prefix = 'prli_link_prefix';
22
  if( $_POST[ $hidden_field_name ] == 'Y' )
23
  {
24
  // Validate This
 
 
 
 
 
 
25
  if( !empty($_POST[ $prli_exclude_ips ]) and !preg_match( "#^[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*))([ \t]*,[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*)))*$#", $_POST[ $prli_exclude_ips ] ) )
26
  $errors[] = "Excluded IP Addresses must be a comma separated list of IPv4 or IPv6 addresses or ranges.";
27
 
28
  if( !empty($_POST[ $whitelist_ips ]) and !preg_match( "#^[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*))([ \t]*,[ \t]*((\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)\.(\d{1,3}|\*)|([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*):([0-9a-fA-F]{1,4}|\*)))*$#", $_POST[ $whitelist_ips ] ) )
29
  $errors[] = "Whitlist IP Addresses must be a comma separated list of IPv4 or IPv6 addresses or ranges.";
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  $errors = apply_filters('prli-validate-options',$errors);
32
 
33
  // Read their posted value
34
  $prli_options->prli_exclude_ips = stripslashes($_POST[ $prli_exclude_ips ]);
35
  $prli_options->whitelist_ips = stripslashes($_POST[ $whitelist_ips ]);
36
  $prli_options->filter_robots = (int)isset($_POST[ $filter_robots ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  $prli_options->link_track_me = (int)isset($_POST[ $link_track_me ]);
38
  $prli_options->link_prefix = (int)isset($_POST[ $link_prefix ]);
39
  $prli_options->link_nofollow = (int)isset($_POST[ $link_nofollow ]);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Pretty Link (Lite Version) ===
2
  Contributors: supercleanse
3
- Donate link: http://www.blairwilliams.com/pretty-link/donate/
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 2.9
6
  Tested up to: 3.0.1
7
- Stable tag: 1.4.51
8
 
9
  Shrink, track and share any URL on the Internet from your WordPress website. Create short links suitable for Twitter using your own domain name!
10
 
@@ -43,7 +43,6 @@ http://blairwilliams.com/w7a
43
  * Download hit details in CSV format
44
  * Intuitive Javascript / AJAX Admin User Interface
45
  * Pass custom parameters to your scripts through pretty link and still have full tracking ability
46
- * Ability to rewrite these custom Parameters before forwarding to Target URL
47
  * Exclude IP Addresses from Stats
48
  * Enables you to post your Pretty Links to Twitter directly from your WordPress admin
49
  * Enables you to send your Pretty Links via Email directly from your WordPress admin
@@ -64,6 +63,9 @@ http://blairwilliams.com/w7a
64
 
65
  == Changelog ==
66
 
 
 
 
67
  = 1.4.51 =
68
  * Removed cloaking & pretty bar redirection to comply with wordpress.org policy requirements
69
 
@@ -264,6 +266,9 @@ http://blairwilliams.com/w7a
264
  * Fixed some issues surrounding keyword content caching in Pro
265
 
266
  == Upgrade Notice ==
 
 
 
267
  = 1.4.51 =
268
  * Removed cloaking & pretty bar redirection to comply with wordpress.org policy requirements
269
 
1
  === Pretty Link (Lite Version) ===
2
  Contributors: supercleanse
3
+ Donate link: http://prettylinkpro.com
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 2.9
6
  Tested up to: 3.0.1
7
+ Stable tag: 1.4.52
8
 
9
  Shrink, track and share any URL on the Internet from your WordPress website. Create short links suitable for Twitter using your own domain name!
10
 
43
  * Download hit details in CSV format
44
  * Intuitive Javascript / AJAX Admin User Interface
45
  * Pass custom parameters to your scripts through pretty link and still have full tracking ability
 
46
  * Exclude IP Addresses from Stats
47
  * Enables you to post your Pretty Links to Twitter directly from your WordPress admin
48
  * Enables you to send your Pretty Links via Email directly from your WordPress admin
63
 
64
  == Changelog ==
65
 
66
+ = 1.4.52 =
67
+ * Fixed bugs related to the cloaking and pretty bar redirection changes
68
+
69
  = 1.4.51 =
70
  * Removed cloaking & pretty bar redirection to comply with wordpress.org policy requirements
71
 
266
  * Fixed some issues surrounding keyword content caching in Pro
267
 
268
  == Upgrade Notice ==
269
+ = 1.4.52 =
270
+ * Fixed bugs related to the cloaking and pretty bar redirection changes. This affected all Pretty Link users -- everyone should upgrade to this release.
271
+
272
  = 1.4.51 =
273
  * Removed cloaking & pretty bar redirection to comply with wordpress.org policy requirements
274