Quick Adsense - Version 1.9

Version Description

  • New functionality added - Hide Ads when user is logged in to Wordpress, giving you option to exclude ads view by you from the total ads impression.
  • Date: 12-June-2011
Download this release

Release Info

Developer philipze
Plugin Icon 128x128 Quick Adsense
Version 1.9
Comparing to
See all releases

Code changes from version 1.8.4 to 1.9

Files changed (4) hide show
  1. quick-adsense-admin.php +18 -12
  2. quick-adsense.php +5 -4
  3. readme.txt +6 -2
  4. screenshot-2.png +0 -0
quick-adsense-admin.php CHANGED
@@ -48,6 +48,7 @@
48
  $atg = get_option('AppTags');
49
  $amx = get_option('AppMaxA');
50
  $asd = get_option('AppSide');
 
51
  $aqt = get_option('QckTags');
52
  $aqr = get_option('QckRnds');
53
  $aqf = get_option('QckOffs');
@@ -91,7 +92,8 @@
91
  document.getElementById("AppArch").checked = <?php echo(truefalse($QData['Default']['AppArch'])) ?>;
92
  document.getElementById("AppTags").checked = <?php echo(truefalse($QData['Default']['AppTags'])) ?>;
93
  document.getElementById("AppMaxA").checked = <?php echo(truefalse($QData['Default']['AppMaxA'])) ?>;
94
- document.getElementById("AppSide").checked = <?php echo(truefalse($QData['Default']['AppSide'])) ?>;
 
95
  document.getElementById("QckTags").checked = <?php echo(truefalse($QData['Default']['QckTags'])) ?>;
96
  document.getElementById("QckRnds").checked = <?php echo(truefalse($QData['Default']['QckRnds'])) ?>;
97
  document.getElementById("QckOffs").checked = <?php echo(truefalse($QData['Default']['QckOffs'])) ?>;
@@ -170,7 +172,7 @@
170
  <input type="checkbox" id="MiddAds" name="MiddAds" value="false" <?php if($rm1){echo('checked');} ?> onchange="checkinfo1('MiddRnd',this)" /> <?php _e('Assign') ; ?> <select id="MiddRnd" name="MiddRnd" onchange="selectinfo(this)">
171
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
172
  <option id="OptMidd<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rm2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
173
- <?php } ?></select> <?php _e('to <b>Middle of Post</b>') ?><span style="color:#a00;font-size:75%"> <b>(New!)</b></span><br/>
174
  <input type="checkbox" id="EndiAds" name="EndiAds" value="false" <?php if($rb1){echo('checked');} ?> onchange="checkinfo1('EndiRnd',this)" /> <?php _e('Assign') ; ?> <select id="EndiRnd" name="EndiRnd" onchange="selectinfo(this)">
175
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
176
  <option id="OptEndi<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rb2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
@@ -178,7 +180,7 @@
178
  <input type="checkbox" id="MoreAds" name="MoreAds" value="false" <?php if($rr1){echo('checked');} ?> onchange="checkinfo1('MoreRnd',this)" /> <?php _e('Assign') ; ?> <select id="MoreRnd" name="MoreRnd" onchange="selectinfo(this)">
179
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
180
  <option id="OptMore<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rr2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
181
- <?php } ?></select> <?php _e('right after <b>the') ?> <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--more--&gt;</span> <?php _e('tag') ?></b><span style="color:#a00;font-size:75%"> <b>(New!)</b></span><br/>
182
  <?php for ($j=1;$j<=$rc;$j++) { ?>
183
  <input type="checkbox" id="Par<?php echo $j; ?>Ads" name="Par<?php echo $j; ?>Ads" value="false" <?php if($rc1[$j]){echo('checked');} ?> onchange="checkinfo2(this,'Par<?php echo $j; ?>Rnd','Par<?php echo $j; ?>Nup','Par<?php echo $j; ?>Con')" /> <?php _e('Assign') ; ?> <select id="Par<?php echo $j; ?>Rnd" name="Par<?php echo $j; ?>Rnd" onchange="selectinfo(this)">
184
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -187,7 +189,7 @@
187
  <?php for ($i=1;$i<=50;$i++) { ?>
188
  <option id="Opt<?php echo $j; ?>Nu<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rc3[$j]==(string)$i){echo('selected');} ?>><?php echo $i; ?></option>
189
  <?php } ?></select> &rarr;
190
- <input type="checkbox" id="Par<?php echo $j; ?>Con" name="Par<?php echo $j; ?>Con" value="false" <?php if($rc4[$j]){echo('checked');} ?> /> <?php _e('to <b>End of Post</b> if fewer paragraphs are found.') ; ?><span style="color:#a00;font-size:75%"> <b>(New!)</b></span><br/>
191
  <?php } ?>
192
  <input type="checkbox" id="Img1Ads" name="Img1Ads" value="false" <?php if($rd1){echo('checked');} ?> onchange="checkinfo2(this,'Img1Rnd','Img1Nup')" /> <?php _e('Assign') ; ?> <select id="Img1Rnd" name="Img1Rnd" onchange="selectinfo(this)">
193
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -204,14 +206,18 @@
204
  <td style="width:110px"><?php _e('Appearance :'); ?></td>
205
  <td>
206
  <span>[ </span>
207
- <input type="checkbox" id="AppPost" name="AppPost" value="true" <?php if($aps){echo('checked');} ?> /> <?php _e('Posts'); ?>
208
- <input type="checkbox" id="AppPage" name="AppPage" value="true" <?php if($apg){echo('checked');} ?> /> <?php _e('Pages'); ?><span> ]</span><br/><span>[ </span>
209
- <input type="checkbox" id="AppHome" name="AppHome" value="true" <?php if($ahm){echo('checked');} ?> /> <?php _e('Homepage'); ?>
210
- <input type="checkbox" id="AppCate" name="AppCate" value="true" <?php if($act){echo('checked');} ?> /> <?php _e('Categories'); ?>
211
- <input type="checkbox" id="AppArch" name="AppArch" value="true" <?php if($aar){echo('checked');} ?> /> <?php _e('Archives'); ?>
212
- <input type="checkbox" id="AppTags" name="AppTags" value="true" <?php if($atg){echo('checked');} ?> /> <?php _e('Tags'); ?><span> ] &rarr; </span>
213
- <input type="checkbox" id="AppMaxA" name="AppMaxA" value="true" <?php if($amx){echo('checked');} ?> /> <?php _e('Place all possible Ads on these pages.'); ?><br/><span>[ </span>
214
- <input type="checkbox" id="AppSide" name="AppSide" value="true" <?php if($asd){echo('checked');} ?> /> <?php _e('Disable AdsWidget on Homepage'); ?><span> ]</span><br/>
 
 
 
 
215
  <br/>
216
  </td>
217
  </tr>
48
  $atg = get_option('AppTags');
49
  $amx = get_option('AppMaxA');
50
  $asd = get_option('AppSide');
51
+ $lgg = get_option('AppLogg');
52
  $aqt = get_option('QckTags');
53
  $aqr = get_option('QckRnds');
54
  $aqf = get_option('QckOffs');
92
  document.getElementById("AppArch").checked = <?php echo(truefalse($QData['Default']['AppArch'])) ?>;
93
  document.getElementById("AppTags").checked = <?php echo(truefalse($QData['Default']['AppTags'])) ?>;
94
  document.getElementById("AppMaxA").checked = <?php echo(truefalse($QData['Default']['AppMaxA'])) ?>;
95
+ document.getElementById("AppSide").checked = <?php echo(truefalse($QData['Default']['AppSide'])) ?>;
96
+ document.getElementById("AppLogg").checked = <?php echo(truefalse($QData['Default']['AppLogg'])) ?>;
97
  document.getElementById("QckTags").checked = <?php echo(truefalse($QData['Default']['QckTags'])) ?>;
98
  document.getElementById("QckRnds").checked = <?php echo(truefalse($QData['Default']['QckRnds'])) ?>;
99
  document.getElementById("QckOffs").checked = <?php echo(truefalse($QData['Default']['QckOffs'])) ?>;
172
  <input type="checkbox" id="MiddAds" name="MiddAds" value="false" <?php if($rm1){echo('checked');} ?> onchange="checkinfo1('MiddRnd',this)" /> <?php _e('Assign') ; ?> <select id="MiddRnd" name="MiddRnd" onchange="selectinfo(this)">
173
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
174
  <option id="OptMidd<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rm2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
175
+ <?php } ?></select> <?php _e('to <b>Middle of Post</b>') ?><br/>
176
  <input type="checkbox" id="EndiAds" name="EndiAds" value="false" <?php if($rb1){echo('checked');} ?> onchange="checkinfo1('EndiRnd',this)" /> <?php _e('Assign') ; ?> <select id="EndiRnd" name="EndiRnd" onchange="selectinfo(this)">
177
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
178
  <option id="OptEndi<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rb2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
180
  <input type="checkbox" id="MoreAds" name="MoreAds" value="false" <?php if($rr1){echo('checked');} ?> onchange="checkinfo1('MoreRnd',this)" /> <?php _e('Assign') ; ?> <select id="MoreRnd" name="MoreRnd" onchange="selectinfo(this)">
181
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
182
  <option id="OptMore<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rr2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
183
+ <?php } ?></select> <?php _e('right after <b>the') ?> <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--more--&gt;</span> <?php _e('tag') ?></b><br/>
184
  <?php for ($j=1;$j<=$rc;$j++) { ?>
185
  <input type="checkbox" id="Par<?php echo $j; ?>Ads" name="Par<?php echo $j; ?>Ads" value="false" <?php if($rc1[$j]){echo('checked');} ?> onchange="checkinfo2(this,'Par<?php echo $j; ?>Rnd','Par<?php echo $j; ?>Nup','Par<?php echo $j; ?>Con')" /> <?php _e('Assign') ; ?> <select id="Par<?php echo $j; ?>Rnd" name="Par<?php echo $j; ?>Rnd" onchange="selectinfo(this)">
186
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
189
  <?php for ($i=1;$i<=50;$i++) { ?>
190
  <option id="Opt<?php echo $j; ?>Nu<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($rc3[$j]==(string)$i){echo('selected');} ?>><?php echo $i; ?></option>
191
  <?php } ?></select> &rarr;
192
+ <input type="checkbox" id="Par<?php echo $j; ?>Con" name="Par<?php echo $j; ?>Con" value="false" <?php if($rc4[$j]){echo('checked');} ?> /> <?php _e('to <b>End of Post</b> if fewer paragraphs are found.') ; ?><br/>
193
  <?php } ?>
194
  <input type="checkbox" id="Img1Ads" name="Img1Ads" value="false" <?php if($rd1){echo('checked');} ?> onchange="checkinfo2(this,'Img1Rnd','Img1Nup')" /> <?php _e('Assign') ; ?> <select id="Img1Rnd" name="Img1Rnd" onchange="selectinfo(this)">
195
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
206
  <td style="width:110px"><?php _e('Appearance :'); ?></td>
207
  <td>
208
  <span>[ </span>
209
+ <input type="checkbox" id="AppPost" name="AppPost" value="true" <?php if($aps){echo('checked');} ?> /> <?php _e('Posts'); ?>
210
+ <input type="checkbox" id="AppPage" name="AppPage" value="true" <?php if($apg){echo('checked');} ?> /> <?php _e('Pages'); ?><span> ]</span><br/>
211
+ <span>[ </span>
212
+ <input type="checkbox" id="AppHome" name="AppHome" value="true" <?php if($ahm){echo('checked');} ?> /> <?php _e('Homepage'); ?>
213
+ <input type="checkbox" id="AppCate" name="AppCate" value="true" <?php if($act){echo('checked');} ?> /> <?php _e('Categories'); ?>
214
+ <input type="checkbox" id="AppArch" name="AppArch" value="true" <?php if($aar){echo('checked');} ?> /> <?php _e('Archives'); ?>
215
+ <input type="checkbox" id="AppTags" name="AppTags" value="true" <?php if($atg){echo('checked');} ?> /> <?php _e('Tags'); ?><span> ] &rarr; </span>
216
+ <input type="checkbox" id="AppMaxA" name="AppMaxA" value="true" <?php if($amx){echo('checked');} ?> /> <?php _e('Place all possible Ads on these pages.'); ?><br/>
217
+ <span>[ </span>
218
+ <input type="checkbox" id="AppSide" name="AppSide" value="true" <?php if($asd){echo('checked');} ?> /> <?php _e('Disable AdsWidget on Homepage'); ?><span> ]</span><br/>
219
+ <span>[ </span>
220
+ <input type="checkbox" id="AppLogg" name="AppLogg" value="true" <?php if($lgg){echo('checked');} ?> /> <?php _e('Hide Ads when user is logged in to Wordpress'); ?><span> ]</span><span style="color:#a00;font-size:75%"> <b>(NEW !)</b></span><br/>
221
  <br/>
222
  </td>
223
  </tr>
quick-adsense.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin URI: http://techmilieu.com/quick-adsense
6
  Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
7
  Author: Philip Ze
8
- Version: 1.8.4
9
  Author URI: http://techmilieu.com/
10
  */
11
 
@@ -34,7 +34,7 @@ global $QData;
34
  $QData['AdsWid'] = 10; /* Ads on Widget */
35
  $QData['Ads'] = 10; /* Ads on Post body */
36
  $QData['Name'] = 'Quick Adsense';
37
- $QData['Version'] = '1.8.4';
38
  $QData['URI'] = 'http://techmilieu.com/quick-adsense';
39
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
40
  $QData['Default'] = array(
@@ -44,7 +44,7 @@ $QData['Default'] = array(
44
  'Par2Ads'=>false,'Par2Rnd'=>'0','Par2Nup'=>'0','Par2Con'=>false,
45
  'Par3Ads'=>false,'Par3Rnd'=>'0','Par3Nup'=>'0','Par3Con'=>false,
46
  'Img1Ads'=>false,'Img1Rnd'=>'0','Img1Nup'=>'0',
47
- 'AppPost'=>true,'AppPage'=>true,'AppHome'=>false,'AppCate'=>false,'AppArch'=>false,'AppTags'=>false,'AppMaxA'=>false,'AppSide'=>false,
48
  'QckTags'=>true,'QckRnds'=>false,'QckOffs'=>false
49
  );
50
  $QData['DefaultAdsOpt'] = array(
@@ -182,7 +182,8 @@ function process_content($content)
182
  (is_home() && !(get_option('AppHome'))) ||
183
  (is_category() && !(get_option('AppCate'))) ||
184
  (is_archive() && !(get_option('AppArch'))) ||
185
- (is_tag() && !(get_option('AppTags'))) ) {
 
186
  $content = clean_tags($content); return $content;
187
  }
188
 
5
  Plugin URI: http://techmilieu.com/quick-adsense
6
  Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
7
  Author: Philip Ze
8
+ Version: 1.9
9
  Author URI: http://techmilieu.com/
10
  */
11
 
34
  $QData['AdsWid'] = 10; /* Ads on Widget */
35
  $QData['Ads'] = 10; /* Ads on Post body */
36
  $QData['Name'] = 'Quick Adsense';
37
+ $QData['Version'] = '1.9';
38
  $QData['URI'] = 'http://techmilieu.com/quick-adsense';
39
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
40
  $QData['Default'] = array(
44
  'Par2Ads'=>false,'Par2Rnd'=>'0','Par2Nup'=>'0','Par2Con'=>false,
45
  'Par3Ads'=>false,'Par3Rnd'=>'0','Par3Nup'=>'0','Par3Con'=>false,
46
  'Img1Ads'=>false,'Img1Rnd'=>'0','Img1Nup'=>'0',
47
+ 'AppPost'=>true,'AppPage'=>true,'AppHome'=>false,'AppCate'=>false,'AppArch'=>false,'AppTags'=>false,'AppMaxA'=>false,'AppSide'=>false,'AppLogg'=>false,
48
  'QckTags'=>true,'QckRnds'=>false,'QckOffs'=>false
49
  );
50
  $QData['DefaultAdsOpt'] = array(
182
  (is_home() && !(get_option('AppHome'))) ||
183
  (is_category() && !(get_option('AppCate'))) ||
184
  (is_archive() && !(get_option('AppArch'))) ||
185
+ (is_tag() && !(get_option('AppTags'))) ||
186
+ (is_user_logged_in() && (get_option('AppLogg'))) ) {
187
  $content = clean_tags($content); return $content;
188
  }
189
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Philip Ze
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8609041
4
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
5
  Requires at least: 2.5
6
- Tested up to: 3.1
7
- Stable tag: 1.8.4
8
 
9
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
10
 
@@ -49,6 +49,10 @@ Please feedback to [http://techmilieu.com/quick-adsense](http://techmilieu.com/q
49
 
50
  == Change Log ==
51
 
 
 
 
 
52
  = 1.8.4 =
53
  * Bug Fix - Fix the Quicktag Buttons display error on the HTML Edit Post SubPanel, make it compatible with WP 3.1 onward.
54
  * Date: 31-Mar-2011
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8609041
4
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
5
  Requires at least: 2.5
6
+ Tested up to: 3.1.3
7
+ Stable tag: 1.9
8
 
9
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
10
 
49
 
50
  == Change Log ==
51
 
52
+ = 1.9 =
53
+ * New functionality added - Hide Ads when user is logged in to Wordpress, giving you option to exclude ads view by you from the total ads impression.
54
+ * Date: 12-June-2011
55
+
56
  = 1.8.4 =
57
  * Bug Fix - Fix the Quicktag Buttons display error on the HTML Edit Post SubPanel, make it compatible with WP 3.1 onward.
58
  * Date: 31-Mar-2011
screenshot-2.png CHANGED
Binary file