Plugin Directory

Changeset 1320804


Ignore:
Timestamp:
01/04/2016 10:39:11 AM (10 years ago)
Author:
markusklems
Message:

New tags to let the plugin submit the wordpress user name when a user uploads a file without showing the form to your user. Thereby you know who uploaded the file without need to let your uploader enter her/his name.

Location:
cloudwok-file-upload/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cloudwok-file-upload/trunk/cloudwok.php

    r1308912 r1320804  
    44Plugin URI: http://www.cloudwok.com
    55Description: 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.4.1
     6Version: 0.4.2
    77Author: CloudWok
    88Author Email: [email protected]
     
    5252            'show_form' => True,
    5353            'show_form_input_name' => True,
     54            'invisible_form_input_name' => False,
    5455            'show_form_input_email' => True,
    5556            'show_powered_by_link' => False,
     
    132133      }}';
    133134    }
    134     if(array_key_exists('label_send_msg_btn', $atts) || array_key_exists('label_send_msg_placeholder', $atts) || array_key_exists('prefill_form_fields', $atts) || array_key_exists('required_firstname', $atts) || array_key_exists('required_lastname', $atts)) {
     135    if(array_key_exists('label_send_msg_btn', $atts) || array_key_exists('label_send_msg_placeholder', $atts) || array_key_exists('prefill_form_fields', $atts) || array_key_exists('required_firstname', $atts) || array_key_exists('required_lastname', $atts) || array_key_exists('invisible_form_input_name', $atts)) {
    135136        $customizeMessages = 'document.querySelector( ".cloudwok-embed .cloudwok-upload-message").addEventListener("DOMNodeInserted", customizeMessages, false);
    136137        function customizeMessages(e) {
     
    172173      }
    173174      }
     175        // you can also hide the message fields
     176        if(array_key_exists('show_form_input_name', $atts) && $atts['show_form_input_name'] == "True" && array_key_exists('show_form_input_name', $atts) && $atts['show_form_input_name'] == "True") {
     177                if(array_key_exists('invisible_form_input_name', $atts) && $atts['invisible_form_input_name'] == "True") {
     178                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]" ).required=false;';
     179                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).required=false;';
     180                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed textarea[name=message]" ).required=false;';
     181                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_lastname]" ).style.display = "none";';
     182                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed input[name=from_firstname]" ).style.display = "none";';
     183                    $customizeMessages = $customizeMessages . 'document.querySelector(".cloudwok-embed textarea[name=message]" ).style.display = "none";';
     184                }
     185        }
    174186        $customizeMessages = $customizeMessages . '
    175187      }}';
  • cloudwok-file-upload/trunk/readme.txt

    r1308912 r1320804  
    44Tags: upload, file upload, dropbox, google drive, microsoft onedrive, box, s3, facebook, upload form, feedback
    55Requires at least: 3.0.0
    6 Tested up to: 4.3.1
    7 Stable tag: 0.4.1
     6Tested up to: 4.4.0
     7Stable tag: 0.4.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    100100`[cloudwok wok_id="YOUR_WOK_ID" show_form="True" show_form_input_name="True" required_firstname="True" required_lastname="True"]`
    101101
     102Since version 0.4.2 of this plugin, via `invisible_form_input_name` you can let the plugin submit the wordpress user name when a user uploads a file without showing the input fields to your user:
     103
     104`[cloudwok wok_id="YOUR_WOK_ID" show_form="True" show_form_input_name="True" prefill_form_fields="True" invisible_form_input_name="True"]`
     105
    102106By default, a small "powered by" text-link to www.cloudwok.com is disabled. If you like our plug-in, we would appreciate it if you would enable the link via `[cloudwok wok_id="YOUR_WOK_ID" show_powered_by_link="True"]`. Send me a link to your WordPress site with enabled "powered by" link, and I'd be happy to send you a small coupon code gift back: [email protected]. Thanks!
    103107
     
    118122== Changelog ==
    119123
     124= 0.4.2 =
     125You can now use `show_form_input_name="True"` in combination with the new `invisible_form_input_name="True"` to let the plugin submit the wordpress user name when a user uploads a file without showing the input fields to your user. Thereby you know who uploaded the file without need to let your uploader enter her/his name.
    120126= 0.4.1 =
    121127Added ability to make first name / last name fields required: `required_firstname="True"` and `required_lastname="True"`
Note: See TracChangeset for help on using the changeset viewer.