Version Description
- Option to enable/disable front page ads in case your front and home pages are different.
Download this release
Release Info
Developer | reviewmylife |
Plugin | Ad Injection |
Version | 0.9.6.3 |
Comparing to | |
See all releases |
Code changes from version 0.9.6.2 to 0.9.6.3
- ad-injection-admin.php +23 -18
- ad-injection-widget.php +2 -1
- ad-injection.php +12 -8
- readme.txt +21 -2
- ui-tab-main.php +20 -14
ad-injection-admin.php
CHANGED
@@ -252,19 +252,25 @@ function adinj_options_page(){
|
|
252 |
function adinj_top_message_box(){
|
253 |
$ops = adinj_options();
|
254 |
if (isset($_POST['adinj_action'])) {
|
255 |
-
echo '<div id="message" class="updated below-h2"><p><strong>';
|
256 |
echo 'All settings saved: ';
|
257 |
if (is_plugin_active('wp-super-cache/wp-cache.php')){
|
258 |
echo "You might need to <a href='options-general.php?page=wpsupercache&tab=tester'>clear your WP Super Cache cache</a> for the settings to take effect.";
|
259 |
} else if (is_plugin_active('w3-total-cache/w3-total-cache.php')){
|
260 |
-
echo "You might need to <a href='options-general.php?page=w3tc_general'>clear your cache</a> for the settings to take effect.";
|
261 |
} else if (is_plugin_active('wp-cache/wp-cache.php')){
|
262 |
-
echo "You might need to <a href='options-general.php?page=wp-cache/wp-cache'>clear your cache</a> for the settings to take effect.";
|
263 |
} else {
|
264 |
echo "If you are using a caching plugin you might need to delete its cache for any changes to take effect.";
|
265 |
}
|
266 |
echo '</strong>';
|
|
|
|
|
|
|
267 |
if ($ops['ad_insertion_mode']=='mfunc'){
|
|
|
|
|
|
|
268 |
global $adinj_warning_msg_filewrite;
|
269 |
if (!empty($adinj_warning_msg_filewrite)){
|
270 |
echo $adinj_warning_msg_filewrite;
|
@@ -282,7 +288,7 @@ function adinj_top_message_box(){
|
|
282 |
|
283 |
} else {
|
284 |
echo '<div id="message" class="updated below-h2"><p style="line-height:140%"><strong>';
|
285 |
-
echo "
|
286 |
echo '</strong></p></div>';
|
287 |
}
|
288 |
}
|
@@ -301,17 +307,12 @@ function adinj_side_info_box(){
|
|
301 |
<li><a href="http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/" target="_new">Ad Injection at reviewmylife</a></li>
|
302 |
<li><b><a href="<?php echo adinj_feedback_url(); ?>" target="_new">Report a bug / give feedback</a></b></li>
|
303 |
</ul>
|
304 |
-
<h4>Coming in 2011</h4>
|
305 |
-
<ul>
|
306 |
-
<li>Per ad control over which categories and tags the ads are shown in.</li>
|
307 |
-
<li>Extra ad locations.</li>
|
308 |
-
</ul>
|
309 |
|
310 |
<h4><font color="red">Important!</font></h4>
|
311 |
<p>You are responsible for making sure the ad settings and positioning you define are in compliance with your ad provider's terms of service! Failure to do so could get you banned by them!</p>
|
312 |
|
313 |
-
<h4><font color="red">
|
314 |
-
<p>This plugin
|
315 |
|
316 |
<h4>More by this author</h4>
|
317 |
<ul>
|
@@ -327,8 +328,10 @@ function adinj_side_info_box(){
|
|
327 |
}
|
328 |
|
329 |
function adinj_feedback_url(){
|
330 |
-
|
331 |
-
|
|
|
|
|
332 |
}
|
333 |
|
334 |
function adinj_add_checkbox($name){
|
@@ -427,7 +430,8 @@ function adinj_get_status($name){
|
|
427 |
$status[] = 'black';
|
428 |
$status[] = 'Error...';
|
429 |
if ($name == 'global'){
|
430 |
-
if ($ops['
|
|
|
431 |
$ops['exclude_page'] == 'on' &&
|
432 |
$ops['exclude_single'] == 'on' &&
|
433 |
$ops['exclude_archive'] == 'on'){
|
@@ -520,7 +524,8 @@ function adinj_get_status($name){
|
|
520 |
$status[1] = 'on';
|
521 |
}
|
522 |
} else if ($name == 'widgets'){
|
523 |
-
if ($ops['
|
|
|
524 |
$ops['widget_exclude_page'] == 'on' &&
|
525 |
$ops['widget_exclude_single'] == 'on' &&
|
526 |
$ops['widget_exclude_archive'] == 'on'){
|
@@ -931,6 +936,7 @@ function adinj_default_options(){
|
|
931 |
// Global settings
|
932 |
'ads_enabled' => 'off',
|
933 |
'ads_on_page_older_than' => '0',
|
|
|
934 |
'exclude_home' => '',
|
935 |
'exclude_page' => '',
|
936 |
'exclude_single' => '',
|
@@ -1027,6 +1033,7 @@ function adinj_default_options(){
|
|
1027 |
'bottom_tag_condition_mode' => ADINJ_ONLY_SHOW_IN, //TODO
|
1028 |
'bottom_tag_condition_entries' => '', //TODO
|
1029 |
// widgets
|
|
|
1030 |
'widget_exclude_home' => '',
|
1031 |
'widget_exclude_page' => '',
|
1032 |
'widget_exclude_single' => '',
|
@@ -1036,7 +1043,7 @@ function adinj_default_options(){
|
|
1036 |
'ad_referrers' => '.google., .bing., .yahoo., .ask., search?, search., /search/',
|
1037 |
'block_ips' => 'on', //TODO
|
1038 |
'blocked_ips' => '',
|
1039 |
-
'block_keywords' => 'off', //TODO
|
1040 |
'blocked_keywords' => '', //TODO
|
1041 |
'ad_insertion_mode' => 'mfunc',
|
1042 |
// ui main tab
|
@@ -1056,8 +1063,6 @@ function adinj_default_options(){
|
|
1056 |
// debug
|
1057 |
'debug_mode' => '',
|
1058 |
// version
|
1059 |
-
// _ = before split testing
|
1060 |
-
// 2 = split testing support
|
1061 |
'db_version' => ADINJ_DB_VERSION
|
1062 |
);
|
1063 |
}
|
252 |
function adinj_top_message_box(){
|
253 |
$ops = adinj_options();
|
254 |
if (isset($_POST['adinj_action'])) {
|
255 |
+
echo '<div id="message" class="updated below-h2"><p style="line-height:140%"><strong>';
|
256 |
echo 'All settings saved: ';
|
257 |
if (is_plugin_active('wp-super-cache/wp-cache.php')){
|
258 |
echo "You might need to <a href='options-general.php?page=wpsupercache&tab=tester'>clear your WP Super Cache cache</a> for the settings to take effect.";
|
259 |
} else if (is_plugin_active('w3-total-cache/w3-total-cache.php')){
|
260 |
+
echo "You might need to <a href='options-general.php?page=w3tc_general'>clear your W3 Total Cache cache</a> for the settings to take effect.";
|
261 |
} else if (is_plugin_active('wp-cache/wp-cache.php')){
|
262 |
+
echo "You might need to <a href='options-general.php?page=wp-cache/wp-cache'>clear your WP Cache cache</a> for the settings to take effect.";
|
263 |
} else {
|
264 |
echo "If you are using a caching plugin you might need to delete its cache for any changes to take effect.";
|
265 |
}
|
266 |
echo '</strong>';
|
267 |
+
if ($ops['debug_mode']=='on' && $ops['ads_enabled'] == 'on'){
|
268 |
+
echo "<br /><b>Recommendation:</b> Turn <a href='#debugging'>debug mode off</a> once you have got your ads working.";
|
269 |
+
}
|
270 |
if ($ops['ad_insertion_mode']=='mfunc'){
|
271 |
+
if (!is_supported_caching_plugin_active()){
|
272 |
+
echo "<br /><b>Recommendation:</b> It looks like you don't have a supported caching plugin (WP Super Cache, W3 Total Cache or WP Cache) active. Therefore one of the <a href='#restrictions'>direct insertion modes</a> might be better for you.";
|
273 |
+
}
|
274 |
global $adinj_warning_msg_filewrite;
|
275 |
if (!empty($adinj_warning_msg_filewrite)){
|
276 |
echo $adinj_warning_msg_filewrite;
|
288 |
|
289 |
} else {
|
290 |
echo '<div id="message" class="updated below-h2"><p style="line-height:140%"><strong>';
|
291 |
+
echo "24th January 2011: Added separate option for enabling/disabling front page as well as home page (they can be different!). Please contact me ASAP if you spot any bugs, or odd behaviour via the ".'<a href="'.adinj_feedback_url().'" target="_new">quick feedback form</a>.';
|
292 |
echo '</strong></p></div>';
|
293 |
}
|
294 |
}
|
307 |
<li><a href="http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/" target="_new">Ad Injection at reviewmylife</a></li>
|
308 |
<li><b><a href="<?php echo adinj_feedback_url(); ?>" target="_new">Report a bug / give feedback</a></b></li>
|
309 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
<h4><font color="red">Important!</font></h4>
|
312 |
<p>You are responsible for making sure the ad settings and positioning you define are in compliance with your ad provider's terms of service! Failure to do so could get you banned by them!</p>
|
313 |
|
314 |
+
<h4><font color="red">In developement</font></h4>
|
315 |
+
<p>This plugin is only a few months old. I'm actively listening to your feedback and fixing any problems, and adding new features that you request. Please let me know if you like the plugin too!</p>
|
316 |
|
317 |
<h4>More by this author</h4>
|
318 |
<ul>
|
328 |
}
|
329 |
|
330 |
function adinj_feedback_url(){
|
331 |
+
$wp_version = get_bloginfo('version');
|
332 |
+
$ad_version = adinj_get_version();
|
333 |
+
$data = urlencode($wp_version." / ".$ad_version);
|
334 |
+
return "https://spreadsheets.google.com/viewform?formkey=dFUwZzBYcG1HNzNKMmJZdWFDdFhkY0E6MQ&entry_3=$data";
|
335 |
}
|
336 |
|
337 |
function adinj_add_checkbox($name){
|
430 |
$status[] = 'black';
|
431 |
$status[] = 'Error...';
|
432 |
if ($name == 'global'){
|
433 |
+
if ($ops['exclude_front'] == 'on' &&
|
434 |
+
$ops['exclude_home'] == 'on' &&
|
435 |
$ops['exclude_page'] == 'on' &&
|
436 |
$ops['exclude_single'] == 'on' &&
|
437 |
$ops['exclude_archive'] == 'on'){
|
524 |
$status[1] = 'on';
|
525 |
}
|
526 |
} else if ($name == 'widgets'){
|
527 |
+
if ($ops['widget_exclude_front'] == 'on' &&
|
528 |
+
$ops['widget_exclude_home'] == 'on' &&
|
529 |
$ops['widget_exclude_page'] == 'on' &&
|
530 |
$ops['widget_exclude_single'] == 'on' &&
|
531 |
$ops['widget_exclude_archive'] == 'on'){
|
936 |
// Global settings
|
937 |
'ads_enabled' => 'off',
|
938 |
'ads_on_page_older_than' => '0',
|
939 |
+
'exclude_front' => '',
|
940 |
'exclude_home' => '',
|
941 |
'exclude_page' => '',
|
942 |
'exclude_single' => '',
|
1033 |
'bottom_tag_condition_mode' => ADINJ_ONLY_SHOW_IN, //TODO
|
1034 |
'bottom_tag_condition_entries' => '', //TODO
|
1035 |
// widgets
|
1036 |
+
'widget_exclude_front' => '',
|
1037 |
'widget_exclude_home' => '',
|
1038 |
'widget_exclude_page' => '',
|
1039 |
'widget_exclude_single' => '',
|
1043 |
'ad_referrers' => '.google., .bing., .yahoo., .ask., search?, search., /search/',
|
1044 |
'block_ips' => 'on', //TODO
|
1045 |
'blocked_ips' => '',
|
1046 |
+
'block_keywords' => 'off', //TODO change to blocked referrers?
|
1047 |
'blocked_keywords' => '', //TODO
|
1048 |
'ad_insertion_mode' => 'mfunc',
|
1049 |
// ui main tab
|
1063 |
// debug
|
1064 |
'debug_mode' => '',
|
1065 |
// version
|
|
|
|
|
1066 |
'db_version' => ADINJ_DB_VERSION
|
1067 |
);
|
1068 |
}
|
ad-injection-widget.php
CHANGED
@@ -16,7 +16,8 @@ class Ad_Injection_Widget extends WP_Widget {
|
|
16 |
function widget( $args, $instance ) {
|
17 |
if (adinj_ads_completely_disabled_from_page()) return;
|
18 |
|
19 |
-
if ((
|
|
|
20 |
(is_page() && adinj_ticked('widget_exclude_page')) ||
|
21 |
(is_single() && adinj_ticked('widget_exclude_single')) ||
|
22 |
(is_archive() && adinj_ticked('widget_exclude_archive'))){
|
16 |
function widget( $args, $instance ) {
|
17 |
if (adinj_ads_completely_disabled_from_page()) return;
|
18 |
|
19 |
+
if ((is_front_page() && adinj_ticked('widget_exclude_front')) ||
|
20 |
+
(is_home() && adinj_ticked('widget_exclude_home')) ||
|
21 |
(is_page() && adinj_ticked('widget_exclude_page')) ||
|
22 |
(is_single() && adinj_ticked('widget_exclude_single')) ||
|
23 |
(is_archive() && adinj_ticked('widget_exclude_archive'))){
|
ad-injection.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ad Injection
|
4 |
Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
|
5 |
Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
|
6 |
-
Version: 0.9.6.
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
@@ -16,8 +16,11 @@ License: GPLv2
|
|
16 |
//
|
17 |
define('ADINJ_NO_CONFIG_FILE', 1);
|
18 |
|
19 |
-
//
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
// Files
|
23 |
define('ADINJ_PATH', WP_PLUGIN_DIR.'/ad-injection');
|
@@ -451,12 +454,13 @@ function adinj_ads_completely_disabled_from_page($content=NULL){
|
|
451 |
}
|
452 |
|
453 |
// check for ads on certain page types being disabled
|
454 |
-
if ((
|
455 |
-
(
|
456 |
-
(
|
457 |
-
|
|
|
458 |
is_search() || is_404()){
|
459 |
-
return "NOADS: excluded from this
|
460 |
}
|
461 |
|
462 |
// if disable_adverts==1
|
3 |
Plugin Name: Ad Injection
|
4 |
Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
|
5 |
Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
|
6 |
+
Version: 0.9.6.3
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
16 |
//
|
17 |
define('ADINJ_NO_CONFIG_FILE', 1);
|
18 |
|
19 |
+
// DB Version
|
20 |
+
// _ = before split testing
|
21 |
+
// 2 = split testing support
|
22 |
+
// 3 = added front options
|
23 |
+
define('ADINJ_DB_VERSION', 3);
|
24 |
|
25 |
// Files
|
26 |
define('ADINJ_PATH', WP_PLUGIN_DIR.'/ad-injection');
|
454 |
}
|
455 |
|
456 |
// check for ads on certain page types being disabled
|
457 |
+
if (is_front_page() && adinj_ticked('exclude_front')){ return "NOADS: excluded from front page"; }
|
458 |
+
if (is_home() && adinj_ticked('exclude_home')){ return "NOADS: excluded from home page"; }
|
459 |
+
if ((is_page() && adinj_ticked('exclude_page')) ||
|
460 |
+
(is_single() && adinj_ticked('exclude_single')) ||
|
461 |
+
(is_archive() && adinj_ticked('exclude_archive')) ||
|
462 |
is_search() || is_404()){
|
463 |
+
return "NOADS: excluded from this page type: ".get_post_type();
|
464 |
}
|
465 |
|
466 |
// if disable_adverts==1
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-w
|
|
4 |
Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
|
5 |
Requires at least: 2.8.6
|
6 |
Tested up to: 3.1
|
7 |
-
Stable tag: 0.9.6.
|
8 |
|
9 |
Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
|
10 |
|
@@ -173,6 +173,22 @@ No! All the features of this plugin will work with no caching plugin installed.
|
|
173 |
|
174 |
The dynamic features will work with any caching program that supports the mfunc tag. At the moment that is WP Super Cache, W3 Total Cache, and WP Cache.
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
= Can I just have adverts on the home page? =
|
177 |
|
178 |
i.e. adverts on the home page, but not on single posts or pages.
|
@@ -289,6 +305,9 @@ If you do get any errors please use the 'Report a bug or give feedback' link on
|
|
289 |
|
290 |
== Changelog ==
|
291 |
|
|
|
|
|
|
|
292 |
= 0.9.6.2 =
|
293 |
* Support for W3 Total Cache and WP Cache (as well as the already supported WP Super Cache).
|
294 |
|
@@ -393,7 +412,7 @@ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on pag
|
|
393 |
|
394 |
== Upgrade Notice ==
|
395 |
|
396 |
-
= 0.9.6.
|
397 |
New split testing, ad rotation and alternate content features. If you have any problems with disappearing ads re-save them to make them appear again.
|
398 |
|
399 |
= 0.8.3 =
|
4 |
Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
|
5 |
Requires at least: 2.8.6
|
6 |
Tested up to: 3.1
|
7 |
+
Stable tag: 0.9.6.3
|
8 |
|
9 |
Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
|
10 |
|
173 |
|
174 |
The dynamic features will work with any caching program that supports the mfunc tag. At the moment that is WP Super Cache, W3 Total Cache, and WP Cache.
|
175 |
|
176 |
+
= Which caching plugin is best? =
|
177 |
+
|
178 |
+
Both WP Super Cache and W3 Total Cache are likely to be faster than WP Cache.
|
179 |
+
|
180 |
+
If you aren't using the dynamic features (and you are using direct_static mode) then the only way to find out which is best between WP Super Cache and W3 Total Cache is to measure the performance yourself, as the speed depends on many factors that will be unique to your web server and web site.
|
181 |
+
|
182 |
+
If you are using dynamic features (i.e. with mfunc mode) then WP Super Cache (in mod_rewrite mode) and W3 Total Cache (in Page Cache: Disk (basic) mode) are likely to offer similar performance as they both return the dynamic files via PHP.
|
183 |
+
|
184 |
+
Note that W3 Total Cache will not cache pages with mfunc tags if you use the Page Cache: Disk (enhanced) mode.
|
185 |
+
|
186 |
+
The speed of your website does depend on more factors than just page serve time so other features that the caching plugins offer (such as CDN and minification support) may swing the advantage either way.
|
187 |
+
|
188 |
+
WP Hyper Cache does not support mfunc tags so only use it if you don't want to use any of the dynamic features. If using WP Hyper Cache set the Ad Injection mode to 'direct_static'.
|
189 |
+
|
190 |
+
For reference: dynamic features are ad rotation, and blocking ad views by IP and referrer.
|
191 |
+
|
192 |
= Can I just have adverts on the home page? =
|
193 |
|
194 |
i.e. adverts on the home page, but not on single posts or pages.
|
305 |
|
306 |
== Changelog ==
|
307 |
|
308 |
+
= 0.9.6.3 =
|
309 |
+
* Option to enable/disable front page ads in case your front and home pages are different.
|
310 |
+
|
311 |
= 0.9.6.2 =
|
312 |
* Support for W3 Total Cache and WP Cache (as well as the already supported WP Super Cache).
|
313 |
|
412 |
|
413 |
== Upgrade Notice ==
|
414 |
|
415 |
+
= 0.9.6.3 =
|
416 |
New split testing, ad rotation and alternate content features. If you have any problems with disappearing ads re-save them to make them appear again.
|
417 |
|
418 |
= 0.8.3 =
|
ui-tab-main.php
CHANGED
@@ -51,17 +51,19 @@ function adinj_tab_main(){
|
|
51 |
</select><?php _e(" (days)", 'adinj') ?> - only for single posts and pages</p>
|
52 |
</td></tr>
|
53 |
<tr><td style="vertical-align:top">
|
54 |
-
Don't show ads on these
|
55 |
</td><td>
|
56 |
-
<?php adinj_add_checkbox('
|
|
|
57 |
<?php
|
58 |
$count_pages = wp_count_posts('page', 'readable');
|
59 |
$count_posts = wp_count_posts('post', 'readable');
|
60 |
?>
|
61 |
<?php adinj_add_checkbox('exclude_page') ?>page - <?php echo $count_pages->publish; ?> page(s)<br />
|
62 |
-
<?php adinj_add_checkbox('exclude_single') ?>single -<?php echo $count_posts->publish; ?>
|
63 |
<?php adinj_add_checkbox('exclude_archive') ?>archive - only <a href="#widgets">widgets</a> currently appear on archives<br />
|
64 |
</td></tr>
|
|
|
65 |
</table>
|
66 |
|
67 |
<b>Category and tag conditions</b>
|
@@ -97,14 +99,14 @@ function adinj_tab_main(){
|
|
97 |
</table>
|
98 |
|
99 |
|
100 |
-
<p><span style="font-size:10px;"><b>Docs:</b> On
|
101 |
<p><span style="font-size:10px;">Be especially careful if you decide to use the 'float' layout options. Make sure that you don't have adverts floated over the top of other page elements, or vice-versa.</span></p>
|
102 |
</div>
|
103 |
|
104 |
<input type="submit" style="float:right" name="adinj_action" value="<?php _e('Save all settings', 'adinj') ?>" />
|
105 |
<h3><a name="random_single"></a><?php _e("Single posts and pages: Randomly Injected ad settings", 'adinj') ?></h3>
|
106 |
<div class="inside" style="margin:10px">
|
107 |
-
<p>These random ad injection settings are specific to
|
108 |
|
109 |
<table border="0">
|
110 |
|
@@ -178,9 +180,9 @@ function adinj_tab_main(){
|
|
178 |
</div>
|
179 |
|
180 |
<input type="submit" style="float:right" name="adinj_action" value="<?php _e('Save all settings', 'adinj') ?>" />
|
181 |
-
<h3><a name="random_home"></a><?php _e("Home page: Randomly Injected ad settings", 'adinj')
|
182 |
<div class="inside" style="margin:10px">
|
183 |
-
<p>These random ad injection settings are specific to your home page
|
184 |
|
185 |
<?php _e("Maximum number of injected ads: ", 'adinj') ?>
|
186 |
<select name='max_num_of_ads_home_page'>
|
@@ -193,7 +195,7 @@ function adinj_tab_main(){
|
|
193 |
?>
|
194 |
</select> <?php echo adinj_getdefault('max_num_of_ads_home_page'); ?><br />
|
195 |
|
196 |
-
<p><span style="font-size:10px;"><b>Docs:</b> On a
|
197 |
|
198 |
<?php adinj_postbox_end(); ?>
|
199 |
|
@@ -262,13 +264,15 @@ function adinj_tab_main(){
|
|
262 |
<table border="0">
|
263 |
|
264 |
<tr><td>
|
265 |
-
<p>Don't show widget ads on these
|
266 |
</td><td>
|
267 |
-
<?php adinj_add_checkbox('
|
|
|
268 |
<?php adinj_add_checkbox('widget_exclude_page') ?>page - <?php echo $count_pages->publish; ?> page(s)<br />
|
269 |
-
<?php adinj_add_checkbox('widget_exclude_single') ?>single - <?php echo $count_posts->publish; ?>
|
270 |
<?php adinj_add_checkbox('widget_exclude_archive') ?>archive - includes category, tag, author, and date pages types<br />
|
271 |
</td></tr>
|
|
|
272 |
|
273 |
</table>
|
274 |
|
@@ -284,7 +288,7 @@ function adinj_tab_main(){
|
|
284 |
<p><input type="radio" name="ad_insertion_mode" value="mfunc" <?php if ($ops['ad_insertion_mode']=='mfunc') echo 'checked="checked"'; ?> /> <b>mfunc: Use mfunc tags for dynamic features</b> - Dynamic features will work with WP Super Cache, W3 Total Cache and WP Cache. Only select this mode if you are using one of those caching plugins.</p>
|
285 |
|
286 |
<?php if (!is_supported_caching_plugin_active()) {
|
287 |
-
echo '<p><b><span style="font-size:10px;color:red;">Note: A supported caching plugin does not appear to be active. If you are not using WP Super Cache / W3 Total Cache / WP Cache you should use one of the direct insertion modes.</span></b></p>';
|
288 |
} ?>
|
289 |
|
290 |
<?php if ($ops['ad_insertion_mode'] != 'mfunc') { ?>
|
@@ -434,7 +438,7 @@ function adinj_wp_super_cache_msg(){
|
|
434 |
|
435 |
function adinj_w3_total_cache_msg(){
|
436 |
?>
|
437 |
-
<p>W3 Total Cache will cache the the page on-disk if you use its Page Cache: 'Disk (basic)' mode. However if you use its Page Cache: Disk (enhanced) mode it won't cache the page.
|
438 |
<?php
|
439 |
}
|
440 |
|
@@ -480,6 +484,7 @@ function adinj_side_status_box(){
|
|
480 |
<?php
|
481 |
$info = adinj_get_status('global'); echo adinj_dot($info[0]).' '.$info[1];
|
482 |
if ($info[0] != 'red') { ?>
|
|
|
483 |
<br /> <?php echo adinj_green_or_red_dot('exclude_home'); ?> home
|
484 |
<br /> <?php echo adinj_green_or_red_dot('exclude_page'); ?> page
|
485 |
<br /> <?php echo adinj_green_or_red_dot('exclude_single'); ?> single
|
@@ -522,6 +527,7 @@ function adinj_side_status_box(){
|
|
522 |
</td><td>
|
523 |
<?php $info = adinj_get_status('widgets'); echo adinj_dot($info[0]).' '.$info[1];
|
524 |
if ($info[0] != 'red') { ?>
|
|
|
525 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_home'); ?> home
|
526 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_page'); ?> page
|
527 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_single'); ?> single
|
@@ -668,7 +674,7 @@ function adinj_docs(){
|
|
668 |
<h3><?php echo adinj_get_logo(); ?> Supported in-page tags</h3>
|
669 |
<div class="inside" style="margin:10px">
|
670 |
|
671 |
-
<p>These tags can be inserted into the page source to override the configured behaviour on
|
672 |
|
673 |
<ul>
|
674 |
<li><code><!--noadsense--></code> OR <code><!-no-adsense--></code> OR <code><!--NoAds--></code> OR <code><!--OffAds--></code> - disables all ads on this page. These tags are here to make this plugin compatible with the tags from Adsense Injection, Whydowork Adsense and Quick Adsense.</li>
|
51 |
</select><?php _e(" (days)", 'adinj') ?> - only for single posts and pages</p>
|
52 |
</td></tr>
|
53 |
<tr><td style="vertical-align:top">
|
54 |
+
Don't show ads on these types:
|
55 |
</td><td>
|
56 |
+
<?php adinj_add_checkbox('exclude_front') ?>front - <?php echo get_bloginfo('url'); ?><br />
|
57 |
+
<?php adinj_add_checkbox('exclude_home') ?>home - latest posts page (may be same as front)<br />
|
58 |
<?php
|
59 |
$count_pages = wp_count_posts('page', 'readable');
|
60 |
$count_posts = wp_count_posts('post', 'readable');
|
61 |
?>
|
62 |
<?php adinj_add_checkbox('exclude_page') ?>page - <?php echo $count_pages->publish; ?> page(s)<br />
|
63 |
+
<?php adinj_add_checkbox('exclude_single') ?>single -<?php echo $count_posts->publish; ?> single blog post(s)<br />
|
64 |
<?php adinj_add_checkbox('exclude_archive') ?>archive - only <a href="#widgets">widgets</a> currently appear on archives<br />
|
65 |
</td></tr>
|
66 |
+
<tr><td colspan="2"><p><span style="font-size:10px;">If you have <a href='options-reading.php'>set your front page</a> to be a static 'page' rather than your latest posts, the 'page' tick box will also apply to the front page.</span></p></td></tr>
|
67 |
</table>
|
68 |
|
69 |
<b>Category and tag conditions</b>
|
99 |
</table>
|
100 |
|
101 |
|
102 |
+
<p><span style="font-size:10px;"><b>Docs:</b> On single posts or pages this advert is inserted between randomly selected paragraphs. On 'your latest posts' page, one ad is inserted into each post. Try a <a href="#468x60">468x60</a> or <a href="#728x90">728x90</a> banner.</span></p>
|
103 |
<p><span style="font-size:10px;">Be especially careful if you decide to use the 'float' layout options. Make sure that you don't have adverts floated over the top of other page elements, or vice-versa.</span></p>
|
104 |
</div>
|
105 |
|
106 |
<input type="submit" style="float:right" name="adinj_action" value="<?php _e('Save all settings', 'adinj') ?>" />
|
107 |
<h3><a name="random_single"></a><?php _e("Single posts and pages: Randomly Injected ad settings", 'adinj') ?></h3>
|
108 |
<div class="inside" style="margin:10px">
|
109 |
+
<p>These random ad injection settings are specific to single posts and pages.</p>
|
110 |
|
111 |
<table border="0">
|
112 |
|
180 |
</div>
|
181 |
|
182 |
<input type="submit" style="float:right" name="adinj_action" value="<?php _e('Save all settings', 'adinj') ?>" />
|
183 |
+
<h3><a name="random_home"></a><?php _e("Home page: Randomly Injected ad settings", 'adinj') ?></h3>
|
184 |
<div class="inside" style="margin:10px">
|
185 |
+
<p>These random ad injection settings are specific to your home page. The home page is the page containing your latest posts. It may not be the same as your front page if you have set a static page to be your front page in the <a href='options-reading.php'>reading settings</a>.</p>
|
186 |
|
187 |
<?php _e("Maximum number of injected ads: ", 'adinj') ?>
|
188 |
<select name='max_num_of_ads_home_page'>
|
195 |
?>
|
196 |
</select> <?php echo adinj_getdefault('max_num_of_ads_home_page'); ?><br />
|
197 |
|
198 |
+
<p><span style="font-size:10px;"><b>Docs:</b> On a 'your latest posts' page, one randomly positioned advert will be inserted into each post, up to the maximum number specified here.</span></p>
|
199 |
|
200 |
<?php adinj_postbox_end(); ?>
|
201 |
|
264 |
<table border="0">
|
265 |
|
266 |
<tr><td>
|
267 |
+
<p>Don't show widget ads on these types:</p>
|
268 |
</td><td>
|
269 |
+
<?php adinj_add_checkbox('widget_exclude_front') ?>front - <?php echo get_bloginfo('url'); ?><br />
|
270 |
+
<?php adinj_add_checkbox('widget_exclude_home') ?>home - latest posts page (may be same as front)<br />
|
271 |
<?php adinj_add_checkbox('widget_exclude_page') ?>page - <?php echo $count_pages->publish; ?> page(s)<br />
|
272 |
+
<?php adinj_add_checkbox('widget_exclude_single') ?>single - <?php echo $count_posts->publish; ?> single blog post(s)<br />
|
273 |
<?php adinj_add_checkbox('widget_exclude_archive') ?>archive - includes category, tag, author, and date pages types<br />
|
274 |
</td></tr>
|
275 |
+
<tr><td colspan="2"><p><span style="font-size:10px;">If you have <a href='options-reading.php'>set your front page</a> to be a static 'page' rather than your latest posts, the 'page' tick box will also apply to the front page.</span></p></td></tr>
|
276 |
|
277 |
</table>
|
278 |
|
288 |
<p><input type="radio" name="ad_insertion_mode" value="mfunc" <?php if ($ops['ad_insertion_mode']=='mfunc') echo 'checked="checked"'; ?> /> <b>mfunc: Use mfunc tags for dynamic features</b> - Dynamic features will work with WP Super Cache, W3 Total Cache and WP Cache. Only select this mode if you are using one of those caching plugins.</p>
|
289 |
|
290 |
<?php if (!is_supported_caching_plugin_active()) {
|
291 |
+
echo '<p><b><span style="font-size:10px;color:red;">Note: A supported caching plugin does not appear to be active. If you are not using WP Super Cache / W3 Total Cache / WP Cache you should use one of the direct insertion modes below.</span></b></p>';
|
292 |
} ?>
|
293 |
|
294 |
<?php if ($ops['ad_insertion_mode'] != 'mfunc') { ?>
|
438 |
|
439 |
function adinj_w3_total_cache_msg(){
|
440 |
?>
|
441 |
+
<p>W3 Total Cache will cache the the page on-disk if you use its Page Cache: 'Disk (basic)' mode. However if you use its Page Cache: Disk (enhanced) mode it won't cache the page. If you aren't using Ad Injection's dynamic features then you can use W3 Total Cache with Page Cache: Disk (enhanced) mode.</p>
|
442 |
<?php
|
443 |
}
|
444 |
|
484 |
<?php
|
485 |
$info = adinj_get_status('global'); echo adinj_dot($info[0]).' '.$info[1];
|
486 |
if ($info[0] != 'red') { ?>
|
487 |
+
<br /> <?php echo adinj_green_or_red_dot('exclude_front'); ?> front
|
488 |
<br /> <?php echo adinj_green_or_red_dot('exclude_home'); ?> home
|
489 |
<br /> <?php echo adinj_green_or_red_dot('exclude_page'); ?> page
|
490 |
<br /> <?php echo adinj_green_or_red_dot('exclude_single'); ?> single
|
527 |
</td><td>
|
528 |
<?php $info = adinj_get_status('widgets'); echo adinj_dot($info[0]).' '.$info[1];
|
529 |
if ($info[0] != 'red') { ?>
|
530 |
+
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_front'); ?> front
|
531 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_home'); ?> home
|
532 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_page'); ?> page
|
533 |
<br /> <?php echo adinj_green_or_red_dot('widget_exclude_single'); ?> single
|
674 |
<h3><?php echo adinj_get_logo(); ?> Supported in-page tags</h3>
|
675 |
<div class="inside" style="margin:10px">
|
676 |
|
677 |
+
<p>These tags can be inserted into the page source to override the configured behaviour on single posts and pages. Because sometimes specific pages need to be treated differently.</p>
|
678 |
|
679 |
<ul>
|
680 |
<li><code><!--noadsense--></code> OR <code><!-no-adsense--></code> OR <code><!--NoAds--></code> OR <code><!--OffAds--></code> - disables all ads on this page. These tags are here to make this plugin compatible with the tags from Adsense Injection, Whydowork Adsense and Quick Adsense.</li>
|