Plugin Directory

Changeset 907413


Ignore:
Timestamp:
05/03/2014 12:49:22 PM (12 years ago)
Author:
ashdurham
Message:
  • Addition of default settings for creating new adverts
  • CSS update for latest version of WP
  • Addition of shortcode builder in edit screen
  • Addition of some extra columns to advert list
Location:
adkingpro
Files:
96 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • adkingpro/trunk/adkingpro.php

    r876148 r907413  
    44    Plugin URI: http://kingpro.me/plugins/ad-king-pro/
    55    Description: Ad King Pro allows you to manage, display, document and report all of your custom advertising on your wordpress site.
    6     Version: 1.9.11
     6    Version: 1.9.12
    77    Author: Ash Durham
    88    Author URI: http://durham.net.au/
     
    2929
    3030    global $akp_db_version;
    31     $akp_db_version = "1.9.11";
     31    $akp_db_version = "1.9.12";
    3232
    3333    function akp_install() {
  • adkingpro/trunk/css/adkingpro-styles.css

    r798364 r907413  
    3737padding: 1px;
    3838font-size: 12px;
     39}
     40
     41.akp_shortcode_example {
     42    height: 40px;
     43    line-height: 40px;
     44    width: 100%;
     45    background-color: #ccc;
     46    color: #333;
     47    text-align: center;
     48    font-weight: bold;
     49    margin-top: 20px;
     50}
     51.akp_shortcode_q {
     52    padding: 10px 0;
    3953}
    4054
  • adkingpro/trunk/includes/admin_area.php

    r814768 r907413  
    3333  register_setting( 'akp-options', 'akp_auth_role' );
    3434  register_setting( 'akp-options', 'akp_custom_css' );
     35  register_setting( 'akp-options', 'akp_default_media_type' );
     36  register_setting( 'akp-options', 'akp_default_window_target' );
     37  register_setting( 'akp-options', 'akp_default_nofollow' );
     38  register_setting( 'akp-options', 'akp_default_remove_link' );
     39  register_setting( 'akp-options', 'akp_default_rev_imp' );
     40  register_setting( 'akp-options', 'akp_default_rev_click' );
    3541}
    3642add_action( 'admin_init', 'register_akp_options' );
     
    4551add_option( 'akp_auth_role', 'subscriber');
    4652add_option( 'akp_custom_css', '/* Add any CSS you would like to modify your banner ads here */' );
     53add_option( 'akp_default_media_type', 'image' );
     54add_option( 'akp_default_window_target', 'blank' );
     55add_option( 'akp_default_nofollow', '0' );
     56add_option( 'akp_default_remove_link', '0' );
     57add_option( 'akp_default_rev_imp', '0.00' );
     58add_option( 'akp_default_rev_click', '0.00' );
    4759
    4860function akp_allowed_cap() {
     
    8294        array(
    8395            'labels' => array(
    84                 'name' => __( 'Adverts', 'akptext' ),
    85                 'singular_name' => __( 'Advert', 'akptext' ),
    86                 'all_items'=>__( 'All Adverts', 'akptext' ),
    87                 'edit_item'=>__( 'Edit Advert', 'akptext' ),
    88                 'update_item'=>__( 'Update Advert', 'akptext' ),
    89                 'add_new_item'=>__( 'Add New Advert', 'akptext' ),
    90                 'new_item_name'=>__( 'New Advert', 'akptext' ),
     96                'name'               => __( 'Adverts', 'akptext' ),
     97                'singular_name'      => __( 'Advert', 'akptext' ),
     98                'all_items'          => __( 'All Adverts', 'akptext' ),
     99                'edit_item'          => __( 'Edit Advert', 'akptext' ),
     100                'update_item'        => __( 'Update Advert', 'akptext' ),
     101                'add_new_item'       => __( 'Add New Advert', 'akptext' ),
     102                'new_item_name'      => __( 'New Advert', 'akptext' ),
     103        'menu_name'          => _x( 'Adverts', 'admin menu', 'akptext' ),
     104        'name_admin_bar'     => _x( 'Advert', 'add new on admin bar', 'akptext' ),
     105        'add_new'            => _x( 'Add New', 'advert', 'akptext' ),
     106        'new_item'           => __( 'New Advert', 'akptext' ),
     107        'view_item'          => __( 'View Advert', 'akptext' ),
     108        'search_items'       => __( 'Search Adverts', 'akptext' ),
     109        'parent_item_colon'  => __( 'Parent Adverts:', 'akptext' ),
     110        'not_found'          => __( 'No adverts found.', 'akptext' ),
     111        'not_found_in_trash' => __( 'No adverts found in Trash.', 'akptext' ),
    91112            ),
    92113            'capabilities' => array(
     
    145166            background: url(<?= plugins_url('/images/akp-icon_16x16_sat.png', dirname(__FILE__)) ?>) no-repeat center center !important;
    146167        }
     168        #menu-posts-adverts_posts .wp-menu-image:before {display: none;}
    147169    #menu-posts-adverts_posts:hover .wp-menu-image, #menu-posts-adverts_posts.wp-has-current-submenu .wp-menu-image {
    148170            background: url(<?= plugins_url('/images/akp-icon_16x16.png', dirname(__FILE__)) ?>) no-repeat center center !important;
     
    332354function akp_change_meta_boxes()
    333355{
     356    add_meta_box('akpshortcode', __('Ad King Pro Shortcode Builder', 'akptext'), 'akp_shortcode', 'adverts_posts', 'normal', 'high');
     357    add_filter( "postbox_classes_adverts_posts_akpshortcode", 'minify_akpshortcode' );
    334358    add_meta_box('akpmediatype', __('Media Type', 'akptext'), 'akp_media_type', 'adverts_posts', 'normal', 'high');
    335359   
     
    412436}
    413437
     438// Display example shortcode
     439function akp_shortcode($object, $box) {
     440    global $wpdb, $post;
     441    ?>
     442    <div class="akp_shortcode_builder">
     443        <div class="akp_shortcode_q">
     444            <span><?php _e('What do you want to display?') ?></span>
     445            <select id="akp_shortcode_display" data-post_id='<?php echo $post->ID ?>'>
     446                <option>-- SELECT --</option>
     447                <option value="single">This single banner</option>
     448                <option value='selected'>Selected banners</option>
     449                <option value="group">A group of banners based on Advert Type</option>
     450            </select>
     451        </div>
     452        <div class="akp_shortcode_q group" style='display: none;'>
     453            <span><?php _e('Which advert type would you like to display banners from?') ?></span>
     454            <select id="akp_shortcode_adverttype">
     455                <option>-- SELECT --</option>
     456                <?php
     457                    $adverttypes = get_terms(array('advert_types'), array('hide_empty'=>false));
     458                    foreach ($adverttypes as $type) :
     459                        echo "<option value='".$type->slug."'>".$type->name."</option>";
     460                    endforeach;
     461                ?>
     462            </select>
     463        </div>
     464        <div class="akp_shortcode_q selected" style='display: none;'>
     465            <span><?php _e('Which adverts would you like to display?') ?></span>
     466            <select id="akp_shortcode_banners" multiple style='width: 100%;'>
     467                <?php
     468                    $adverts = new WP_Query(array('post_type'=>'adverts_posts', 'showposts'=>-1));
     469                    if ($adverts->have_posts()) :
     470                        while ($adverts->have_posts()) :
     471                            $adverts->the_post();
     472                            echo "<option value='".get_the_ID()."'>".get_the_ID()." - ".get_the_title()."</option>";
     473                        endwhile;
     474                    endif;
     475                ?>
     476            </select>
     477        </div>
     478        <div class="akp_shortcode_q group selected" style='display: none;'>
     479            <span><?php _e('Would you like the advert to rotate through all adverts in the group?') ?></span>
     480            <input type='checkbox' id='akp_shortcode_rotate' value='1' />
     481        </div>
     482        <div class="akp_shortcode_q rotate" style='display: none;'>
     483            <span><?php _e('How long would you like the advert to pause for?') ?></span>
     484            <input type='text' id='akp_shortcode_speed' value='5000' />
     485        </div>
     486        <div class="akp_shortcode_q rotate" style='display: none;'>
     487            <span><?php _e('How long would you like change between each advert to be?') ?></span>
     488            <input type='text' id='akp_shortcode_changespeed' value='600' />
     489        </div>
     490        <div class="akp_shortcode_q rotate" style='display: none;'>
     491            <span><?php _e('Would you like a transition effect?') ?></span>
     492            <select id="akp_shortcode_effect">
     493                <option value="fade">Fade</option>
     494                <option value="slideLeft">SlideLeft</option>
     495                <option value="none">None</option>
     496            </select>
     497        </div>
     498        <div class="akp_shortcode_q group" style='display: none;'>
     499            <span><?php _e('How many adverts would you like to be displayed at once?') ?></span>
     500            <input type='text' id='akp_shortcode_render' value='' />
     501        </div>
     502    </div>
     503    <div class="akp_shortcode_example">
     504        [adkingpro<span class="akp_shortcode_type"></span><span class="akp_shortcode_banner"></span><span class="akp_shortcode_rotate"></span><span class="akp_shortcode_speed"></span><span class="akp_shortcode_changespeed"></span><span class="akp_shortcode_effect"></span><span class="akp_shortcode_render"></span>]
     505    </div>
     506    <?php
     507}
     508
     509function minify_akpshortcode( $classes ) {
     510   
     511    array_push( $classes, 'closed' );
     512
     513    return $classes;
     514}
     515
    414516// Selection of media type
    415517function akp_media_type($object, $box) {
    416518    global $wpdb, $post;
    417     $media_type = (get_post_meta( $post->ID, 'akp_media_type', true )) ? get_post_meta( $post->ID, 'akp_media_type', true ) : 'image';
     519    $media_type = (get_post_meta( $post->ID, 'akp_media_type', true )) ? get_post_meta( $post->ID, 'akp_media_type', true ) : get_option('akp_default_media_type', 'image');
    418520    $html5 = ($media_type == 'html5') ? ' selected' : '';
    419521    $flash = ($media_type == 'flash') ? ' selected' : '';
     
    549651function akp_revenue_values($object, $box) {
    550652    global $post;
    551     $revenue_impression = get_post_meta( $post->ID, 'akp_revenue_per_impression', true );
    552     $revenue_click = get_post_meta( $post->ID, 'akp_revenue_per_click', true );
     653    $revenue_impression = (get_post_meta( $post->ID, 'akp_revenue_per_impression', true )) ? get_post_meta( $post->ID, 'akp_revenue_per_impression', true ) : get_option('akp_default_rev_imp', '0.00');
     654    $revenue_click = (get_post_meta( $post->ID, 'akp_revenue_per_click', true )) ? get_post_meta( $post->ID, 'akp_revenue_per_click', true ) : get_option('akp_default_rev_click', '0.00');
    553655   
    554656    echo '<div class="misc-pub-section"><label for="akp_revenue_per_impression">'.__("Revenue Per Impression", "akptext").':</label>';
     
    563665function akp_link_options($object, $box) {
    564666    global $post;
    565     $remove_url = get_post_meta( $post->ID, 'akp_remove_url', true );
    566     $target = (get_post_meta( $post->ID, 'akp_target', true )) ? get_post_meta( $post->ID, 'akp_target', true ) : '';
     667    $remove_url = (get_post_meta( $post->ID, 'akp_remove_url', true )) ? get_post_meta( $post->ID, 'akp_remove_url', true ) : get_option('akp_default_remove_link', '0');
     668    $target = (get_post_meta( $post->ID, 'akp_target', true )) ? get_post_meta( $post->ID, 'akp_target', true ) : get_option('akp_default_window_target', 'blank');
    567669    $self = ($target == 'self') ? ' selected' : '';
    568670    $parent = ($target == 'parent') ? ' selected' : '';
    569671    $top = ($target == 'top') ? ' selected' : '';
    570672    $none = ($target == 'none') ? ' selected' : '';
    571     $nofollow = (get_post_meta( $post->ID, 'akp_nofollow', true )) ? get_post_meta( $post->ID, 'akp_nofollow', true ) : '';
     673    $nofollow = (get_post_meta( $post->ID, 'akp_nofollow', true )) ? get_post_meta( $post->ID, 'akp_nofollow', true ) : get_option('akp_default_nofollow', '0');
    572674   
    573675    // Use nonce for verification
     
    575677   
    576678    echo '<div class="misc-pub-section"><label for="akp_remove_url">'.__("Remove URL from link", 'akptext').':</label>';
    577     echo '<input type="checkbox" value="1" name="akp_remove_url" id="akp_remove_url"', $remove_url ? ' checked="checked"' : '', ' style="width: 70px;float: right;margin-top: -3px;" />';
     679    echo '<input type="checkbox" value="1" name="akp_remove_url" id="akp_remove_url"', $remove_url ? ' checked="checked"' : '', ' style="width: auto;float: right;margin-top: -3px;" />';
    578680    echo '</div>';
    579681   
     
    586688    echo "</select></div>";
    587689   
    588     echo '<div class="misc-pub-section"><label for="akp_nofollow">'.__('Add "nofollow" to link?', 'akptext').'</label><input type="hidden" name="akp_nofollow" value="0" /><input type="checkbox" value="1" name="akp_nofollow" id="akp_nofollow"', $nofollow ? ' checked="checked"' : '', ' style="width: 70px;float: right;margin-top: -3px;" /></div>';
     690    echo '<div class="misc-pub-section"><label for="akp_nofollow">'.__('Add "nofollow" to link?', 'akptext').'</label><input type="hidden" name="akp_nofollow" value="0" /><input type="checkbox" value="1" name="akp_nofollow" id="akp_nofollow"', $nofollow ? ' checked="checked"' : '', ' style="width: auto;float: right;margin-top: -3px;" /></div>';
    589691}
    590692
     
    692794        'cb' => '<input type="checkbox" />',
    693795        'banner_id' => __( 'Banner ID', 'akptext' ),
     796        'shortcode' => __( 'Shortcode', 'akptext'),
    694797        'impressions' => __( 'Impressions', 'akptext' ),
    695798        'clicks' => __( 'Clicks', 'akptext' ),
    696799        'title' => __( 'URL', 'akptext' ),
     800        'media_type' => __('Media','akptext'),
    697801        'advert_type' => __( 'Advert Type', 'akptext'),
    698802        'advert_image' => __( 'Advert Image', 'akptext'),
     
    732836        case 'banner_id' :
    733837            echo $ID;
     838            break;
     839       
     840        case 'shortcode' :
     841            echo "[adkingpro banner=\"$ID\"]";
     842            break;
     843       
     844        case 'media_type' :
     845            global $wpdb;
     846            $mediatype = get_post_meta($ID, 'akp_media_type');
     847            echo strtoupper($mediatype[0]);
    734848            break;
    735849       
  • adkingpro/trunk/includes/screens/settings.php

    r814768 r907413  
    3939            <table class="form-table">
    4040                <tr valign="top">
     41                    <th scope="row" colspan="3"><h2><?= __("Permissions", 'akptext' ); ?></h2></th>
     42                </tr>
     43               
     44                <tr valign="top">
    4145                <th scope="row"><?= __("Minimum Authorised Role", 'akptext' ); ?></th>
    4246                <td>
     
    5155                </td>
    5256                <td></td>
     57                </tr>
     58               
     59                <tr valign="top">
     60                    <th scope="row" colspan="3"><hr /></th>
     61                </tr>
     62               
     63                <tr valign="top">
     64                    <th scope="row" colspan="3"><h2><?= __("Tracking Settings", 'akptext' ); ?></h2></th>
    5365                </tr>
    5466
     
    89101                </td>
    90102                <td></td>
     103                </tr>
     104               
     105                <tr valign="top">
     106                    <th scope="row" colspan="3"><hr /></th>
     107                </tr>
     108               
     109                <tr valign="top">
     110                    <th scope="row" colspan="3"><h2><?= __("Reporting Settings", 'akptext' ); ?></h2></th>
    91111                </tr>
    92112
     
    139159               
    140160                <tr valign="top">
     161                    <th scope="row" colspan="3"><hr /></th>
     162                </tr>
     163               
     164                <tr valign="top">
     165                    <th scope="row" colspan="3"><h2><?= __("Defaults", 'akptext' ); ?></h2></th>
     166                </tr>
     167               
     168                <tr valign="top">
     169                <th scope="row"><?= __("Media Type", 'akptext' ); ?></th>
     170                <td colspan="2">
     171                    <?php
     172                    $media_type = get_option('akp_default_media_type', 'image');
     173                    ?>
     174                    <select name='akp_default_media_type'>
     175                        <option value='image'><?php _e('Image', 'akptext') ?></option>
     176                        <option value='html5'<?php echo ($media_type == 'html5') ? ' selected' : '' ?>><?php _e('HTML5', 'akptext') ?></option>
     177                        <option value='flash'<?php echo ($media_type == 'flash') ? ' selected' : '' ?>><?php _e('Flash', 'akptext') ?></option>
     178                        <option value='adsense'<?php echo ($media_type == 'adsense') ? ' selected' : '' ?>><?php _e('AdSense', 'akptext') ?></option>
     179                        <option value='text'<?php echo ($media_type == 'text') ? ' selected' : '' ?>><?php _e('Text', 'akptext') ?></option>
     180                    </select>
     181                </td>
     182                </tr>
     183               
     184                <tr valign="top">
     185                <th scope="row"><?= __("Window Target", 'akptext' ); ?></th>
     186                <td colspan="2">
     187                    <?php
     188                    $target = get_option('akp_default_window_target', 'blank');
     189                    ?>
     190                    <select name='akp_default_window_target'>
     191                        <option value='blank'>_blank</option>
     192                        <option value='self'<?php echo ($target == 'self') ? ' selected' : '' ?>>_self</option>
     193                        <option value='parent'<?php echo ($target == 'parent') ? ' selected' : '' ?>>_parent</option>
     194                        <option value='top'<?php echo ($target == 'top') ? ' selected' : '' ?>>_top</option>
     195                        <option value='none'<?php echo ($target == 'none') ? ' selected' : '' ?>><?php _e('none', 'akptext') ?></option>
     196                    </select>
     197                </td>
     198                </tr>
     199               
     200                <tr valign="top">
     201                <th scope="row"><?= __("No Follow", 'akptext' ); ?></th>
     202                <td colspan="2">
     203                    <?php $nofollow = get_option('akp_default_nofollow', '0'); ?>
     204                    <input type="hidden" name="akp_default_nofollow" value="0" />
     205                    <input type="checkbox" value="1" name="akp_default_nofollow"<?php echo $nofollow ? ' checked="checked"' : '' ?> />
     206                </td>
     207                </tr>
     208               
     209                <tr valign="top">
     210                <th scope="row"><?= __("Remove Link", 'akptext' ); ?></th>
     211                <td colspan="2">
     212                    <?php $removelink = get_option('akp_default_remove_link', '0'); ?>
     213                    <input type="hidden" name="akp_default_remove_link" value="0" />
     214                    <input type="checkbox" value="1" name="akp_default_remove_link"<?php echo $removelink ? ' checked="checked"' : '' ?> />
     215                </td>
     216                </tr>
     217               
     218                <tr valign="top">
     219                <th scope="row"><?= __("Revenue per Impression", 'akptext' ); ?></th>
     220                <td colspan="2">
     221                    <?php $rev_imp = get_option('akp_default_rev_imp', '0.00'); ?>
     222                    <input type="text" value="<?php echo $rev_imp; ?>" name="akp_default_rev_imp" />
     223                </td>
     224                </tr>
     225               
     226                <tr valign="top">
     227                <th scope="row"><?= __("Revenue per Click", 'akptext' ); ?></th>
     228                <td colspan="2">
     229                    <?php $rev_click = get_option('akp_default_rev_click', '0.00'); ?>
     230                    <input type="text" value="<?php echo $rev_click; ?>" name="akp_default_rev_click" />
     231                </td>
     232                </tr>
     233               
     234                <tr valign="top">
     235                    <th scope="row" colspan="3"><hr /></th>
     236                </tr>
     237               
     238                <tr valign="top">
     239                    <th scope="row" colspan="3"><h2><?= __("Customisation", 'akptext' ); ?></h2></th>
     240                </tr>
     241               
     242                <tr valign="top">
    141243                <th scope="row"><?= __("Custom CSS", 'akptext' ); ?></th>
    142                 <td>
     244                <td colspan="2">
    143245                    <?php $css = get_option('akp_custom_css'); ?>
    144                     <textarea name="akp_custom_css"><?= $css ?></textarea>
    145                 </td>
    146                 <td></td>
     246                    <textarea name="akp_custom_css" style="width: 100%; height: 200px;"><?= $css ?></textarea>
     247                </td>
    147248                </tr>
    148249            </table>
  • adkingpro/trunk/js/adkingpro-admin-functions.js

    r814768 r907413  
    4343            $('#akptextbox').fadeIn();
    4444        }
     45    });
     46   
     47    // Shortcode Builder
     48    // Select type
     49    $("#akp_shortcode_display").change(function() {
     50        $(".akp_shortcode_q").not($(this).parent()).fadeOut();
     51        $(".akp_shortcode_example span").text('');
     52        $("#akp_shortcode_rotate").removeAttr('checked');
     53        $("#akp_shortcode_banners").children('option').removeAttr('selected');
     54        $("#akp_shortcode_effect").children('option').removeAttr('selected');
     55        var option = $(this).val();
     56        if (option == 'single') {
     57            // Single banner
     58            var current_id = $(this).data('post_id');
     59            $(".akp_shortcode_example .akp_shortcode_banner").text(' banner="'+current_id+'"');
     60        } else if (option == 'selected') {
     61            // Multiple selected banners
     62            $(".akp_shortcode_q.selected").fadeIn();
     63        } else if (option == 'group') {
     64            // Advert type
     65            $(".akp_shortcode_q.group").fadeIn();
     66        }
     67    });
     68   
     69    // Select banners
     70    $("#akp_shortcode_banners").change(function() {
     71        // Get selected ids
     72        var options = [];
     73        var output = '';
     74        $(this).children('option:selected').each(function() {
     75            options[options.length] = $(this).val();
     76            output += $(this).val()+",";
     77        });
     78       
     79        output = output.substr(0, output.length-1);
     80       
     81        $(".akp_shortcode_example .akp_shortcode_banner").text(' banner="'+output+'"');
     82       
     83        // Check if rotate is selected and process render as required
     84        if (!$("#akp_shortcode_rotate").is(':checked'))
     85            $(".akp_shortcode_example .akp_shortcode_render").text(' render="'+options.length+'"');
     86        else
     87            $(".akp_shortcode_example .akp_shortcode_render").text('');
     88    });
     89   
     90    // Select Advert Type
     91    $("#akp_shortcode_adverttype").change(function() {
     92        var adverttype = $(this).val();
     93        $(".akp_shortcode_example .akp_shortcode_type").text(' type="'+adverttype+'"');
     94    });
     95   
     96    // Enter render amount
     97    $("#akp_shortcode_render").keyup(function() {
     98        var render = $(this).val();
     99        // validate entry
     100       
     101        if (render !== '') {
     102            $("#akp_shortcode_rotate").parent().fadeOut();
     103            $(".akp_shortcode_example .akp_shortcode_render").text(' render="'+render+'"');
     104        } else {
     105            $("#akp_shortcode_rotate").parent().fadeIn();
     106            $(".akp_shortcode_example .akp_shortcode_render").text('');
     107        }
     108    });
     109   
     110    // Select auto rotate
     111    $("#akp_shortcode_rotate").click(function() {
     112        if ($(this).is(":checked")) {
     113            // Display rotate options
     114            $(".akp_shortcode_q.rotate").fadeIn();
     115            $("#akp_shortcode_render").parent().fadeOut();
     116            $(".akp_shortcode_example .akp_shortcode_render").text('');
     117            $(".akp_shortcode_example .akp_shortcode_rotate").text(' rotate="true"');
     118            $(".akp_shortcode_example .akp_shortcode_speed").text(' speed="'+$("#akp_shortcode_speed").val()+'"');
     119            $(".akp_shortcode_example .akp_shortcode_changespeed").text(' changespeed="'+$("#akp_shortcode_changespeed").val()+'"');
     120            $(".akp_shortcode_example .akp_shortcode_effect").text(' effect="'+$("#akp_shortcode_effect").val()+'"');
     121        } else {
     122            // hide rotate options
     123            if ($("#akp_shortcode_display").val() == 'selected') {
     124                var options = [];
     125                var output = '';
     126                $("#akp_shortcode_banners").children('option:selected').each(function() {
     127                    options[options.length] = $(this).val();
     128                    output += $(this).val()+",";
     129                });
     130
     131                output = output.substr(0, output.length-1);
     132                $(".akp_shortcode_example .akp_shortcode_render").text(' render="'+options.length+'"');
     133            } else {
     134                $("#akp_shortcode_render").parent().fadeIn();
     135            }
     136            $(".akp_shortcode_q.rotate").fadeOut();
     137            $(".akp_shortcode_example .akp_shortcode_rotate").text('');
     138            $(".akp_shortcode_example .akp_shortcode_speed").text('');
     139            $(".akp_shortcode_example .akp_shortcode_changespeed").text('');
     140            $(".akp_shortcode_example .akp_shortcode_effect").text('');
     141        }
     142    });
     143   
     144    // Enter speed amount
     145    $("#akp_shortcode_speed").keyup(function() {
     146        var speed = $(this).val();
     147        // validate entry
     148       
     149        if (speed !== '') {
     150            $(".akp_shortcode_example .akp_shortcode_speed").text(' speed="'+speed+'"');
     151        }
     152    });
     153   
     154    // Enter changespeed amount
     155    $("#akp_shortcode_changespeed").keyup(function() {
     156        var changespeed = $(this).val();
     157        // validate entry
     158       
     159        if (changespeed !== '') {
     160            $(".akp_shortcode_example .akp_shortcode_changespeed").text(' changespeed="'+changespeed+'"');
     161        }
     162    });
     163   
     164    // Select efect
     165    $("#akp_shortcode_effect").change(function() {
     166        var option = $(this).val();
     167       
     168        $(".akp_shortcode_example .akp_shortcode_effect").text(' effect="'+option+'"');
    45169    });
    46170   
  • adkingpro/trunk/readme.txt

    r876148 r907413  
    44Tags: advertising, ads, ad, adverts, advert, advertisements, advertisement, advertise, stats, stat, statistics, statistic, promotions, promotion, banners, banner, tracking, track, detailed, adkingpro, ad king pro, page, post, reporting, reports, report, csv, pdf, revenue, charge, money, theme, themes, flash, adsense, text, resize, rotate, slideshow, multiple
    55Requires at least: 3.0.1
    6 Tested up to: 3.8.1
    7 Stable tag: 1.9.11
     6Tested up to: 3.9
     7Stable tag: 1.9.12
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    137137== Changelog ==
    138138
     139= 1.9.12 =
     140* Addition of default settings for creating new adverts
     141* CSS update for latest version of WP
     142* Addition of shortcode builder in edit screen
     143* Addition of some extra columns to advert list
     144
    139145= 1.9.11 =
    140146* Serbian Translation included thanks to Borisa @ WebHostingHub.com
     
    246252== Upgrade Notice ==
    247253
     254= 1.9.12 =
     255* Addition of default settings for creating new adverts
     256* CSS update for latest version of WP
     257* Addition of shortcode builder in edit screen
     258* Addition of some extra columns to advert list
     259
    248260= 1.9.11 =
    249261* Serbian Translation included thanks to Borisa @ WebHostingHub.com
Note: See TracChangeset for help on using the changeset viewer.