Easy Plugin for AdSense - Version 5.12

Version Description

Documentation and admin updates. Translation interface changes.

=

Download this release

Release Info

Developer manojtd
Plugin Icon 128x128 Easy Plugin for AdSense
Version 5.12
Comparing to
See all releases

Code changes from version 5.11 to 5.12

Files changed (5) hide show
  1. easy-adsense-lite.php +1 -1
  2. head-text.php +10 -2
  3. invite.gif +0 -0
  4. lang/easy-translator.php +18 -22
  5. readme.txt +8 -7
easy-adsense-lite.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Easy AdSense
4
  Plugin URI: http://www.thulasidas.com/adsense
5
  Description: Easiest way to show AdSense and make money from your blog. Configure it at <a href="options-general.php?page=easy-adsense-lite.php">Settings &rarr; Easy AdSense</a>.
6
- Version: 5.11
7
  Author: Manoj Thulasidas
8
  Author URI: http://www.thulasidas.com
9
  */
3
  Plugin Name: Easy AdSense
4
  Plugin URI: http://www.thulasidas.com/adsense
5
  Description: Easiest way to show AdSense and make money from your blog. Configure it at <a href="options-general.php?page=easy-adsense-lite.php">Settings &rarr; Easy AdSense</a>.
6
+ Version: 5.12
7
  Author: Manoj Thulasidas
8
  Author URI: http://www.thulasidas.com
9
  */
head-text.php CHANGED
@@ -67,6 +67,11 @@ function renderProText($name, $plg) {
67
  echo "</div>" ;
68
  }
69
 
 
 
 
 
 
70
  function renderSupportText($name, $plg, $long=true) {
71
  $value = '<em><strong>'.$plg['value'].'</strong></em>';
72
  $supportText = "<div style=\"background-color:#cff;padding:5px;border: solid 1px\" id=\"support\"><b>Support $value. <a href=\"http://buy.thulasidas.com/$name\" title=\"Pro version of this plugin. Instant download link.\">Go Pro!</a></b>" ;
@@ -167,13 +172,16 @@ ENDDIVS;
167
 
168
  echo '<td width="30%">' ;
169
 
170
- renderSupportText($plgName, $myPlugins[$plgName], $myPlugins[$plgName]['long']) ;
 
 
 
 
171
 
172
  echo '</td>' ;
173
  echo '<td width="30%">' ;
174
 
175
  renderProText($plgName, $myPlugins[$plgName]) ;
176
- renderTipDivs($name) ;
177
 
178
  echo '</td>' ;
179
 
67
  echo "</div>" ;
68
  }
69
 
70
+ function renderAffiliate() {
71
+ $plugindir = get_option('siteurl') . '/' . PLUGINDIR . '/' . basename(dirname(__FILE__)) ;
72
+ echo "<div style='padding:0px;border:none; width:300px' id='support' onmouseover=\"Tip('<b>ezAffiliates</b>: The most affiliate-centric revenue sharing model on the Web. Finally, you can make some serious returns on your web presence.<br /><b>Generous 50% Commission</b>: perhaps the highest rate of revenue sharing on the web. With just a couple of sales of this plugin, you will have recovered your purchase price!<br /><b>$10 Minimum Payout</b> so that you will not be waiting forever before you qualify for payment.<br /><b>Lifetime Tracking</b>: ezAffiliates uses cookie-less tracking technology to attribute every purchase of your lead to your account. Whatever your leads buy from us, whenever they do, will earn you commission. No cookie expiry!<br /><b>High Quality Products</b> such as this plugin, and other premium plugins and PHP packages.<br /><b>Diverse Markets</b>: Bloggers who blog about plugins, PayPal integration, affiliate marketing, MacOS apps and even eBooks will find ezAffiliates attractive and more effective that their current ad campaigns.', WIDTH, 295, TITLE, 'ezAffiliates', FIX, [this, 0, 0])\" onmouseout=\"UnTip()\" ><a href='http://affiliates.thulasidas.com'><img src='$plugindir/invite.gif' /></a></div>" ;
73
+ }
74
+
75
  function renderSupportText($name, $plg, $long=true) {
76
  $value = '<em><strong>'.$plg['value'].'</strong></em>';
77
  $supportText = "<div style=\"background-color:#cff;padding:5px;border: solid 1px\" id=\"support\"><b>Support $value. <a href=\"http://buy.thulasidas.com/$name\" title=\"Pro version of this plugin. Instant download link.\">Go Pro!</a></b>" ;
172
 
173
  echo '<td width="30%">' ;
174
 
175
+ if (rand(0,2) % 2) {
176
+ renderSupportText($plgName, $myPlugins[$plgName], $myPlugins[$plgName]['long']) ;
177
+ renderTipDivs($name) ;
178
+ }
179
+ else renderAffiliate() ;
180
 
181
  echo '</td>' ;
182
  echo '<td width="30%">' ;
183
 
184
  renderProText($plgName, $myPlugins[$plgName]) ;
 
185
 
186
  echo '</td>' ;
187
 
invite.gif ADDED
Binary file
lang/easy-translator.php CHANGED
@@ -25,7 +25,7 @@ condition, and confirming that your sites abide by Google's policies
25
  and terms of service.
26
  */
27
 
28
- define('minmatch', 89) ;
29
 
30
  if (!class_exists("ezTran") && !class_exists("PO")) {
31
  class PO { // an id-str pair with attributes
@@ -34,14 +34,17 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
34
  function PO($id, $str) {
35
  $this->id = (string) $id ;
36
  $this->str = (string) $str ;
37
- $this->tranVal = minmatch ;
38
- $this->keyVal = minmatch ;
39
  }
40
 
41
  // Returns a properly escaped string
42
- function decorate($str, $esc) {
43
- $str = stripslashes($str) ;
44
- $str = addcslashes($str, $esc) ;
 
 
 
45
  return $str ;
46
  }
47
 
@@ -49,10 +52,10 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
49
  function textId() {
50
  $ht = round(strlen($this->id)/52 + 1) * 25 ;
51
  $col = 'background-color:#f5f5f5;' ;
52
- if ($this->keyVal > minmatch+1) {
53
  $col = "background-color:#ffc;border: solid 1px #f00" ;
54
  $tit = 'onmouseover = "Tip(\'Another similar string: ' .
55
- htmlspecialchars('<br /><em><b>' . $this->decorate($this->keyId, "\n") .
56
  '</b></em><br /> ', ENT_QUOTES) .
57
  'exists. Please alert the author.\',WIDTH, 300)" ' .
58
  'onmouseout="UnTip()"';
@@ -67,10 +70,10 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
67
 
68
  function textStr() {
69
  $ht = round(strlen($this->id)/52 + 1) * 25 ;
70
- if ($this->tranVal > minmatch+1){
71
  $col = "background-color:#fdd;border: solid 1px #f00" ;
72
  $tit = 'onmouseover = "Tip(\'Using the translation for a similar string: ' .
73
- htmlspecialchars('<br /><em><b>' . $this->decorate($this->tranId, "\n") .
74
  '</b></em><br />', ENT_QUOTES) .
75
  'Please check carefully.\',WIDTH, 300)" ' .
76
  'onmouseout="UnTip()"';
@@ -99,7 +102,7 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
99
  header('Expires: 0');
100
  header('Pragma: no-cache');
101
  ob_start() ;
102
- print stripslashes(htmlspecialchars_decode($str, ENT_QUOTES)) ;
103
  ob_end_flush() ;
104
  $this->status = '<div class="updated">Pot file: ' . $file . ' was saved.</div> ' ;
105
  exit(0) ;
@@ -138,13 +141,6 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
138
  }
139
  }
140
 
141
- // Returns a properly escaped string
142
- function decorate($str, $esc) {
143
- $str = stripslashes($str) ;
144
- $str = addcslashes($str, $esc) ;
145
- return $str ;
146
- }
147
-
148
  // Return the contents of all PHP files in the dir specified
149
  function getFileContents($dir="") {
150
  if ($dir == "") $dir = dirname(__FILE__) ;
@@ -214,7 +210,7 @@ if (!class_exists("ezTran") && !class_exists("PO")) {
214
  function mkPot(&$POs, $msg){
215
  $pot = '' ;
216
  $pot .=
217
- '# This file was generated by Easy Translator -- a WordPress plugin translator
218
  # Your Name: ' . $msg["name"] . '
219
  # Your Email: ' . $msg["email"] . '
220
  # Your Website: ' . $msg["blog"] . '
@@ -233,9 +229,9 @@ msgstr ""
233
 
234
  ' ;
235
  foreach ($POs as $n => $po) {
236
- $pot .= "msgid " . '"' . $this->decorate($po->id, "\n\r\"") . '"' . "\n" ;
237
  $t = $msg[$po->num] ;
238
- $pot .= "msgstr " . '"' . $this->decorate($t, "\n\r") . '"' . "\n\n" ;
239
  }
240
  return $pot ;
241
  }
@@ -244,7 +240,7 @@ msgstr ""
244
  function updatePot(&$POs, $msg){
245
  foreach ($POs as $n => $po) {
246
  $t = $msg[$po->num] ;
247
- $po->str = $this->decorate($t, "\n\r") ;
248
  }
249
  }
250
 
25
  and terms of service.
26
  */
27
 
28
+ define('MINMATCH', 89) ;
29
 
30
  if (!class_exists("ezTran") && !class_exists("PO")) {
31
  class PO { // an id-str pair with attributes
34
  function PO($id, $str) {
35
  $this->id = (string) $id ;
36
  $this->str = (string) $str ;
37
+ $this->tranVal = MINMATCH ;
38
+ $this->keyVal = MINMATCH ;
39
  }
40
 
41
  // Returns a properly escaped string
42
+ static function decorate($str, $esc) {
43
+ if (!get_magic_quotes_gpc()) $str = addcslashes($str, $esc) ;
44
+ return $str ;
45
+ }
46
+ static function undecorate($str) {
47
+ if (!get_magic_quotes_gpc()) $str = stripslashes($str) ;
48
  return $str ;
49
  }
50
 
52
  function textId() {
53
  $ht = round(strlen($this->id)/52 + 1) * 25 ;
54
  $col = 'background-color:#f5f5f5;' ;
55
+ if ($this->keyVal > MINMATCH+1) {
56
  $col = "background-color:#ffc;border: solid 1px #f00" ;
57
  $tit = 'onmouseover = "Tip(\'Another similar string: ' .
58
+ htmlspecialchars('<br /><em><b>' . $this->keyId .
59
  '</b></em><br /> ', ENT_QUOTES) .
60
  'exists. Please alert the author.\',WIDTH, 300)" ' .
61
  'onmouseout="UnTip()"';
70
 
71
  function textStr() {
72
  $ht = round(strlen($this->id)/52 + 1) * 25 ;
73
+ if ($this->tranVal > MINMATCH+1){
74
  $col = "background-color:#fdd;border: solid 1px #f00" ;
75
  $tit = 'onmouseover = "Tip(\'Using the translation for a similar string: ' .
76
+ htmlspecialchars('<br /><em><b>' . $this->tranId .
77
  '</b></em><br />', ENT_QUOTES) .
78
  'Please check carefully.\',WIDTH, 300)" ' .
79
  'onmouseout="UnTip()"';
102
  header('Expires: 0');
103
  header('Pragma: no-cache');
104
  ob_start() ;
105
+ print htmlspecialchars_decode($str, ENT_QUOTES) ;
106
  ob_end_flush() ;
107
  $this->status = '<div class="updated">Pot file: ' . $file . ' was saved.</div> ' ;
108
  exit(0) ;
141
  }
142
  }
143
 
 
 
 
 
 
 
 
144
  // Return the contents of all PHP files in the dir specified
145
  function getFileContents($dir="") {
146
  if ($dir == "") $dir = dirname(__FILE__) ;
210
  function mkPot(&$POs, $msg){
211
  $pot = '' ;
212
  $pot .=
213
+ '# This file was generated by Easy Translator for Easy AdSense -- a WordPress plugin translator
214
  # Your Name: ' . $msg["name"] . '
215
  # Your Email: ' . $msg["email"] . '
216
  # Your Website: ' . $msg["blog"] . '
229
 
230
  ' ;
231
  foreach ($POs as $n => $po) {
232
+ $pot .= "msgid " . '"' . PO::decorate($po->id, "\n\r\"") . '"' . "\n" ;
233
  $t = $msg[$po->num] ;
234
+ $pot .= "msgstr " . '"' . PO::decorate($t, "\n\r") . '"' . "\n\n" ;
235
  }
236
  return $pot ;
237
  }
240
  function updatePot(&$POs, $msg){
241
  foreach ($POs as $n => $po) {
242
  $t = $msg[$po->num] ;
243
+ $po->str = PO::undecorate($t) ;
244
  }
245
  }
246
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Easy AdSense ===
2
  Contributors: manojtd
3
- Donate link: http://buy.thulasidas.com/easy-adsense
4
  Tags: adsense, ad, ads, advertising, easy adsense, google, adsense plugin
5
  Requires at least: 2.6
6
  Tested up to: 3.3
7
- Stable tag: 5.11
8
 
9
  Easy AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
10
 
@@ -28,17 +28,17 @@ Easy AdSense provides a very easy way to generate revenue from your blog using G
28
  5. Simplest possible configuration interface -- nothing more than cutting and pasting AdSense code, and with sensible defaults for the few options present, all with clear instructions.
29
  6. Internationalized (multiple languages supported).
30
 
31
- Easy AdSense is the freely distributed version of a premium plugin. The [Pro version](http://buy.ads-ez.com/easy-adsense/ "Pro version of the Easy AdSense plugin") gives you more benefits. It gives you filter to ensure that your Google AdSense ads show only on those pages that seem to comply with Google AdSense policies, which can be important since some comments may render your pages inconsistent with those policies. It also lets you specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned. Also in the works for the Pro version is a compatibility mode, which solves the issue of the ad insertion messing up your page appearances when using some themes.
32
 
33
  = New in this Release =
34
 
35
- Renaming the plugin -- dropping the word Lite, and other minor documentation changes.
36
 
37
  == Upgrade Notice ==
38
 
39
- = 5.11 =
40
 
41
- Renaming the plugin -- dropping the word Lite, and other minor documentation changes.
42
 
43
  == Screenshots ==
44
 
@@ -64,7 +64,7 @@ This seems to be a problem with some WordPress installations. I have never been
64
 
65
  = What are the different versions of the plugin? =
66
 
67
- Easy AdSense is the freely distributed version of a premium plugin. The [Pro version](https://buy.ads-ez.com/easy-adsense/ "Pro version of the Easy AdSense plugin") gives you more benefits -- lets you activate a filter to ensure that your ads show only on those pages that seem to comply with Google AdSense policies. It also lets you specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned. The Pro version costs $4.95, and is appropriate if you expect to make more than $100 of ad revenue from your site.
68
 
69
  Note that support is *not* included. Each [support question](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HYZ5AWPYSC8VA "Ask a support question via PayPal") (for both the Lite and Pro versions) will be charged at $0.95. The same charges will apply for follow-up questions as well. In other words, support pricing is on a per-question basis, not a per-issue basis.
70
 
@@ -122,6 +122,7 @@ A big "Thank You" to all my translators. Easy AdSense V2.6+ sports an *Easy Tran
122
 
123
  == Change Log ==
124
 
 
125
  * V5.11: Renaming the plugin -- dropping the word Lite, and other minor documentation changes. [May 7, 2012]
126
  * V5.10: Updating a few translations (only change). [Apr 18, 2012]
127
  * V5.09: Updating a few translations, consolidating image resources and trimming auxiliary files. New option to suppress invitations to upgrade the plugin. [Mar 20, 2012]
1
  === Easy AdSense ===
2
  Contributors: manojtd
3
+ Donate link: http://affiliates.thulasidas.com/
4
  Tags: adsense, ad, ads, advertising, easy adsense, google, adsense plugin
5
  Requires at least: 2.6
6
  Tested up to: 3.3
7
+ Stable tag: 5.12
8
 
9
  Easy AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
10
 
28
  5. Simplest possible configuration interface -- nothing more than cutting and pasting AdSense code, and with sensible defaults for the few options present, all with clear instructions.
29
  6. Internationalized (multiple languages supported).
30
 
31
+ Easy AdSense is the freely distributed version of a premium plugin. The [Pro version](http://buy.thulasidas.com/easy-adsense "Pro version of the Easy AdSense plugin") gives you more benefits. It gives you filter to ensure that your Google AdSense ads show only on those pages that seem to comply with Google AdSense policies, which can be important since some comments may render your pages inconsistent with those policies. It also lets you specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned. Also in the works for the Pro version is a compatibility mode, which solves the issue of the ad insertion messing up your page appearances when using some themes.
32
 
33
  = New in this Release =
34
 
35
+ Documentation and admin updates. Translation interface changes.
36
 
37
  == Upgrade Notice ==
38
 
39
+ = 5.12 =
40
 
41
+ Documentation and admin updates. Translation interface changes.
42
 
43
  == Screenshots ==
44
 
64
 
65
  = What are the different versions of the plugin? =
66
 
67
+ Easy AdSense is the freely distributed version of a premium plugin. The [Pro version](https://buy.thulasidas.com/easy-adsense "Pro version of the Easy AdSense plugin") gives you more benefits -- lets you activate a filter to ensure that your ads show only on those pages that seem to comply with Google AdSense policies. It also lets you specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned. The Pro version costs $4.95, and is appropriate if you expect to make more than $100 of ad revenue from your site.
68
 
69
  Note that support is *not* included. Each [support question](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HYZ5AWPYSC8VA "Ask a support question via PayPal") (for both the Lite and Pro versions) will be charged at $0.95. The same charges will apply for follow-up questions as well. In other words, support pricing is on a per-question basis, not a per-issue basis.
70
 
122
 
123
  == Change Log ==
124
 
125
+ * V5.12: Documentation and admin updates. Translation interface changes. [May 24, 2012]
126
  * V5.11: Renaming the plugin -- dropping the word Lite, and other minor documentation changes. [May 7, 2012]
127
  * V5.10: Updating a few translations (only change). [Apr 18, 2012]
128
  * V5.09: Updating a few translations, consolidating image resources and trimming auxiliary files. New option to suppress invitations to upgrade the plugin. [Mar 20, 2012]