Easy Plugin for AdSense - Version 8.64

Version Description

Reverting back to the non-AJAX version of the plugin.

Download this release

Release Info

Developer gsikka33
Plugin Icon 128x128 Easy Plugin for AdSense
Version 8.64
Comparing to
See all releases

Code changes from version 8.60 to 8.64

Files changed (7) hide show
  1. EzAdmin.php +8 -36
  2. admin.php +42 -6
  3. banner.gif +0 -0
  4. easy-adsense-lite.php +28 -73
  5. head-text.php +2 -2
  6. readme.txt +2 -2
  7. tail-text.php +1 -1
EzAdmin.php CHANGED
@@ -178,24 +178,7 @@ ENDINVITE;
178
  $s3 = __("Do not show this anymore", 'easy-common');
179
  $s4 = __("Please Save Options to hide this box forever", 'easy-common');
180
 
181
- echo <<<ENDRATING
182
- <div class='updated' id='rating'>
183
- <p>Thanks for using <i><b>$plgLongName</b></i>! $msg <br />
184
- $s1 <a href='http://wordpress.org/extend/plugins/$plgKey/' onclick="popupwindow('http://wordpress.org/extend/plugins/$plgKey/','$s2', 1024, 1024);return false;">$s2</a>
185
- <small style='font-weight:normal;'><a id='hideRating' $display href='#' style='float:right; display:block; border:none;' onmouseover="Tip('$hideTip', WIDTH, 200, CLOSEBTN, true, CLICKCLOSE, true, FIX, [this, 5, 5], TITLE, 'Hide this Box')" onclick = "hideme()">
186
- $s3</a></small></p></div>
187
- <input type="hidden" id="kill_rating" name="kill_rating" value="" />
188
- <script type = "text/javascript">
189
- function hideRating() {
190
- document.getElementById("rating").style.display = 'none';
191
- }
192
- function hideme() {
193
- document.getElementById("kill_rating").value = 'true' ;
194
- document.getElementById("hideRating").innerHTML = '$s4';
195
- setTimeout('hideRating()', 4000);
196
- }
197
- </script>
198
- ENDRATING;
199
  }
200
 
201
  function renderHeadText() {
@@ -583,25 +566,14 @@ ENDDIVS;
583
  $plg = $this->plg;
584
  $slug = $this->slug;
585
  $value = $plg['value'];
586
- $url = 'http://www.thulasidas.com/plugins/' . $slug . '#faq';
587
  $link = '<a href="' . $url . '" target="_blank">' . $value . '</a>';
588
- echo "&nbsp;<a href='http://support.thulasidas.com' onclick=\"popupwindow('http://support.thulasidas.com','ezSupport for $value', 1024, 768);return false;\" title='";
589
- _e('Ask a support question (in English or French only) via ezSupport @ $0.95', 'easy-common');
590
- echo "'><img src='$plgURL/ezsupport.png' class='alignright' alt='ezSupport Portal'/></a>";
591
- printf(__("If you need help with %s, please read the FAQ section on the %s page. It may answer all your questions.", 'easy-common'), $value, $link);
592
  echo "<br style='line-height: 20px;'/>";
593
- _e("Or, if you still need help, you can raise a support ticket.", 'easy-common');
594
- echo "&nbsp;<a href='http://support.thulasidas.com' onclick=\"popupwindow('http://support.thulasidas.com','ezSupport', 1024, 768);return false;\" title='";
595
- _e('Ask a support question (in English or French only) via ezSupport @ $0.95', 'easy-common');
596
- echo "'>";
597
- _e("[Request Paid Support]", 'easy-common');
598
  $info = $this->getPlgInfo();
599
- echo "</a>&nbsp;<small><em>[";
600
- _e('Using our ezSupport Ticket System.', 'easy-common');
601
- echo "]</em></small>";
602
- echo "<small style='float:right'><em>[";
603
- printf(__('You are using %s (V%s)', 'easy-common'), $value, $info[0]['Version']);
604
- echo "]</em></small>";
605
  $_SESSION['ezSupport'] = $info[0]['Info'];
606
  echo "</div>";
607
  }
@@ -627,7 +599,7 @@ ENDDIVS;
627
  $moreInfo = " &nbsp; &nbsp; <a href='$infoURL' title='$s2' target=_blank> $s4 </a>&nbsp; <a href='$buyURL' $onclick title='$s3'>Get Pro Version</a>";
628
  $toolTip .= addslashes('<br />' . $moreInfo);
629
  $why = addslashes($plg['pro']);
630
- echo '<div style="background-color:#cff;padding:5px;border: solid 1px;margin:5px;padding-bottom:15px;">';
631
  if ($short) {
632
  $s5 = __('Buy the Pro Version', 'easy-common');
633
  $s6 = __('More features, more power!', 'easy-common');
@@ -650,4 +622,4 @@ $moreInfo
650
 
651
  }
652
 
653
- }
178
  $s3 = __("Do not show this anymore", 'easy-common');
179
  $s4 = __("Please Save Options to hide this box forever", 'easy-common');
180
 
181
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
 
184
  function renderHeadText() {
566
  $plg = $this->plg;
567
  $slug = $this->slug;
568
  $value = $plg['value'];
569
+ $url = 'http://adpu.sh/easy-ad-faq';
570
  $link = '<a href="' . $url . '" target="_blank">' . $value . '</a>';
571
+
572
+ printf(__("If you need help with %s, please read the FAQ section on the %s page.", 'easy-common'), $value, $link);
 
 
573
  echo "<br style='line-height: 20px;'/>";
574
+
 
 
 
 
575
  $info = $this->getPlgInfo();
576
+
 
 
 
 
 
577
  $_SESSION['ezSupport'] = $info[0]['Info'];
578
  echo "</div>";
579
  }
599
  $moreInfo = " &nbsp; &nbsp; <a href='$infoURL' title='$s2' target=_blank> $s4 </a>&nbsp; <a href='$buyURL' $onclick title='$s3'>Get Pro Version</a>";
600
  $toolTip .= addslashes('<br />' . $moreInfo);
601
  $why = addslashes($plg['pro']);
602
+ echo '<div style="background-color:#cff;padding:5px;border: solid 1px;margin:5px;padding-bottom:15px;display:none;">';
603
  if ($short) {
604
  $s5 = __('Buy the Pro Version', 'easy-common');
605
  $s6 = __('More features, more power!', 'easy-common');
622
 
623
  }
624
 
625
+ }
admin.php CHANGED
@@ -15,7 +15,38 @@
15
  You should have received a copy of the GNU General Public License
16
  along with the programs. If not, see <http://www.gnu.org/licenses/>.
17
  */
18
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  echo '<script type="text/javascript" src="' . $this->plgURL . '/wz_tooltip.js"></script>';
20
 
21
  $this->mkEzOptions();
@@ -23,10 +54,14 @@ $this->setOptionValues();
23
  $this->mkHelpTags();
24
  ?>
25
  <div class="wrap" id="wrapper" style="width:1000px">
26
- <h2>Easy Plugin for AdSense Setup</h2>
 
 
 
 
27
  <table class="form-table">
28
  <tr style="vertical-align:middle">
29
- <td style="width:40%">
30
  <h3>
31
  <?php
32
  _e('Instructions', 'easy-adsenser');
@@ -230,7 +265,7 @@ $this->mkHelpTags();
230
  </tr>
231
  </table>
232
 
233
- <table class='form-table'>
234
  <tr style='vertical-align:top'>
235
  <td style='width:50%;height:250px;vertical-align:middle'>
236
  <br style='line-height: 12px;' />
@@ -313,16 +348,17 @@ no', 'easy-adsenser'); ?>
313
  ?>
314
 
315
  <table class="form-table" >
316
- <tr><th scope="row"><b><?php _e('Credits', 'easy-adsenser'); ?></b></th></tr>
317
  <tr><td>
318
  <ul style="padding-left:10px;list-style-type:circle; list-style-position:inside;" >
319
  <li>
320
- <?php printf(__('%s uses the excellent Javascript/DHTML tooltips by %s', 'easy-adsenser'), '<b>Easy Adsense</b>', '<a href="http://www.walterzorn.com" target="_blank" title="Javascript, DTML Tooltips"> Walter Zorn</a>.');
321
  ?>
322
  </li>
323
  </ul>
324
  </td>
325
  </tr>
326
  </table>
 
327
 
328
  </div>
15
  You should have received a copy of the GNU General Public License
16
  along with the programs. If not, see <http://www.gnu.org/licenses/>.
17
  */
18
+ echo '<style type="text/css"> tbody {
19
+ background-color : white;
20
+ color: #5D5D5D;
21
+ }
22
+ h2, h3 {
23
+ font-size: 1.4em !important;
24
+ padding-left: 10px;
25
+ }
26
+ h1, h2, h3 {
27
+ color: #D04545 !important;
28
+ }
29
+ u,b{
30
+ color:#EB575C;
31
+ }
32
+ label{padding: 5px;}
33
+ .form-table td{ line-height: 1.6;}
34
+ .form-table th{
35
+ padding: 0px;
36
+ line-height:0;
37
+ }
38
+ input[type="submit"]{
39
+ background-color: #FF7579;
40
+ border: 2px solid #EB575C;
41
+ color: white;
42
+ }
43
+ input[type="submit"]:hover{
44
+ box-shadow: 6px 6px 11px #C5C5C5;
45
+ transition: .5s;
46
+ background-color: white;
47
+ color: #EB575C;
48
+ }
49
+ </style>';
50
  echo '<script type="text/javascript" src="' . $this->plgURL . '/wz_tooltip.js"></script>';
51
 
52
  $this->mkEzOptions();
54
  $this->mkHelpTags();
55
  ?>
56
  <div class="wrap" id="wrapper" style="width:1000px">
57
+ <h2 style="font-size: 2.5em !important;
58
+ color: #8B1606 !important;
59
+ font-weight: 600;
60
+ margin-bottom: 17px;">Easy Plugin for AdSense Setup</h2>
61
+ <a href="http://adpu.sh/easy-ad-link" target="_blank"><img src="../wp-content/plugins/easy-adsense-lite/banner.gif" style="height:auto;width:100%;"></a>
62
  <table class="form-table">
63
  <tr style="vertical-align:middle">
64
+ <td style="width:40%:">
65
  <h3>
66
  <?php
67
  _e('Instructions', 'easy-adsenser');
265
  </tr>
266
  </table>
267
 
268
+ <table class='form-table' style="display:none;">
269
  <tr style='vertical-align:top'>
270
  <td style='width:50%;height:250px;vertical-align:middle'>
271
  <br style='line-height: 12px;' />
348
  ?>
349
 
350
  <table class="form-table" >
351
+ <tr><th scope="row"><h2><?php _e('Credits', 'easy-adsenser'); ?></h2></th></tr>
352
  <tr><td>
353
  <ul style="padding-left:10px;list-style-type:circle; list-style-position:inside;" >
354
  <li>
355
+ <?php printf(__('%s uses the excellent Javascript/DHTML tooltips by %s', 'easy-adsenser'), '<b>Easy Adsense</b>', '<a href="http://www.walterzorn.com" target="_blank" title="Javascript, DTML Tooltips"> Walter Zorn</a> and original author of the plugin was <a href="http://www.thulasidas.com">Manoj Thulasidas</a>');
356
  ?>
357
  </li>
358
  </ul>
359
  </td>
360
  </tr>
361
  </table>
362
+ <a href="http://adpu.sh/easy-ad-link" target="_blank"><img src="../wp-content/plugins/easy-adsense-lite/banner.gif" style="height:auto;width:100%;"></a>
363
 
364
  </div>
banner.gif ADDED
Binary file
easy-adsense-lite.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Easy Plugin for AdSense
5
  Plugin URI: https://wordpress.org/plugins/easy-adsense-lite/
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 Plugin for AdSense</a>.
7
- * Version: 8.60
8
  */
9
 
10
  /*
@@ -70,22 +70,22 @@ if (!class_exists("EzAdSense")) {
70
 
71
  $stats = &$this->stats;
72
  $stats = get_option('easy_adsense_stats_new', (object) array(
73
- 'start_date' => null,
74
- 'duration' => 5,
75
- 'display_admin_notice' => true, // Show option to disable collecting stats for admin
76
- 'admin_has_disabled' => false, // If admin has disable collecting stats
77
- 'expired' => null, // If time period of collecting data ended (Dynamically determined)
78
- 'collecting' => null, // Whether collecting stats (Dynamically determined)
79
  ));
80
 
81
  if (empty($stats->start_date)) {
82
- // Set today's date on first run
83
- $stats->start_date = date('Y-m-d');
84
- update_option('easy_adsense_stats_new', $stats);
85
  }
86
 
87
- $today = date('Y-m-d');
88
- $day_passed = strtotime($today) - strtotime($stats->start_date);
89
 
90
  $stats->expired = $day_passed > $this->stats->duration;
91
  $stats->collecting = !$stats->expired && !$stats->admin_has_disabled;
@@ -126,11 +126,7 @@ if (!class_exists("EzAdSense")) {
126
  $o->desc = __('Check out the FAQ and rate this plugin.', 'easy-adsenser');
127
  $this->helpTags[] = $o;
128
 
129
- $o = new EzHelpPopUp('http://www.thulasidas.com/easy-adsense');
130
- $o->title = __('It is still available as a Premium Plugin. When you buy it, you will get both the AJAX and non-AJAX Pro versions! Find out more.', 'easy-adsenser');
131
- $o->tipTitle = __('Get the AJAX version', 'easy-adsenser');
132
- $o->desc = "<b>" . __('Miss the AJAX version?', 'easy-adsenser') . "</b>";
133
- $this->helpTags[] = $o;
134
  }
135
 
136
  function mkEzOptions() {
@@ -741,60 +737,22 @@ if (!class_exists("EzAdSense")) {
741
 
742
 
743
  function actionAdminInit() {
744
- if (current_user_can('manage_options')) {
745
- global $pagenow;
746
- $page = isset($_GET['page']) && 'easy-adsense-lite.php' == $_GET['page'] ? '?page=easy-adsense-lite.php' : '';
747
-
748
- if (isset($_GET['ezAdSense_stats_display_admin_notice']) && check_admin_referer( 'ezAdSense_stats' )) {
749
- $this->stats->display_admin_notice = ('yes' == $_GET['ezAdSense_stats_display_admin_notice']);
750
- update_option('easy_adsense_stats_new', $this->stats);
751
- header("Location: $pagenow$page");die;
752
- }
753
-
754
- if (isset($_GET['ezAdSense_stats_admin_has_disabled']) && check_admin_referer( 'ezAdSense_stats' )) {
755
- $this->stats->admin_has_disabled = ('yes' == $_GET['ezAdSense_stats_admin_has_disabled']);
756
- update_option('easy_adsense_stats_new', $this->stats);
757
- header("Location: $pagenow$page");die;
758
- }
759
- }
760
- }
761
-
762
- function actionAdminNotices() {
763
- global $pagenow;
764
-
765
- if ($pagenow != 'options-general.php' || empty($_GET['page']) || 'easy-adsense-lite.php' != $_GET['page']) {
766
- return;
767
- }
768
-
769
- if ($this->stats->display_admin_notice && !$this->stats->expired && current_user_can('manage_options')) {
770
- $active = ! $this->stats->admin_has_disabled;
771
-
772
- if ($active) {
773
- $msg = sprintf("Easy AdSense is collecting some anonymous access data for few days to improve the plugin. %s to disable it",
774
- "<a href='?ezAdSense_stats_admin_has_disabled=yes&page=easy-adsense-lite.php&_wpnonce=" . wp_create_nonce('ezAdSense_stats') . "'>" . 'Click here' . '</a>');
775
- } else {
776
- $msg = sprintf("Easy AdSense want to collect some anonymous access data for few days to improve the plugin. %s to enable it",
777
- "<a href='?ezAdSense_stats_admin_has_disabled=no&page=easy-adsense-lite.php&_wpnonce=" . wp_create_nonce('ezAdSense_stats') . "'>" . 'Click here' . '</a>');
778
- }
779
-
780
- echo '<div class="update-nag">';
781
- echo "$msg | <a href='?ezAdSense_stats_display_admin_notice=no&page=easy-adsense-lite.php&_wpnonce=" . wp_create_nonce('ezAdSense_stats') . "'>Hide Notice</a>";
782
- echo "</div>";
783
-
784
- }
785
- }
786
-
787
- function actionWpFooter() {
788
- if ($this->stats->collecting) { ?>
789
-
790
- <script type="text/javascript">
791
- // Easy AdSense is collecting some anonymous access data for few days to improve the plugin. To opt out visit plugin setting page
792
- var random_key = Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2);
793
- var image_url = 'http://azure-test-vm-1.cloudapp.net/img.jpg?no_cache=' + random_key;
794
- document.write("<img style='display:none' src='" + image_url + "'></img");
795
- </script>
796
 
797
- <?php }
 
 
 
 
 
798
  }
799
 
800
  function filterContent($content) {
@@ -1129,8 +1087,6 @@ if (class_exists("EzAdSense")) {
1129
  add_action('widgets_init', create_function('', 'return register_widget("EzAdsLU");'));
1130
  add_action('admin_menu', 'ezAdSense_ap');
1131
  add_action('admin_init', array($ezAdSense, 'actionAdminInit'));
1132
- add_action('admin_notices', array($ezAdSense, 'actionAdminNotices'));
1133
- add_action('wp_footer', array($ezAdSense, 'actionWpFooter'));
1134
 
1135
  add_filter('plugin_action_links', array($ezAdSense, 'plugin_action'), -10, 2);
1136
 
@@ -1152,4 +1108,3 @@ if (class_exists("EzAdSense")) {
1152
  register_activation_hook(__FILE__, array($ezAdSense, 'migrateOptions'));
1153
  }
1154
  }
1155
-
4
  Plugin Name: Easy Plugin for AdSense
5
  Plugin URI: https://wordpress.org/plugins/easy-adsense-lite/
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 Plugin for AdSense</a>.
7
+ * Version: 8.64
8
  */
9
 
10
  /*
70
 
71
  $stats = &$this->stats;
72
  $stats = get_option('easy_adsense_stats_new', (object) array(
73
+ 'start_date' => null,
74
+ 'duration' => 5,
75
+ 'display_admin_notice' => true, // Show option to disable collecting stats for admin
76
+ 'admin_has_disabled' => false, // If admin has disable collecting stats
77
+ 'expired' => null, // If time period of collecting data ended (Dynamically determined)
78
+ 'collecting' => null, // Whether collecting stats (Dynamically determined)
79
  ));
80
 
81
  if (empty($stats->start_date)) {
82
+ // Set today's date on first run
83
+ $stats->start_date = date('Y-m-d');
84
+ update_option('easy_adsense_stats_new', $stats);
85
  }
86
 
87
+ $today = date('Y-m-d');
88
+ $day_passed = strtotime($today) - strtotime($stats->start_date);
89
 
90
  $stats->expired = $day_passed > $this->stats->duration;
91
  $stats->collecting = !$stats->expired && !$stats->admin_has_disabled;
126
  $o->desc = __('Check out the FAQ and rate this plugin.', 'easy-adsenser');
127
  $this->helpTags[] = $o;
128
 
129
+
 
 
 
 
130
  }
131
 
132
  function mkEzOptions() {
737
 
738
 
739
  function actionAdminInit() {
740
+ if (current_user_can('manage_options')) {
741
+ global $pagenow;
742
+ $page = isset($_GET['page']) && 'easy-adsense-lite.php' == $_GET['page'] ? '?page=easy-adsense-lite.php' : '';
743
+
744
+ if (isset($_GET['ezAdSense_stats_display_admin_notice']) && check_admin_referer( 'ezAdSense_stats' )) {
745
+ $this->stats->display_admin_notice = ('yes' == $_GET['ezAdSense_stats_display_admin_notice']);
746
+ update_option('easy_adsense_stats_new', $this->stats);
747
+ header("Location: $pagenow$page");die;
748
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749
 
750
+ if (isset($_GET['ezAdSense_stats_admin_has_disabled']) && check_admin_referer( 'ezAdSense_stats' )) {
751
+ $this->stats->admin_has_disabled = ('yes' == $_GET['ezAdSense_stats_admin_has_disabled']);
752
+ update_option('easy_adsense_stats_new', $this->stats);
753
+ header("Location: $pagenow$page");die;
754
+ }
755
+ }
756
  }
757
 
758
  function filterContent($content) {
1087
  add_action('widgets_init', create_function('', 'return register_widget("EzAdsLU");'));
1088
  add_action('admin_menu', 'ezAdSense_ap');
1089
  add_action('admin_init', array($ezAdSense, 'actionAdminInit'));
 
 
1090
 
1091
  add_filter('plugin_action_links', array($ezAdSense, 'plugin_action'), -10, 2);
1092
 
1108
  register_activation_hook(__FILE__, array($ezAdSense, 'migrateOptions'));
1109
  }
1110
  }
 
head-text.php CHANGED
@@ -17,12 +17,12 @@
17
  along with this program. If not, see <http://www.gnu.org/licenses/>.
18
  */
19
 
20
- echo '<td style="width:15%">';
21
 
22
  $ez->renderProText();
23
 
24
  echo '</td>';
25
- echo '<td style="width:30%">';
26
 
27
  $ez->renderAffiliate();
28
  $ez->renderTipDivs();
17
  along with this program. If not, see <http://www.gnu.org/licenses/>.
18
  */
19
 
20
+ echo '<td style="width:15%;display:none;">';
21
 
22
  $ez->renderProText();
23
 
24
  echo '</td>';
25
+ echo '<td style="width:30%;display:none;">';
26
 
27
  $ez->renderAffiliate();
28
  $ez->renderTipDivs();
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: gsikka33
3
  Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
4
  Requires at least: 2.6
5
- Tested up to: 4.1
6
- Stable tag: 8.60
7
  License: GPL2 or later
8
 
9
  Easy Plugin for AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
2
  Contributors: gsikka33
3
  Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
4
  Requires at least: 2.6
5
+ Tested up to: 4.5
6
+ Stable tag: 8.64
7
  License: GPL2 or later
8
 
9
  Easy Plugin for AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
tail-text.php CHANGED
@@ -18,7 +18,7 @@
18
 
19
  if (!$ez->killAuthor) {
20
  ?>
21
- <table class="form-table" >
22
  <tr>
23
  <td>
24
  <ul style="padding-left:10px;list-style-type:circle; list-style-position:inside;" >
18
 
19
  if (!$ez->killAuthor) {
20
  ?>
21
+ <table class="form-table" style="display:none;">
22
  <tr>
23
  <td>
24
  <ul style="padding-left:10px;list-style-type:circle; list-style-position:inside;" >