Plugin Directory

Changeset 1183638


Ignore:
Timestamp:
06/18/2015 04:53:02 PM (11 years ago)
Author:
sparklit
Message:

Added Secure tags

Location:
adbutler/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • adbutler/trunk/adbutler.php

    r1181213 r1183638  
    55Plugin URI: http://example.com/wordpress-plugins/adbutler
    66Description: AdButler ad management system integration plugin. Simplify deployment of your ad zones with this highly effective manner of deploying your publishing needs
    7 Version: 1.08
     7Version: 1.09
    88Author: Sparklit Networks
    99Author URI: http://sparklit.com
  • adbutler/trunk/css/adbutler.css

    r788990 r1183638  
    2323}
    2424.adbutler-optional{
    25     display:none;
     25 
    2626}
    2727
  • adbutler/trunk/includes/adbutler_plugin.class

    r1179344 r1183638  
    8888            'zone_id' => 0,
    8989            'type' => 'asyncjs',
    90             'secure'=> false,
    91             'size' => '300*250',
     90            'secure'=> is_ssl(),
     91            'size' => '300x250',
    9292            'adbutler_id' => get_option('adbutler_id'),
    9393            'host_name' => get_option('adbutler_host_name'),
     
    354354        }
    355355
     356        if (isset($_POST['refresh'])) {
     357            check_admin_referer('spark_permission_check', 'nonce_check');
     358            $adbutler_key = get_option('adbutler_key');
     359            if (adbutler_plugin::validate_adbutler_key($adbutler_key)) {
     360                echo "<strong style=\"color:darkgreen\">The configuration was refreshed susccesfully</strong>";
     361            } else {
     362                echo "<strong style=\"color:red\">The configuration refresh failed. Please enter a new key</strong>";
     363            }
     364        }
     365
    356366        $adbutler_key = get_option('adbutler_id');
    357367        echo '<div  id="key-form"><form method="post" target="_self">';
     
    388398        ?>
    389399        <p>A key has been configured with this account.</p>
    390         <input type="hidden" name="clear" value="1">
    391         <button class="button-primary" type=submit>Clear Key</button>
     400        <button class="button-primary" name="clear" type=submit>Clear Key</button>
     401        <button class="button-primary" name="refresh" type=submit>Refresh</button>
    392402    <?php
    393403    }
     
    551561            $protocol = "http://" . $def['host_name'];
    552562        }
     563        if (isset($def['extra_data']) && !empty($def['extra_data'])) {
     564            $extra = ",extraData:'".$def['extra_data']."'";
     565        }
    553566        ob_start();
    554567        ?>
     
    560573            var plc<?php echo $zone_id?> = window.plc<?php echo $zone_id?> || 0;
    561574            document.write('<'+'div id="placement_<?php echo $zone_id?>_'+plc<?php echo $zone_id?>+'"></'+'div>');
    562             AdButler.ads.push({handler: function(opt){ AdButler.register(<?php echo $MID?>,<?php echo $zone_id?>, [<?php echo $size[0]?>,<?php echo $size[1]?>], 'placement_<?php echo $zone_id?>_'+opt.place, opt); }, opt: { place: plc<?php echo $zone_id?>++, keywords: abkw, domain: '<?php echo $def['secure']? $def['ssl_host_name']: $def['host_name']?>' }});
     575            AdButler.ads.push({handler: function(opt){ AdButler.register(<?php echo $MID?>,<?php echo $zone_id?>, [<?php echo $size[0]?>,<?php echo $size[1]?>], 'placement_<?php echo $zone_id?>_'+opt.place, opt); }, opt: { place: plc<?php echo $zone_id?>++, keywords: abkw <?php echo empty($extra)?'':$extra?>,domain: '<?php echo $def['secure']? $def['ssl_host_name']: $def['host_name']?>' }});
    563576        </script>
    564577        <?php
  • adbutler/trunk/includes/adbutler_widget.class

    r1040829 r1183638  
    4242                break;
    4343        }       
    44         $instance['secure'] = isset($new_instance['secure']) ? 1 : 0;       
     44        $instance['secure']= $new_instance['secure'];
    4545        if(preg_match('^\d+x\d+$^',$new_instance['size']))
    4646            $instance['size'] = $new_instance['size'];     
     
    165165
    166166            <p class="adbutler-optional" title="Select Secure to enable SSL based Ad serving. Note this should only be chosen for secure sites">
    167                 <input id="<?php echo $this->get_field_id('secure'); ?>" type="checkbox" value="1"
    168                       name="
    169                 <?php echo $this->get_field_name('secure'); ?>" <?php checked($secure, 1); ?>>
    170                 <label
    171                        for="<?php echo $this->get_field_id('secure'); ?>"><?php _e('Secure', 'spark_domain'); ?></label>
     167                <input class="checkbox" type="checkbox" <?php checked($instance['secure'], 'on'); ?> id="<?php echo $this->get_field_id('secure'); ?>" name="<?php echo $this->get_field_name('secure'); ?>" />
     168                <label for="<?php echo $this->get_field_id('secure'); ?>"><?php _e('Secure', 'spark_domain'); ?></label>
     169            </p>
    172170            </p>
    173171
    174172            <p class="adbutler-optional"  title="Enter extra data to be passed along in your request. This requires configuration of your zones through AdButler">
    175173                <label for="<?php echo $this->get_field_id('extra_data'); ?>"><?php _e('Extra Data', 'spark_domain'); ?></label>
    176                 <input id="<?php echo $this->get_field_id('extra_data'); ?>" maxlength="60"
    177                        name="<?php echo $this->get_field_name('extra_data'); ?>" value="<?php echo $extra_data ?>"
     174                <input id="<?php echo $this->get_field_id('extra_data'); ?>"
     175                       name="<?php echo $this->get_field_name('extra_data'); ?>" class="widefat" value="<?php echo $extra_data ?>"
    178176                    /></p>
    179177            <?php if (isset($instance['adtag'])): ?>
  • adbutler/trunk/readme.txt

    r1181213 r1183638  
    74741. 07 Added Support for shortcodes
    75751. 08 Fixed development bug
     761. 09 Added Secure Tags and Refresh Settings
    7677
    7778== Upgrade notice ==
    7879
    79 Added the ability to embed shortcodes within in posts
     80Added the ability to refresh tag config and Secure tag type
    8081
    8182
Note: See TracChangeset for help on using the changeset viewer.