Quick Adsense - Version 1.1

Version Description

  • Minor fix for the removal of <p></p> tag wrapped around Ads code.
  • Default options value will now load when the frist time plugin is activated, not every time during plugin reactivation.
  • Change the clearing DIV height at the end of post from 1px to 0px to hide this transparent line.
  • Date: 02-Oct-2009
Download this release

Release Info

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

Code changes from version 1.0 to 1.1

Files changed (4) hide show
  1. quick-adsense-admin.php +2 -2
  2. quick-adsense.php +12 -17
  3. readme.txt +13 -5
  4. screenshot-1.png +0 -0
quick-adsense-admin.php CHANGED
@@ -156,13 +156,13 @@
156
  <td>
157
  <?php echo(__(
158
  'Visit <a href="http://techmilieu.com/quick-adsense" target="_blank">http://techmilieu.com/quick-adsense</a> for more information and updates about this plugin. '.
159
- 'A link from your blog to http://techmilieu.com/ would be highly appreciated.')); ?><br/>
160
  </tr>
161
  </table>
162
 
163
  <br/>
164
  <h3 style="font-size:120%;margin-bottom:5px"><?php _e('Adsense Codes'); ?></h3>
165
- <p style="margin-top:0px"><span class="description"><?php _e('Paste up to <b>'.$QData['Ads'].' Ads codes</b> on Post Body, according to the options as assigned above, and <b>'.$QData['AdsWid'].' Ads codes</b> on Sidebar Widget. Ads codes provided must be identical, repeated codes may result the Ads not being display correctly.') ?></span></p>
166
 
167
  <h4><?php _e('Ads on Post Body :'); ?></h4>
168
  <table border="0" cellspacing="0" cellpadding="0">
156
  <td>
157
  <?php echo(__(
158
  'Visit <a href="http://techmilieu.com/quick-adsense" target="_blank">http://techmilieu.com/quick-adsense</a> for more information and updates about this plugin. '.
159
+ 'A link from your blog to <b>TechMilieu</b> (http://techmilieu.com/) would be highly appreciated.')); ?><br/>
160
  </tr>
161
  </table>
162
 
163
  <br/>
164
  <h3 style="font-size:120%;margin-bottom:5px"><?php _e('Adsense Codes'); ?></h3>
165
+ <p style="margin-top:0px"><span class="description"><?php _e('Paste up to <b>'.$QData['Ads'].' Ads codes</b> on Post Body, as options assigned above, and <b>'.$QData['AdsWid'].' Ads codes</b> on Sidebar Widget. Ads codes provided must be identical, repeated codes may result the Ads not being display correctly. Ads will never displays more than once in a page.') ?></span></p>
166
 
167
  <h4><?php _e('Ads on Post Body :'); ?></h4>
168
  <table border="0" cellspacing="0" cellpadding="0">
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.0
9
  Author URI: http://techmilieu.com/
10
  */
11
 
@@ -34,7 +34,7 @@ global $QData;
34
  $QData['AdsWid'] = 3; /* Ads on Widget */
35
  $QData['Ads'] = 10; /* Ads on Post body */
36
  $QData['Name'] = 'Quick Adsense';
37
- $QData['Version'] = '1.0';
38
  $QData['URI'] = 'http://techmilieu.com/quick-adsense';
39
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
40
  $QData['Default'] = array(
@@ -67,20 +67,15 @@ add_filter('plugin_action_links','ads_plugin_links',10,2);
67
 
68
  function plugin_activated() {
69
  global $QData;
70
- update_option('AdsDisp', $QData['Default']['AdsDisp']);
71
- update_option('BegnAds', $QData['Default']['BegnAds']);
72
- update_option('BegnRnd', $QData['Default']['BegnRnd']);
73
- update_option('EndiAds', $QData['Default']['EndiAds']);
74
- update_option('EndiRnd', $QData['Default']['EndiRnd']);
75
- update_option('AppPost', $QData['Default']['AppPost']);
76
- update_option('AppPage', $QData['Default']['AppPage']);
77
- update_option('AppHome', $QData['Default']['AppHome']);
78
- update_option('AppCate', $QData['Default']['AppCate']);
79
- update_option('AppArch', $QData['Default']['AppArch']);
80
- update_option('AppTags', $QData['Default']['AppTags']);
81
- update_option('QckTags', $QData['Default']['QckTags']);
82
  for ($i=1;$i<=$QData['Ads'];$i++) {
83
- $tp=get_option('AdsCode'.$i);
84
  if(empty($tp)) {
85
  update_option('AdsMargin'.$i, $QData['Default']['AdsMargin']);
86
  update_option('AdsAlign'.$i, $QData['Default']['AdsAlign']);
@@ -163,8 +158,8 @@ function process_content($content)
163
  } else if( $endi1 ) {
164
  $content = $content.'<!--'.$b1.'-->';
165
  }
166
- $content = '<!--EmptyClear-->'.$content.PHP_EOL.'<div style="font-size:0px;height:1px;line-height:0px;margin:0;padding:0;clear:both"></div>';
167
- clean_tags($content, true);
168
  $ismany = (!is_single() && !is_page());
169
 
170
  /* ... Replace Begining/End Ads1-10 ... */
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.1
9
  Author URI: http://techmilieu.com/
10
  */
11
 
34
  $QData['AdsWid'] = 3; /* Ads on Widget */
35
  $QData['Ads'] = 10; /* Ads on Post body */
36
  $QData['Name'] = 'Quick Adsense';
37
+ $QData['Version'] = '1.1';
38
  $QData['URI'] = 'http://techmilieu.com/quick-adsense';
39
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
40
  $QData['Default'] = array(
67
 
68
  function plugin_activated() {
69
  global $QData;
70
+ $tpn = array('AdsDisp','BegnAds','BegnRnd','EndiAds','EndiRnd','AppPost','AppPage','AppHome','AppCate','AppArch','AppTags','QckTags') ;
71
+ for ($i=0;$i<count($tpn);$i++) {
72
+ $tp = get_option($tpn[$i]);
73
+ if(empty($tp)) {
74
+ update_option($tpn[$i], $QData['Default'][$tpn[$i]]);
75
+ }
76
+ }
 
 
 
 
 
77
  for ($i=1;$i<=$QData['Ads'];$i++) {
78
+ $tp = get_option('AdsCode'.$i);
79
  if(empty($tp)) {
80
  update_option('AdsMargin'.$i, $QData['Default']['AdsMargin']);
81
  update_option('AdsAlign'.$i, $QData['Default']['AdsAlign']);
158
  } else if( $endi1 ) {
159
  $content = $content.'<!--'.$b1.'-->';
160
  }
161
+ $content = '<!--EmptyClear-->'.$content.PHP_EOL.'<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>';
162
+ $content = clean_tags($content, true);
163
  $ismany = (!is_single() && !is_page());
164
 
165
  /* ... Replace Begining/End Ads1-10 ... */
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Quick Adsense ===
2
  Contributors: Philip Ze
3
- Donate link: http://techmilieu.com/quick-adsense/
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: 2.8.4
7
- Stable tag: 1.0
8
 
9
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
10
 
@@ -22,13 +22,13 @@ Here are some **features** that come with this plugin:
22
  1. Support any Ads code, not limited to Adsense code only.
23
  1. Display up to a maximum of 3 Ads on a page.
24
  1. Support up to a maximum of 3 Ads codes on Sidebar Widgets.
25
- 1. Support up to a maximum of 10 Ads codes for Randomization within a post.
26
  1. Ads placement on the fly, simply insert &lt;!--Ads1--&gt;, &lt;!--Ads2--&gt; ... , &lt;!--RndAds--&gt;, &lt;!--NoAds--&gt;, &lt;!--OffAds--&gt; to a post to accomplish this.
27
  1. Tags above can be inserted into a post easily via the additional Quicktag Buttons added to the HTML Edit Post SubPanel.
28
 
29
  Sign up for a [Google Adsense Account](http://adsense.google.com/) to generate revenue from your blog, if you don't have one.
30
 
31
- [Download](http://wordpress.org/extend/plugins/quick-adsense/download/) | [Installation](http://wordpress.org/extend/plugins/quick-adsense/installation/) | [Screen Shots](http://wordpress.org/extend/plugins/quick-adsense/screenshots/) | [Plugin Homepage](http://techmilieu.com/quick-adsense)
32
 
33
  == Screenshots ==
34
 
@@ -48,6 +48,14 @@ Please feedback to [http://techmilieu.com/quick-adsense](http://techmilieu.com/q
48
 
49
  == Change Log ==
50
 
51
- * 1.0 Initial public release. [September 21, 2009]
 
 
 
 
 
 
 
 
52
 
53
 
1
  === Quick Adsense ===
2
  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: 2.8.4
7
+ Stable tag: 1.1
8
 
9
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
10
 
22
  1. Support any Ads code, not limited to Adsense code only.
23
  1. Display up to a maximum of 3 Ads on a page.
24
  1. Support up to a maximum of 3 Ads codes on Sidebar Widgets.
25
+ 1. Support up to a maximum of 10 Ads codes for specific placement & randomization within a post.
26
  1. Ads placement on the fly, simply insert &lt;!--Ads1--&gt;, &lt;!--Ads2--&gt; ... , &lt;!--RndAds--&gt;, &lt;!--NoAds--&gt;, &lt;!--OffAds--&gt; to a post to accomplish this.
27
  1. Tags above can be inserted into a post easily via the additional Quicktag Buttons added to the HTML Edit Post SubPanel.
28
 
29
  Sign up for a [Google Adsense Account](http://adsense.google.com/) to generate revenue from your blog, if you don't have one.
30
 
31
+ [Installation](http://wordpress.org/extend/plugins/quick-adsense/installation/) | [Screen Shots](http://wordpress.org/extend/plugins/quick-adsense/screenshots/) | [Plugin Homepage](http://techmilieu.com/quick-adsense)
32
 
33
  == Screenshots ==
34
 
48
 
49
  == Change Log ==
50
 
51
+ = 1.1 =
52
+ * Minor fix for the removal of &lt;p&gt;&lt;/p&gt; tag wrapped around Ads code.
53
+ * Default options value will now load when the frist time plugin is activated, not every time during plugin reactivation.
54
+ * Change the clearing DIV height at the end of post from 1px to 0px to hide this transparent line.
55
+ * Date: 02-Oct-2009
56
+
57
+ = 1.0 =
58
+ * Initial public release.
59
+ * Date: 21-Sep-2009
60
 
61
 
screenshot-1.png CHANGED
Binary file