Changeset 2636750
- Timestamp:
- 11/29/2021 10:26:36 AM (4 years ago)
- Location:
- import-spreadsheets-from-microsoft-excel
- Files:
-
- 38 added
- 4 edited
-
tags/10.1.3 (added)
-
tags/10.1.3/changelog.txt (added)
-
tags/10.1.3/css (added)
-
tags/10.1.3/css/admin_plugin.css (added)
-
tags/10.1.3/css/custom_plugin.css (added)
-
tags/10.1.3/css/style_plugin.css (added)
-
tags/10.1.3/debug.txt (added)
-
tags/10.1.3/examples (added)
-
tags/10.1.3/examples/1-upload (added)
-
tags/10.1.3/examples/1-upload/weekly-time-card.zip (added)
-
tags/10.1.3/examples/2-update (added)
-
tags/10.1.3/examples/2-update/weekly-time-card.zip (added)
-
tags/10.1.3/icon (added)
-
tags/10.1.3/icon/add_shortcode.png (added)
-
tags/10.1.3/icon/delete_shortcode.png (added)
-
tags/10.1.3/icon/icon-apple.png (added)
-
tags/10.1.3/icon/icon-color-picker.png (added)
-
tags/10.1.3/icon/icon-color.png (added)
-
tags/10.1.3/icon/icon-css.png (added)
-
tags/10.1.3/icon/icon-facebook.png (added)
-
tags/10.1.3/icon/icon-flickr.png (added)
-
tags/10.1.3/icon/icon-general-setting.png (added)
-
tags/10.1.3/icon/icon-googleplus.png (added)
-
tags/10.1.3/icon/icon-instagram.png (added)
-
tags/10.1.3/icon/icon-linkedin.png (added)
-
tags/10.1.3/icon/icon-map.png (added)
-
tags/10.1.3/icon/icon-socialsites.png (added)
-
tags/10.1.3/icon/icon-tracking.png (added)
-
tags/10.1.3/icon/icon-twitter.png (added)
-
tags/10.1.3/icon/icon-vimeo.png (added)
-
tags/10.1.3/icon/icon-youtube.png (added)
-
tags/10.1.3/icon/minus.png (added)
-
tags/10.1.3/icon/plus.png (added)
-
tags/10.1.3/import-spreadsheets-from-microsoft-excel.php (added)
-
tags/10.1.3/js (added)
-
tags/10.1.3/js/admin_plugin.js (added)
-
tags/10.1.3/js/plugin-shortcode-manager-scripts.js (added)
-
tags/10.1.3/readme.txt (added)
-
trunk/changelog.txt (modified) (3 diffs)
-
trunk/import-spreadsheets-from-microsoft-excel.php (modified) (11 diffs)
-
trunk/js/plugin-shortcode-manager-scripts.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
import-spreadsheets-from-microsoft-excel/trunk/changelog.txt
r2508832 r2636750 1 1 == Changelog == 2 3 = 10.1.3 = 4 5 * Under rare conditions, the **Embed Calculator** button did not appear in the Classic editor. 2 6 3 7 = 10.1.2 = … … 6 10 7 11 = 10.1.1 = 12 8 13 * $row array issue fixes. 9 14 * zip file open/read issue fixed for PHP version 8. … … 32 37 33 38 = 9.0.1 = 39 34 40 * Improvement: Added checking for ZipArchive PHP extension and error logging feature. 35 41 * Fix: Tested compatibility with more than 35 most common plugins and fixed compatibility issue with another plugin. 36 42 37 43 = 9.0.0 = 44 38 45 * Initial version. -
import-spreadsheets-from-microsoft-excel/trunk/import-spreadsheets-from-microsoft-excel.php
r2508832 r2636750 3 3 * 4 4 Plugin Name: Import Spreadsheets from Microsoft Excel 5 Plugin URI: https:// help.spreadsheetconverter.com/support/online-help/ssc-help-wordpress-plugin-to-import-spreadsheets-from-microsoft-excel/5 Plugin URI: https://www.spreadsheetconverter.com/support/online-help/help-wordpress-plugin-to-import-spreadsheets-from-microsoft-excel 6 6 Description: Import Spreadsheets from Microsoft Excel 7 Version: 10.1. 27 Version: 10.1.3 8 8 Author: SpreadsheetConverter 9 Author URI: http s://www.spreadsheetconverter.com9 Author URI: http://www.spreadsheetconverter.com 10 10 Text Domain: SpreadsheetConverter 11 11 License: GPLv2 or later … … 16 16 * 17 17 18 Copyright (C) 2019-202 1SpreadsheetConverter, http://www.spreadsheetconverter.com18 Copyright (C) 2019-2020 SpreadsheetConverter, http://www.spreadsheetconverter.com 19 19 This program is free software: you can redistribute it and/or modify 20 20 it under the terms of the GNU General Public License as published by … … 107 107 108 108 //Add button to the media button context in edit/add new post screen 109 //add_action('media_buttons_context', 'ims_fme_ssc_ttc_files_button');109 add_action('media_buttons_context', 'ims_fme_ssc_ttc_files_button'); 110 110 function ims_fme_ssc_ttc_files_button( $context ) { 111 111 $context .= "<a id='files_media_link' href='#TB_inline?width=650&height=600&inlineId=tt_shortcode_popup_container&guid=".uniqid()."' class='button thickbox' title='". __('Embed SpreadsheetConverter Calculator', 'SpreadsheetConverter') ."'><span class='files_media_icon'></span>". __('Embed SSC Calculator', 'SpreadsheetConverter' )."</a>"; … … 162 162 $my_query = new WP_Query( $args ); 163 163 ?> 164 <select name="btn_link" id="btn_link " style="width:67%">164 <select name="btn_link" id="btn_link_calculator" style="width:67%"> 165 165 <option value="0" ><?php _e('Select Links', 'SpreadsheetConverter'); ?></option> 166 166 <?php … … 182 182 <li style="display:none;"> 183 183 <label style="width:140px;display: inline-block;">File URL:</label> 184 <input type="text" id="file_url " name="file_url" style="width:67%" />184 <input type="text" id="file_url_calculator" name="file_url" style="width:67%" /> 185 185 </li> 186 186 … … 192 192 <label style="width:140px;display: inline-block;"> 193 193 <?php _e( 'Iframe Width', 'SpreadsheetConverter'); ?>:<em style="color:red">*</em></label> 194 <input type="text" id="iframe_width " name="iframe_width" style="width:25%" />194 <input type="text" id="iframe_width_calculator" name="iframe_width" style="width:25%" /> 195 195 </li> 196 196 197 197 <li> 198 198 <label style="width:140px;display: inline-block;"><?php _e('Iframe Height', 'SpreadsheetConverter') ?>: <em style="color:red">*</em></label> 199 <input type="text" id="iframe_height " name="iframe_height" style="width:25%" />199 <input type="text" id="iframe_height_calculator" name="iframe_height" style="width:25%" /> 200 200 </li> 201 201 … … 203 203 </ul> 204 204 205 <input class="button-primary" type="button" id="insertbutton " style="margin-left:145px" value="<?php _e('Insert Calculator', 'SpreadsheetConverter'); ?>" />205 <input class="button-primary" type="button" id="insertbutton_calculator" style="margin-left:145px" value="<?php _e('Insert Calculator', 'SpreadsheetConverter'); ?>" /> 206 206 <a class="button" onclick="tb_remove(); return false;" href="#"><?php _e('Cancel', 'SpreadsheetConverter'); ?></a> 207 207 … … 228 228 endif; 229 229 230 $fileurl = get_post_meta( $postid, 'wp_custom_attachment', true);230 $fileurl = esc_url( get_post_meta( $postid, 'wp_custom_attachment', true ) ); 231 231 $height = intval( get_post_meta( $postid, 'wp_custom_attachment_height', true ) ); 232 232 $width = intval( get_post_meta( $postid, 'wp_custom_attachment_width', true ) ); … … 468 468 // return $id; 469 469 // } 470 470 471 $folder_name = basename( sanitize_file_name( $_FILES['wp_custom_attachment']['name'] ),".zip" ); 471 472 … … 479 480 480 481 $source = $_FILES['wp_custom_attachment']['tmp_name']; 481 $target_path = $pub_dir."/". $folder_name.'.zip';482 $target_path = $pub_dir."/". sanitize_file_name( $_FILES['wp_custom_attachment']['name'] ); 482 483 483 484 // change this to the correct site path … … 518 519 519 520 } 520 521 521 // change this to the correct site path 522 522 $zip->extractTo( $pub_dir.'/'); 523 523 524 if ( true === $rename ){ 524 525 //rename folder to sanitize name 525 rename( $pub_dir .'/'. $pathall[0] , $pub_dir .'/'. $folder_name);526 rename( $pub_dir .'/'. $pathall[0] , $pub_dir .'/'. sanitize_file_name( $pathall[0] ) ); 526 527 527 528 //reanme file to sanitize name 528 if( file_exists( $pub_dir .'/'. $folder_name.'/'. $pathall[0] . '.htm' ) ) {529 $oldname = $pub_dir .'/'. $folder_name.'/'. $pathall[0] . '.htm';530 $sanitize_name = $pub_dir .'/'. $folder_name .'/'. $folder_name. '.htm';529 if( file_exists( $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. $pathall[0] . '.htm' ) ) { 530 $oldname = $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. $pathall[0] . '.htm'; 531 $sanitize_name = $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. sanitize_file_name( $pathall[0] ) . '.htm'; 531 532 copy( $oldname , $sanitize_name ); 532 533 wp_delete_file( $oldname ); -
import-spreadsheets-from-microsoft-excel/trunk/js/plugin-shortcode-manager-scripts.js
r2025154 r2636750 2 2 3 3 /*Script For Shortcode Button*/ 4 jQuery("#insertbutton ").click(function(){4 jQuery("#insertbutton_calculator").click(function(){ 5 5 6 var file_url = jQuery("#file_url ").val();7 var iframe_height = jQuery("#iframe_height ").val();8 var iframe_width = jQuery("#iframe_width ").val();6 var file_url = jQuery("#file_url_calculator").val(); 7 var iframe_height = jQuery("#iframe_height_calculator").val(); 8 var iframe_width = jQuery("#iframe_width_calculator").val(); 9 9 var button_type = jQuery("#btn_type").val();//Get the value of the button type 10 10 var button_title = jQuery("#btn_title").val();//Get the title of the button 11 var button_link = jQuery("#btn_link").val(); 11 var button_link = jQuery("#btn_link_calculator").val(); 12 console.log( button_link); 13 console.log( file_url); 12 14 var button_external_link = jQuery("#btn_external_url").val();//Get 13 15 var jquery_min = jQuery("#jquery_min").val(); … … 23 25 }; 24 26 //to get HTML from iframe 25 jQuery("#btn_link ").val("");27 jQuery("#btn_link_calculator").val(""); 26 28 jQuery("#btn_external_url").val(''); 27 jQuery("#file_url ").val('');28 jQuery("#iframe_height ").val('');29 jQuery("#iframe_width ").val('');29 jQuery("#file_url_calculator").val(''); 30 jQuery("#iframe_height_calculator").val(''); 31 jQuery("#iframe_width_calculator").val(''); 30 32 } 31 33 else{ … … 52 54 53 55 /*Disable External Url when dropdown is changed*/ 54 jQuery('#btn_link ').change(function() {56 jQuery('#btn_link_calculator').change(function() { 55 57 56 var button_link = jQuery("#btn_link ").val();58 var button_link = jQuery("#btn_link_calculator option:selected").val(); 57 59 jQuery.ajax({ 58 60 type: "POST", … … 69 71 success: function(data){ 70 72 data = jQuery.parseJSON(data); 71 jQuery('#file_url').val(jQuery.trim(data.html)); 72 jQuery('#iframe_width').val(data.width); 73 jQuery('#iframe_height').val(data.height); 73 console.log( data ); 74 jQuery('#file_url_calculator').val(jQuery.trim(data.html)); 75 jQuery('#iframe_width_calculator').val(data.width); 76 jQuery('#iframe_height_calculator').val(data.height); 74 77 } 75 78 }); -
import-spreadsheets-from-microsoft-excel/trunk/readme.txt
r2573902 r2636750 7 7 Tested up to: 5.8 8 8 Requires PHP: 5.2.4 9 Stable tag: 10.1. 29 Stable tag: 10.1.3 10 10 11 11 Import live, calculating spreadsheets from Microsoft Excel to WordPress. The uploaded online spreadsheet is live, and looks and feels like in Excel. … … 357 357 == Changelog == 358 358 359 = 10.1.3 = 360 361 * Under rare conditions, the **Embed Calculator** button did not appear in the Classic editor. 362 359 363 = 10.1.2 = 360 364
Note: See TracChangeset
for help on using the changeset viewer.