Easy Plugin for AdSense - Version 7.01

Version Description

Changes to show ads on home/front pages made up of full posts. (Those made up of excerpts cannot show ads.)

Download this release

Release Info

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

Code changes from version 7.00 to 7.01

Files changed (7) hide show
  1. EzOptions.php +12 -6
  2. EzTran.php +97 -57
  3. easy-adsense-lite.php +2 -9
  4. head-text.php +1 -1
  5. loading.gif +0 -0
  6. readme.txt +10 -3
  7. tail-text.php +3 -4
EzOptions.php CHANGED
@@ -525,6 +525,7 @@ if (!class_exists("EzBasePlugin")) {
525
  var $slug, $domain, $name, $plgDir, $plgURL, $plgFile;
526
  var $ezTran, $ezAdmin, $myPlugins;
527
  var $isPro, $strPro;
 
528
 
529
  function __construct($slug, $name, $file) {
530
  $this->slug = $slug;
@@ -567,12 +568,7 @@ if (!class_exists("EzBasePlugin")) {
567
  }
568
  }
569
 
570
- function printAdminPage() {
571
- // if translating, print translation interface
572
- if ($this->ezTran->printAdminPage()) {
573
- return;
574
- }
575
- $this->handleSubmits();
576
  require_once($this->plgDir . '/myPlugins.php');
577
  $slug = $this->slug;
578
  $plg = $this->myPlugins[$slug];
@@ -593,6 +589,16 @@ if (!class_exists("EzBasePlugin")) {
593
  return $this->ezAdmin;
594
  }
595
 
 
 
 
 
 
 
 
 
 
 
596
  }
597
 
598
  }
525
  var $slug, $domain, $name, $plgDir, $plgURL, $plgFile;
526
  var $ezTran, $ezAdmin, $myPlugins;
527
  var $isPro, $strPro;
528
+ var $options;
529
 
530
  function __construct($slug, $name, $file) {
531
  $this->slug = $slug;
568
  }
569
  }
570
 
571
+ function mkEzAdmin() {
 
 
 
 
 
572
  require_once($this->plgDir . '/myPlugins.php');
573
  $slug = $this->slug;
574
  $plg = $this->myPlugins[$slug];
589
  return $this->ezAdmin;
590
  }
591
 
592
+ function printAdminPage() {
593
+ // if translating, print translation interface
594
+ if ($this->ezTran->printAdminPage()) {
595
+ return;
596
+ }
597
+ $this->handleSubmits();
598
+ $this->mkEzAdmin();
599
+ return $this->ezAdmin;
600
+ }
601
+
602
  }
603
 
604
  }
EzTran.php CHANGED
@@ -21,7 +21,7 @@ if (!class_exists("PO")) {
21
 
22
  class PO { // an id-str pair with attributes
23
 
24
- var $num, $id, $str, $tranId, $tranVal, $keyId, $keyVal;
25
 
26
  const MINMATCH = 89;
27
 
@@ -87,7 +87,7 @@ if (!class_exists("PO")) {
87
  'Please check carefully.\',WIDTH, 300)" ' .
88
  'onmouseout="UnTip()"';
89
  }
90
- if (empty($this->str)) {
91
  $col = "background-color:#dff;border: solid 1px #0ff";
92
  $tit = 'onmouseover = "Tip(\'Using Machine Translation from Google.<br />Please check carefully.\',WIDTH, 300)" ' .
93
  'onmouseout="UnTip()"';
@@ -101,14 +101,12 @@ if (!class_exists("PO")) {
101
  return $s;
102
  }
103
 
104
- function googleTran() {
105
- $q = urlencode($this->id);
106
- $locale = get_locale();
107
- $tl = substr($locale, 0, 2);
108
  $sl = "auto";
109
  if (!$q) {
110
  return;
111
- } // avoid unneeded curling
112
  $url = 'http://translate.google.com/translate_a/t?client=a&q=' . $q . '&tl=' . $tl . '&sl=' . $sl;
113
  $ch = curl_init();
114
  curl_setopt($ch, CURLOPT_URL, $url);
@@ -118,17 +116,33 @@ if (!class_exists("PO")) {
118
  $output = curl_exec($ch);
119
  curl_close($ch);
120
  if ($output === false) {
121
- return "No help from Google!";
122
  }
123
  $jsonarr = json_decode($output);
124
  if (!$jsonarr) {
125
- return "No help from Google!";
126
  }
127
- if (!isset($jsonarr->results)) {
128
- $jsonarr2->results[] = $jsonarr;
129
- $jsonarr = $jsonarr2;
 
 
 
 
 
 
 
 
 
 
 
 
130
  }
131
- return $jsonarr->results[0]->sentences[0]->trans;
 
 
 
 
132
  }
133
 
134
  }
@@ -139,7 +153,8 @@ if (!class_exists("EzTran")) {
139
 
140
  class EzTran {
141
 
142
- var $status, $error, $plgName, $plgDir, $plgURL, $domain, $locale, $state;
 
143
  var $adminMsg;
144
  var $helpers;
145
 
@@ -193,8 +208,11 @@ if (!class_exists("EzTran")) {
193
  }
194
 
195
  // Return the contents of all PHP files in the dir specified
196
- function getFileContents() {
197
- $files = glob($this->plgDir . '/*.php');
 
 
 
198
  $page = "";
199
  foreach ($files as $f) {
200
  $page .= file_get_contents($f, FILE_IGNORE_NEW_LINES);
@@ -257,6 +275,10 @@ if (!class_exists("EzTran")) {
257
  }
258
  $po = new PO($k, $t);
259
  $po->num = $n;
 
 
 
 
260
  array_push($POs, $po);
261
  }
262
  $this->getClose($mo, $POs);
@@ -301,19 +323,6 @@ EOF;
301
  }
302
  }
303
 
304
- // Error messages
305
- function errMsg($s, $class = "error", $close = true) {
306
- $e = '';
307
- if ($class == "error") {
308
- $e = "<b>Error: </b>";
309
- }
310
- $s = '<div class="' . $class . '"><p>' . $e . $s . '</p></div>';
311
- if ($close) {
312
- $s .= "\n</div>\n";
313
- }
314
- return $s;
315
- }
316
-
317
  function handleSubmits() {
318
  $adminNeeded = false;
319
  if (empty($_POST)) {
@@ -343,32 +352,44 @@ EOF;
343
  return $adminNeeded;
344
  }
345
  if (!empty($_POST['ezt-mailPot'])) {
346
- $file = $_POST['potFile'];
347
- $str = stripslashes($_POST['potStr']);
348
- $str = str_replace("\'", "'", $str);
 
349
 
350
- if (!class_exists("phpmailer")) {
351
- require_once(ABSPATH . 'wp-includes/class-phpmailer.php');
352
- }
353
- $mail = new PHPMailer();
354
- $mail->From = get_bloginfo('admin_email');
355
- $mail->FromName = get_bloginfo('name');
356
- $mail->AddAddress('Manoj@Thulasidas.com', "Manoj Thulasidas");
357
- $mail->CharSet = get_bloginfo('charset');
358
- $mail->Mailer = 'php';
359
- $mail->SMTPAuth = false;
360
- $mail->Subject = $file;
361
- $mail->AddStringAttachment($str, $file);
362
- $pos1 = strpos($str, "msgstr");
363
- $pos2 = strpos($str, "msgid", $pos1);
364
- $head = substr($str, 0, $pos2);
365
- $mail->Body = $head;
366
- if ($mail->Send()) {
367
- $this->status = '<div class="updated">Pot file: ' . $file . ' was sent.</div> ';
 
 
 
 
 
 
 
 
 
 
 
 
368
  }
369
  else {
370
- $this->error = '<div class="error">Error: ' . $mail->ErrorInfo .
371
- ' Please save the pot file and <a href="mailto:Manoj@Thulasidas.com">contact the author</a></div>';
372
  }
373
  return $adminNeeded;
374
  }
@@ -377,6 +398,8 @@ EOF;
377
 
378
  // Prints out the admin page
379
  function printAdminPage() {
 
 
380
  $printed = false;
381
  if (!$this->handleSubmits()) {
382
  return $printed;
@@ -388,15 +411,26 @@ EOF;
388
  return $printed;
389
  }
390
  $printed = true;
391
- $backButton = "<br /><b>If you are done with translating, <input type='button' value='Go Back to {$this->plgName} Admin' onClick='location.reload(true)'>.<br />You can continue later, and your translation for the session will be remembered until you close the browser window.</b>";
 
 
 
 
 
 
392
  echo '<div class="wrap" style="width:1000px">';
393
  echo '<form method="post" action="#">';
394
  wp_nonce_field('ezTranSubmit', 'ezTranNonce');
395
  echo "<input type='hidden' name='eztran' value='eztran'>";
396
- $locale = get_locale();
397
  $made = isset($_POST['ezt-make']);
398
  echo "\n<script type='text/javascript' src='{$this->plgURL}/wz_tooltip.js'></script>\n";
399
- echo "<h2>Translation Interface for {$this->plgName}</h2>";
 
 
 
 
 
400
  $domain = $this->domain;
401
 
402
  if (isset($_SESSION[$this->domain]['ezt-POs'])) {
@@ -485,6 +519,11 @@ EOF;
485
  echo '<input type="hidden" name="potFile" value="' .
486
  $domain . "-" . $locale . '.po" />';
487
  echo '<input type="hidden" name="potStr" value="' . $pot . '" />';
 
 
 
 
 
488
  echo $saveStr;
489
  echo "\n" . '<pre>' . $pot . '</pre>';
490
  }
@@ -512,12 +551,13 @@ EOF1;
512
  return "";
513
  }
514
  $plgName = $this->plgName;
 
515
  if ($this->state == "Not Translated") {
516
- $tip = htmlentities("It is easy to have <b>$plgName</b> in your language. All you have to do is to translate some strings, and email the file to the author.<br /><br />If you would like to help, please use the translation interface. It picks up the translatable strings in <b>$plgName</b> and presents them (and their existing translations in <b>$locale</b>, if any) in an easy-to-edit form. You can then generate a translation file and email it to the author all from the same form. I will include your translation in the next release.");
517
  $invite = "<span style='color:red'> Would you like to see <b>$plgName</b> in your langugage (<b>$locale</b>)?&nbsp; <input type='submit' name='ezt-translate' onmouseover=\"Tip('$tip', WIDTH, 350, TITLE, 'How to Translate?', STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true, FIX, [this, 0, 5])\" onmouseout=\"UnTip()\" value ='Please help translate ' /></span>";
518
  }
519
  else {
520
- $tip = htmlentities("If you would like to improve this translation, please use the translation interface. It picks up the translatable strings in <b>$plgName</b> and presents them and their existing translations in <b>$locale</b> in an easy-to-edit form. You can then generate a translation file and email it to the author all from the same form. Slick, isn\'t it? I will include your translation in the next release.");
521
  $invite = "<span style='color:red'> Would you like to improve this translation of <b>$plgName</b> in your langugage (<b>$locale</b>)?  <input type='submit' name='ezt-translate' onmouseover=\'Tip('$tip', WIDTH, 350, TITLE, 'How to Translate?', STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true, FIX, [this, 0, 5])\' onmouseout=\'UnTip()\' value='Improve $locale translation' /></span>";
522
  }
523
  return $invite;
21
 
22
  class PO { // an id-str pair with attributes
23
 
24
+ var $num, $id, $str, $tranId, $tranVal, $keyId, $keyVal, $tl = '';
25
 
26
  const MINMATCH = 89;
27
 
87
  'Please check carefully.\',WIDTH, 300)" ' .
88
  'onmouseout="UnTip()"';
89
  }
90
+ if (empty($this->str) && !empty($this->tl)) {
91
  $col = "background-color:#dff;border: solid 1px #0ff";
92
  $tit = 'onmouseover = "Tip(\'Using Machine Translation from Google.<br />Please check carefully.\',WIDTH, 300)" ' .
93
  'onmouseout="UnTip()"';
101
  return $s;
102
  }
103
 
104
+ function googleTran1($q) {
105
+ $tl = $this->tl;
 
 
106
  $sl = "auto";
107
  if (!$q) {
108
  return;
109
+ }
110
  $url = 'http://translate.google.com/translate_a/t?client=a&q=' . $q . '&tl=' . $tl . '&sl=' . $sl;
111
  $ch = curl_init();
112
  curl_setopt($ch, CURLOPT_URL, $url);
116
  $output = curl_exec($ch);
117
  curl_close($ch);
118
  if ($output === false) {
119
+ return "No help (output) from Google!";
120
  }
121
  $jsonarr = json_decode($output);
122
  if (!$jsonarr) {
123
+ return "No help (json) from Google!";
124
  }
125
+ if (isset($jsonarr->results)) {
126
+ $ret = $jsonarr->results[0]->sentences[0]->trans;
127
+ }
128
+ else {
129
+ $ret = $jsonarr->sentences[0]->trans;
130
+ }
131
+ return $ret;
132
+ }
133
+
134
+ function googleTran() {
135
+ $sentences = preg_split('/(?<=[.?!;:])\s+/', $this->id, -1, PREG_SPLIT_NO_EMPTY);
136
+ $ret = '';
137
+ foreach ($sentences as $s) {
138
+ $q = urlencode($s);
139
+ $ret .= ' ' . $this->googleTran1($q);
140
  }
141
+ return trim($ret);
142
+ }
143
+
144
+ function setTl($tl) {
145
+ $this->tl = $tl;
146
  }
147
 
148
  }
153
 
154
  class EzTran {
155
 
156
+ var $status, $error, $plgName, $plgDir, $plgURL, $domain, $locale, $state,
157
+ $isEmbedded = true, $isPro = false;
158
  var $adminMsg;
159
  var $helpers;
160
 
208
  }
209
 
210
  // Return the contents of all PHP files in the dir specified
211
+ function getFileContents($dir = '') {
212
+ if (empty($dir)) {
213
+ $dir = $this->plgDir;
214
+ }
215
+ $files = glob("$dir/*.php");
216
  $page = "";
217
  foreach ($files as $f) {
218
  $page .= file_get_contents($f, FILE_IGNORE_NEW_LINES);
275
  }
276
  $po = new PO($k, $t);
277
  $po->num = $n;
278
+ if ($this->isEmbedded || $this->isPro) {
279
+ $tl = substr($this->locale, 0, 2);
280
+ $po->setTl($tl);
281
+ }
282
  array_push($POs, $po);
283
  }
284
  $this->getClose($mo, $POs);
323
  }
324
  }
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  function handleSubmits() {
327
  $adminNeeded = false;
328
  if (empty($_POST)) {
352
  return $adminNeeded;
353
  }
354
  if (!empty($_POST['ezt-mailPot'])) {
355
+ if ($this->isEmbedded || $this->isPro) {
356
+ $file = $_POST['potFile'];
357
+ $str = stripslashes($_POST['potStr']);
358
+ $str = str_replace("\'", "'", $str);
359
 
360
+ if (!class_exists("phpmailer")) {
361
+ require_once(ABSPATH . 'wp-includes/class-phpmailer.php');
362
+ }
363
+ $mail = new PHPMailer();
364
+ $mail->From = get_bloginfo('admin_email');
365
+ $mail->FromName = get_bloginfo('name');
366
+ if ($this->isEmbedded) {
367
+ $author = "Manoj Thulasidas";
368
+ $authormail = 'Manoj@Thulasidas.com';
369
+ }
370
+ else {
371
+ $author = $_POST['ezt-author'];
372
+ $authormail = $_POST['ezt-authormail'];
373
+ }
374
+ $mail->AddAddress($authormail, $author);
375
+ $mail->CharSet = get_bloginfo('charset');
376
+ $mail->Mailer = 'php';
377
+ $mail->SMTPAuth = false;
378
+ $mail->Subject = $file;
379
+ $mail->AddStringAttachment($str, $file);
380
+ $pos1 = strpos($str, "msgstr");
381
+ $pos2 = strpos($str, "msgid", $pos1);
382
+ $head = substr($str, 0, $pos2);
383
+ $mail->Body = $head;
384
+ if ($mail->Send()) {
385
+ $this->status = "<div class='updated'>Pot file: $file was sent.</div>";
386
+ }
387
+ else {
388
+ $this->error = "<div class='error'>Error: {$mail->ErrorInfo} Please save the pot file and <a href='mailto:$authormail'>contact $author</a></div>";
389
+ }
390
  }
391
  else {
392
+ $this->status = '<div style="background-color:#cff;padding:5px;margin:5px;border:solid 1px;margin-top:10px;font-weight:bold;color:red">In the <a href="http://buy.thulasidas.com/easy-translator">Pro Version</a>, the Pot file would have been sent to the plugin author.<br />In this Lite version, please download the PO file (using the "Display &amp; Save POT File" button above) and email it using your mail client.</div><br />';
 
393
  }
394
  return $adminNeeded;
395
  }
398
 
399
  // Prints out the admin page
400
  function printAdminPage() {
401
+ echo '<script type="text/javascript">window.onload = function() {jQuery("#loading").fadeOut("slow");};</script>';
402
+ echo "<div id='loading'><p><img src='{$this->plgURL}/loading.gif' alt='loading'/> Please Wait. Loading...</p></div>";
403
  $printed = false;
404
  if (!$this->handleSubmits()) {
405
  return $printed;
411
  return $printed;
412
  }
413
  $printed = true;
414
+ if ($this->isEmbedded) {
415
+ $backButtonVal = "Go Back to {$this->plgName} Admin";
416
+ }
417
+ else {
418
+ $backButtonVal = "Go Back to Easy Translator";
419
+ }
420
+ $backButton = "<br /><b>If you are done with translating, <input type='button' value='$backButtonVal' onClick='location.reload(true)'><br />You can continue later, and your translation for the session will be remembered until you close the browser window.</b>";
421
  echo '<div class="wrap" style="width:1000px">';
422
  echo '<form method="post" action="#">';
423
  wp_nonce_field('ezTranSubmit', 'ezTranNonce');
424
  echo "<input type='hidden' name='eztran' value='eztran'>";
425
+ $locale = $this->locale;
426
  $made = isset($_POST['ezt-make']);
427
  echo "\n<script type='text/javascript' src='{$this->plgURL}/wz_tooltip.js'></script>\n";
428
+ if ($this->isEmbedded) {
429
+ echo "<h2>Translation Interface for {$this->plgName}</h2>";
430
+ }
431
+ else {
432
+ echo "<h2>Translating {$this->plgName} using Easy Translator</h2>";
433
+ }
434
  $domain = $this->domain;
435
 
436
  if (isset($_SESSION[$this->domain]['ezt-POs'])) {
519
  echo '<input type="hidden" name="potFile" value="' .
520
  $domain . "-" . $locale . '.po" />';
521
  echo '<input type="hidden" name="potStr" value="' . $pot . '" />';
522
+ if (!$this->isEmbedded) {
523
+ $mail = "<br /><span style='width:15%;float:left;'>Plugin Author:</span><input type='text' style='width: 30%' name='ezt-author' value='' /><br />\n";
524
+ $mail .= "<span style='width:15%;float:left'>Author's Email:</span><input type='text' style='width: 30%' name='ezt-authormail' value='' />\n<br />";
525
+ echo $mail;
526
+ }
527
  echo $saveStr;
528
  echo "\n" . '<pre>' . $pot . '</pre>';
529
  }
551
  return "";
552
  }
553
  $plgName = $this->plgName;
554
+ $patience = "I will include your translation in the next release.<br /><br /><span style=\"color:red;font-weight:bold\">Please note that the page may take a while to load because the plugin will query Google Translator for each string. Please be patient!</span>";
555
  if ($this->state == "Not Translated") {
556
+ $tip = htmlentities("It is easy to have <b>$plgName</b> in your language. All you have to do is to translate some strings, and email the file to the author.<br /><br />If you would like to help, please use the translation interface. It picks up the translatable strings in <b>$plgName</b> and presents them (and their existing translations in <b>$locale</b>, if any) in an easy-to-edit form. You can then generate a translation file and email it to the author all from the same form. $patience");
557
  $invite = "<span style='color:red'> Would you like to see <b>$plgName</b> in your langugage (<b>$locale</b>)?&nbsp; <input type='submit' name='ezt-translate' onmouseover=\"Tip('$tip', WIDTH, 350, TITLE, 'How to Translate?', STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true, FIX, [this, 0, 5])\" onmouseout=\"UnTip()\" value ='Please help translate ' /></span>";
558
  }
559
  else {
560
+ $tip = htmlentities("If you would like to improve this translation, please use the translation interface. It picks up the translatable strings in <b>$plgName</b> and presents them and their existing translations in <b>$locale</b> in an easy-to-edit form. You can then generate a translation file and email it to the author all from the same form. Slick, isn\'t it? $patience");
561
  $invite = "<span style='color:red'> Would you like to improve this translation of <b>$plgName</b> in your langugage (<b>$locale</b>)?  <input type='submit' name='ezt-translate' onmouseover=\'Tip('$tip', WIDTH, 350, TITLE, 'How to Translate?', STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true, FIX, [this, 0, 5])\' onmouseout=\'UnTip()\' value='Improve $locale translation' /></span>";
562
  }
563
  return $invite;
easy-adsense-lite.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Easy AdSense
5
  Plugin URI: http://www.thulasidas.com/adsense
6
  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>.
7
- Version: 7.00
8
  Author: Manoj Thulasidas
9
  Author URI: http://www.thulasidas.com
10
  */
@@ -739,14 +739,7 @@ if (!class_exists("EzAdSense")) {
739
  return $paras;
740
  }
741
 
742
- function mayBeExcerpt() {
743
- return is_home() || is_category() || is_tag() || is_archive();
744
- }
745
-
746
- function filterContent($content, $force = false) {
747
- if (!$force && $this->mayBeExcerpt()) {
748
- return $content;
749
- }
750
  foreach ($this->kills as $k) {
751
  $fn = "is_$k";
752
  if ($this->options["kill_$k"] && $fn()) {
4
  Plugin Name: Easy AdSense
5
  Plugin URI: http://www.thulasidas.com/adsense
6
  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>.
7
+ Version: 7.01
8
  Author: Manoj Thulasidas
9
  Author URI: http://www.thulasidas.com
10
  */
739
  return $paras;
740
  }
741
 
742
+ function filterContent($content) {
 
 
 
 
 
 
 
743
  foreach ($this->kills as $k) {
744
  $fn = "is_$k";
745
  if ($this->options["kill_$k"] && $fn()) {
head-text.php CHANGED
@@ -19,7 +19,7 @@
19
 
20
  echo '<td style="width:30%">';
21
 
22
- if (rand(0, 2) % 2 || $this->slug == "easy-ads" || $this->slug == "google-adsense") {
23
  $ez->renderSupportText();
24
  $ez->renderTipDivs();
25
  }
19
 
20
  echo '<td style="width:30%">';
21
 
22
+ if (rand(0, 2) % 2 || $ez->slug == "easy-ads" || $ez->slug == "google-adsense") {
23
  $ez->renderSupportText();
24
  $ez->renderTipDivs();
25
  }
loading.gif ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://buy.thulasidas.com/easy-adsense
4
  Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
5
  Requires at least: 2.6
6
  Tested up to: 3.8
7
- Stable tag: 7.00
8
  License: GPL2 or later
9
 
10
  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!
@@ -42,7 +42,7 @@ Easy AdSense is the freely distributed version of a premium plugin. The [Pro ver
42
 
43
  == Upgrade Notice ==
44
 
45
- Major changes to the options data model and the translation interface. If you notice anything not working as expected, please leave a note.
46
 
47
  == Screenshots ==
48
 
@@ -62,6 +62,12 @@ Although the Easy AdSense plugin is designed to handle Google AdSense efficientl
62
 
63
  == Frequently Asked Questions ==
64
 
 
 
 
 
 
 
65
  = I just activated the plugin. How come I don't see any ads in my blog? =
66
 
67
  Note that you have to generate your adsense code from Google, and paste the *entire* code in the text boxes, replacing the existing text. There are three main text boxes corresponding to three ad locations - Lead-in, Mid-text and Lead-out. If you don't want to use a particular location, please suppress it by selecting the appropriate option. Otherwise, the plugin will show a red box indicating where you ad would be shown.
@@ -70,7 +76,7 @@ If you just created the new Google AdSense code, it may not be active yet. Googl
70
 
71
  = I activated the plugin, and I see a lot of red boxes on my blog posts your ads will be inserted here. How do I get rid of them? =
72
 
73
- Easy AdSense shows the spots on your blog where the ads would be shown if you entered the ad code on its admin page by drawing a red box. This is meant to serve as a reminder for you to go to the admin page and enter the ad code. If you would like to suppress them, check the option "Suppress Placement Boxes" near the bottom of the admin page. The right thing to do, however, would be to enter your ad codes in the text boxes for each ad slot, or suppress the ad slot by selecting the corresponding "Show" option under the ad slot text box.
74
 
75
  = The admin page is cluttered with links and information about the author. Any way to suppress them? =
76
 
@@ -134,6 +140,7 @@ A big "Thank You" to all my translators. Easy AdSense V2.6+ sports an *Easy Tran
134
 
135
  == Change Log ==
136
 
 
137
  * V7.00: Major changes to the options data model and the translation interface. [Mar 21, 2014]
138
  * V6.51: Adding options to suppress ads on sticky front page or search pages. [Jan 7, 2014]
139
  * V6.50: Compatibility checks for WordPress V3.8. Admin page updates [Dec 17, 2013]
4
  Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
5
  Requires at least: 2.6
6
  Tested up to: 3.8
7
+ Stable tag: 7.01
8
  License: GPL2 or later
9
 
10
  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!
42
 
43
  == Upgrade Notice ==
44
 
45
+ Changes to show ads on home/front pages made up of full posts. (Those made up of excerpts cannot show ads.)
46
 
47
  == Screenshots ==
48
 
62
 
63
  == Frequently Asked Questions ==
64
 
65
+ = Why doesn't my home/front page show no ads? =
66
+
67
+ Ads are inserted by attaching a filter to the contents. If your home/front page is made up of full posts, the content filter will apply and you will see ads. On the other hand, if your home/front page is made up of excerpts (snippets of post contents), the content filter doesn't apply.
68
+
69
+ It is possible to apply the filter on excerpts as well. But then, we have to make sure that it applies only to the first three excerpts (to comply with Google policy). This feature is implemented in the [Pro version](http://buy.thulasidas.com/easy-adsense "Pro version of the Easy AdSense plugin") of the plugin.
70
+
71
  = I just activated the plugin. How come I don't see any ads in my blog? =
72
 
73
  Note that you have to generate your adsense code from Google, and paste the *entire* code in the text boxes, replacing the existing text. There are three main text boxes corresponding to three ad locations - Lead-in, Mid-text and Lead-out. If you don't want to use a particular location, please suppress it by selecting the appropriate option. Otherwise, the plugin will show a red box indicating where you ad would be shown.
76
 
77
  = I activated the plugin, and I see a lot of red boxes on my blog posts your ads will be inserted here. How do I get rid of them? =
78
 
79
+ Easy AdSense draws a red box on your blog posts to show where the ads would be shown if you entered the ad code on its admin page. This is meant to serve as a reminder for you to go to the admin page and enter the ad code. If you would like to suppress them, check the option "Suppress Placement Boxes" near the bottom of the admin page. The right thing to do, however, would be to enter your ad codes in the text boxes for each ad slot, or suppress the ad slot by selecting the corresponding "Show" option under the ad slot text box.
80
 
81
  = The admin page is cluttered with links and information about the author. Any way to suppress them? =
82
 
140
 
141
  == Change Log ==
142
 
143
+ * V7.01: Changes to show ads on home/front pages made up of full posts. Translation interface improvements. [Mar 29, 2014]
144
  * V7.00: Major changes to the options data model and the translation interface. [Mar 21, 2014]
145
  * V6.51: Adding options to suppress ads on sticky front page or search pages. [Jan 7, 2014]
146
  * V6.50: Compatibility checks for WordPress V3.8. Admin page updates [Dec 17, 2013]
tail-text.php CHANGED
@@ -16,9 +16,8 @@
16
  along with this program. If not, see <http://www.gnu.org/licenses/>.
17
  */
18
 
19
- if (!$this->options['kill_author']) {
20
  ?>
21
-
22
  <table class="form-table" >
23
  <tr>
24
  <td>
@@ -36,7 +35,7 @@ if (!$this->options['kill_author']) {
36
 
37
  <?php
38
  $myPluginsU = array_unique($this->myPlugins, SORT_REGULAR);
39
- unset($myPluginsU[$this->slug]);
40
  foreach ($myPluginsU as $k => $p) {
41
  if (isset($p['hide']) || isset($p['kind'])) {
42
  unset($myPluginsU[$k]);
@@ -44,7 +43,7 @@ if (!$this->options['kill_author']) {
44
  }
45
  $keys = array_rand($myPluginsU, 3);
46
  foreach ($keys as $name) {
47
- if ($name != $this->slug) {
48
  $ez->renderPlg($name, $myPluginsU[$name]);
49
  }
50
  }
16
  along with this program. If not, see <http://www.gnu.org/licenses/>.
17
  */
18
 
19
+ if (!$ez->killAuthor) {
20
  ?>
 
21
  <table class="form-table" >
22
  <tr>
23
  <td>
35
 
36
  <?php
37
  $myPluginsU = array_unique($this->myPlugins, SORT_REGULAR);
38
+ unset($myPluginsU[$ez->slug]);
39
  foreach ($myPluginsU as $k => $p) {
40
  if (isset($p['hide']) || isset($p['kind'])) {
41
  unset($myPluginsU[$k]);
43
  }
44
  $keys = array_rand($myPluginsU, 3);
45
  foreach ($keys as $name) {
46
+ if ($name != $ez->slug) {
47
  $ez->renderPlg($name, $myPluginsU[$name]);
48
  }
49
  }