Plugin Directory

Changeset 324187


Ignore:
Timestamp:
12/18/2010 09:23:41 PM (15 years ago)
Author:
midrangeman
Message:

Added support for infolinks

Location:
ad-wrap/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ad-wrap/trunk/ad-wrap.php

    r244666 r324187  
    44Plugin URI: http://www.geekyramblings.net/plugins/ad-wrap
    55Description: Simple plugin to wrap text in context ad service tags to identify important context.
    6 Version: 0.5
    7 Tested up to: 3.0.0
     6Version: 0.6
     7Tested up to: 3.0.3
    88Author: David Gibbs
    99Author URI: http://www.geekyramblings.net
     
    1515    $amazon = get_option('ad_wrap_amazon');
    1616    $kontera = get_option('ad_wrap_kontera');
     17    $infolinks = get_option('ad_wrap_infolinks');
    1718
    1819    $prefix = "";
    1920    if ($kontera) {
    20         $prefix .="<div class=\"KonaBody\">";
     21        $prefix .="\n<div class=\"KonaBody\">";
    2122    }
    2223    if ($google_adsense) {
    23           $prefix .= "<!-- google_ad_section_start -->";
     24          $prefix .= "\n<!-- google_ad_section_start -->";
    2425    }
    25     if ($amazon) {
    26           $prefix .= "<!--Amazon_CLS_IM_START-->";
     26    if ($infolinks) {
     27          $prefix .= "\n<!--INFOLINKS_ON-->";
    2728    }
    2829
    2930    $sufix = "";
    30     if ($amazon) {
    31         $sufix .= "<!--Amazon_CLS_IM_END-->";
     31    if ($infolinks) {
     32        $sufix .= "\n<!--INFOLINKS_OFF-->";
    3233    }
    3334    if ($google_adsense) {
    34         $sufix .= "<!-- google_ad_section_end -->";
     35        $sufix .= "\n<!-- google_ad_section_end -->";
    3536    }
    3637    if ($kontera) {
    37          $sufix .= "</div>";
     38         $sufix .= "\n</div> <!-- KonaBody -->";
    3839    }
    3940
    40     return $prefix."<p>".$text.$sufix;
     41    return $prefix."\n<p>".$text.$sufix."\n";
    4142}
    4243
     
    5253        <li><a href="http://www.google.com/adsense">Google AdSense</a></li>
    5354        <li><a href="http://www.kontera.com/ads-for-site/become-a-kontera-publisher">Kontera ContextLink</a></li>
     55        <li><a href="http://www.infolinks.com/signup.html">infolinks</a></li>
    5456    </ul>
    5557    <?php _e('Contact') ?> <a href="mailto:[email protected]">[email protected]</a> <?php _e('to request additional context ad services.  Please provide details on how the ad service identifies relevent content (usually with html comments or div sections.') ?>
     
    7274        </td>
    7375 </tr>
     76 <tr>
     77        <th scope="row" valign="top">infolinks</th>
     78        <td>
     79        <input id="ad_wrap_infolinks" type="checkbox" name="ad_wrap_infolinks" <?php echo get_option('ad_wrap_infolinks')?'checked=checked':''; ?> />
     80                <label for="ad_wrap_kontera"><?php _e('Check this box to wrap text in') ?> &lt;!--INFOLINKS_ON--&gt; <?php _e('and') ?> &lt;!--INFOLINKS_OFF--&gt;</label>
     81        </td>
     82 </tr>
    7483</table>
    7584<p/>
    7685<b><?php _e('NOTE') ?>:</b> <?php _e('This plug-in does <u>NOT</u> add the code to invoke the actual ad service.  It just provides markers to the ad service to identify the important content.  Consider using ') ?><a href="http://www.geekyramblings.net/plugins/general-headers/">General Headers</a> <?php _e('to add arbitrary code to the headers and/or footers of your content.') ?>
     86
    7787        <p class="submit">
    7888        <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
    7989        </p>
    8090    <input type="hidden" name="action" value="update" />
    81     <input type="hidden" name="page_options" value="ad_wrap_google_adsense,ad_wrap_kontera"/>
     91    <input type="hidden" name="page_options" value="ad_wrap_google_adsense,ad_wrap_kontera,ad_wrap_infolinks"/>
    8292    </form>
    8393    </div>
     
    99109        // Clean up the options
    100110    delete_option('ad_wrap_google_adsense');
    101     delete_option('ad_wrap_amazon');
     111    delete_option('ad_wrap_infolinks');
    102112    delete_option('ad_wrap_kontera');
    103113}
     
    105115add_option('ad_wrap_google_adsense', true);
    106116add_option('ad_wrap_kontera', true);
     117add_option('ad_wrap_infolinks', true);
    107118add_option('ad_wrap_version', '0.3');
    108119add_action('admin_menu', 'ad_wrap_menu');
  • ad-wrap/trunk/readme.txt

    r244666 r324187  
    44Tags: ads, context, monetize
    55Requires at least: 2.2.0
    6 Tested up to: 3.0
     6Tested up to: 3.0.3
    77Stable tag: Trunk
    88
     
    1515
    16161. Google Adsense
    17 3. Kontera ContextLink
     172. Kontera ContextLink
     183. Infolinks
    1819
    1920This plug-in is based on work originally done by John Godley
     
    3536
    3637== Changelog ==
     38
     39= 0.6 =
     40* Removed WP Help Center
     41* Added support for infolinks
    3742
    3843= 0.5 =
Note: See TracChangeset for help on using the changeset viewer.