Description: Place Google <a href="https://www.google.com/adsense/" title="adsense">AdSense</a> ads in your WordPress Posts. Requires WordPress 1.5 or higer. For complete usage and configuration click on <a href="admin.php?page=adsense-deluxe.php"><b>AdsenseDeluxe</b></a> under the "Options" menu.
Author: Acme Technologies
Author URI: http://www.acmetech.com/
*/
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
//--
//-- Version of the plugin
//--
$__ADSENSE_DELUXE_VERSION__ = "0.8";
//--
//-- You can select in the Adsense-Deluxe options page to give something back to this
//-- plugin's author (me) by having 5% of the ads shown on your WP blog use my adsense
//-- client ID. This is DISABLED by default, and I assure you I do nothing in the code
//-- to subversively turn it on! The way it works is if you enable the option (and it's
//-- just as easily disabled...), approximately 5% of the time an adsense ad block is
//-- displayed, it will use my AdSense client-id, and if someone happens to click one of
//-- those ads, I benefit from it and you've helped encourage me to continue supporting
//-- this plugin. If you're going to enable this option, you can make me feel even happier
//-- posting a comment on the blog page for this plugin to let mee know, and I can
<p><span style="font-weight:bold;color:#03F;font-size:1.2em;margin-left:10px;">AdSense-Deluxe</span> provides shortcuts for automatically inserting Google AdSense code into your posts<a href="$def_url">.</a>
</p>
<ul>
<li><a href="#instructions" style="font-weight:bold;">Instructions</a> are located at the bottom of this page. . . . . or visit <a href="http://www.acmetech.com/blog/adsense-deluxe/" target="external" title="Adsense-Deluxe WordPress Plugin Official Site"><i><b>AdSense-Deluxe</b></i> home page</a></li>
<li>The <a href="#adsense_sandbox" style="font-weight:bold;">AdSense Preview Tool</a> will help you see which ads will appear on your pages.</li>
<li><b>Maximize your ad revenues: <a href="http://www.alternateurl.com/index.php?rid=764" style="font-weight:bold;color:#00C;font-style:italic;" title="AlternateURL lets you replace PSAs with paying ads" target="external">AlternateURL</a> . . . . . <a href="https://www.google.com/adsense/" style="font-weight:bold;" title="AdSense Login" target="external">Login to AdSense</a> . . . . . read <a href="https://www.google.com/adsense/policies" title="View Google's AdSense Terms of Service" target="external">Google's TOS</a></li><li>Please support Adsense-Deluxe development with a <a href="http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@acmetech.com&item_name=Adsense-Deluxe+Donation" title="Make a PayPal donation for Adsense-Deluxe right now" target="external">PayPal Donation</a> or the <a href="#reward_author" title="Enable the reward author feature and 5% of ads shown will use Wayne's AdSense ID">Reward Author</a> feature</li></ul>
END;
}// _AdsDel_Header()
/*
**
** Output bottom of Options page including instructions.
This plugin allows you to insert html comments in your posts (or WordPress templates) and have them replaced
by the actual Google AdSense or Yahoo Publisher Network code. You can define a single default code block to use, or as many variations as you like. <b>Adsense-Deluxe</b> makes it easy to test different AdSense styles in all your posts without having to edit the WordPress code or templates, or change all the posts manually.
</p><p>
The designated default AdSense code is included in a post by inserting this: <code style="color:blue;"><!--adsense--></code> wherever you want the ads to appear. To insert an alternate AdSense block which you've defined by a keyword (for example, "wide_banner", you would use: <code style="color:blue;"><!--adsense#wide_banner--></code>.
</p>
<p>When viewing the list of ads you've defined, the default ad block will have a shaded background. <span style="color:red;font-weight:bold;">Tip:</span> When viewing the list of ad units you've defined you can click on the linked Description text to preview the ad style.</p>
<p>If you want to use the ads defined in Adsense-Deluxe within your WordPress templates, place the following code where you want the ads to appear:<br /> <code style="color:#0033CC;"><?php adsense_deluxe_ads('Ad_Name'); ?></code>.<br />Calling that PHP function without a parameter will return the default ad unit.
</p>
<p>
Please restrict your keywords to the letters a-zA-Z, 0-9 and underscore (_). Matching is case-sensitive, so you might save yourself headaches by sticking to lowercase keywords. Also avoid extraneous spaces inside the html comments; regular expressions (which could account for extra whitespace) are not used so that replacements when the page is serving are as fast as possible.
</p>
<blockquote><dl>
<dt><b>Name</b></dt>
<dd>This is the name by which you reference an AdSense
block of code when creating posts. For example, if you <b><i>name</i></b> a block "wide_banner", you would insert into your post<br />"<code style="color:blue;"><!--adsense#wide_banner--></code>".
<br /><br />Whichever block is designated as the <i>default</i> AdSense block will be substituted wherever the default comment string is found ("<code style="color:blue;"><!--adsense--></code>"), and also for any comment strings which reference it by its unique name (e.g., "<code style="color:blue;"><!--adsense#test--></code>"). You'll want to set the <i>default</i> AdSense block to the AdSense code you will use in the most places within your posts.
</dd>
<dt><b>AdSense Code</b></dt>
<dd>This is the block of AdSense code to substitute for the given keyword.</dd>
<dt><b>Description</b></dt>
<dd>This is for your own use to help remember what each block of AdSense code looks like. You might use something like "banner 468x60, white background"</dd>
</dl>
</blockquote>
<p> Please make sure you read <a href="https://www.google.com/adsense/policies" target="external">Google's TOS</a> before using this plugin!
</p>
<p><hr><span style="font-size:.9em;color:#888;">Feedback can be sent to <a href="mailto:support@acmetech.com?subject=Adsense-Deluxe Plugin Comment" title="Email Acme Technologies">support@acmetech.com</a>. Please keep in mind this is free software and Acme Technologies absolutely does not warrant it as suitable for any particular use nor that it is defect-free. Support is provided whenever possible, but at our discretion. Thank you for your understanding and for supporting our work.</span>
<br /><b>*</b><span style="font-size:.9em">This plugin is loosely based on the "Adsense" Plugin by Phil Hord, http://philhord.com/wp-hacks/adsense.</span>
<p style="background-color:#CCF;padding:5px 5px 5px 5px;">This form allows you to preview the ads which would appear on a web page. Just enter any URL in the text box and the ads will display in a new window. Since they're shown in test mode, none of the impressions are recorded and clicking them does not cost nor benefit anyone.
<input name="reward_author" type="checkbox" value="1" $rewards_checked/> Reward <i><b>AdSense-Deluxe</b></i> Author with 5% of your AdSense Impressions <input name="submit" type="submit" value="Update Author Rewards" />
</form>
<p style="background-color:#CCF;padding:5px 5px 5px 5px;">When this option is checked, approximately 5% of the ad impressions on your blog will use my [the guy who wrote and maintains this plug-in] AdSense client-ID. Doing this is not <i>crazy</i>, no... it's a good way to help contribute to let the author know you appreciate how useful the tool is to you and motivate him to add more features. I've spent over 200 hours writing and maintaining this software and will only continue releasing updates if the community shows their support. [<i>My sincere thanks to all those users who are already showing that support!</i>]
echo '<td style="font-size:.9em;">' . '<a title="Click to Preview This Ad Style in a new window" onClick=\''. AdsDel_makePreviewUrl($vals['adsense'], get_settings('home'), $key).'\'>'.$vals['desc'] . '</a></td>';