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

Version Description

  • Fix Fixed some potential security vulnerabilities
Download this release

Release Info

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

Code changes from version 1.5.9 to 1.6.0

classes/controllers/PrliAppController.php CHANGED
@@ -39,12 +39,15 @@ class PrliAppController
39
  public function parse_standalone_request()
40
  {
41
  if( !empty($_REQUEST['plugin']) and $_REQUEST['plugin'] == 'pretty-link' and
42
- !empty($_REQUEST['controller']) and !empty($_REQUEST['action']) )
43
- {
44
  $this->standalone_route($_REQUEST['controller'], $_REQUEST['action']);
45
  do_action('prli-standalone-route');
46
  exit;
47
  }
 
 
 
 
48
  }
49
 
50
  public function standalone_route($controller, $action)
39
  public function parse_standalone_request()
40
  {
41
  if( !empty($_REQUEST['plugin']) and $_REQUEST['plugin'] == 'pretty-link' and
42
+ !empty($_REQUEST['controller']) and !empty($_REQUEST['action']) ) {
 
43
  $this->standalone_route($_REQUEST['controller'], $_REQUEST['action']);
44
  do_action('prli-standalone-route');
45
  exit;
46
  }
47
+ else if( !empty($_GET['action']) and $_GET['action']=='prli_bookmarklet' ) {
48
+ PrliBookmarkletController::route();
49
+ exit;
50
+ }
51
  }
52
 
53
  public function standalone_route($controller, $action)
classes/controllers/PrliBookmarkletController.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!defined('ABSPATH'))
3
+ die('You are not allowed to call this page directly.');
4
+
5
+ class PrliBookmarkletController {
6
+ public static function route() {
7
+ global $prli_options;
8
+ $action = isset($_GET['action']) ? $_GET['action'] : '';
9
+ if(isset($_GET['k']) and $_GET['k']==$prli_options->bookmarklet_auth) {
10
+ if($action == 'prli_bookmarklet' and
11
+ isset($_GET['target_url']) and
12
+ PrliUtils::is_url($_GET['target_url'])) { return self::bookmark($_GET['target_url']); }
13
+ }
14
+ else {
15
+ wp_redirect(home_url());
16
+ exit;
17
+ }
18
+ }
19
+
20
+ public static function bookmark($target_url) {
21
+ global $prli_options, $prli_blogurl, $prli_link;
22
+
23
+ $redirect_type = esc_html((isset($_GET['rt']) and $_GET['rt'] != '-1')?$_GET['rt']:'');
24
+ $track = esc_html((isset($_GET['trk']) and $_GET['trk'] != '-1')?$_GET['trk']:'');
25
+ $group = esc_html((isset($_GET['grp']) and $_GET['grp'] != '-1')?$_GET['grp']:'');
26
+
27
+ $result = prli_create_pretty_link( esc_url_raw($target_url, array('http','https')), '', '', '', $group, $track, '', $redirect_type );
28
+
29
+ $plink = $prli_link->getOne($result);
30
+ $target_url = $plink->url;
31
+ $target_url_title = $plink->name;
32
+ $pretty_link = $prli_blogurl . PrliUtils::get_permalink_pre_slug_uri() . $plink->slug;
33
+
34
+ $twitter_status = substr($target_url_title,0,(114 - strlen($pretty_link))) . ((strlen($target_url_title) > 114)?"...":'') . " | $pretty_link";
35
+
36
+ require PRLI_VIEWS_PATH . '/prli-tools/bookmarklet.php';
37
+ }
38
+ }
classes/models/PrliLink.php CHANGED
@@ -481,7 +481,8 @@ class PrliLink
481
  if( preg_match('#/$#', $values['slug']) )
482
  $errors[] = "Pretty Link slugs must not end with a slash (\"/\")";
483
 
484
- if( !$prli_utils->slugIsAvailable($values['slug'],$values['id']) )
 
485
  $errors[] = "This Pretty Link Slug is already taken. Check to make sure it isn't being used by another pretty link, post, page, category or tag slug. If none of these are true then check to see that this slug isn't the name of a file in the root folder of your wordpress install.";
486
 
487
  if( isset($values['param_forwarding']) and $values['param_forwarding'] == 'custom' and empty($values['param_struct']) )
@@ -534,4 +535,10 @@ class PrliLink
534
 
535
  return $prli_lookup;
536
  }
 
 
 
 
 
 
537
  }
481
  if( preg_match('#/$#', $values['slug']) )
482
  $errors[] = "Pretty Link slugs must not end with a slash (\"/\")";
483
 
484
+ $id = isset($values['id'])?$values['id']:null;
485
+ if( !$prli_utils->slugIsAvailable($values['slug'],$id) )
486
  $errors[] = "This Pretty Link Slug is already taken. Check to make sure it isn't being used by another pretty link, post, page, category or tag slug. If none of these are true then check to see that this slug isn't the name of a file in the root folder of your wordpress install.";
487
 
488
  if( isset($values['param_forwarding']) and $values['param_forwarding'] == 'custom' and empty($values['param_struct']) )
535
 
536
  return $prli_lookup;
537
  }
538
+
539
+ public static function bookmarklet_link() {
540
+ global $prli_options;
541
+ $site_url = site_url();
542
+ return "javascript:location.href='{$site_url}/index.php?action=prli_bookmarklet&k={$prli_options->bookmarklet_auth}&target_url='+escape(location.href);";
543
+ }
544
  }
classes/models/PrliUtils.php CHANGED
@@ -1187,9 +1187,10 @@ class PrliUtils
1187
  {
1188
  $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
1189
  $string = '';
 
1190
 
1191
  for($p = 0; $p < $length; $p++)
1192
- $string .= $characters[mt_rand(0, strlen($characters))];
1193
 
1194
  return $string;
1195
  }
@@ -1214,4 +1215,9 @@ class PrliUtils
1214
 
1215
  return $title;
1216
  }
 
 
 
 
 
1217
  }
1187
  {
1188
  $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
1189
  $string = '';
1190
+ $max_index = strlen($characters) - 1;
1191
 
1192
  for($p = 0; $p < $length; $p++)
1193
+ $string .= $characters[mt_rand(0, $max_index)];
1194
 
1195
  return $string;
1196
  }
1215
 
1216
  return $title;
1217
  }
1218
+
1219
+ public static function is_url($url) {
1220
+ return ( preg_match('/^http.?:\/\/.*\..*$/', $url ) or
1221
+ preg_match('!^(http|https)://(localhost|127\.0\.0\.1)(:\d+)?(/[\w- ./?%&=]*)?!', $url ) );
1222
+ }
1223
  }
classes/models/models.inc.php CHANGED
@@ -35,6 +35,7 @@ $prlipro_db_version = 3; // this is the version of the database we're moving to
35
  require_once( PRLI_CONTROLLERS_PATH . '/PrliAppController.php' );
36
  require_once( PRLI_CONTROLLERS_PATH . '/PrliLinksController.php' );
37
  require_once( PRLI_CONTROLLERS_PATH . '/PrliGroupsController.php' );
 
38
 
39
  PrliGroupsController::load_hooks();
40
 
35
  require_once( PRLI_CONTROLLERS_PATH . '/PrliAppController.php' );
36
  require_once( PRLI_CONTROLLERS_PATH . '/PrliLinksController.php' );
37
  require_once( PRLI_CONTROLLERS_PATH . '/PrliGroupsController.php' );
38
+ require_once( PRLI_CONTROLLERS_PATH . '/PrliBookmarkletController.php' );
39
 
40
  PrliGroupsController::load_hooks();
41
 
classes/views/prli-groups/new.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  if(!defined('ABSPATH'))
3
  die('You are not allowed to call this page directly.');
 
 
4
  ?>
5
 
6
  <div class="wrap">
@@ -18,7 +20,7 @@ if(!defined('ABSPATH'))
18
  <table class="form-table">
19
  <tr class="form-field">
20
  <td width="75px" valign="top">Name*: </td>
21
- <td><input type="text" name="name" value="<?php echo (($_POST['name'] != null)?$_POST['name']:''); ?>" size="75">
22
  <br/><span class="setting-description">This is how you'll identify your Group.</span></td>
23
  </tr>
24
  <tr class="form-field">
@@ -61,4 +63,4 @@ if(!defined('ABSPATH'))
61
  </p>
62
 
63
  </form>
64
- </div>
1
  <?php
2
  if(!defined('ABSPATH'))
3
  die('You are not allowed to call this page directly.');
4
+
5
+ $name = isset($_POST['name']) ? esc_html($_POST['name']) : '';
6
  ?>
7
 
8
  <div class="wrap">
20
  <table class="form-table">
21
  <tr class="form-field">
22
  <td width="75px" valign="top">Name*: </td>
23
+ <td><input type="text" name="name" value="<?php echo $name; ?>" size="75">
24
  <br/><span class="setting-description">This is how you'll identify your Group.</span></td>
25
  </tr>
26
  <tr class="form-field">
63
  </p>
64
 
65
  </form>
66
+ </div>
classes/views/prli-tools/bookmarklet.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!defined('ABSPATH')) die('You are not allowed to call this page directly.');
3
+
4
+ // Escape all variables used on this page
5
+ $target_url_raw = esc_url_raw( $target_url, array('http','https') );
6
+ $target_url = esc_url( $target_url, array('http','https') );
7
+ $pretty_link_raw = esc_url_raw( $pretty_link, array('http','https') );
8
+ $pretty_link = esc_url( $pretty_link, array('http','https') );
9
+ $prli_blogurl_raw = esc_url_raw( $prli_blogurl, array('http','https') );
10
+ $prli_blogurl = esc_url( $prli_blogurl, array('http','https') );
11
+ $target_url_title = esc_html( $target_url_title );
12
+ $twitter_status = esc_html( $twitter_status );
13
+ ?>
14
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
15
+ "http://www.w3.org/TR/html4/loose.dtd">
16
+ <html>
17
+ <head>
18
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
19
+ <title><?php echo __('Here\'s your Pretty Link', 'pretty-link'); ?></title>
20
+ <script type='text/javascript' src='<?php echo site_url('/wp-includes/js/jquery/jquery.js'); ?>'></script>
21
+ <script type='text/javascript' src='<?php echo PRLI_JS_URL . '/jquery.clippy.js'; ?>'></script>
22
+ <script type="text/javascript">
23
+ jQuery(document).ready(function() {
24
+ /* Set up the clippies! */
25
+ jQuery('.clippy').clippy({clippy_path: '<?php echo PRLI_JS_URL; ?>/clippy.swf', width: '100px'});
26
+ });
27
+ </script>
28
+ <style type="text/css">
29
+ body {
30
+ font-family: Arial;
31
+ text-align: center;
32
+ margin-top: 25px;
33
+ }
34
+
35
+ h4 {
36
+ font-size: 18px;
37
+ color: #aaaaaa;
38
+ }
39
+
40
+ h2 {
41
+ font-size: 24px;
42
+ font-weight: bold;
43
+ }
44
+
45
+ h2 a {
46
+ text-decoration: none;
47
+ color: #1f487e;
48
+ }
49
+
50
+ h2 a:hover {
51
+ text-decoration: none;
52
+ color: blue;
53
+ }
54
+ .clippy {
55
+ padding-left: 75px;
56
+ }
57
+ </style>
58
+ </head>
59
+ <body>
60
+ <p><a href="http://prettylinkpro.com"><img src="<?php echo PRLI_IMAGES_URL; ?>/prettylink_logo.jpg" /></a></p>
61
+ <h4><em><?php _e('here\'s your pretty link for:', 'pretty-link'); ?></em><br/><?php echo $target_url_title; ?><br/>(<span title="<?php echo $target_url; ?>"><?php echo substr($target_url,0,50) . ((strlen($target_url)>50)?"...":''); ?></span>)</h4>
62
+ <h2><a href="<?php echo $pretty_link_raw; ?>"><?php echo $pretty_link; ?></a><br/><span class="clippy"><?php echo $pretty_link_raw; ?></span></h2>
63
+ <p>send this link to:<br/>
64
+ <a href="http://www.delicious.com/save" onclick="window.open('http://www.delicious.com/save?v=5&noui&jump=close&url=<?php echo urlencode($pretty_link_raw); ?>&title=<?php echo urlencode($target_url_title); ?>', 'delicious','toolbar=no,width=550,height=550'); return false;"><img src="<?php echo PRLI_IMAGES_URL; ?>/delicious_32.png" title="delicious" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
65
+ <!-- Place this tag where you want the su badge to render -->
66
+ <su:badge layout="6"></su:badge>&nbsp;&nbsp;
67
+
68
+ <!-- Place this snippet wherever appropriate -->
69
+ <script type="text/javascript">
70
+ (function() {
71
+ var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
72
+ li.src = 'https://platform.stumbleupon.com/1/widgets.js';
73
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
74
+ })();
75
+ </script>
76
+ <a href="http://digg.com/submit?phase=2&url=<?php echo urlencode($pretty_link_raw) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/digg_32.png" title="digg" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
77
+ <a href="http://twitter.com/home?status=<?php echo urlencode($twitter_status); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/twitter_32.png" title="twitter" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
78
+ <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode($pretty_link_raw) ?>&t=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/facebook_32.png" title="facebook" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
79
+ <a href="http://reddit.com/submit?url=<?php echo urlencode($pretty_link_raw) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/reddit_32.png" title="reddit" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
80
+ <a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode($pretty_link_raw) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/linkedin_32.png" title="linkedin" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
81
+ <p><a href="<?php echo $target_url_raw; ?>">&laquo; <?php _e('back', 'pretty-link'); ?></a></p>
82
+ </body>
83
+ </html>
classes/views/prli-tools/form.php CHANGED
@@ -15,13 +15,13 @@ function toggle_iphone_instructions()
15
  require(PRLI_VIEWS_PATH.'/shared/nav.php');
16
  ?>
17
  <?php echo PrliAppHelper::page_title(__('Tools', 'pretty-link')); ?>
18
- <h3>Bookmarklet: </h3>
19
- <p><strong><a href="javascript:location.href='<?php echo PRLI_URL; ?>/prli-bookmarklet.php?k=<?php echo $prli_options->bookmarklet_auth; ?>&target_url='+escape(location.href);">Get PrettyLink</a></strong><br/>
20
- <span class="description">Just drag this "Get PrettyLink" link to your toolbar to install the bookmarklet. As you browse the web, you can just click this bookmarklet to create a pretty link from the current url you're looking at.&nbsp;&nbsp;<a href="http://blairwilliams.com/pretty-link-bookmarklet/">(more help)</a></span>
21
  <br/><br/><a href="javascript:toggle_iphone_instructions()"><strong><?php _e('Show iPhone Bookmarklet Instructions', 'pretty-link'); ?></strong></a>
22
- <div class="iphone_instructions" style="display: none"><strong>Note:</strong> iPhone users can install this bookmarklet in their Safari to create Pretty Links with the following steps:<br/>
23
  <ol>
24
- <li>Copy this text:<br/><code>javascript:location.href='<?php echo PRLI_URL; ?>/prli-bookmarklet.php?k=<?php echo $prli_options->bookmarklet_auth; ?>&target_url='+escape(location.href);</code></li>
25
  <li>Tap the + button at the bottom of the screen</li>
26
  <li>Choose "Add Bookmark", rename your bookmark to "Get PrettyLink" (or whatever you want) and then "Save"</li>
27
  <li>Navigate through your Bookmarks folders until you find the new bookmark and click "Edit"</li>
@@ -31,4 +31,4 @@ function toggle_iphone_instructions()
31
  </ol>
32
  </div>
33
  <?php do_action('prli-add-tools'); ?>
34
- </div>
15
  require(PRLI_VIEWS_PATH.'/shared/nav.php');
16
  ?>
17
  <?php echo PrliAppHelper::page_title(__('Tools', 'pretty-link')); ?>
18
+ <h3><?php _e('Bookmarklet:', 'pretty-link'); ?></h3>
19
+ <p><strong><a href="<?php echo PrliLink::bookmarklet_link(); ?>">Get PrettyLink</a></strong><br/>
20
+ <span class="description"><?php _e('Just drag this "Get PrettyLink" link to your toolbar to install the bookmarklet. As you browse the web, you can just click this bookmarklet to create a pretty link from the current url you\'re looking at. <a href="http://blairwilliams.com/pretty-link-bookmarklet/">(more help)</a>', 'pretty-link'); ?></span>
21
  <br/><br/><a href="javascript:toggle_iphone_instructions()"><strong><?php _e('Show iPhone Bookmarklet Instructions', 'pretty-link'); ?></strong></a>
22
+ <div class="iphone_instructions" style="display: none"><?php _e('<strong>Note:</strong> iPhone users can install this bookmarklet in their Safari to create Pretty Links with the following steps:', 'pretty-link'); ?><br/>
23
  <ol>
24
+ <li>Copy this text:<br/><code><?php echo PrliLink::bookmarklet_link(); ?></code></li>
25
  <li>Tap the + button at the bottom of the screen</li>
26
  <li>Choose "Add Bookmark", rename your bookmark to "Get PrettyLink" (or whatever you want) and then "Save"</li>
27
  <li>Navigate through your Bookmarks folders until you find the new bookmark and click "Edit"</li>
31
  </ol>
32
  </div>
33
  <?php do_action('prli-add-tools'); ?>
34
+ </div>
i18n/pretty-link.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Pretty Link Lite package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pretty Link Lite 1.5.9\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/pretty-link\n"
7
- "POT-Creation-Date: 2012-03-21 15:58:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -37,6 +37,22 @@ msgstr ""
37
  msgid "No hits older than 90 days were found, so nothing was deleted"
38
  msgstr ""
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  #: classes/helpers/PrliLinksHelper.php:14 classes/views/prli-links/form.php:44
41
  msgid "None"
42
  msgstr ""
@@ -88,7 +104,7 @@ msgid ""
88
  "$sAutomatically Upgrade your Database%2$s"
89
  msgstr ""
90
 
91
- #: classes/controllers/PrliAppController.php:66
92
  msgid "Your Database Has Been Successfully Upgraded."
93
  msgstr ""
94
 
@@ -235,7 +251,7 @@ msgstr ""
235
  msgid "Pro Account Information"
236
  msgstr ""
237
 
238
- #: classes/views/prli-groups/new.php:7
239
  msgid "New Group"
240
  msgstr ""
241
 
@@ -419,10 +435,40 @@ msgstr ""
419
  msgid "Tools"
420
  msgstr ""
421
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  #: classes/views/prli-tools/form.php:21
423
  msgid "Show iPhone Bookmarklet Instructions"
424
  msgstr ""
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  #: classes/views/prli-dashboard-widget/widget.php:3
427
  msgid "Add a Pretty Link from your Dashboard:"
428
  msgstr ""
@@ -545,10 +591,6 @@ msgstr ""
545
  msgid "There was an error fetching your Pretty Link URL"
546
  msgstr ""
547
 
548
- #: prli-bookmarklet.php:33
549
- msgid "Here's your Pretty Link"
550
- msgstr ""
551
-
552
  #: prli-main.php:20
553
  msgid "Pretty Link | Manage Pretty Links"
554
  msgstr ""
@@ -597,178 +639,178 @@ msgstr ""
597
  msgid "Unauthorized"
598
  msgstr ""
599
 
600
- #: pro/pretty-link-pro.php:944
601
  msgid "Delay Redirect must be a number"
602
  msgstr ""
603
 
604
- #: pro/pretty-link-pro.php:1007
605
  msgid "This Link Has additional Target URL rotations"
606
  msgstr ""
607
 
608
- #: pro/pretty-link-pro.php:1405
609
  msgid "Alternate Pretty Bar Attribution URL:"
610
  msgstr ""
611
 
612
- #: pro/pretty-link-pro.php:1498
613
  msgid "End-Point URL:"
614
  msgstr ""
615
 
616
- #: pro/pretty-link-pro.php:1499
617
  msgid "This can be used to integrate with your twitter client."
618
  msgstr ""
619
 
620
- #: pro/pretty-link-pro.php:1502
621
  msgid "Show TweetDeck Integration Instructions"
622
  msgstr ""
623
 
624
- #: pro/pretty-link-pro.php:1504 pro/pretty-link-pro.php:1510
625
  msgid "Follow the"
626
  msgstr ""
627
 
628
- #: pro/pretty-link-pro.php:1504
629
  msgid "TweetDeck Custom URL Instructions"
630
  msgstr ""
631
 
632
- #: pro/pretty-link-pro.php:1504
633
  msgid " and add the following URL to TweetDeck"
634
  msgstr ""
635
 
636
- #: pro/pretty-link-pro.php:1508
637
  msgid "Show Twitter for iPhone Integration Instructions"
638
  msgstr ""
639
 
640
- #: pro/pretty-link-pro.php:1510
641
  msgid "Twitter for iPhone Custom URL Instructions"
642
  msgstr ""
643
 
644
- #: pro/pretty-link-pro.php:1510
645
  msgid " and add the following URL to Twitter for iPhone"
646
  msgstr ""
647
 
648
- #: pro/pretty-link-pro.php:1520
649
  msgid "Label:"
650
  msgstr ""
651
 
652
- #: pro/pretty-link-pro.php:1525 pro/prlipro-create-public-link-widget.php:46
653
  msgid "Redirection:"
654
  msgstr ""
655
 
656
- #: pro/pretty-link-pro.php:1536 pro/prlipro-create-public-link-widget.php:57
657
  msgid "Tracking Enabled:"
658
  msgstr ""
659
 
660
- #: pro/pretty-link-pro.php:1545 pro/prlipro-create-public-link-widget.php:66
661
  msgid "Group:"
662
  msgstr ""
663
 
664
- #: pro/pretty-link-pro.php:1651 pro/pretty-link-pro.php:1691
665
  msgid "There was an error saving your Twitter account."
666
  msgstr ""
667
 
668
- #: pro/pretty-link-pro.php:1687
669
  msgid "Your Twitter Account was successfully saved."
670
  msgstr ""
671
 
672
- #: pro/pretty-link-pro.php:1705 pro/pretty-link-pro.php:1783
673
  msgid "Pretty Bar"
674
  msgstr ""
675
 
676
- #: pro/pretty-link-pro.php:1706
677
  msgid "Cloaked"
678
  msgstr ""
679
 
680
- #: pro/pretty-link-pro.php:1707 pro/pretty-link-pro.php:1785
681
  msgid "Pixel"
682
  msgstr ""
683
 
684
- #: pro/pretty-link-pro.php:1708 pro/pretty-link-pro.php:1786
685
  msgid "Meta Refresh"
686
  msgstr ""
687
 
688
- #: pro/pretty-link-pro.php:1709 pro/pretty-link-pro.php:1787
689
  msgid "Javascript"
690
  msgstr ""
691
 
692
- #: pro/pretty-link-pro.php:1784
693
  msgid "Cloak"
694
  msgstr ""
695
 
696
- #: pro/pretty-link-pro.php:1815
697
  msgid "Image URL:"
698
  msgstr ""
699
 
700
- #: pro/pretty-link-pro.php:1818
701
  msgid ""
702
  "If set, this will replace the logo image on the PrettyBar. The image that "
703
  "this URL references should be 48x48 Pixels to fit."
704
  msgstr ""
705
 
706
- #: pro/pretty-link-pro.php:1822
707
  msgid "Background Image URL:"
708
  msgstr ""
709
 
710
- #: pro/pretty-link-pro.php:1825
711
  msgid ""
712
  "If set, this will replace the background image on PrettyBar. The image that "
713
  "this URL references should be 65px tall - this image will be repeated "
714
  "horizontally across the bar."
715
  msgstr ""
716
 
717
- #: pro/pretty-link-pro.php:1829
718
  msgid "Background Color:"
719
  msgstr ""
720
 
721
- #: pro/pretty-link-pro.php:1832
722
  msgid ""
723
  "This will alter the background color of the PrettyBar if you haven't "
724
  "specified a PrettyBar background image."
725
  msgstr ""
726
 
727
- #: pro/pretty-link-pro.php:1836
728
  msgid "Text Color:"
729
  msgstr ""
730
 
731
- #: pro/pretty-link-pro.php:1839
732
  msgid ""
733
  "If not set, this defaults to black (RGB value <code>#000000</code>) but you "
734
  "can change it to whatever color you like."
735
  msgstr ""
736
 
737
- #: pro/pretty-link-pro.php:1843
738
  msgid "Link Color:"
739
  msgstr ""
740
 
741
- #: pro/pretty-link-pro.php:1846
742
  msgid ""
743
  "If not set, this defaults to blue (RGB value <code>#0000ee</code>) but you "
744
  "can change it to whatever color you like."
745
  msgstr ""
746
 
747
- #: pro/pretty-link-pro.php:1850
748
  msgid "Link Hover Color:"
749
  msgstr ""
750
 
751
- #: pro/pretty-link-pro.php:1853
752
  msgid ""
753
  "If not set, this defaults to RGB value <code>#ababab</code> but you can "
754
  "change it to whatever color you like."
755
  msgstr ""
756
 
757
- #: pro/pretty-link-pro.php:1857
758
  msgid "Visited Link Color:"
759
  msgstr ""
760
 
761
- #: pro/pretty-link-pro.php:1860
762
  msgid ""
763
  "If not set, this defaults to RGB value <code>#551a8b</code> but you can "
764
  "change it to whatever color you like."
765
  msgstr ""
766
 
767
- #: pro/pretty-link-pro.php:1864
768
  msgid "Title Char Limit*:"
769
  msgstr ""
770
 
771
- #: pro/pretty-link-pro.php:1867
772
  msgid ""
773
  "If your Website has a long title then you may need to adjust this value so "
774
  "that it will all fit on the PrettyBar. It is recommended that you keep this "
@@ -776,11 +818,11 @@ msgid ""
776
  "good across different browsers and screen resolutions."
777
  msgstr ""
778
 
779
- #: pro/pretty-link-pro.php:1871
780
  msgid "Description Char Limit*:"
781
  msgstr ""
782
 
783
- #: pro/pretty-link-pro.php:1874
784
  msgid ""
785
  "If your Website has a long Description (tagline) then you may need to adjust "
786
  "this value so that it will all fit on the PrettyBar. It is recommended that "
@@ -788,118 +830,118 @@ msgid ""
788
  "format looks good across different browsers and screen resolutions."
789
  msgstr ""
790
 
791
- #: pro/pretty-link-pro.php:1878
792
  msgid "Target URL Char Limit*:"
793
  msgstr ""
794
 
795
- #: pro/pretty-link-pro.php:1881
796
  msgid ""
797
  "If you link to a lot of large Target URLs you may want to adjust this value. "
798
  "It is recommended that you keep this value to <code>40</code> or below so "
799
  "the PrettyBar's format looks good across different browsers and URL sizes"
800
  msgstr ""
801
 
802
- #: pro/pretty-link-pro.php:1886
803
  msgid "Show Pretty Bar Title"
804
  msgstr ""
805
 
806
- #: pro/pretty-link-pro.php:1887
807
  msgid ""
808
  "Make sure this is checked if you want the title of your blog (and link) to "
809
  "show up on the PrettyBar."
810
  msgstr ""
811
 
812
- #: pro/pretty-link-pro.php:1892
813
  msgid "Show Pretty Bar Description"
814
  msgstr ""
815
 
816
- #: pro/pretty-link-pro.php:1893
817
  msgid ""
818
  "Make sure this is checked if you want your site description to show up on "
819
  "the PrettyBar."
820
  msgstr ""
821
 
822
- #: pro/pretty-link-pro.php:1898
823
  msgid "Show Pretty Bar Share Links"
824
  msgstr ""
825
 
826
- #: pro/pretty-link-pro.php:1899
827
  msgid ""
828
  "Make sure this is checked if you want \"share links\" to show up on the "
829
  "PrettyBar."
830
  msgstr ""
831
 
832
- #: pro/pretty-link-pro.php:1904
833
  msgid "Show Pretty Bar Target URL"
834
  msgstr ""
835
 
836
- #: pro/pretty-link-pro.php:1905
837
  msgid ""
838
  "Make sure this is checked if you want a link displaying the Target URL to "
839
  "show up on the PrettyBar."
840
  msgstr ""
841
 
842
- #: pro/pretty-link-pro.php:1935
843
  msgid "Logo Image URL must be a correctly formatted URL"
844
  msgstr ""
845
 
846
- #: pro/pretty-link-pro.php:1938
847
  msgid "Background Image URL must be a correctly formatted URL"
848
  msgstr ""
849
 
850
- #: pro/pretty-link-pro.php:1941
851
  msgid "PrettyBar Background Color must be an actual RGB Value"
852
  msgstr ""
853
 
854
- #: pro/pretty-link-pro.php:1944
855
  msgid "PrettyBar Text Color must be an actual RGB Value"
856
  msgstr ""
857
 
858
- #: pro/pretty-link-pro.php:1947
859
  msgid "PrettyBar Link Color must be an actual RGB Value"
860
  msgstr ""
861
 
862
- #: pro/pretty-link-pro.php:1950 pro/pretty-link-pro.php:1953
863
  msgid "PrettyBar Hover Color must be an actual RGB Value"
864
  msgstr ""
865
 
866
- #: pro/pretty-link-pro.php:1956
867
  msgid "PrettyBar Title Character Limit must not be blank"
868
  msgstr ""
869
 
870
- #: pro/pretty-link-pro.php:1959
871
  msgid "PrettyBar Description Character Limit must not be blank"
872
  msgstr ""
873
 
874
- #: pro/pretty-link-pro.php:1962
875
  msgid "PrettyBar Link Character Limit must not be blank"
876
  msgstr ""
877
 
878
- #: pro/pretty-link-pro.php:1965
879
  msgid "PrettyBar Title Character Limit must be a number"
880
  msgstr ""
881
 
882
- #: pro/pretty-link-pro.php:1968
883
  msgid "PrettyBar Description Character Limit must be a number"
884
  msgstr ""
885
 
886
- #: pro/pretty-link-pro.php:1971
887
  msgid "PrettyBar Link Character Limit must be a number"
888
  msgstr ""
889
 
890
- #: pro/pretty-link-pro.php:2094
891
  msgid "You are unauthorized to view this resource"
892
  msgstr ""
893
 
894
- #: pro/pretty-link-pro.php:2124
895
  msgid "View QR Code for this link: %s"
896
  msgstr ""
897
 
898
- #: pro/pretty-link-pro.php:2132
899
  msgid "Download QR Code for this link: %s"
900
  msgstr ""
901
 
902
- #: pro/pretty-link-pro.php:2226
903
  msgid "Double Redirection Enabled"
904
  msgstr ""
905
 
2
  # This file is distributed under the same license as the Pretty Link Lite package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pretty Link Lite 1.6.0rc1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/pretty-link\n"
7
+ "POT-Creation-Date: 2012-04-19 19:24:09+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
37
  msgid "No hits older than 90 days were found, so nothing was deleted"
38
  msgstr ""
39
 
40
+ #: prli-clicks.php:52
41
+ msgid "IP Address: "
42
+ msgstr ""
43
+
44
+ #: prli-clicks.php:58
45
+ msgid "Visitor: "
46
+ msgstr ""
47
+
48
+ #: prli-clicks.php:65
49
+ msgid "Group: "
50
+ msgstr ""
51
+
52
+ #: prli-clicks.php:71
53
+ msgid "All Links"
54
+ msgstr ""
55
+
56
  #: classes/helpers/PrliLinksHelper.php:14 classes/views/prli-links/form.php:44
57
  msgid "None"
58
  msgstr ""
104
  "$sAutomatically Upgrade your Database%2$s"
105
  msgstr ""
106
 
107
+ #: classes/controllers/PrliAppController.php:69
108
  msgid "Your Database Has Been Successfully Upgraded."
109
  msgstr ""
110
 
251
  msgid "Pro Account Information"
252
  msgstr ""
253
 
254
+ #: classes/views/prli-groups/new.php:9
255
  msgid "New Group"
256
  msgstr ""
257
 
435
  msgid "Tools"
436
  msgstr ""
437
 
438
+ #: classes/views/prli-tools/form.php:18
439
+ msgid "Bookmarklet:"
440
+ msgstr ""
441
+
442
+ #: classes/views/prli-tools/form.php:20
443
+ msgid ""
444
+ "Just drag this \"Get PrettyLink\" link to your toolbar to install the "
445
+ "bookmarklet. As you browse the web, you can just click this bookmarklet to "
446
+ "create a pretty link from the current url you're looking at. <a href="
447
+ "\"http://blairwilliams.com/pretty-link-bookmarklet/\">(more help)</a>"
448
+ msgstr ""
449
+
450
  #: classes/views/prli-tools/form.php:21
451
  msgid "Show iPhone Bookmarklet Instructions"
452
  msgstr ""
453
 
454
+ #: classes/views/prli-tools/form.php:22
455
+ msgid ""
456
+ "<strong>Note:</strong> iPhone users can install this bookmarklet in their "
457
+ "Safari to create Pretty Links with the following steps:"
458
+ msgstr ""
459
+
460
+ #: classes/views/prli-tools/bookmarklet.php:19
461
+ msgid "Here's your Pretty Link"
462
+ msgstr ""
463
+
464
+ #: classes/views/prli-tools/bookmarklet.php:61
465
+ msgid "here's your pretty link for:"
466
+ msgstr ""
467
+
468
+ #: classes/views/prli-tools/bookmarklet.php:81
469
+ msgid "back"
470
+ msgstr ""
471
+
472
  #: classes/views/prli-dashboard-widget/widget.php:3
473
  msgid "Add a Pretty Link from your Dashboard:"
474
  msgstr ""
591
  msgid "There was an error fetching your Pretty Link URL"
592
  msgstr ""
593
 
 
 
 
 
594
  #: prli-main.php:20
595
  msgid "Pretty Link | Manage Pretty Links"
596
  msgstr ""
639
  msgid "Unauthorized"
640
  msgstr ""
641
 
642
+ #: pro/pretty-link-pro.php:924
643
  msgid "Delay Redirect must be a number"
644
  msgstr ""
645
 
646
+ #: pro/pretty-link-pro.php:987
647
  msgid "This Link Has additional Target URL rotations"
648
  msgstr ""
649
 
650
+ #: pro/pretty-link-pro.php:1385
651
  msgid "Alternate Pretty Bar Attribution URL:"
652
  msgstr ""
653
 
654
+ #: pro/pretty-link-pro.php:1477
655
  msgid "End-Point URL:"
656
  msgstr ""
657
 
658
+ #: pro/pretty-link-pro.php:1478
659
  msgid "This can be used to integrate with your twitter client."
660
  msgstr ""
661
 
662
+ #: pro/pretty-link-pro.php:1481
663
  msgid "Show TweetDeck Integration Instructions"
664
  msgstr ""
665
 
666
+ #: pro/pretty-link-pro.php:1483 pro/pretty-link-pro.php:1489
667
  msgid "Follow the"
668
  msgstr ""
669
 
670
+ #: pro/pretty-link-pro.php:1483
671
  msgid "TweetDeck Custom URL Instructions"
672
  msgstr ""
673
 
674
+ #: pro/pretty-link-pro.php:1483
675
  msgid " and add the following URL to TweetDeck"
676
  msgstr ""
677
 
678
+ #: pro/pretty-link-pro.php:1487
679
  msgid "Show Twitter for iPhone Integration Instructions"
680
  msgstr ""
681
 
682
+ #: pro/pretty-link-pro.php:1489
683
  msgid "Twitter for iPhone Custom URL Instructions"
684
  msgstr ""
685
 
686
+ #: pro/pretty-link-pro.php:1489
687
  msgid " and add the following URL to Twitter for iPhone"
688
  msgstr ""
689
 
690
+ #: pro/pretty-link-pro.php:1499
691
  msgid "Label:"
692
  msgstr ""
693
 
694
+ #: pro/pretty-link-pro.php:1504 pro/prlipro-create-public-link-widget.php:46
695
  msgid "Redirection:"
696
  msgstr ""
697
 
698
+ #: pro/pretty-link-pro.php:1515 pro/prlipro-create-public-link-widget.php:57
699
  msgid "Tracking Enabled:"
700
  msgstr ""
701
 
702
+ #: pro/pretty-link-pro.php:1524 pro/prlipro-create-public-link-widget.php:66
703
  msgid "Group:"
704
  msgstr ""
705
 
706
+ #: pro/pretty-link-pro.php:1630 pro/pretty-link-pro.php:1670
707
  msgid "There was an error saving your Twitter account."
708
  msgstr ""
709
 
710
+ #: pro/pretty-link-pro.php:1666
711
  msgid "Your Twitter Account was successfully saved."
712
  msgstr ""
713
 
714
+ #: pro/pretty-link-pro.php:1684 pro/pretty-link-pro.php:1762
715
  msgid "Pretty Bar"
716
  msgstr ""
717
 
718
+ #: pro/pretty-link-pro.php:1685
719
  msgid "Cloaked"
720
  msgstr ""
721
 
722
+ #: pro/pretty-link-pro.php:1686 pro/pretty-link-pro.php:1764
723
  msgid "Pixel"
724
  msgstr ""
725
 
726
+ #: pro/pretty-link-pro.php:1687 pro/pretty-link-pro.php:1765
727
  msgid "Meta Refresh"
728
  msgstr ""
729
 
730
+ #: pro/pretty-link-pro.php:1688 pro/pretty-link-pro.php:1766
731
  msgid "Javascript"
732
  msgstr ""
733
 
734
+ #: pro/pretty-link-pro.php:1763
735
  msgid "Cloak"
736
  msgstr ""
737
 
738
+ #: pro/pretty-link-pro.php:1794
739
  msgid "Image URL:"
740
  msgstr ""
741
 
742
+ #: pro/pretty-link-pro.php:1797
743
  msgid ""
744
  "If set, this will replace the logo image on the PrettyBar. The image that "
745
  "this URL references should be 48x48 Pixels to fit."
746
  msgstr ""
747
 
748
+ #: pro/pretty-link-pro.php:1801
749
  msgid "Background Image URL:"
750
  msgstr ""
751
 
752
+ #: pro/pretty-link-pro.php:1804
753
  msgid ""
754
  "If set, this will replace the background image on PrettyBar. The image that "
755
  "this URL references should be 65px tall - this image will be repeated "
756
  "horizontally across the bar."
757
  msgstr ""
758
 
759
+ #: pro/pretty-link-pro.php:1808
760
  msgid "Background Color:"
761
  msgstr ""
762
 
763
+ #: pro/pretty-link-pro.php:1811
764
  msgid ""
765
  "This will alter the background color of the PrettyBar if you haven't "
766
  "specified a PrettyBar background image."
767
  msgstr ""
768
 
769
+ #: pro/pretty-link-pro.php:1815
770
  msgid "Text Color:"
771
  msgstr ""
772
 
773
+ #: pro/pretty-link-pro.php:1818
774
  msgid ""
775
  "If not set, this defaults to black (RGB value <code>#000000</code>) but you "
776
  "can change it to whatever color you like."
777
  msgstr ""
778
 
779
+ #: pro/pretty-link-pro.php:1822
780
  msgid "Link Color:"
781
  msgstr ""
782
 
783
+ #: pro/pretty-link-pro.php:1825
784
  msgid ""
785
  "If not set, this defaults to blue (RGB value <code>#0000ee</code>) but you "
786
  "can change it to whatever color you like."
787
  msgstr ""
788
 
789
+ #: pro/pretty-link-pro.php:1829
790
  msgid "Link Hover Color:"
791
  msgstr ""
792
 
793
+ #: pro/pretty-link-pro.php:1832
794
  msgid ""
795
  "If not set, this defaults to RGB value <code>#ababab</code> but you can "
796
  "change it to whatever color you like."
797
  msgstr ""
798
 
799
+ #: pro/pretty-link-pro.php:1836
800
  msgid "Visited Link Color:"
801
  msgstr ""
802
 
803
+ #: pro/pretty-link-pro.php:1839
804
  msgid ""
805
  "If not set, this defaults to RGB value <code>#551a8b</code> but you can "
806
  "change it to whatever color you like."
807
  msgstr ""
808
 
809
+ #: pro/pretty-link-pro.php:1843
810
  msgid "Title Char Limit*:"
811
  msgstr ""
812
 
813
+ #: pro/pretty-link-pro.php:1846
814
  msgid ""
815
  "If your Website has a long title then you may need to adjust this value so "
816
  "that it will all fit on the PrettyBar. It is recommended that you keep this "
818
  "good across different browsers and screen resolutions."
819
  msgstr ""
820
 
821
+ #: pro/pretty-link-pro.php:1850
822
  msgid "Description Char Limit*:"
823
  msgstr ""
824
 
825
+ #: pro/pretty-link-pro.php:1853
826
  msgid ""
827
  "If your Website has a long Description (tagline) then you may need to adjust "
828
  "this value so that it will all fit on the PrettyBar. It is recommended that "
830
  "format looks good across different browsers and screen resolutions."
831
  msgstr ""
832
 
833
+ #: pro/pretty-link-pro.php:1857
834
  msgid "Target URL Char Limit*:"
835
  msgstr ""
836
 
837
+ #: pro/pretty-link-pro.php:1860
838
  msgid ""
839
  "If you link to a lot of large Target URLs you may want to adjust this value. "
840
  "It is recommended that you keep this value to <code>40</code> or below so "
841
  "the PrettyBar's format looks good across different browsers and URL sizes"
842
  msgstr ""
843
 
844
+ #: pro/pretty-link-pro.php:1865
845
  msgid "Show Pretty Bar Title"
846
  msgstr ""
847
 
848
+ #: pro/pretty-link-pro.php:1866
849
  msgid ""
850
  "Make sure this is checked if you want the title of your blog (and link) to "
851
  "show up on the PrettyBar."
852
  msgstr ""
853
 
854
+ #: pro/pretty-link-pro.php:1871
855
  msgid "Show Pretty Bar Description"
856
  msgstr ""
857
 
858
+ #: pro/pretty-link-pro.php:1872
859
  msgid ""
860
  "Make sure this is checked if you want your site description to show up on "
861
  "the PrettyBar."
862
  msgstr ""
863
 
864
+ #: pro/pretty-link-pro.php:1877
865
  msgid "Show Pretty Bar Share Links"
866
  msgstr ""
867
 
868
+ #: pro/pretty-link-pro.php:1878
869
  msgid ""
870
  "Make sure this is checked if you want \"share links\" to show up on the "
871
  "PrettyBar."
872
  msgstr ""
873
 
874
+ #: pro/pretty-link-pro.php:1883
875
  msgid "Show Pretty Bar Target URL"
876
  msgstr ""
877
 
878
+ #: pro/pretty-link-pro.php:1884
879
  msgid ""
880
  "Make sure this is checked if you want a link displaying the Target URL to "
881
  "show up on the PrettyBar."
882
  msgstr ""
883
 
884
+ #: pro/pretty-link-pro.php:1914
885
  msgid "Logo Image URL must be a correctly formatted URL"
886
  msgstr ""
887
 
888
+ #: pro/pretty-link-pro.php:1917
889
  msgid "Background Image URL must be a correctly formatted URL"
890
  msgstr ""
891
 
892
+ #: pro/pretty-link-pro.php:1920
893
  msgid "PrettyBar Background Color must be an actual RGB Value"
894
  msgstr ""
895
 
896
+ #: pro/pretty-link-pro.php:1923
897
  msgid "PrettyBar Text Color must be an actual RGB Value"
898
  msgstr ""
899
 
900
+ #: pro/pretty-link-pro.php:1926
901
  msgid "PrettyBar Link Color must be an actual RGB Value"
902
  msgstr ""
903
 
904
+ #: pro/pretty-link-pro.php:1929 pro/pretty-link-pro.php:1932
905
  msgid "PrettyBar Hover Color must be an actual RGB Value"
906
  msgstr ""
907
 
908
+ #: pro/pretty-link-pro.php:1935
909
  msgid "PrettyBar Title Character Limit must not be blank"
910
  msgstr ""
911
 
912
+ #: pro/pretty-link-pro.php:1938
913
  msgid "PrettyBar Description Character Limit must not be blank"
914
  msgstr ""
915
 
916
+ #: pro/pretty-link-pro.php:1941
917
  msgid "PrettyBar Link Character Limit must not be blank"
918
  msgstr ""
919
 
920
+ #: pro/pretty-link-pro.php:1944
921
  msgid "PrettyBar Title Character Limit must be a number"
922
  msgstr ""
923
 
924
+ #: pro/pretty-link-pro.php:1947
925
  msgid "PrettyBar Description Character Limit must be a number"
926
  msgstr ""
927
 
928
+ #: pro/pretty-link-pro.php:1950
929
  msgid "PrettyBar Link Character Limit must be a number"
930
  msgstr ""
931
 
932
+ #: pro/pretty-link-pro.php:2073
933
  msgid "You are unauthorized to view this resource"
934
  msgstr ""
935
 
936
+ #: pro/pretty-link-pro.php:2103
937
  msgid "View QR Code for this link: %s"
938
  msgstr ""
939
 
940
+ #: pro/pretty-link-pro.php:2111
941
  msgid "Download QR Code for this link: %s"
942
  msgstr ""
943
 
944
+ #: pro/pretty-link-pro.php:2204
945
  msgid "Double Redirection Enabled"
946
  msgstr ""
947
 
pretty-link.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Pretty Link Lite
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.5.9
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2004-2012, Caseproof, LLC
3
  Plugin Name: Pretty Link Lite
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.6.0
7
  Author: Caseproof
8
  Author URI: http://caseproof.com
9
  Copyright: 2004-2012, Caseproof, LLC
prli-bookmarklet.php CHANGED
@@ -1,104 +1,12 @@
1
  <?php
2
- $root = dirname(dirname(dirname(dirname(__FILE__))));
3
- if (file_exists($root.'/wp-load.php'))
4
- require_once($root.'/wp-load.php');
5
- else
6
- require_once($root.'/wp-config.php');
7
-
8
- require_once('prli-config.php');
9
- require_once(PRLI_MODELS_PATH . '/models.inc.php');
10
-
11
- if(isset($_GET['k']))
12
- {
13
- if($_GET['k'] == $prli_options->bookmarklet_auth)
14
- {
15
- $redirect_type = ((isset($_GET['rt']) and $_GET['rt'] != '-1')?$_GET['rt']:'');
16
- $track = ((isset($_GET['trk']) and $_GET['trk'] != '-1')?$_GET['trk']:'');
17
- $group = ((isset($_GET['grp']) and $_GET['grp'] != '-1')?$_GET['grp']:'');
18
-
19
- $result = prli_create_pretty_link( $_GET['target_url'], '', '', '', $group, $track, '', $redirect_type );
20
-
21
- $plink = $prli_link->getOne($result);
22
- $target_url = $plink->url;
23
- $target_url_title = $plink->name;
24
- $pretty_link = "{$prli_blogurl}".PrliUtils::get_permalink_pre_slug_uri()."{$plink->slug}";
25
-
26
- $twitter_status = substr($target_url_title,0,(114 - strlen($pretty_link))) . ((strlen($target_url_title) > 114)?"...":'') . " | $pretty_link";
27
- ?>
28
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
29
- "http://www.w3.org/TR/html4/loose.dtd">
30
- <html>
31
- <head>
32
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
33
- <title><?php echo __('Here\'s your Pretty Link', 'pretty-link'); ?></title>
34
- <script type='text/javascript' src='<?php echo site_url('/wp-includes/js/jquery/jquery.js'); ?>'></script>
35
- <script type='text/javascript' src='<?php echo PRLI_JS_URL . '/jquery.clippy.js'; ?>'></script>
36
- <script type="text/javascript">
37
- jQuery(document).ready(function() {
38
- /* Set up the clippies! */
39
- jQuery('.clippy').clippy({clippy_path: '<?php echo PRLI_JS_URL; ?>/clippy.swf', width: '100px'});
40
- });
41
- </script>
42
- <style type="text/css">
43
- body {
44
- font-family: Arial;
45
- text-align: center;
46
- margin-top: 25px;
47
- }
48
-
49
- h4 {
50
- font-size: 18px;
51
- color: #aaaaaa;
52
- }
53
-
54
- h2 {
55
- font-size: 24px;
56
- font-weight: bold;
57
- }
58
-
59
- h2 a {
60
- text-decoration: none;
61
- color: #1f487e;
62
- }
63
-
64
- h2 a:hover {
65
- text-decoration: none;
66
- color: blue;
67
- }
68
- .clippy {
69
- padding-left: 75px;
70
- }
71
- </style>
72
- </head>
73
- <body>
74
- <p><img src="<?php echo PRLI_IMAGES_URL; ?>/prettylink_logo.jpg" /></p>
75
- <h4><em>here's your pretty link for:</em><br/><?php echo $target_url_title; ?><br/>(<span title="<?php echo $target_url; ?>"><?php echo substr($target_url,0,50) . ((strlen($target_url)>50)?"...":''); ?></span>)</h4>
76
- <h2><a href="<?php echo $pretty_link; ?>"><?php echo $pretty_link; ?></a><br/><span class="clippy"><?php echo $pretty_link; ?></span></h2>
77
- <p>send this link to:<br/>
78
- <a href="http://del.icio.us/post?url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/delicious_32.png" title="delicious" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
79
- <a href="http://www.stumbleupon.com/submit?url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/stumbleupon_32.png" title="stumbleupon" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
80
- <a href="http://digg.com/submit?phase=2&url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/digg_32.png" title="digg" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
81
- <a href="http://twitter.com/home?status=<?php echo urlencode($twitter_status); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/twitter_32.png" title="twitter" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
82
- <a href="http://www.mixx.com/submit?page_url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/mixx_32.png" title="mixx" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
83
- <a href="http://technorati.com/faves?add=<?php echo urlencode($pretty_link) ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/technorati_32.png" title="technorati" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
84
- <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode($pretty_link) ?>&t=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/facebook_32.png" title="facebook" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
85
- <a href="http://www.newsvine.com/_tools/seed&save?u=<?php echo urlencode($pretty_link) ?>&h=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/newsvine_32.png" title="news vine" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
86
- <a href="http://reddit.com/submit?url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/reddit_32.png" title="reddit" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
87
- <a href="http://www.linkedin.com/sharearticle?mini=true&url=<?php echo urlencode($pretty_link) ?>&title=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/linkedin_32.png" title="linkedin" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
88
- <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=<?php echo urlencode($pretty_link) ?>&=<?php echo urlencode($target_url_title); ?>" target="_blank"><img src="<?php echo PRLI_IMAGES_URL; ?>/yahoobuzz_32.png" title="yahoo! bookmarks" width="32px" height="32px" border="0" /></a>&nbsp;&nbsp;
89
- <p><a href="<?php echo $_GET['target_url']; ?>">&laquo; back</a></p>
90
- </body>
91
- </html>
92
- <?php
93
- }
94
- else
95
- {
96
- wp_redirect($prli_blogurl);
97
- exit;
98
  }
 
99
  }
100
- else
101
- {
102
- wp_redirect($prli_blogurl);
103
- exit;
104
- }
1
  <?php
2
+ function get_params() {
3
+ $accepted_params = array('k','target_url','action','rt','trk','grp');
4
+ $param_str = '';
5
+ foreach($_GET as $k => $v) {
6
+ if(in_array($k,$accepted_params))
7
+ $param_str .= "&{$k}={$v}";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  }
9
+ return $param_str;
10
  }
11
+
12
+ header("location: /index.php?action=prli_bookmarklet".get_params());
 
 
 
prli-clicks.php CHANGED
@@ -31,44 +31,44 @@ if(!isset($_REQUEST['action']))
31
  $edmon = date('n',$end_timestamp);
32
  $eddom = date('j',$end_timestamp);
33
 
34
- $where_clause = " cl.created_at BETWEEN '$sdyear-$sdmon-$sddom 00:00:00' AND '$edyear-$edmon-$eddom 23:59:59'";
35
 
36
- if(!empty($params['sdate']))
37
- $page_params .= "&sdate=".$params['sdate'];
38
 
39
- if(!empty($params['edate']))
40
- $page_params .= "&edate=".$params['edate'];
41
 
42
  if(!empty($params['l']) and $params['l'] != 'all')
43
  {
44
- $where_clause .= (($params['l'] != 'all')?" AND cl.link_id=".$params['l']:'');
45
- $link_name = $wpdb->get_var("SELECT name FROM ".$wpdb->prefix."prli_links WHERE id=".$params['l']);
46
- $link_slug = $wpdb->get_var("SELECT slug FROM ".$wpdb->prefix."prli_links WHERE id=".$params['l']);
47
 
48
- $page_params .= "&l=".$params['l'];
49
  }
50
  else if(!empty($params['ip']))
51
  {
52
- $link_name = "IP Address: " . $params['ip'];
53
- $where_clause .= " AND cl.ip='".$params['ip']."'";
54
- $page_params .= "&ip=".$params['ip'];
55
  }
56
  else if(!empty($params['vuid']))
57
  {
58
- $link_name = "Visitor: " . $params['vuid'];
59
- $where_clause .= " AND cl.vuid='".$params['vuid']."'";
60
- $page_params .= "&vuid=".$params['vuid'];
61
  }
62
  else if(!empty($params['group']))
63
  {
64
  $group = $prli_group->getOne($params['group']);
65
- $link_name = "Group: " . $group->name;
66
- $where_clause .= " AND cl.link_id IN (SELECT id FROM " . $prli_link->table_name . " WHERE group_id=".$params['group'].")";
67
- $page_params .= "&group=".$params['group'];
68
  }
69
  else
70
  {
71
- $link_name = "All Links";
72
  $where_clause .= "";
73
  $page_params .= "";
74
  }
@@ -96,7 +96,7 @@ if(!isset($_REQUEST['action']))
96
  $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
97
  $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
98
 
99
- require_once 'classes/views/prli-clicks/list.php';
100
  }
101
  else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'csv')
102
  {
@@ -105,66 +105,64 @@ else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'csv')
105
 
106
  if(isset($_GET['l']))
107
  {
108
- $where_clause = " link_id=".$_GET['l'];
109
- $link_name = $wpdb->get_var("SELECT name FROM ".$wpdb->prefix."prli_links WHERE id=".$_GET['l']);
110
- $link_slug = $wpdb->get_var("SELECT slug FROM ".$wpdb->prefix."prli_links WHERE id=".$_GET['l']);
111
- $param_string .= "l=".$_GET['l'];
112
  }
113
  else if(isset($_GET['ip']))
114
  {
115
  $link_name = "ip_addr_" . $_GET['ip'];
116
- $where_clause = " cl.ip='".$_GET['ip']."'";
117
- $param_string .= "ip=".$_GET['ip'];
118
  }
119
  else if(isset($_GET['vuid']))
120
  {
121
  $link_name = "visitor_" . $_GET['vuid'];
122
- $where_clause = " cl.vuid='".$_GET['vuid']."'";
123
- $param_string .= "vuid=".$_GET['vuid'];
124
  }
125
  else if(isset($_GET['group']))
126
  {
127
  $group = $prli_group->getOne($_GET['group']);
128
- $link_name = "group_" . $group->name;
129
- $where_clause .= " cl.link_id IN (SELECT id FROM {$prli_link->table_name} WHERE group_id=".$_GET['group'].")";
130
- $param_string .= "group=".$_GET['group'];
131
  }
132
  else
133
- {
134
  $link_name = "all_links";
135
- }
136
-
137
  $hit_record_count = $prli_click->getRecordCount($where_clause);
138
  $hit_page_count = (int)ceil($hit_record_count / $max_rows_per_file);
139
 
140
  $param_string = (empty($param_string)?'':"&{$param_string}");
141
  $hit_report_url = "{$prli_blogurl}/index.php?action=prli_download_csv_hit_report{$param_string}";
142
 
143
- require_once 'classes/views/prli-clicks/csv_download.php';
144
  }
145
  else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'prli_download_csv_hit_report')
146
  {
147
  if(isset($_GET['l']))
148
  {
149
- $where_clause = " link_id=".$_GET['l'];
150
- $link_name = $wpdb->get_var("SELECT name FROM ".$wpdb->prefix."prli_links WHERE id=".$_GET['l']);
151
- $link_slug = $wpdb->get_var("SELECT slug FROM ".$wpdb->prefix."prli_links WHERE id=".$_GET['l']);
152
  }
153
  else if(isset($_GET['ip']))
154
  {
155
- $link_name = "ip_addr_" . $_GET['ip'];
156
- $where_clause = " cl.ip='".$_GET['ip']."'";
157
  }
158
  else if(isset($_GET['vuid']))
159
  {
160
- $link_name = "visitor_" . $_GET['vuid'];
161
- $where_clause = " cl.vuid='".$_GET['vuid']."'";
162
  }
163
  else if(isset($_GET['group']))
164
  {
165
  $group = $prli_group->getOne($_GET['group']);
166
- $link_name = "group_" . $group->name;
167
- $where_clause .= " cl.link_id IN (SELECT id FROM " . $prli_link->table_name . " WHERE group_id=".$_GET['group'].")";
168
  }
169
  else
170
  {
@@ -177,7 +175,7 @@ else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'prli_download_csv
177
 
178
  $record_count = $prli_click->getRecordCount($where_clause);
179
  $page_count = (int)ceil($record_count / $max_rows_per_file);
180
- $prli_page = $_GET['prli_page'];
181
  $hmin = 0;
182
 
183
  if($prli_page)
@@ -190,13 +188,15 @@ else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'prli_download_csv
190
 
191
  $hlimit = "{$hmin},{$max_rows_per_file}";
192
  $clicks = $prli_click->getAll($where_clause,'',false,$hlimit);
193
- require_once 'classes/views/prli-clicks/csv.php';
194
  }
195
 
196
  // Helpers
197
  function prli_get_click_sort_vars($params,$where_clause = '')
198
  {
199
- $count_where_clause = '';
 
 
200
  $page_params = '';
201
  $order_by = '';
202
 
@@ -208,34 +208,47 @@ function prli_get_click_sort_vars($params,$where_clause = '')
208
  // Insert search string
209
  if(!empty($search_str))
210
  {
211
- $search_params = explode(" ", $search_str);
212
 
213
  $first_pass = true;
214
  foreach($search_params as $search_param)
215
  {
216
  if($first_pass)
217
  {
218
- if($where_clause != '')
219
  $where_clause .= ' AND';
 
 
220
 
221
  $first_pass = false;
222
  }
223
- else
224
  $where_clause .= ' AND';
 
 
225
 
226
- $where_clause .= " (cl.ip LIKE '%$search_param%' OR ".
227
- "cl.vuid LIKE '%$search_param%' OR ".
228
- "cl.btype LIKE '%$search_param%' OR ".
229
- "cl.bversion LIKE '%$search_param%' OR ".
230
- "cl.host LIKE '%$search_param%' OR ".
231
- "cl.referer LIKE '%$search_param%' OR ".
232
- "cl.uri LIKE '%$search_param%' OR ".
233
- "cl.created_at LIKE '%$search_param%'";
234
- $count_where_clause = $where_clause . ")";
235
- $where_clause .= " OR li.name LIKE '%$search_param%')";
 
 
 
 
 
 
 
 
 
236
  }
237
 
238
- $page_params .="&search=$search_str";
239
  }
240
 
241
  // Have to create a separate var so sorting doesn't get screwed up
@@ -279,12 +292,6 @@ function prli_get_click_sort_vars($params,$where_clause = '')
279
  else
280
  $sdir_str = 'asc';
281
 
282
- return array('count_where_clause' => $count_where_clause,
283
- 'sort_str' => $sort_str,
284
- 'sdir_str' => $sdir_str,
285
- 'search_str' => $search_str,
286
- 'where_clause' => $where_clause,
287
- 'order_by' => $order_by,
288
- 'sort_params' => $sort_params,
289
- 'page_params' => $page_params);
290
- }
31
  $edmon = date('n',$end_timestamp);
32
  $eddom = date('j',$end_timestamp);
33
 
34
+ $where_clause = $wpdb->prepare(" cl.created_at BETWEEN '%d-%d-%d 00:00:00' AND '%d-%d-%d 23:59:59'",$sdyear,$sdmon,$sddom,$edyear,$edmon,$eddom);
35
 
36
+ if(!empty($params['sdate']) and preg_match('/^\d\d\d\d-\d\d-\d\d$/', $params['sdate']))
37
+ $page_params .= "&sdate={$params['sdate']}";
38
 
39
+ if(!empty($params['edate']) and preg_match('/^\d\d\d\d-\d\d-\d\d$/', $params['edate']))
40
+ $page_params .= "&edate={$params['edate']}";
41
 
42
  if(!empty($params['l']) and $params['l'] != 'all')
43
  {
44
+ $where_clause .= (($params['l'] != 'all') ? $wpdb->prepare(" AND cl.link_id=%d",$params['l']):'');
45
+ $link_name = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->prefix}prli_links WHERE id=%d", $params['l']));
46
+ $link_slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->prefix}prli_links WHERE id=%d", $params['l']));
47
 
48
+ $page_params .= "&l={$params['l']}";
49
  }
50
  else if(!empty($params['ip']))
51
  {
52
+ $link_name = __("IP Address: ", 'pretty-link') . esc_html($params['ip']);
53
+ $where_clause .= $wpdb->prepare(" AND cl.ip=%d", $params['ip']);
54
+ $page_params .= "&ip={$params['ip']}";
55
  }
56
  else if(!empty($params['vuid']))
57
  {
58
+ $link_name = __("Visitor: ", 'pretty-link') . esc_html($params['vuid']);
59
+ $where_clause .= $wpdb->prepare(" AND cl.vuid=%s",$params['vuid']);
60
+ $page_params .= "&vuid={$params['vuid']}";
61
  }
62
  else if(!empty($params['group']))
63
  {
64
  $group = $prli_group->getOne($params['group']);
65
+ $link_name = __("Group: ", 'pretty-link') . esc_html($group->name);
66
+ $where_clause .= $wpdb->prepare(" AND cl.link_id IN (SELECT id FROM {$prli_link->table_name} WHERE group_id=%d)",$params['group']);
67
+ $page_params .= "&group={$params['group']}";
68
  }
69
  else
70
  {
71
+ $link_name = __("All Links", 'pretty-link');
72
  $where_clause .= "";
73
  $page_params .= "";
74
  }
96
  $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
97
  $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
98
 
99
+ require_once PRLI_VIEWS_PATH . '/prli-clicks/list.php';
100
  }
101
  else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'csv')
102
  {
105
 
106
  if(isset($_GET['l']))
107
  {
108
+ $where_clause = $wpdb->prepare(" link_id=%d",$_GET['l']);
109
+ $link_name = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->prefix}prli_links WHERE id=%d",$_GET['l']));
110
+ $link_slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->prefix}prli_links WHERE id=%d",$_GET['l']));
111
+ $param_string .= "l={$_GET['l']}";
112
  }
113
  else if(isset($_GET['ip']))
114
  {
115
  $link_name = "ip_addr_" . $_GET['ip'];
116
+ $where_clause = $wpdb->prepare(" cl.ip=%s",$_GET['ip']);
117
+ $param_string .= "ip={$_GET['ip']}";
118
  }
119
  else if(isset($_GET['vuid']))
120
  {
121
  $link_name = "visitor_" . $_GET['vuid'];
122
+ $where_clause = $wpdb->prepare(" cl.vuid=%s",$_GET['vuid']);
123
+ $param_string .= "vuid={$_GET['vuid']}";
124
  }
125
  else if(isset($_GET['group']))
126
  {
127
  $group = $prli_group->getOne($_GET['group']);
128
+ $link_name = "group_{$group->name}";
129
+ $where_clause .= $wpdb->prepare(" cl.link_id IN (SELECT id FROM {$prli_link->table_name} WHERE group_id=%d)",$_GET['group']);
130
+ $param_string .= "group={$_GET['group']}";
131
  }
132
  else
 
133
  $link_name = "all_links";
134
+
 
135
  $hit_record_count = $prli_click->getRecordCount($where_clause);
136
  $hit_page_count = (int)ceil($hit_record_count / $max_rows_per_file);
137
 
138
  $param_string = (empty($param_string)?'':"&{$param_string}");
139
  $hit_report_url = "{$prli_blogurl}/index.php?action=prli_download_csv_hit_report{$param_string}";
140
 
141
+ require_once PRLI_VIEWS_PATH . '/prli-clicks/csv_download.php';
142
  }
143
  else if(isset($_REQUEST['action']) and $_REQUEST['action'] == 'prli_download_csv_hit_report')
144
  {
145
  if(isset($_GET['l']))
146
  {
147
+ $where_clause = $wpdb->prepare(" link_id=%d",$_GET['l']);
148
+ $link_name = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->prefix}prli_links WHERE id=%d",$_GET['l']));
149
+ $link_slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->prefix}prli_links WHERE id=%d",$_GET['l']));
150
  }
151
  else if(isset($_GET['ip']))
152
  {
153
+ $link_name = "ip_addr_{$_GET['ip']}";
154
+ $where_clause = $wpdb->prepare(" cl.ip=%s",$_GET['ip']);
155
  }
156
  else if(isset($_GET['vuid']))
157
  {
158
+ $link_name = "visitor_{$_GET['vuid']}";
159
+ $where_clause = $wpdb->prepare(" cl.vuid=%s",$_GET['vuid']);
160
  }
161
  else if(isset($_GET['group']))
162
  {
163
  $group = $prli_group->getOne($_GET['group']);
164
+ $link_name = "group_{$group->name}";
165
+ $where_clause .= $wpdb->prepare(" cl.link_id IN (SELECT id FROM {$prli_link->table_name} WHERE group_id=%d)", $_GET['group']);
166
  }
167
  else
168
  {
175
 
176
  $record_count = $prli_click->getRecordCount($where_clause);
177
  $page_count = (int)ceil($record_count / $max_rows_per_file);
178
+ $prli_page = esc_html($_GET['prli_page']);
179
  $hmin = 0;
180
 
181
  if($prli_page)
188
 
189
  $hlimit = "{$hmin},{$max_rows_per_file}";
190
  $clicks = $prli_click->getAll($where_clause,'',false,$hlimit);
191
+ require_once PRLI_VIEWS_PATH . '/prli-clicks/csv.php';
192
  }
193
 
194
  // Helpers
195
  function prli_get_click_sort_vars($params,$where_clause = '')
196
  {
197
+ global $wpdb;
198
+
199
+ $count_where_clause = $where_clause;
200
  $page_params = '';
201
  $order_by = '';
202
 
208
  // Insert search string
209
  if(!empty($search_str))
210
  {
211
+ $search_params = explode(" ", esc_html($search_str));
212
 
213
  $first_pass = true;
214
  foreach($search_params as $search_param)
215
  {
216
  if($first_pass)
217
  {
218
+ if($where_clause != '') {
219
  $where_clause .= ' AND';
220
+ $count_where_clause .= ' AND';
221
+ }
222
 
223
  $first_pass = false;
224
  }
225
+ else {
226
  $where_clause .= ' AND';
227
+ $count_where_clause .= ' AND';
228
+ }
229
 
230
+ $search_param = $sp = "%" . like_escape($search_param) . "%";
231
+ $where_clause .= $wpdb->prepare( " (cl.ip LIKE %s OR ".
232
+ "cl.vuid LIKE %s OR ".
233
+ "cl.btype LIKE %s OR ".
234
+ "cl.bversion LIKE %s OR ".
235
+ "cl.host LIKE %s OR ".
236
+ "cl.referer LIKE %s OR ".
237
+ "cl.uri LIKE %s OR ".
238
+ "cl.created_at LIKE %s", $sp, $sp, $sp, $sp, $sp, $sp, $sp, $sp );
239
+ $count_where_clause .= $wpdb->prepare( " (cl.ip LIKE %s OR ".
240
+ "cl.vuid LIKE %s OR ".
241
+ "cl.btype LIKE %s OR ".
242
+ "cl.bversion LIKE %s OR ".
243
+ "cl.host LIKE %s OR ".
244
+ "cl.referer LIKE %s OR ".
245
+ "cl.uri LIKE %s OR ".
246
+ "cl.created_at LIKE %s", $sp, $sp, $sp, $sp, $sp, $sp, $sp, $sp );
247
+ $count_where_clause .= ")";
248
+ $where_clause .= $wpdb->prepare( " OR li.name LIKE %s)", $sp );
249
  }
250
 
251
+ $page_params .= "&search=" . urlencode($search_str);
252
  }
253
 
254
  // Have to create a separate var so sorting doesn't get screwed up
292
  else
293
  $sdir_str = 'asc';
294
 
295
+ return compact( 'count_where_clause', 'sort_str', 'sdir_str', 'search_str',
296
+ 'where_clause', 'order_by', 'sort_params', 'page_params' );
297
+ }
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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: 3.0
6
  Tested up to: 3.3.1
7
- Stable tag: 1.5.9
8
 
9
  Shrink, beautify, track, manage and share any URL on or off of your WordPress website. Create links that look how you want using your own domain name!
10
 
@@ -66,6 +66,9 @@ http://blairwilliams.com/w7a
66
 
67
  == Changelog ==
68
 
 
 
 
69
  = 1.5.9 =
70
  * *Feature* Added Bulk Actions for Pretty Link Management page
71
  * *Feature* Added the ability to change the number of rows displayed in the Pretty Link Management page (no longer limited to 10)
@@ -352,6 +355,9 @@ http://blairwilliams.com/w7a
352
 
353
  == Upgrade Notice ==
354
 
 
 
 
355
  = 1.5.9 =
356
  * This adds some very useful features for link managment in Lite & Pro ... everyone should upgrade.
357
 
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: 3.0
6
  Tested up to: 3.3.1
7
+ Stable tag: 1.6.0
8
 
9
  Shrink, beautify, track, manage and share any URL on or off of your WordPress website. Create links that look how you want using your own domain name!
10
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.6.0 =
70
+ * *Fix* Fixed some potential security vulnerabilities
71
+
72
  = 1.5.9 =
73
  * *Feature* Added Bulk Actions for Pretty Link Management page
74
  * *Feature* Added the ability to change the number of rows displayed in the Pretty Link Management page (no longer limited to 10)
355
 
356
  == Upgrade Notice ==
357
 
358
+ = 1.6.0 =
359
+ * This adds some security fixes. Everyone should upgrade.
360
+
361
  = 1.5.9 =
362
  * This adds some very useful features for link managment in Lite & Pro ... everyone should upgrade.
363