Changeset 907413
- Timestamp:
- 05/03/2014 12:49:22 PM (12 years ago)
- Location:
- adkingpro
- Files:
-
- 96 added
- 1 deleted
- 6 edited
-
tags/1.9.12 (added)
-
tags/1.9.12/adkingpro.php (added)
-
tags/1.9.12/css (added)
-
tags/1.9.12/css/adkingpro-styles.css (added)
-
tags/1.9.12/css/dynamic.css.php (added)
-
tags/1.9.12/css/font-awesome.min.css (added)
-
tags/1.9.12/css/jquery-ui.css (added)
-
tags/1.9.12/fonts (added)
-
tags/1.9.12/fonts/FontAwesome.otf (added)
-
tags/1.9.12/fonts/fontawesome-webfont.eot (added)
-
tags/1.9.12/fonts/fontawesome-webfont.svg (added)
-
tags/1.9.12/fonts/fontawesome-webfont.ttf (added)
-
tags/1.9.12/fonts/fontawesome-webfont.woff (added)
-
tags/1.9.12/images (added)
-
tags/1.9.12/images/ajax-loader.gif (added)
-
tags/1.9.12/images/akp-icon_16x16.png (added)
-
tags/1.9.12/images/akp-icon_16x16_sat.png (added)
-
tags/1.9.12/images/akp-icon_32x32.png (added)
-
tags/1.9.12/images/akp-icon_32x32_sat.png (added)
-
tags/1.9.12/images/kpp-icon_16x16.png (added)
-
tags/1.9.12/images/kpp-icon_16x16_sat.png (added)
-
tags/1.9.12/images/kpp-icon_32x32.png (added)
-
tags/1.9.12/images/kpp-icon_32x32_sat.png (added)
-
tags/1.9.12/images/kpp_akp.jpg (added)
-
tags/1.9.12/images/kpp_dkp.jpg (added)
-
tags/1.9.12/images/kpp_invkp.jpg (added)
-
tags/1.9.12/images/kpp_relkp.jpg (added)
-
tags/1.9.12/images/kpp_rsskp.jpg (added)
-
tags/1.9.12/images/kpp_smtpkp.jpg (added)
-
tags/1.9.12/images/minus_icon.png (added)
-
tags/1.9.12/images/plus-icon.gif (added)
-
tags/1.9.12/images/plus_icon.png (added)
-
tags/1.9.12/includes (added)
-
tags/1.9.12/includes/admin_area.php (added)
-
tags/1.9.12/includes/install.php (added)
-
tags/1.9.12/includes/output.php (added)
-
tags/1.9.12/includes/screens (added)
-
tags/1.9.12/includes/screens/detailed.php (added)
-
tags/1.9.12/includes/screens/kpp.php (added)
-
tags/1.9.12/includes/screens/settings.php (added)
-
tags/1.9.12/includes/widget.php (added)
-
tags/1.9.12/js (added)
-
tags/1.9.12/js/adkingpro-admin-functions.js (added)
-
tags/1.9.12/js/adkingpro-functions.js (added)
-
tags/1.9.12/js/adkingpro-js.php (added)
-
tags/1.9.12/js/jquery.jshowoff.js (added)
-
tags/1.9.12/languages (added)
-
tags/1.9.12/languages/akptext-es_ES.mo (added)
-
tags/1.9.12/languages/akptext-es_ES.po (added)
-
tags/1.9.12/languages/akptext-sr_RS.mo (added)
-
tags/1.9.12/languages/akptext-sr_RS.po (added)
-
tags/1.9.12/languages/akptext.pot (added)
-
tags/1.9.12/outputs (added)
-
tags/1.9.12/packages (added)
-
tags/1.9.12/packages/fpdf (added)
-
tags/1.9.12/packages/fpdf/font (added)
-
tags/1.9.12/packages/fpdf/font/courier.php (added)
-
tags/1.9.12/packages/fpdf/font/helvetica.php (added)
-
tags/1.9.12/packages/fpdf/font/helveticab.php (added)
-
tags/1.9.12/packages/fpdf/font/helveticabi.php (added)
-
tags/1.9.12/packages/fpdf/font/helveticai.php (added)
-
tags/1.9.12/packages/fpdf/font/makefont (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1250.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1251.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1252.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1253.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1254.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1255.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1257.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp1258.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/cp874.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-1.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-11.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-15.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-16.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-2.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-4.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-5.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-7.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/iso-8859-9.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/koi8-r.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/koi8-u.map (added)
-
tags/1.9.12/packages/fpdf/font/makefont/makefont.php (added)
-
tags/1.9.12/packages/fpdf/font/symbol.php (added)
-
tags/1.9.12/packages/fpdf/font/times.php (added)
-
tags/1.9.12/packages/fpdf/font/timesb.php (added)
-
tags/1.9.12/packages/fpdf/font/timesbi.php (added)
-
tags/1.9.12/packages/fpdf/font/timesi.php (added)
-
tags/1.9.12/packages/fpdf/font/zapfdingbats.php (added)
-
tags/1.9.12/packages/fpdf/fpdf.php (added)
-
tags/1.9.12/readme.txt (added)
-
tags/1.9.12/themes (added)
-
tags/1.9.12/themes/default (added)
-
tags/1.9.12/themes/default/pdf.php (added)
-
tags/1.9.12/themes/no-image (added)
-
tags/1.9.12/themes/no-image/pdf.php (added)
-
trunk/adkingpro.php (modified) (2 diffs)
-
trunk/css/adkingpro-styles.css (modified) (1 diff)
-
trunk/includes/admin_area.php (modified) (12 diffs)
-
trunk/includes/screens/settings.php (modified) (4 diffs)
-
trunk/js/adkingpro-admin-functions.js (modified) (1 diff)
-
trunk/js/jquery-ui.js (deleted)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adkingpro/trunk/adkingpro.php
r876148 r907413 4 4 Plugin URI: http://kingpro.me/plugins/ad-king-pro/ 5 5 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.1 16 Version: 1.9.12 7 7 Author: Ash Durham 8 8 Author URI: http://durham.net.au/ … … 29 29 30 30 global $akp_db_version; 31 $akp_db_version = "1.9.1 1";31 $akp_db_version = "1.9.12"; 32 32 33 33 function akp_install() { -
adkingpro/trunk/css/adkingpro-styles.css
r798364 r907413 37 37 padding: 1px; 38 38 font-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; 39 53 } 40 54 -
adkingpro/trunk/includes/admin_area.php
r814768 r907413 33 33 register_setting( 'akp-options', 'akp_auth_role' ); 34 34 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' ); 35 41 } 36 42 add_action( 'admin_init', 'register_akp_options' ); … … 45 51 add_option( 'akp_auth_role', 'subscriber'); 46 52 add_option( 'akp_custom_css', '/* Add any CSS you would like to modify your banner ads here */' ); 53 add_option( 'akp_default_media_type', 'image' ); 54 add_option( 'akp_default_window_target', 'blank' ); 55 add_option( 'akp_default_nofollow', '0' ); 56 add_option( 'akp_default_remove_link', '0' ); 57 add_option( 'akp_default_rev_imp', '0.00' ); 58 add_option( 'akp_default_rev_click', '0.00' ); 47 59 48 60 function akp_allowed_cap() { … … 82 94 array( 83 95 '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' ), 91 112 ), 92 113 'capabilities' => array( … … 145 166 background: url(<?= plugins_url('/images/akp-icon_16x16_sat.png', dirname(__FILE__)) ?>) no-repeat center center !important; 146 167 } 168 #menu-posts-adverts_posts .wp-menu-image:before {display: none;} 147 169 #menu-posts-adverts_posts:hover .wp-menu-image, #menu-posts-adverts_posts.wp-has-current-submenu .wp-menu-image { 148 170 background: url(<?= plugins_url('/images/akp-icon_16x16.png', dirname(__FILE__)) ?>) no-repeat center center !important; … … 332 354 function akp_change_meta_boxes() 333 355 { 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' ); 334 358 add_meta_box('akpmediatype', __('Media Type', 'akptext'), 'akp_media_type', 'adverts_posts', 'normal', 'high'); 335 359 … … 412 436 } 413 437 438 // Display example shortcode 439 function 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 509 function minify_akpshortcode( $classes ) { 510 511 array_push( $classes, 'closed' ); 512 513 return $classes; 514 } 515 414 516 // Selection of media type 415 517 function akp_media_type($object, $box) { 416 518 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'); 418 520 $html5 = ($media_type == 'html5') ? ' selected' : ''; 419 521 $flash = ($media_type == 'flash') ? ' selected' : ''; … … 549 651 function akp_revenue_values($object, $box) { 550 652 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'); 553 655 554 656 echo '<div class="misc-pub-section"><label for="akp_revenue_per_impression">'.__("Revenue Per Impression", "akptext").':</label>'; … … 563 665 function akp_link_options($object, $box) { 564 666 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'); 567 669 $self = ($target == 'self') ? ' selected' : ''; 568 670 $parent = ($target == 'parent') ? ' selected' : ''; 569 671 $top = ($target == 'top') ? ' selected' : ''; 570 672 $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'); 572 674 573 675 // Use nonce for verification … … 575 677 576 678 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;" />'; 578 680 echo '</div>'; 579 681 … … 586 688 echo "</select></div>"; 587 689 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>'; 589 691 } 590 692 … … 692 794 'cb' => '<input type="checkbox" />', 693 795 'banner_id' => __( 'Banner ID', 'akptext' ), 796 'shortcode' => __( 'Shortcode', 'akptext'), 694 797 'impressions' => __( 'Impressions', 'akptext' ), 695 798 'clicks' => __( 'Clicks', 'akptext' ), 696 799 'title' => __( 'URL', 'akptext' ), 800 'media_type' => __('Media','akptext'), 697 801 'advert_type' => __( 'Advert Type', 'akptext'), 698 802 'advert_image' => __( 'Advert Image', 'akptext'), … … 732 836 case 'banner_id' : 733 837 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]); 734 848 break; 735 849 -
adkingpro/trunk/includes/screens/settings.php
r814768 r907413 39 39 <table class="form-table"> 40 40 <tr valign="top"> 41 <th scope="row" colspan="3"><h2><?= __("Permissions", 'akptext' ); ?></h2></th> 42 </tr> 43 44 <tr valign="top"> 41 45 <th scope="row"><?= __("Minimum Authorised Role", 'akptext' ); ?></th> 42 46 <td> … … 51 55 </td> 52 56 <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> 53 65 </tr> 54 66 … … 89 101 </td> 90 102 <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> 91 111 </tr> 92 112 … … 139 159 140 160 <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"> 141 243 <th scope="row"><?= __("Custom CSS", 'akptext' ); ?></th> 142 <td >244 <td colspan="2"> 143 245 <?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> 147 248 </tr> 148 249 </table> -
adkingpro/trunk/js/adkingpro-admin-functions.js
r814768 r907413 43 43 $('#akptextbox').fadeIn(); 44 44 } 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+'"'); 45 169 }); 46 170 -
adkingpro/trunk/readme.txt
r876148 r907413 4 4 Tags: 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 5 5 Requires at least: 3.0.1 6 Tested up to: 3. 8.17 Stable tag: 1.9.1 16 Tested up to: 3.9 7 Stable tag: 1.9.12 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 137 137 == Changelog == 138 138 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 139 145 = 1.9.11 = 140 146 * Serbian Translation included thanks to Borisa @ WebHostingHub.com … … 246 252 == Upgrade Notice == 247 253 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 248 260 = 1.9.11 = 249 261 * Serbian Translation included thanks to Borisa @ WebHostingHub.com
Note: See TracChangeset
for help on using the changeset viewer.