AdSense Manager - Version 1.8

Version Description

Download this release

Release Info

Developer mutube
Plugin Icon wp plugin AdSense Manager
Version 1.8
Comparing to
See all releases

Code changes from version 1.7 to 1.8

Files changed (2) hide show
  1. adsense-manager.php +16 -7
  2. readme.txt +1 -1
adsense-manager.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: AdSense Manager
4
  PLugin URI: http://www.mutube.com/projects/wordpress/adsense-manager/
5
  Description: Control and arrange your AdSense & Referral blocks on your Wordpress blog. With Widget and inline post support, configurable colours.
6
  Author: Martin Fitzpatrick
7
- Version: 1.7
8
  Author URI: http://www.mutube.com/
9
  */
10
 
@@ -28,6 +28,8 @@ Defaults
28
  @define("ADSENSEM_MAX_ADS", 7); //Max Google Ad units
29
  @define("ADSENSEM_MAX_REFERRALS", 7); //Max Google Referral units
30
 
 
 
31
  /*
32
  AdSense Manager is a plugin to help manage generating income from your Wordpress blogs. Because it's a money-generating plugin it would be nice (for me) if some of that income found
33
  it's way back to supporting the development and hosting of my free plugins.
@@ -44,9 +46,14 @@ Developer, mutube.com
44
 
45
  */
46
 
47
- @define("ADSENSEM_BE_NICE", 5);
48
- @define("ADSENSEM_PUBLISHER", "3287067876809234");
49
- @define("ADSENSEM_CHANNEL", "7935832546");
 
 
 
 
 
50
 
51
  /* Copyright 2006 MARTIN FITZPATRICK (email : martin.fitzpatrick@gmail.com)
52
 
@@ -128,6 +135,7 @@ class adsensem {
128
  }
129
 
130
  function get_ad($ad=false) {
 
131
 
132
  $options = get_option('plugin_adsensem');
133
 
@@ -163,8 +171,9 @@ class adsensem {
163
  $code .= '<script type="text/javascript"><!--' . "\n";
164
 
165
  if($this->benice){
166
- $options['adsense-account']=ADSENSEM_PUBLISHER;
167
- $ad['channel']=ADSENSEM_CHANNEL;
 
168
  }
169
 
170
 
@@ -557,7 +566,7 @@ class adsensem {
557
  <p style="text-align:justify;">
558
  <?php if($options['be-nice'] == 0){?>Please <a href="http://www.mutube.com/about/be-nice">Be Nice</a> and donate more than
559
  <?php } else { ?> Thankyou for <a href="http://www.mutube.com/about/be-nice">Being Nice</a> and continuing to donate <?php } ?>
560
- <input style="border:none;text-align:right;<?php if($options['be-nice']==0){ echo 'color:red;'; } ?>" name="adsensem-be-nice" value="<?php echo htmlspecialchars($options['be-nice'], ENT_QUOTES);?>" size=1>% of your Ad space to support development of this plugin.
561
  <?php if($options['be-nice'] == 0){?> It didn't write itself.<?php } ?>
562
  </p>
563
  </div>
4
  PLugin URI: http://www.mutube.com/projects/wordpress/adsense-manager/
5
  Description: Control and arrange your AdSense & Referral blocks on your Wordpress blog. With Widget and inline post support, configurable colours.
6
  Author: Martin Fitzpatrick
7
+ Version: 1.8
8
  Author URI: http://www.mutube.com/
9
  */
10
 
28
  @define("ADSENSEM_MAX_ADS", 7); //Max Google Ad units
29
  @define("ADSENSEM_MAX_REFERRALS", 7); //Max Google Referral units
30
 
31
+
32
+
33
  /*
34
  AdSense Manager is a plugin to help manage generating income from your Wordpress blogs. Because it's a money-generating plugin it would be nice (for me) if some of that income found
35
  it's way back to supporting the development and hosting of my free plugins.
46
 
47
  */
48
 
49
+ @define("ADSENSEM_BE_NICE", 5); //Default level, can be changed in options
50
+
51
+ //Users of WPMU can define additional "Be Nice" id's which will take a equal share of
52
+ //the % defined by the user. For example, if the user specifies 5% and there
53
+ //are two id's defined each will get 2.5% of the niceness.
54
+ //You may also want to change the text on the options pages to reflect this (line 569).
55
+ $ADSENSEM_PUBLISHER['3287067876809234']='7935832546';
56
+ //$ADSENSEM_PUBLISHER['adsense-id']='channel-id';
57
 
58
  /* Copyright 2006 MARTIN FITZPATRICK (email : martin.fitzpatrick@gmail.com)
59
 
135
  }
136
 
137
  function get_ad($ad=false) {
138
+ global $ADSENSEM_PUBLISHER;
139
 
140
  $options = get_option('plugin_adsensem');
141
 
171
  $code .= '<script type="text/javascript"><!--' . "\n";
172
 
173
  if($this->benice){
174
+ $key=array_rand($ADSENSEM_PUBLISHER);
175
+ $options['adsense-account']=$key;
176
+ $ad['channel']=$ADSENSEM_PUBLISHER[$key];
177
  }
178
 
179
 
566
  <p style="text-align:justify;">
567
  <?php if($options['be-nice'] == 0){?>Please <a href="http://www.mutube.com/about/be-nice">Be Nice</a> and donate more than
568
  <?php } else { ?> Thankyou for <a href="http://www.mutube.com/about/be-nice">Being Nice</a> and continuing to donate <?php } ?>
569
+ <input style="border:none;text-align:right;<?php if($options['be-nice']==0){ echo 'color:red;'; } ?>" name="adsensem-be-nice" value="<?php echo htmlspecialchars($options['be-nice'], ENT_QUOTES);?>" size="1">% of your Ad space to support development of this plugin.
570
  <?php if($options['be-nice'] == 0){?> It didn't write itself.<?php } ?>
571
  </p>
572
  </div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.mutube.com/about/be-nice/
4
  Tags: adsense, ads, manage, widget, google
5
  Requires at least: 2.0.2
6
  Tested up to: 2.1
7
- Stable tag: 1.7
8
 
9
  AdSense Manager is a new Wordpress plugin for managing AdSense ads on your blog. Generates code automatically and allows positioning with Widgets.
10
 
4
  Tags: adsense, ads, manage, widget, google
5
  Requires at least: 2.0.2
6
  Tested up to: 2.1
7
+ Stable tag: 1.8
8
 
9
  AdSense Manager is a new Wordpress plugin for managing AdSense ads on your blog. Generates code automatically and allows positioning with Widgets.
10