Plugin Directory

Changeset 3253320


Ignore:
Timestamp:
03/10/2025 12:41:59 PM (12 months ago)
Author:
sofkpvtltd
Message:

update plugin

Location:
sofk-air-conditioning-calaculate/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sofk-air-conditioning-calaculate/trunk/readme.txt

    r3194700 r3253320  
    44Requires at least: 4.6
    55Tested up to: 6.7.1
    6 Stable tag: 1.0
     6Stable tag: 1.1
    77License: GPL2
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    9 
    109Simple air conditioning calculator plugin for WordPress websites.
    11 
    1210== Description ==
    13 
    1411This plugin adds a simple air conditioning calculator to your WordPress website. You can easily insert the calculator into your posts or pages using the shortcode `[air_condition_cal]`.
    15 
    1612== Installation ==
    17 
    18131. Upload the `sofk-air-conditioning-calculate` folder to the `/wp-content/plugins/` directory
    19142. Activate the plugin through the 'Plugins' menu in WordPress
    20153. Use the shortcode `[air_condition_cal]` in your posts or pages to display the calculator.
    21 
    2216== Screenshots ==
    23 
    24171. ![Screenshot 1](screenshot-1.png)
    2518   Frontend Screenshot.
    26 
    27192. ![Screenshot 2](screenshot-2.png)
    2820   Backend screenshot.
    29 
    3021== Frequently Asked Questions ==
    31 
    3222= How do I use the calculator? =
    33 
    3423Simply insert the shortcode `[air_condition_cal]` into your posts or pages where you want the calculator to appear.
    35 
    3624== Changelog ==
    37 
    3825= 1.0 =
    3926* Initial release
    40 
    4127== Upgrade Notice ==
    42 
    4328= 1.0 =
    4429Initial release
    45 
    4630== Privacy Policy ==
    4731This plugin does not collect any personal data.
    48 
    4932== Credits ==
    50 
    5133This plugin is developed by Sofk Pvt Ltd.
    52 
    5334== Support ==
    54 
    5535For support, please visit [plugin support forum](https://wordpress.org/support/plugin/air-conditioning-calculator/).
    56 
    5736== Plugin URI ==
    58 
    5937[Plugin Homepage](https://sofkpvtltd.com/shopfromreel/air-conditioning-calculator/)
    60 
    6138== Author ==
    62 
    6339[Sofk Pvt Ltd](https://sofkpvtltd.com/)
    64 
    6540== License ==
    66 
    6741Licensed under the GNU General Public License v2.0, see [License URI](https://www.gnu.org/licenses/gpl-2.0.html)
    68 
  • sofk-air-conditioning-calaculate/trunk/sofk-air-conditioning-calculate.php

    r3194705 r3253320  
    11<?php
    22/**
    3  *  @package Sofk Air Conditioning calculate
     3 * @package Sofk Air Conditioning calculate
    44 */
    55/*
     
    1414Text Domain:  sofk-air-conditioning-calculate
    1515Domain Path:  /languages
    16 
    1716*/
    1817if ( ! defined( 'ABSPATH' ) ) exit;
    1918global  $plugin_url ,$plugin_dir;
    20 
    2119$plugin_url = plugins_url()."/sofk-air-conditioning-calculate";
    2220$plugin_dir = plugin_dir_path( __FILE__ );
    2321if (!function_exists('SFACC_hook_css')) {
    2422function SFACC_hook_css() {
    25     global $wpdb,$woocommerce,$plugin_url; 
    26 
    27                   wp_enqueue_script('air_cond-prototype');     
    28                   wp_enqueue_script('air_cond_bootstrap',$plugin_url."/js/bootstrap.min.js");                     
    29                   wp_enqueue_style( 'bootsrap-air_cond',$plugin_url."/css/bootstrap.min.css");
     23    global $wpdb,$woocommerce,$plugin_url;     
     24                          wp_enqueue_script('air_cond-prototype');             
     25                          wp_enqueue_script('air_cond_bootstrap',$plugin_url."/js/bootstrap.min.js");                             
     26                                  wp_enqueue_style( 'bootsrap-air_cond',$plugin_url."/css/bootstrap.min.css");
    3027                  wp_enqueue_style( 'style-air_cond',$plugin_url."/css/air-con-cala-style.css");
    31 
    32 }
    33 
     28}
    3429add_action('wp_head', 'SFACC_hook_css');
    3530}
    36 
    3731if (!function_exists('SFACC_cal_function')) {
    3832  function SFACC_cal_function() {
     
    6862      color: <?php echo esc_html($btn_hover_color)?>;}
    6963  </style>
    70 
    7164  <div class="air_condition_cal">
    7265      <div class="container">
     
    7972                              <output class="bubble"></output>
    8073                              <input type="range" class="form-range range" id="length"  min="<?php echo esc_html($room_length_min);?>" max="<?php echo esc_html($room_length_max);?>" step="0.5" value="0" name="length">
    81                               
     74                             
    8275                          </div>
    8376                          <div class="col range-wrap">
     
    8679                              <input type="range" class="form-range range" id="width"  min="<?php echo esc_html($room_width_min);?>" max="<?php echo esc_html($room_width_max);?>" step="0.5" value="0" name="width">
    8780                          </div>
    88                       </div> 
     81                      </div>
    8982                  </div>
    9083                  <div class="form-group">
     
    107100                  <div class="form-group">
    108101                      <label for="exampleFormControlInput1">Sunlight Exposure</label>
    109                       <div class="check_group row">                        
     102                      <div class="check_group row">                       
    110103                          <div class="form-check form-check-inline col">
    111104                            <input class="form-check-input" type="radio" name="sunlight" id="sunlight1" value="<?php echo esc_html($sunlight_exposure_shaded);?>">
     
    128121                            <input class="form-check-input" type="radio" name="insulated" id="insulated2" value="<?php echo esc_html($insulated_no);?>">
    129122                            <label class="form-check-label" for="insulated2">No</label>
    130                           </div>    
    131                       </div>                
     123                          </div>   
     124                      </div>               
    132125                  </div>
    133126                  <span class="error_message text-danger"></span>
    134127                  <div class="form-group">
    135                       <button type="button" class="air_calculate"><?php echo esc_html($btn_text);?></button> 
    136                       <div class="air_cal_result">Result: <span class="result_value">NaN kW</span></div> 
     128                      <button type="button" class="air_calculate"><?php echo esc_html($btn_text);?></button>
     129                      <div class="air_cal_result">Result: <span class="result_value">NaN kW</span></div>
    137130                      <div class="form-group floor-input">Floor: <span class="floor"></span></div>
    138131                  </div>
     
    140133              <div class="ac_listing">
    141134                  <div class="row">
    142                       
     135                     
    143136                  </div>
    144137              </div>
     
    147140  </div>
    148141  <script>
    149 
    150142      jQuery(".air_calculate").click(function(){
    151143        flag = 1;
     
    156148          return;
    157149        }
    158         
     150       
    159151        width = jQuery('input[name="width"]').val();
    160152        if(width == ''){
     
    163155          return;
    164156        }
    165         
     157       
    166158        room_height = jQuery('input[name="room_height"]:checked').val();
    167       
     159     
    168160        // if(room_height == '' || room_height == undefined){
    169161        if(isNaN(room_height)){
     
    172164          return;
    173165        }
    174        
    175 
     166       
    176167        sunlight = jQuery('input[name="sunlight"]:checked').val();
    177168        // if(sunlight == '' || sunlight == undefined){
     
    181172          return;
    182173        }
    183        
    184 
     174       
    185175        insulated = jQuery('input[name="insulated"]:checked').val();
    186176        // if(insulated == '' || insulated == undefined){
     
    208198            }
    209199        }
    210         
     200       
    211201        // result = length * width * room_height * sunlight * insulated;
    212         
     202       
    213203        if(result != ''){
    214204          jQuery('.result_value').html(result.toFixed(2)+' kW');
     
    218208          jQuery('.floor').html(width_length.toFixed(2)+' m2');
    219209        }
    220     
    221   }); 
     210   
     211  });
    222212  </script>
    223213  <script>
     
    226216    const range = wrap.querySelector(".range");
    227217    const bubble = wrap.querySelector(".bubble");
    228 
    229218    range.addEventListener("input", () => {
    230219      setBubble(range, bubble);
     
    232221    setBubble(range, bubble);
    233222  });
    234 
    235223  function setBubble(range, bubble) {
    236224    const val = range.value;
     
    239227    const newVal = Number(((val - min) * 100) / (max - min));
    240228    bubble.innerHTML = val+'m';
    241 
    242229    // Sorta magic numbers based on size of the native UI thumb
    243230    bubble.style.left = `calc(${newVal}% + (${18 - newVal * 0.3}px))`;
    244231  }
    245 
    246232  </script>
    247233  <?php
     
    249235    return  $output;
    250236    ob_end_clean();
    251       
     237     
    252238  }
    253239  add_shortcode( 'air_condition_cal', 'SFACC_cal_function' );
    254240}
    255 
    256 
    257241/* air condition calculation admin setting*/
    258242add_action('admin_menu', 'SFACC_cal_create_menu');
    259 
    260243if (!function_exists('SFACC_cal_create_menu')) {
    261244function SFACC_cal_create_menu() {
    262 
    263245    //create new top-level menu
    264246    add_menu_page('Air Condition Cal Settings', 'Air Condition Cal', 'administrator', 'air_condition_cal', 'SFACC_cal_settings_page' );
    265 
    266247    //call register settings function
    267248    add_action( 'admin_init', 'SFACC_cool_plugin_settings' );
    268249}
    269250}
    270 
    271251if (!function_exists('SFACC_cool_plugin_settings')) {
    272252function SFACC_cool_plugin_settings() {
     
    293273    register_setting( 'SFACC-cool-plugin-settings-group', 'daikin_ac_url' );
    294274    register_setting( 'SFACC-cool-plugin-settings-group', 'contact_url' );
    295 
    296 }
    297 }
    298 
     275}
     276}
    299277if (!function_exists('SFACC_cal_settings_page')) {
    300278  function SFACC_cal_settings_page() {
     
    306284      float: left;}
    307285  .air_condition_cal_settings input[type='color']{max-width: 40px;}
    308 
    309286  </style>
    310287  <div class="wrap myheader">
     
    322299          <td></td>
    323300          </tr>
    324           
     301         
    325302          <tr valign="top">
    326303          <th scope="row">Room Width</th>
     
    330307          <td></td>
    331308          </tr>
    332           
     309         
    333310          <tr valign="top">
    334311          <th scope="row">Room Height</th>
     
    338315          <td></td>
    339316          </tr>
    340           
     317         
    341318          <tr valign="top">
    342319          <th scope="row">Sunlight Exposure</th>
     
    346323          <td></td>
    347324          </tr>
    348           
     325         
    349326          <tr valign="top">
    350327          <th scope="row">Roof Area Insulated</th>
     
    354331          <td></td>
    355332          </tr>
    356           
     333         
    357334          <tr valign="top">
    358335          <th scope="row">Button</th>
     
    369346          <td></td>
    370347          </tr>
    371          
    372           <!--<tr valign="top">-->
    373           <!--<th scope="row">AC Image Url</th>-->
    374           <!--<td><label> Toshiba AC Image Url</label><input type="text" name="toshiba_ac_url" value="<?php echo esc_attr( get_option('toshiba_ac_url') ); ?>" placeholder="Enter Toshiba AC Image Url"/></td>-->
    375           <!--<td><label> Daikin AC Image Url</label><input type="text" name="daikin_ac_url" value="<?php echo esc_attr( get_option('daikin_ac_url') ); ?>" placeholder="Enter Daikin AC Image Url"/></td>-->
    376           <!--<td></td>-->
    377           <!--</tr>-->
    378          
    379           <!--<tr valign="top">-->
    380           <!--<th scope="row">Contact Url</th>-->
    381           <!--<td><label> Contact Url</label><input type="text" name="contact_url" value="<?php echo esc_attr( get_option('contact_url') ); ?>" placeholder="Enter Roof Contact Url"/></td>-->
    382           <!--<td></td>-->
    383           <!--<td></td>-->
    384           <!--<td></td>-->
    385           <!--</tr>-->
    386          
     348         
     349         
    387350      </table>
    388       
     351     
    389352      <?php submit_button(); ?>
    390 
    391353  </form>
    392354  </div>
Note: See TracChangeset for help on using the changeset viewer.