Version Description
- New functionality - Default Ads positioning: Assign Ads right after the <!--more--> tag.
- Date: 03-Dec-2010
Download this release
Release Info
Developer | philipze |
Plugin | Quick Adsense |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
- quick-adsense-admin.php +13 -3
- quick-adsense.php +10 -3
- readme.txt +9 -5
quick-adsense-admin.php
CHANGED
@@ -28,6 +28,8 @@
|
|
28 |
$rm2 = get_option('MiddRnd');
|
29 |
$rb1 = get_option('EndiAds');
|
30 |
$rb2 = get_option('EndiRnd');
|
|
|
|
|
31 |
$rc = 3;
|
32 |
for ($j=1;$j<=$rc;$j++) {
|
33 |
$rc1[$j] = get_option('Par'.$j.'Ads');
|
@@ -71,6 +73,8 @@
|
|
71 |
document.getElementById("MiddRnd").selectedIndex = <?php echo($QData['Default']['MiddRnd']) ?>;
|
72 |
document.getElementById("EndiAds").checked = <?php echo(truefalse($QData['Default']['EndiAds'])) ?>;
|
73 |
document.getElementById("EndiRnd").selectedIndex = <?php echo($QData['Default']['EndiRnd']) ?>;
|
|
|
|
|
74 |
<?php for ($j=1;$j<=$rc;$j++) { ?>
|
75 |
document.getElementById("Par<?php echo $j; ?>Ads").checked = <?php echo(truefalse($QData['Default']['Par'.$j.'Ads'])) ?>;
|
76 |
document.getElementById("Par<?php echo $j; ?>Rnd").selectedIndex = <?php echo($QData['Default']['Par'.$j.'Rnd']) ?>;
|
@@ -106,6 +110,7 @@
|
|
106 |
document.getElementById('BegnRnd'),
|
107 |
document.getElementById('MiddRnd'),
|
108 |
document.getElementById('EndiRnd'),
|
|
|
109 |
document.getElementById('Par1Rnd'),
|
110 |
document.getElementById('Par2Rnd'),
|
111 |
document.getElementById('Par3Rnd'),
|
@@ -128,6 +133,7 @@
|
|
128 |
checkinfo1('BegnRnd',document.getElementById('BegnAds'));
|
129 |
checkinfo1('MiddRnd',document.getElementById('MiddAds'));
|
130 |
checkinfo1('EndiRnd',document.getElementById('EndiAds'));
|
|
|
131 |
for (i=1;i<=3;i++) {
|
132 |
checkinfo2(document.getElementById('Par'+i+'Ads'),'Par'+i+'Rnd','Par'+i+'Nup','Par'+i+'Con');
|
133 |
}
|
@@ -160,15 +166,19 @@
|
|
160 |
<input type="checkbox" id="BegnAds" name="BegnAds" value="true" <?php if($ra1){echo('checked');} ?> onchange="checkinfo1('BegnRnd',this)" /> <?php _e('Assign') ; ?> <select id="BegnRnd" name="BegnRnd" onchange="selectinfo(this)">
|
161 |
<?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
|
162 |
<option id="OptBegn<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($ra2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
|
163 |
-
<?php } ?></select> <?php _e('to <b>Beginning of Post')
|
164 |
<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)">
|
165 |
<?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
|
166 |
<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>
|
167 |
-
<?php } ?></select> <?php _e('to <b>Middle of Post')
|
168 |
<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)">
|
169 |
<?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
|
170 |
<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>
|
171 |
-
<?php } ?></select> <?php _e('to <b>End of Post')
|
|
|
|
|
|
|
|
|
172 |
<?php for ($j=1;$j<=$rc;$j++) { ?>
|
173 |
<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)">
|
174 |
<?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
|
28 |
$rm2 = get_option('MiddRnd');
|
29 |
$rb1 = get_option('EndiAds');
|
30 |
$rb2 = get_option('EndiRnd');
|
31 |
+
$rr1 = get_option('MoreAds');
|
32 |
+
$rr2 = get_option('MoreRnd');
|
33 |
$rc = 3;
|
34 |
for ($j=1;$j<=$rc;$j++) {
|
35 |
$rc1[$j] = get_option('Par'.$j.'Ads');
|
73 |
document.getElementById("MiddRnd").selectedIndex = <?php echo($QData['Default']['MiddRnd']) ?>;
|
74 |
document.getElementById("EndiAds").checked = <?php echo(truefalse($QData['Default']['EndiAds'])) ?>;
|
75 |
document.getElementById("EndiRnd").selectedIndex = <?php echo($QData['Default']['EndiRnd']) ?>;
|
76 |
+
document.getElementById("MoreAds").checked = <?php echo(truefalse($QData['Default']['MoreAds'])) ?>;
|
77 |
+
document.getElementById("MoreRnd").selectedIndex = <?php echo($QData['Default']['MoreRnd']) ?>;
|
78 |
<?php for ($j=1;$j<=$rc;$j++) { ?>
|
79 |
document.getElementById("Par<?php echo $j; ?>Ads").checked = <?php echo(truefalse($QData['Default']['Par'.$j.'Ads'])) ?>;
|
80 |
document.getElementById("Par<?php echo $j; ?>Rnd").selectedIndex = <?php echo($QData['Default']['Par'.$j.'Rnd']) ?>;
|
110 |
document.getElementById('BegnRnd'),
|
111 |
document.getElementById('MiddRnd'),
|
112 |
document.getElementById('EndiRnd'),
|
113 |
+
document.getElementById('MoreRnd'),
|
114 |
document.getElementById('Par1Rnd'),
|
115 |
document.getElementById('Par2Rnd'),
|
116 |
document.getElementById('Par3Rnd'),
|
133 |
checkinfo1('BegnRnd',document.getElementById('BegnAds'));
|
134 |
checkinfo1('MiddRnd',document.getElementById('MiddAds'));
|
135 |
checkinfo1('EndiRnd',document.getElementById('EndiAds'));
|
136 |
+
checkinfo1('MoreRnd',document.getElementById('MoreAds'));
|
137 |
for (i=1;i<=3;i++) {
|
138 |
checkinfo2(document.getElementById('Par'+i+'Ads'),'Par'+i+'Rnd','Par'+i+'Nup','Par'+i+'Con');
|
139 |
}
|
166 |
<input type="checkbox" id="BegnAds" name="BegnAds" value="true" <?php if($ra1){echo('checked');} ?> onchange="checkinfo1('BegnRnd',this)" /> <?php _e('Assign') ; ?> <select id="BegnRnd" name="BegnRnd" onchange="selectinfo(this)">
|
167 |
<?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
|
168 |
<option id="OptBegn<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if($ra2==(string)$i){echo('selected');} ?>><?php _e(($i==0)?'Random Ads':'Ads'.$i) ; ?></option>
|
169 |
+
<?php } ?></select> <?php _e('to <b>Beginning of Post</b>') ?><br/>
|
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>
|
177 |
+
<?php } ?></select> <?php _e('to <b>End of Post</b>') ?><br/>
|
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"><!--more--></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++) { ?>
|
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.
|
9 |
Author URI: http://techmilieu.com/
|
10 |
*/
|
11 |
|
@@ -34,12 +34,12 @@ 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.
|
38 |
$QData['URI'] = 'http://techmilieu.com/quick-adsense';
|
39 |
$QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
|
40 |
$QData['Default'] = array(
|
41 |
'AdsDisp'=>'3',
|
42 |
-
'BegnAds'=>true,'BegnRnd'=>'1','EndiAds'=>true,'EndiRnd'=>'0','MiddAds'=>false,'MiddRnd'=>'0',
|
43 |
'Par1Ads'=>false,'Par1Rnd'=>'0','Par1Nup'=>'0','Par1Con'=>false,
|
44 |
'Par2Ads'=>false,'Par2Rnd'=>'0','Par2Nup'=>'0','Par2Con'=>false,
|
45 |
'Par3Ads'=>false,'Par3Rnd'=>'0','Par3Nup'=>'0','Par3Con'=>false,
|
@@ -178,6 +178,7 @@ function process_content($content)
|
|
178 |
if( !$offdef ) {
|
179 |
$AdsIdCus = array();
|
180 |
$cusads = 'CusAds'; $cusrnd = 'CusRnd';
|
|
|
181 |
$begn1 = get_option('BegnAds'); $begn2 = get_option('BegnRnd');
|
182 |
$midd1 = get_option('MiddAds'); $midd2 = get_option('MiddRnd');
|
183 |
$endi1 = get_option('EndiAds'); $endi2 = get_option('EndiRnd');
|
@@ -187,6 +188,7 @@ function process_content($content)
|
|
187 |
}
|
188 |
$imge1 = get_option('Img1Ads'); $imge2 = get_option('Img1Rnd'); $imge3 = get_option('Img1Nup');
|
189 |
if ( $begn2 == 0 ) { $b1 = $cusrnd; } else { $b1 = $cusads.$begn2; array_push($AdsIdCus, $begn2); };
|
|
|
190 |
if ( $midd2 == 0 ) { $m1 = $cusrnd; } else { $m1 = $cusads.$midd2; array_push($AdsIdCus, $midd2); };
|
191 |
if ( $endi2 == 0 ) { $b2 = $cusrnd; } else { $b2 = $cusads.$endi2; array_push($AdsIdCus, $endi2); };
|
192 |
for($i=1;$i<=$rc;$i++) {
|
@@ -213,6 +215,11 @@ function process_content($content)
|
|
213 |
$content = implode($sch, $arr);
|
214 |
}
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
216 |
if( $begn1 ) {
|
217 |
$content = '<!--'.$b1.'-->'.$content;
|
218 |
}
|
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.2
|
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.8.2';
|
38 |
$QData['URI'] = 'http://techmilieu.com/quick-adsense';
|
39 |
$QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
|
40 |
$QData['Default'] = array(
|
41 |
'AdsDisp'=>'3',
|
42 |
+
'BegnAds'=>true,'BegnRnd'=>'1','EndiAds'=>true,'EndiRnd'=>'0','MiddAds'=>false,'MiddRnd'=>'0','MoreAds'=>false,'MoreRnd'=>'0',
|
43 |
'Par1Ads'=>false,'Par1Rnd'=>'0','Par1Nup'=>'0','Par1Con'=>false,
|
44 |
'Par2Ads'=>false,'Par2Rnd'=>'0','Par2Nup'=>'0','Par2Con'=>false,
|
45 |
'Par3Ads'=>false,'Par3Rnd'=>'0','Par3Nup'=>'0','Par3Con'=>false,
|
178 |
if( !$offdef ) {
|
179 |
$AdsIdCus = array();
|
180 |
$cusads = 'CusAds'; $cusrnd = 'CusRnd';
|
181 |
+
$more1 = get_option('MoreAds'); $more2 = get_option('MoreRnd');
|
182 |
$begn1 = get_option('BegnAds'); $begn2 = get_option('BegnRnd');
|
183 |
$midd1 = get_option('MiddAds'); $midd2 = get_option('MiddRnd');
|
184 |
$endi1 = get_option('EndiAds'); $endi2 = get_option('EndiRnd');
|
188 |
}
|
189 |
$imge1 = get_option('Img1Ads'); $imge2 = get_option('Img1Rnd'); $imge3 = get_option('Img1Nup');
|
190 |
if ( $begn2 == 0 ) { $b1 = $cusrnd; } else { $b1 = $cusads.$begn2; array_push($AdsIdCus, $begn2); };
|
191 |
+
if ( $more2 == 0 ) { $r1 = $cusrnd; } else { $r1 = $cusads.$more2; array_push($AdsIdCus, $more2); };
|
192 |
if ( $midd2 == 0 ) { $m1 = $cusrnd; } else { $m1 = $cusads.$midd2; array_push($AdsIdCus, $midd2); };
|
193 |
if ( $endi2 == 0 ) { $b2 = $cusrnd; } else { $b2 = $cusads.$endi2; array_push($AdsIdCus, $endi2); };
|
194 |
for($i=1;$i<=$rc;$i++) {
|
215 |
$content = implode($sch, $arr);
|
216 |
}
|
217 |
}
|
218 |
+
if( $more1 ) {
|
219 |
+
$mmr = '<!--'.$r1.'-->';
|
220 |
+
$postid = get_the_ID();
|
221 |
+
$content = str_replace('<span id="more-'.$postid.'"></span>', $mmr, $content);
|
222 |
+
}
|
223 |
if( $begn1 ) {
|
224 |
$content = '<!--'.$b1.'-->'.$content;
|
225 |
}
|
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.0.
|
7 |
-
Stable tag: 1.8.
|
8 |
|
9 |
Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
|
10 |
|
@@ -49,13 +49,17 @@ Please feedback to [http://techmilieu.com/quick-adsense](http://techmilieu.com/q
|
|
49 |
|
50 |
== Change Log ==
|
51 |
|
|
|
|
|
|
|
|
|
52 |
= 1.8.1 =
|
53 |
-
*
|
54 |
* Date: 22-Nov-2010
|
55 |
|
56 |
= 1.8 =
|
57 |
* Text correction: Change the words "must be identical" to "must not be identical".
|
58 |
-
*
|
59 |
* Also, option to display ads at End of Post if the above function is selected & fewer paragraphs are found.
|
60 |
* Date: 20-Nov-2010
|
61 |
|
@@ -76,7 +80,7 @@ Please feedback to [http://techmilieu.com/quick-adsense](http://techmilieu.com/q
|
|
76 |
* Date: 04-Jan-2010
|
77 |
|
78 |
= 1.5 =
|
79 |
-
*
|
80 |
* You can now disable AdsWidget (Sidebar Ads) on Homepage.
|
81 |
* Insert a <!--OffDef--> to temporary disable the default positioned Ads, so that you can insert the specific Ads or Random ad tags in the post.
|
82 |
* Google allows publishers to place up to 3 Adsense for Content on a page. If you are using other Ads, you may now display up to 10 Ads.
|
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.0.2
|
7 |
+
Stable tag: 1.8.2
|
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.8.2 =
|
53 |
+
* New functionality - Default Ads positioning: Assign Ads right after the <!--more--> tag.
|
54 |
+
* Date: 03-Dec-2010
|
55 |
+
|
56 |
= 1.8.1 =
|
57 |
+
* New functionality - Default Ads positioning: Assign Ads to Middle of post.
|
58 |
* Date: 22-Nov-2010
|
59 |
|
60 |
= 1.8 =
|
61 |
* Text correction: Change the words "must be identical" to "must not be identical".
|
62 |
+
* New functionality - Default Ads positioning after certain paragraphs, make it up to the total of three.
|
63 |
* Also, option to display ads at End of Post if the above function is selected & fewer paragraphs are found.
|
64 |
* Date: 20-Nov-2010
|
65 |
|
80 |
* Date: 04-Jan-2010
|
81 |
|
82 |
= 1.5 =
|
83 |
+
* New functionality - Default Ads positioning: Assign Ads after certain paragraphs & assign Ads after certain images.
|
84 |
* You can now disable AdsWidget (Sidebar Ads) on Homepage.
|
85 |
* Insert a <!--OffDef--> to temporary disable the default positioned Ads, so that you can insert the specific Ads or Random ad tags in the post.
|
86 |
* Google allows publishers to place up to 3 Adsense for Content on a page. If you are using other Ads, you may now display up to 10 Ads.
|