Plugin Directory

Changeset 357224


Ignore:
Timestamp:
03/08/2011 02:43:49 PM (15 years ago)
Author:
herzcthu
Message:
 
Location:
ayar-web-kit/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ayar-web-kit/trunk/ayar-admin-theme.php

    r356873 r357224  
    11<?php
    22wp_admin_css_color('ayar', __('Green'), AWK_PLUGIN_URL.'/css/colors-green.css', array('#316c14', '#0ed869', '#a0feca', '#8bf2b9'));
     3function 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}
     12function 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}
     21function 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}
     30function 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}
     40add_action('admin_head','admin_logo');
    341?>
  • ayar-web-kit/trunk/mcecomment.php

    r354607 r357224  
    55
    66function 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');
    88    add_action( "admin_print_scripts-$page", 'mcecomment_admin_page_init' );
     9        wp_enqueue_style('thickbox');
    910}
    1011
     
    6970       'elements' => 'comment',
    7071       'theme' => 'advanced',
    71        'width' => '320px',
    7272       'theme_advanced_buttons1' => $mcecomment_options['buttons'],
    7373       'theme_advanced_buttons2' => $mcecomment_options['buttons_2'],
     
    8181       'theme_advanced_disable' => ($mcecomment_options['viewhtml'] ? '':'code'),
    8282       'theme_advanced_row_height' => "10",
    83        'theme_advanced_resizing_min_width' => "300",
    84        'theme_advanced_resizing_max_width' => "350",
    8583       'force_p_newlines' => false,
    8684       'force_br_newlines' => true,
     
    193191function mcecomment_admin_page_init() {
    194192   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');
    196197   wp_enqueue_script('tiny_mce', AWK_PLUGIN_URL . '/tiny_MCE/tiny_mce.js', false, '20081129');
    197198    //wp_enqueue_script('tiny_mce_lang', get_option('siteurl') . '/wp-includes/js/tinymce/langs/wp-langs-' . $mce_locale . '.js', false, '20081129');
     
    223224add_action('wp_footer', 'mcecomment_init');
    224225}
     226if ($mcecomment_options['aod'] == "1" ) {
     227include (AWK_PLUGIN_PATH.'/aod.php');
     228}
    225229add_action('template_redirect', 'mcecomment_loadCoreJS');
    226230
  • ayar-web-kit/trunk/mceoptions.php

    r354607 r357224  
    2323        $mcecomment_options['resize'] = (isset($_POST['mcecomment_resize']) ? '1' : '0');
    2424        $mcecomment_options['comment'] = (isset($_POST['mcecomment_comment']) ? '1' : '0');
     25        $mcecomment_options['aod'] = (isset($_POST['mcecomment_aod']) ? '1' : '0');
    2526      $mcecomment_options['skin'] = (isset($_POST['mcecomment_skin']) ? $_POST['mcecomment_skin'] : 'default');
    2627     
     
    5051        if (isset($_POST['mcecomment_css']))
    5152            $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']);
    5259   
    5360        update_option('mcecomment_options', $mcecomment_options);
     
    6370
    6471<div class="wrap">
    65 <h2>MCEComments Options</h2>
     72<h2>Ayar Web Kit Options</h2>
    6673
    6774<form method="post">
     
    8794<p><input name="mcecomment_comment" type="checkbox" id="mcecomment_comment" value="1" <?php echo ($mcecomment_options['comment'] ? 'checked="checked"':''); ?>/>
    8895<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>
    8998<p><input name="mcecomment_rtl" type="checkbox" id="mcecomment_rtl" value="1" <?php echo ($mcecomment_options['rtl'] ? 'checked="checked"':''); ?>/>
    9099<label for="mcecomment_rtl">Enable right-to-left (RTL) editing mode in comment field</label></p>
     
    113122<table width="100%" cellspacing="2" cellpadding="5" class="form-table">
    114123<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>
     129Fully 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">
    115143<th>Buttons in use:</th>
    116144<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.