Changeset 357224
- Timestamp:
- 03/08/2011 02:43:49 PM (15 years ago)
- Location:
- ayar-web-kit/trunk
- Files:
-
- 4 edited
-
ayar-admin-theme.php (modified) (1 diff)
-
mcecomment.php (modified) (5 diffs)
-
mceoptions.php (modified) (5 diffs)
-
screenshot-1.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
ayar-web-kit/trunk/ayar-admin-theme.php
r356873 r357224 1 1 <?php 2 2 wp_admin_css_color('ayar', __('Green'), AWK_PLUGIN_URL.'/css/colors-green.css', array('#316c14', '#0ed869', '#a0feca', '#8bf2b9')); 3 function mcecomment_getlogo() { 4 $mcecomment_options = get_option('mcecomment_options'); 5 6 if ($mcecomment_options['hlogo'] != '') { 7 return $mcecomment_options['hlogo']; 8 } else { 9 return AWK_PLUGIN_URL . '/images/myLOGO.png'; 10 } 11 } 12 function mcecomment_getlogo_w() { 13 $mcecomment_options = get_option('mcecomment_options'); 14 15 if ($mcecomment_options['hlogo_w'] != '') { 16 return $mcecomment_options['hlogo_w']; 17 } else { 18 return '100'; 19 } 20 } 21 function mcecomment_getlogo_h() { 22 $mcecomment_options = get_option('mcecomment_options'); 23 24 if ($mcecomment_options['hlogo_h'] != '') { 25 return $mcecomment_options['hlogo_h']; 26 } else { 27 return '100'; 28 } 29 } 30 function admin_logo(){ 31 $admin_logo= mcecomment_getlogo(); 32 $logo_width= mcecomment_getlogo_w(); 33 $logo_height= mcecomment_getlogo_h(); 34 ?> 35 <style type="text/css"> 36 #header-logo{float:left;left:0px; padding-left:20px; width:<?php echo $logo_width; ?>px; height:<?php echo $logo_height; ?>px; background:transparent url(<?php echo $admin_logo;?>?ver=20100531) no-repeat scroll center center !important;} 37 </style> 38 <?php 39 } 40 add_action('admin_head','admin_logo'); 3 41 ?> -
ayar-web-kit/trunk/mcecomment.php
r354607 r357224 5 5 6 6 function mcecomment_adminpages() { 7 $page = add_options_page(' MCEComments Options', 'MCEComments', 8, 'MCEComments', 'mcecomment_optionpage');7 $page = add_options_page('Ayar Web Kit Options', 'AyarWebKit', 8, 'AyarWebKit', 'mcecomment_optionpage'); 8 8 add_action( "admin_print_scripts-$page", 'mcecomment_admin_page_init' ); 9 wp_enqueue_style('thickbox'); 9 10 } 10 11 … … 69 70 'elements' => 'comment', 70 71 'theme' => 'advanced', 71 'width' => '320px',72 72 'theme_advanced_buttons1' => $mcecomment_options['buttons'], 73 73 'theme_advanced_buttons2' => $mcecomment_options['buttons_2'], … … 81 81 'theme_advanced_disable' => ($mcecomment_options['viewhtml'] ? '':'code'), 82 82 'theme_advanced_row_height' => "10", 83 'theme_advanced_resizing_min_width' => "300",84 'theme_advanced_resizing_max_width' => "350",85 83 'force_p_newlines' => false, 86 84 'force_br_newlines' => true, … … 193 191 function mcecomment_admin_page_init() { 194 192 global $mce_locale; 195 193 wp_enqueue_script('media-upload'); 194 wp_enqueue_script('thickbox'); 195 wp_register_script('my-upload', AWK_PLUGIN_URL . '/js/custom_uploader.js', array('jquery','media-upload','thickbox')); 196 wp_enqueue_script('my-upload'); 196 197 wp_enqueue_script('tiny_mce', AWK_PLUGIN_URL . '/tiny_MCE/tiny_mce.js', false, '20081129'); 197 198 //wp_enqueue_script('tiny_mce_lang', get_option('siteurl') . '/wp-includes/js/tinymce/langs/wp-langs-' . $mce_locale . '.js', false, '20081129'); … … 223 224 add_action('wp_footer', 'mcecomment_init'); 224 225 } 226 if ($mcecomment_options['aod'] == "1" ) { 227 include (AWK_PLUGIN_PATH.'/aod.php'); 228 } 225 229 add_action('template_redirect', 'mcecomment_loadCoreJS'); 226 230 -
ayar-web-kit/trunk/mceoptions.php
r354607 r357224 23 23 $mcecomment_options['resize'] = (isset($_POST['mcecomment_resize']) ? '1' : '0'); 24 24 $mcecomment_options['comment'] = (isset($_POST['mcecomment_comment']) ? '1' : '0'); 25 $mcecomment_options['aod'] = (isset($_POST['mcecomment_aod']) ? '1' : '0'); 25 26 $mcecomment_options['skin'] = (isset($_POST['mcecomment_skin']) ? $_POST['mcecomment_skin'] : 'default'); 26 27 … … 50 51 if (isset($_POST['mcecomment_css'])) 51 52 $mcecomment_options['css'] = trim($_POST['mcecomment_css']); 53 if (isset($_POST['mcecomment_hlogo'])) 54 $mcecomment_options['hlogo'] = trim($_POST['mcecomment_hlogo']); 55 if (isset($_POST['mcecomment_hlogo_w'])) 56 $mcecomment_options['hlogo_w'] = trim($_POST['mcecomment_hlogo_w']); 57 if (isset($_POST['mcecomment_hlogo_h'])) 58 $mcecomment_options['hlogo_h'] = trim($_POST['mcecomment_hlogo_h']); 52 59 53 60 update_option('mcecomment_options', $mcecomment_options); … … 63 70 64 71 <div class="wrap"> 65 <h2> MCECommentsOptions</h2>72 <h2>Ayar Web Kit Options</h2> 66 73 67 74 <form method="post"> … … 87 94 <p><input name="mcecomment_comment" type="checkbox" id="mcecomment_comment" value="1" <?php echo ($mcecomment_options['comment'] ? 'checked="checked"':''); ?>/> 88 95 <label for="mcecomment_comment">Enable tinyMCE Editor in comment form (Should disable for some Theme's compatibality)</label></p> 96 <p><input name="mcecomment_aod" type="checkbox" id="mcecomment_aod" value="1" <?php echo ($mcecomment_options['aod'] ? 'checked="checked"':''); ?>/> 97 <label for="mcecomment_aod">Enable Ayar Online Editor</label></p> 89 98 <p><input name="mcecomment_rtl" type="checkbox" id="mcecomment_rtl" value="1" <?php echo ($mcecomment_options['rtl'] ? 'checked="checked"':''); ?>/> 90 99 <label for="mcecomment_rtl">Enable right-to-left (RTL) editing mode in comment field</label></p> … … 113 122 <table width="100%" cellspacing="2" cellpadding="5" class="form-table"> 114 123 <tr class="form-field"> 124 <th>Admin Header Logo Url:</th> 125 <td><input id="mcecomment_hlogo" class="uploadfield" type="text" size="90" name="mcecomment_hlogo" value="<?php echo $mcecomment_options['hlogo']; ?>" /> 126 <div class="upload_buttons"> 127 <input class="upload_image_button" type="button" value="Upload Image" style="width:100px;" /> 128 </div> 129 Fully qualified URL required (leave blank to use default). Upload your logo image from your computer. Copy and paste your image link. 130 </td> 131 </tr> 132 <tr class="form-field"> 133 <th>Admin Header Logo Width:</th> 134 <td><input name="mcecomment_hlogo_w" type="text" id="mcecomment_hlogo_w" value="<?php echo $mcecomment_options['hlogo_w']; ?>" style="width:50px" /> px ( Your Header Logo Width. Only value. No need to add px.) 135 </td> 136 </tr> 137 <tr class="form-field"> 138 <th>Admin Header Logo Height:</th> 139 <td><input name="mcecomment_hlogo_h" type="text" id="mcecomment_hlogo_h" value="<?php echo $mcecomment_options['hlogo_h']; ?>" style="width:50px" /> px ( Your Header Logo Height. Only value. No need to add px. ) 140 </td> 141 </tr> 142 <tr class="form-field"> 115 143 <th>Buttons in use:</th> 116 144 <td><input name="mcecomment_buttons" type="text" id="mcecomment_buttons" value="<?php echo $mcecomment_options['buttons']; ?>" style="width:98%" /><br />
Note: See TracChangeset
for help on using the changeset viewer.