Changeset 1211874
- Timestamp:
- 08/03/2015 02:44:29 PM (11 years ago)
- Location:
- cloudwok-file-upload/trunk
- Files:
-
- 2 edited
-
cloudwok.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudwok-file-upload/trunk/cloudwok.php
r1201910 r1211874 4 4 Plugin URI: http://www.cloudwok.com 5 5 Description: CloudWok enables you to let your website visitors upload files directly into a Dropbox, Google Drive, Amazon S3, Box.com, or other cloud storage folder that you own. 6 Version: 0.3. 36 Version: 0.3.4 7 7 Author: CloudWok 8 8 Author Email: [email protected] … … 41 41 'show_form_input_name' => True, 42 42 'show_form_input_email' => True, 43 'show_powered_by_link' => False 43 'show_powered_by_link' => False, 44 'label_add_files_btn' => '', 45 'label_send_msg_btn' => '', 46 'label_dropzone' => '', 47 'label_send_msg_placeholder' => '', 48 'label_send_email_placeholder' => '', 49 'label_send_firstname_placeholder' => '', 50 'label_send_lastname_placeholder' => '' 44 51 ), $atts ) 45 52 ); … … 51 58 $show_form_input_email = ' data-show-email="n"'; 52 59 $show_powered_by_link = ' data-pby="n"'; 60 61 // customize labels and texts 62 $customizeDropzone = ''; 63 $customizeMessages = ''; 53 64 54 65 if(array_key_exists('show_uploads', $atts) && $atts['show_uploads'] == "True") { … … 69 80 if(array_key_exists('show_powered_by_link', $atts) && $atts['show_powered_by_link'] == "True") { 70 81 $show_powered_by_link = 'data-pby="y"'; 82 } 83 84 // custom labels 85 if(array_key_exists('label_add_files_btn', $atts) || array_key_exists('label_dropzone', $atts)) { 86 $customizeDropzone = 'document.querySelector( ".cloudwok-embed .cloudwok-dropzone").addEventListener("DOMNodeInserted", customizeDropzone, false); 87 function customizeDropzone(e) { 88 if(e.target && e.target.nodeName == "DIV") { 89 '; 90 if(array_key_exists('label_add_files_btn', $atts)) { 91 $customizeDropzone = $customizeDropzone . 'document.querySelector(".cloudwok-embed .dropzone span.lead > .fileinput-button > span" ).innerHTML = "' . $atts['label_add_files_btn'] . '";'; 92 } 93 if(array_key_exists('label_dropzone', $atts)) { 94 $customizeDropzone = $customizeDropzone . 'document.querySelector(".cloudwok-embed .dropzone span.lead > strong" ).innerHTML = "' . $atts['label_dropzone'] . '";'; 95 } 96 $customizeDropzone = $customizeDropzone . ' 97 }}'; 98 } 99 if(array_key_exists('label_send_msg_btn', $atts) || array_key_exists('label_send_msg_placeholder', $atts)) { 100 $customizeMessages = 'document.querySelector( ".cloudwok-embed .cloudwok-upload-message").addEventListener("DOMNodeInserted", customizeMessages, false); 101 function customizeMessages(e) { 102 if(e.target && e.target.nodeName == "DIV") {'; 103 if(array_key_exists('label_send_msg_btn', $atts)) { 104 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed .cloudwok-upload-message .btn-start-upload" ).innerHTML = "<i class=\'fa fa-send\'></i> ' . $atts['label_send_msg_btn'] . '";'; 105 } 106 if(array_key_exists('label_send_msg_placeholder', $atts)) { 107 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed .cloudwok-upload-message > form > fieldset > div.form-group > div > textarea" ).innerHTML = "' . $atts['label_send_msg_placeholder'] . '";'; 108 } 109 if(array_key_exists('label_send_msg_placeholder', $atts)) { 110 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed .cloudwok-upload-message > form > fieldset > div.form-group > div > textarea" ).placeholder = "' . $atts['label_send_msg_placeholder'] . '";'; 111 } 112 if(array_key_exists('label_send_email_placeholder', $atts)) { 113 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from]").placeholder = "' . $atts['label_send_email_placeholder'] . '";'; 114 } 115 if(array_key_exists('label_send_firstname_placeholder', $atts)) { 116 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]").placeholder = "' . $atts['label_send_firstname_placeholder'] . '";'; 117 } 118 if(array_key_exists('label_send_lastname_placeholder', $atts)) { 119 $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).placeholder = "' . $atts['label_send_lastname_placeholder'] . '";'; 120 } 121 $customizeMessages = $customizeMessages . ' 122 }}'; 71 123 } 72 124 … … 92 144 window.attachEvent("onload", loader); 93 145 })(window, document); 94 </script>'; 146 147 ' . $customizeDropzone . ' 148 149 ' . $customizeMessages . ' 150 </script> 151 '; 95 152 return $to_return; 96 153 } -
cloudwok-file-upload/trunk/readme.txt
r1202157 r1211874 4 4 Tags: upload, file upload, dropbox, google drive, microsoft onedrive, box, s3, facebook, upload form, feedback 5 5 Requires at least: 3.0.0 6 Tested up to: 4.2. 27 Stable tag: 0.3. 36 Tested up to: 4.2.3 7 Stable tag: 0.3.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 92 92 == Changelog == 93 93 94 = 0.3.4 = 95 Added feature to customize labels and texts (see here: https://wordpress.org/support/topic/custom-text-translation). This will likely be replaced in future versions by a central customization admin page. 94 96 = 0.3.3 = 95 97 Added new features to optionally show first name, last name, and e-mail address as input fields of the message form. Use it for example like this: `[cloudwok wok_id="YOUR_WOK_ID" show_form="True" show_form_input_name="True"]`
Note: See TracChangeset
for help on using the changeset viewer.