Version Description
- Bug fixes in Dashboard Settings Shortcode Composer.
- Correction of important bug that was breaking page in some cases.
- Minor improvements of user data fields and notification email attributes.
Download this release
Release Info
Developer | nickboss |
Plugin | WordPress File Upload |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- css/wordpress_file_upload_adminstyle.css +7 -0
- js/wordpress_file_upload_adminfunctions.js +22 -8
- languages/wordpress-file-upload-upload.pot +0 -374
- lib/wfu_admin.php +8 -4
- lib/wfu_attributes.php +5 -5
- lib/wfu_constants.php +1 -1
- lib/wfu_functions.php +7 -3
- readme.txt +9 -1
- wordpress_file_upload.php +1 -1
css/wordpress_file_upload_adminstyle.css
CHANGED
@@ -95,6 +95,13 @@ span.wfu_ptext_span
|
|
95 |
width: 60px;
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
div.wfu_shadow
|
99 |
{
|
100 |
position: absolute;
|
95 |
width: 60px;
|
96 |
}
|
97 |
|
98 |
+
div.wfu_rolelist_checkall
|
99 |
+
{
|
100 |
+
display: inline-block;
|
101 |
+
vertical-align: top;
|
102 |
+
margin: 0px 0px 0px 10px;
|
103 |
+
}
|
104 |
+
|
105 |
div.wfu_shadow
|
106 |
{
|
107 |
position: absolute;
|
js/wordpress_file_upload_adminfunctions.js
CHANGED
@@ -51,8 +51,9 @@ function wfu_admin_onoff_clicked(key) {
|
|
51 |
|
52 |
function wfu_admin_radio_clicked(key) {
|
53 |
var radios = document.getElementsByName("wfu_radioattribute_" + key);
|
54 |
-
var
|
55 |
-
var
|
|
|
56 |
var val = "";
|
57 |
for (i = 0; i < radios.length; i++)
|
58 |
if (radios[i].checked) val = radios[i].value;
|
@@ -396,6 +397,10 @@ function wfu_update_text_value(e) {
|
|
396 |
var item = e.target;
|
397 |
var attribute = item.id.replace("wfu_attribute_", "");
|
398 |
var val = item.value;
|
|
|
|
|
|
|
|
|
399 |
if (val !== item.oldVal) {
|
400 |
item.oldVal = val;
|
401 |
document.getElementById("wfu_attribute_value_" + attribute).value = val;
|
@@ -449,13 +454,22 @@ function wfu_update_ptext_value(attribute) {
|
|
449 |
}
|
450 |
|
451 |
function wfu_update_rolelist_value(attribute) {
|
452 |
-
var options = document.getElementById("wfu_attribute_" + attribute).options;
|
453 |
var value = "";
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
document.getElementById("wfu_attribute_value_" + attribute).value = value;
|
460 |
wfu_generate_shortcode();
|
461 |
}
|
51 |
|
52 |
function wfu_admin_radio_clicked(key) {
|
53 |
var radios = document.getElementsByName("wfu_radioattribute_" + key);
|
54 |
+
var container = document.getElementById("wfu_wrapper");
|
55 |
+
var shadows = document.getElementsByClassName("wfu_shadow_" + key, "div", container);
|
56 |
+
var shadows_inv = document.getElementsByClassName("wfu_shadow_" + key + "_inv", "div", container);
|
57 |
var val = "";
|
58 |
for (i = 0; i < radios.length; i++)
|
59 |
if (radios[i].checked) val = radios[i].value;
|
397 |
var item = e.target;
|
398 |
var attribute = item.id.replace("wfu_attribute_", "");
|
399 |
var val = item.value;
|
400 |
+
//if it is a multiline element, then replace line breaks with %n%
|
401 |
+
if (item.tagName == "TEXTAREA") {
|
402 |
+
val = val.replace(/(\r\n|\n|\r)/gm,"%n%");
|
403 |
+
}
|
404 |
if (val !== item.oldVal) {
|
405 |
item.oldVal = val;
|
406 |
document.getElementById("wfu_attribute_value_" + attribute).value = val;
|
454 |
}
|
455 |
|
456 |
function wfu_update_rolelist_value(attribute) {
|
|
|
457 |
var value = "";
|
458 |
+
var rolelist = document.getElementById("wfu_attribute_" + attribute);
|
459 |
+
var checkall = document.getElementById("wfu_attribute_" + attribute + "_all");
|
460 |
+
if (checkall.checked) {
|
461 |
+
rolelist.disabled = true;
|
462 |
+
value = "all";
|
463 |
+
}
|
464 |
+
else {
|
465 |
+
rolelist.disabled = false;
|
466 |
+
var options = rolelist.options;
|
467 |
+
for (var i = 0; i < options.length; i++)
|
468 |
+
if (options[i].selected) {
|
469 |
+
if (value != "") value += ",";
|
470 |
+
value += options[i].value;
|
471 |
+
}
|
472 |
+
}
|
473 |
document.getElementById("wfu_attribute_value_" + attribute).value = value;
|
474 |
wfu_generate_shortcode();
|
475 |
}
|
languages/wordpress-file-upload-upload.pot
CHANGED
@@ -1,374 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Wordpress File Upload\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-12-08 02:57+0200\n"
|
6 |
-
"PO-Revision-Date: 2013-12-08 02:57+0200\n"
|
7 |
-
"Last-Translator: nickboss <info@iptanus.com>\n"
|
8 |
-
"Language-Team: Iptanus <info@iptanus.com>\n"
|
9 |
-
"Language: \n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __\n"
|
14 |
-
"X-Poedit-Basepath: ../\n"
|
15 |
-
"X-Poedit-SearchPath-0: .\n"
|
16 |
-
|
17 |
-
#: lib/wfu_constants.php:5
|
18 |
-
msgid "Upload files"
|
19 |
-
msgstr ""
|
20 |
-
|
21 |
-
#: lib/wfu_constants.php:6
|
22 |
-
msgid "Select File"
|
23 |
-
msgstr ""
|
24 |
-
|
25 |
-
#: lib/wfu_constants.php:7
|
26 |
-
msgid "Upload File"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: lib/wfu_constants.php:22
|
30 |
-
msgid "File Upload Notification"
|
31 |
-
msgstr ""
|
32 |
-
|
33 |
-
#: lib/wfu_constants.php:23
|
34 |
-
msgid ""
|
35 |
-
"Dear Recipient,\n"
|
36 |
-
"\n"
|
37 |
-
" This is an automatic delivery message to notify you that a new file has been uploaded.\n"
|
38 |
-
"\n"
|
39 |
-
"Best Regards"
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: lib/wfu_constants.php:29
|
43 |
-
#, php-format
|
44 |
-
msgid "File %filename% uploaded successfully"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: lib/wfu_constants.php:30
|
48 |
-
#, php-format
|
49 |
-
msgid "File %filename% uploaded successfully but with warnings"
|
50 |
-
msgstr ""
|
51 |
-
|
52 |
-
#: lib/wfu_constants.php:31
|
53 |
-
msgid "File %filename% not uploaded"
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: lib/wfu_constants.php:32
|
57 |
-
msgid "File %filename% is being uploaded"
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: lib/wfu_constants.php:48
|
61 |
-
msgid "Your message"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: lib/wfu_constants.php:51
|
65 |
-
msgid "Error. Could not resolve ftp target filedir. Check the domain in 'ftpinfo' attribute."
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: lib/wfu_constants.php:52
|
69 |
-
msgid "Error. Invalid ftp information. Check 'ftpinfo' attribute."
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: lib/wfu_constants.php:53
|
73 |
-
msgid "Error. Could not extract ftp information from 'ftpinfo' attribute. Check its syntax."
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: lib/wfu_constants.php:54
|
77 |
-
msgid "Error. Could not resolve ftp target filename. Check the domain in 'ftpinfo' attribute."
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: lib/wfu_constants.php:55
|
81 |
-
msgid ""
|
82 |
-
"Error. The upload size limit of PHP directive upload_max_filesize is preventing the upload of big files.\n"
|
83 |
-
"PHP directive upload_max_filesize limit is: "
|
84 |
-
msgstr ""
|
85 |
-
|
86 |
-
#: lib/wfu_constants.php:56
|
87 |
-
msgid ""
|
88 |
-
"The upload time limit of PHP directive max_input_time is preventing the upload of big files.\n"
|
89 |
-
"PHP directive max_input_time limit is: "
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: lib/wfu_constants.php:57
|
93 |
-
msgid ""
|
94 |
-
"Error. Permission denied to write to target folder.\n"
|
95 |
-
"Check and correct read/write permissions of target folder."
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: lib/wfu_constants.php:58
|
99 |
-
msgid "Targer folder doesn't exist."
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: lib/wfu_constants.php:59
|
103 |
-
msgid "Upload failed! Missing a temporary folder."
|
104 |
-
msgstr ""
|
105 |
-
|
106 |
-
#: lib/wfu_constants.php:60
|
107 |
-
msgid "Upload failed! Permission denied to write to target folder."
|
108 |
-
msgstr ""
|
109 |
-
|
110 |
-
#: lib/wfu_constants.php:61
|
111 |
-
msgid "File not allowed."
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: lib/wfu_constants.php:62
|
115 |
-
msgid "The uploaded file exceeds the file size limit."
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: lib/wfu_constants.php:63
|
119 |
-
msgid "Upload failed! The uploaded file exceeds the file size limit of the server. Please contact the administrator."
|
120 |
-
msgstr ""
|
121 |
-
|
122 |
-
#: lib/wfu_constants.php:64
|
123 |
-
msgid "Upload failed! The duration of the upload exceeded the time limit of the server. Please contact the administrator."
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: lib/wfu_constants.php:65
|
127 |
-
msgid "Upload failed! The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form."
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: lib/wfu_constants.php:66
|
131 |
-
msgid "Upload failed! The uploaded file was only partially uploaded."
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: lib/wfu_constants.php:67
|
135 |
-
msgid "Upload failed! No file was uploaded."
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: lib/wfu_constants.php:68
|
139 |
-
msgid "Upload failed! Failed to write file to disk."
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: lib/wfu_constants.php:69
|
143 |
-
msgid "Upload failed! Error occured while moving temporary file. Please contact administrator."
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: lib/wfu_constants.php:70
|
147 |
-
msgid "Upload failed! A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help."
|
148 |
-
msgstr ""
|
149 |
-
|
150 |
-
#: lib/wfu_constants.php:71
|
151 |
-
msgid "Upload failed! Error occured while attemting to upload the file."
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: lib/wfu_constants.php:72
|
155 |
-
msgid "Upload failed!"
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: lib/wfu_constants.php:73
|
159 |
-
msgid "No file!"
|
160 |
-
msgstr ""
|
161 |
-
|
162 |
-
#: lib/wfu_constants.php:74
|
163 |
-
msgid "Upload failed! The upload has been canceled by the user or the browser dropped the connection."
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: lib/wfu_constants.php:75
|
167 |
-
msgid "Upload failed! Unknown error."
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: lib/wfu_constants.php:76
|
171 |
-
msgid "Please contact the administrator."
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: lib/wfu_constants.php:77
|
175 |
-
msgid "No result from remote server!"
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: lib/wfu_constants.php:78
|
179 |
-
msgid " but with warnings"
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: lib/wfu_constants.php:79
|
183 |
-
#: lib/wfu_constants.php:81
|
184 |
-
msgid "Warning: JSON parse error."
|
185 |
-
msgstr ""
|
186 |
-
|
187 |
-
#: lib/wfu_constants.php:80
|
188 |
-
msgid "Upload parameters of this file, passed as JSON string to the handler, could not be parsed."
|
189 |
-
msgstr ""
|
190 |
-
|
191 |
-
#: lib/wfu_constants.php:82
|
192 |
-
msgid "UploadStates, passed as JSON string to the handler, could not be parsed."
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
#: lib/wfu_constants.php:83
|
196 |
-
msgid "Redirection to classic form functionality occurred due to unknown error."
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
#: lib/wfu_constants.php:84
|
200 |
-
msgid "Redirection to classic form functionality occurred because AJAX is not supported."
|
201 |
-
msgstr ""
|
202 |
-
|
203 |
-
#: lib/wfu_constants.php:85
|
204 |
-
msgid "Redirection to classic form functionality occurred because HTML5 is not supported."
|
205 |
-
msgstr ""
|
206 |
-
|
207 |
-
#: lib/wfu_constants.php:86
|
208 |
-
msgid "Redirection to classic form functionality occurred due to JSON parse error."
|
209 |
-
msgstr ""
|
210 |
-
|
211 |
-
#: lib/wfu_constants.php:87
|
212 |
-
msgid "cannot be empty!"
|
213 |
-
msgstr ""
|
214 |
-
|
215 |
-
#: lib/wfu_constants.php:90
|
216 |
-
msgid "Upload skipped! File already exists."
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: lib/wfu_constants.php:91
|
220 |
-
msgid "No files have been selected!"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: lib/wfu_constants.php:92
|
224 |
-
msgid "WPFilebase Plugin not updated because there were no files uploaded."
|
225 |
-
msgstr ""
|
226 |
-
|
227 |
-
#: lib/wfu_constants.php:93
|
228 |
-
msgid "Notification email was not sent because there were no files uploaded."
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: lib/wfu_constants.php:94
|
232 |
-
msgid "Notification email was not sent because no recipients were defined. Please check notifyrecipients attribute in the shortcode."
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: lib/wfu_constants.php:95
|
236 |
-
msgid "Notification email was not sent due to an error. Please check notifyrecipients, notifysubject and notifymessage attributes for errors."
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: lib/wfu_constants.php:96
|
240 |
-
msgid "Redirection not executed because redirection link is empty. Please check redirectlink attribute."
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
-
#: lib/wfu_constants.php:97
|
244 |
-
msgid "Redirection not executed because not all files were successfully uploaded."
|
245 |
-
msgstr ""
|
246 |
-
|
247 |
-
#: lib/wfu_constants.php:100
|
248 |
-
msgid "Test Mode"
|
249 |
-
msgstr ""
|
250 |
-
|
251 |
-
#: lib/wfu_constants.php:101
|
252 |
-
msgid "Upload path: %filepath%"
|
253 |
-
msgstr ""
|
254 |
-
|
255 |
-
#: lib/wfu_constants.php:102
|
256 |
-
msgid "Failed upload path: %filepath%"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#: lib/wfu_constants.php:105
|
260 |
-
msgid "This is a test message"
|
261 |
-
msgstr ""
|
262 |
-
|
263 |
-
#: lib/wfu_constants.php:106
|
264 |
-
msgid "This is a test administrator message"
|
265 |
-
msgstr ""
|
266 |
-
|
267 |
-
#: lib/wfu_constants.php:107
|
268 |
-
msgid "File testfile 1 under test"
|
269 |
-
msgstr ""
|
270 |
-
|
271 |
-
#: lib/wfu_constants.php:108
|
272 |
-
msgid "File testfile 1 message"
|
273 |
-
msgstr ""
|
274 |
-
|
275 |
-
#: lib/wfu_constants.php:109
|
276 |
-
msgid "File testfile 1 administrator message"
|
277 |
-
msgstr ""
|
278 |
-
|
279 |
-
#: lib/wfu_constants.php:110
|
280 |
-
msgid "File testfile 2 under test"
|
281 |
-
msgstr ""
|
282 |
-
|
283 |
-
#: lib/wfu_constants.php:111
|
284 |
-
msgid "File testfile 2 message"
|
285 |
-
msgstr ""
|
286 |
-
|
287 |
-
#: lib/wfu_constants.php:112
|
288 |
-
msgid "File testfile 2 administrator message"
|
289 |
-
msgstr ""
|
290 |
-
|
291 |
-
#: lib/wfu_constants.php:115
|
292 |
-
msgid "Insert variable %username% inside text. It will be replaced by the username of the current user."
|
293 |
-
msgstr ""
|
294 |
-
|
295 |
-
#: lib/wfu_constants.php:116
|
296 |
-
msgid "Insert variable %useremail% inside text. It will be replaced by the email of the current user."
|
297 |
-
msgstr ""
|
298 |
-
|
299 |
-
#: lib/wfu_constants.php:117
|
300 |
-
msgid "Insert variable %filename% inside text. It will be replaced by the filename of the uploaded file."
|
301 |
-
msgstr ""
|
302 |
-
|
303 |
-
#: lib/wfu_constants.php:118
|
304 |
-
msgid "Insert variable %filepath% inside text. It will be replaced by the full filepath of the uploaded file."
|
305 |
-
msgstr ""
|
306 |
-
|
307 |
-
#: lib/wfu_constants.php:119
|
308 |
-
msgid "Insert variable %blogid% inside text. It will be replaced by the blog id of the website."
|
309 |
-
msgstr ""
|
310 |
-
|
311 |
-
#: lib/wfu_constants.php:120
|
312 |
-
msgid "Insert variable %userdataXXX% inside text. Replace XXX with the number of the user field (1, 2, etc...). It will be replaced by the value that the user entered in this field."
|
313 |
-
msgstr ""
|
314 |
-
|
315 |
-
#: lib/wfu_constants.php:121
|
316 |
-
msgid "Insert variable %n% inside text to denote a line change."
|
317 |
-
msgstr ""
|
318 |
-
|
319 |
-
#: lib/wfu_constants.php:124
|
320 |
-
msgid "Upload in progress"
|
321 |
-
msgstr ""
|
322 |
-
|
323 |
-
#: lib/wfu_constants.php:125
|
324 |
-
msgid "Upload in progress with warnings!"
|
325 |
-
msgstr ""
|
326 |
-
|
327 |
-
#: lib/wfu_constants.php:126
|
328 |
-
msgid "Upload in progress but some files already failed!"
|
329 |
-
msgstr ""
|
330 |
-
|
331 |
-
#: lib/wfu_constants.php:127
|
332 |
-
msgid "Upload in progress but no files uploaded so far!"
|
333 |
-
msgstr ""
|
334 |
-
|
335 |
-
#: lib/wfu_constants.php:128
|
336 |
-
msgid "All files uploaded successfully"
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
#: lib/wfu_constants.php:129
|
340 |
-
msgid "All files uploaded successfully but there are warnings!"
|
341 |
-
msgstr ""
|
342 |
-
|
343 |
-
#: lib/wfu_constants.php:130
|
344 |
-
msgid "File uploaded successfully but there are warnings!"
|
345 |
-
msgstr ""
|
346 |
-
|
347 |
-
#: lib/wfu_constants.php:131
|
348 |
-
msgid "Some files failed to upload!"
|
349 |
-
msgstr ""
|
350 |
-
|
351 |
-
#: lib/wfu_constants.php:132
|
352 |
-
msgid "All files failed to upload"
|
353 |
-
msgstr ""
|
354 |
-
|
355 |
-
#: lib/wfu_constants.php:133
|
356 |
-
msgid "File failed to upload"
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
#: lib/wfu_constants.php:134
|
360 |
-
msgid "There are no files to upload!"
|
361 |
-
msgstr ""
|
362 |
-
|
363 |
-
#: lib/wfu_constants.php:135
|
364 |
-
msgid "Test upload message"
|
365 |
-
msgstr ""
|
366 |
-
|
367 |
-
#: lib/wfu_constants.php:136
|
368 |
-
msgid "JSON parse warning!"
|
369 |
-
msgstr ""
|
370 |
-
|
371 |
-
#: lib/wfu_constants.php:137
|
372 |
-
msgid "please wait while redirecting..."
|
373 |
-
msgstr ""
|
374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/wfu_admin.php
CHANGED
@@ -266,18 +266,22 @@ function wfu_shortcode_composer() {
|
|
266 |
$echo_str .= $dlp."\t\t".'<span class="wfu_variable wfu_variable_p_'.$attr.'" title'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
|
267 |
}
|
268 |
elseif ( $def['type'] == "mtext" ) {
|
269 |
-
$
|
|
|
270 |
if ( $def['variables'] != null ) foreach ( $def['variables'] as $variable )
|
271 |
-
$echo_str .= $dlp."\t\t".'<span class="wfu_variable wfu_variable_'.$attr.'" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
|
272 |
}
|
273 |
elseif ( $def['type'] == "rolelist" ) {
|
274 |
$roles = $wp_roles->get_names();
|
275 |
-
$
|
|
|
|
|
276 |
foreach ( $selected as $key => $item ) $selected[$key] = trim($item);
|
277 |
-
$echo_str .= $dlp."\t\t".'<select id="wfu_attribute_'.$attr.'" multiple="multiple" size="'.count($roles).'" onchange="wfu_update_rolelist_value(\''.$attr.'\');">';
|
278 |
foreach ( $roles as $roleid => $rolename )
|
279 |
$echo_str .= $dlp."\t\t\t".'<option value="'.$roleid.'"'.( in_array($roleid, $selected) ? ' selected="selected"' : '' ).'>'.$rolename.'</option>';
|
280 |
$echo_str .= $dlp."\t\t".'</select>';
|
|
|
281 |
}
|
282 |
elseif ( $def['type'] == "dimensions" ) {
|
283 |
$vals_arr = explode(",", $def['value']);
|
266 |
$echo_str .= $dlp."\t\t".'<span class="wfu_variable wfu_variable_p_'.$attr.'" title'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
|
267 |
}
|
268 |
elseif ( $def['type'] == "mtext" ) {
|
269 |
+
$val = str_replace("%n%", "\n", $def['value']);
|
270 |
+
$echo_str .= $dlp."\t\t".'<textarea id="wfu_attribute_'.$attr.'" name="wfu_text_elements" rows="5">'.$val.'</textarea>';
|
271 |
if ( $def['variables'] != null ) foreach ( $def['variables'] as $variable )
|
272 |
+
if ( $variable != "%n%" ) $echo_str .= $dlp."\t\t".'<span class="wfu_variable wfu_variable_'.$attr.'" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
|
273 |
}
|
274 |
elseif ( $def['type'] == "rolelist" ) {
|
275 |
$roles = $wp_roles->get_names();
|
276 |
+
$def['value'] = strtolower($def['value']);
|
277 |
+
if ( $def['value'] == "all" ) $selected = array("administrator");
|
278 |
+
else $selected = explode(",", $def['value']);
|
279 |
foreach ( $selected as $key => $item ) $selected[$key] = trim($item);
|
280 |
+
$echo_str .= $dlp."\t\t".'<select id="wfu_attribute_'.$attr.'" multiple="multiple" size="'.count($roles).'" onchange="wfu_update_rolelist_value(\''.$attr.'\');"'.( strtolower($def['value']) == "all" ? ' disabled="disabled"' : '' ).'>';
|
281 |
foreach ( $roles as $roleid => $rolename )
|
282 |
$echo_str .= $dlp."\t\t\t".'<option value="'.$roleid.'"'.( in_array($roleid, $selected) ? ' selected="selected"' : '' ).'>'.$rolename.'</option>';
|
283 |
$echo_str .= $dlp."\t\t".'</select>';
|
284 |
+
$echo_str .= $dlp."\t\t".'<div class="wfu_rolelist_checkall"><input id="wfu_attribute_'.$attr.'_all" type="checkbox" onchange="wfu_update_rolelist_value(\''.$attr.'\');"'.( strtolower($def['value']) == "all" ? ' checked="checked"' : '' ).' /> Select all (including guests)</div>';
|
285 |
}
|
286 |
elseif ( $def['type'] == "dimensions" ) {
|
287 |
$vals_arr = explode(",", $def['value']);
|
lib/wfu_attributes.php
CHANGED
@@ -255,7 +255,7 @@ function wfu_attribute_definitions() {
|
|
255 |
array(
|
256 |
"name" => "List of Subfolders",
|
257 |
"attribute" => "subfoldertree",
|
258 |
-
"type" => "
|
259 |
"listitems" => null,
|
260 |
"value" => WFU_SUBFOLDERTREE,
|
261 |
"mode" => "free",
|
@@ -267,7 +267,7 @@ function wfu_attribute_definitions() {
|
|
267 |
"help" => "The list of folders a user can select. Please see documentation on how to create the list of folders."
|
268 |
),
|
269 |
array(
|
270 |
-
"name" => "File
|
271 |
"attribute" => "dublicatespolicy",
|
272 |
"type" => "radio",
|
273 |
"listitems" => array("overwrite", "reject", "*maintain both"),
|
@@ -515,7 +515,7 @@ function wfu_attribute_definitions() {
|
|
515 |
"subcategory" => "Email Notifications",
|
516 |
"parent" => "notify",
|
517 |
"dependencies" => null,
|
518 |
-
"variables" => array("%useremail%"),
|
519 |
"help" => "Defines the recipients of the email notification. Can be dynamic by using variables. Please check Documentation on how to use variables in atributes."
|
520 |
),
|
521 |
array(
|
@@ -529,13 +529,13 @@ function wfu_attribute_definitions() {
|
|
529 |
"subcategory" => "Email Notifications",
|
530 |
"parent" => "notify",
|
531 |
"dependencies" => null,
|
532 |
-
"variables" =>
|
533 |
"help" => "Defines additional email headers, in case you want to sent an HTML message, or use Bcc list, or use a different From address and name or other more advanced email options."
|
534 |
),
|
535 |
array(
|
536 |
"name" => "Email Subject",
|
537 |
"attribute" => "notifysubject",
|
538 |
-
"type" => "
|
539 |
"listitems" => null,
|
540 |
"value" => WFU_NOTIFYSUBJECT,
|
541 |
"mode" => "free",
|
255 |
array(
|
256 |
"name" => "List of Subfolders",
|
257 |
"attribute" => "subfoldertree",
|
258 |
+
"type" => "text",
|
259 |
"listitems" => null,
|
260 |
"value" => WFU_SUBFOLDERTREE,
|
261 |
"mode" => "free",
|
267 |
"help" => "The list of folders a user can select. Please see documentation on how to create the list of folders."
|
268 |
),
|
269 |
array(
|
270 |
+
"name" => "File Duplicates Policy",
|
271 |
"attribute" => "dublicatespolicy",
|
272 |
"type" => "radio",
|
273 |
"listitems" => array("overwrite", "reject", "*maintain both"),
|
515 |
"subcategory" => "Email Notifications",
|
516 |
"parent" => "notify",
|
517 |
"dependencies" => null,
|
518 |
+
"variables" => array("%useremail%", "%n%"),
|
519 |
"help" => "Defines the recipients of the email notification. Can be dynamic by using variables. Please check Documentation on how to use variables in atributes."
|
520 |
),
|
521 |
array(
|
529 |
"subcategory" => "Email Notifications",
|
530 |
"parent" => "notify",
|
531 |
"dependencies" => null,
|
532 |
+
"variables" => array("%n%"),
|
533 |
"help" => "Defines additional email headers, in case you want to sent an HTML message, or use Bcc list, or use a different From address and name or other more advanced email options."
|
534 |
),
|
535 |
array(
|
536 |
"name" => "Email Subject",
|
537 |
"attribute" => "notifysubject",
|
538 |
+
"type" => "ltext",
|
539 |
"listitems" => null,
|
540 |
"value" => WFU_NOTIFYSUBJECT,
|
541 |
"mode" => "free",
|
lib/wfu_constants.php
CHANGED
@@ -20,7 +20,7 @@ DEFINE("WFU_FILEBASELINK", "false");
|
|
20 |
DEFINE("WFU_NOTIFY", "false");
|
21 |
DEFINE("WFU_NOTIFYRECIPIENTS", "");
|
22 |
DEFINE("WFU_NOTIFYSUBJECT", __('File Upload Notification', 'wordpress-file-upload'));
|
23 |
-
DEFINE("WFU_NOTIFYMESSAGE", __("Dear Recipient
|
24 |
DEFINE("WFU_NOTIFYHEADERS", "");
|
25 |
DEFINE("WFU_ATTACHFILE", "false");
|
26 |
DEFINE("WFU_REDIRECT", "false");
|
20 |
DEFINE("WFU_NOTIFY", "false");
|
21 |
DEFINE("WFU_NOTIFYRECIPIENTS", "");
|
22 |
DEFINE("WFU_NOTIFYSUBJECT", __('File Upload Notification', 'wordpress-file-upload'));
|
23 |
+
DEFINE("WFU_NOTIFYMESSAGE", __("Dear Recipient,%n%%n% This is an automatic delivery message to notify you that a new file has been uploaded.%n%%n%Best Regards", 'wordpress-file-upload'));
|
24 |
DEFINE("WFU_NOTIFYHEADERS", "");
|
25 |
DEFINE("WFU_ATTACHFILE", "false");
|
26 |
DEFINE("WFU_REDIRECT", "false");
|
lib/wfu_functions.php
CHANGED
@@ -267,20 +267,24 @@ function wfu_send_notification_email($user, $only_filename_list, $target_path_li
|
|
267 |
$user_email = $user->user_email;
|
268 |
}
|
269 |
$notifyrecipients = trim(preg_replace('/%useremail%/', $user_email, $params["notifyrecipients"]));
|
|
|
|
|
|
|
270 |
$search = array ('/%username%/', '/%useremail%/', '/%filename%/', '/%filepath%/', '/%n%/');
|
271 |
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename_list, $target_path_list, "\n");
|
272 |
foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
|
273 |
-
|
|
|
274 |
array_push($replace, $userdata_field["value"]);
|
275 |
}
|
276 |
$notifysubject = preg_replace($search, $replace, $params["notifysubject"]);
|
277 |
$notifymessage = preg_replace($search, $replace, $params["notifymessage"]);
|
278 |
if ( $params["attachfile"] == "true" ) {
|
279 |
$attachments = explode(",", $attachment_list);
|
280 |
-
$notify_sent = wp_mail($notifyrecipients, $notifysubject, $notifymessage, $
|
281 |
}
|
282 |
else {
|
283 |
-
$notify_sent = wp_mail($notifyrecipients, $notifysubject, $notifymessage, $
|
284 |
}
|
285 |
return ( $notify_sent ? "" : WFU_WARNING_NOTIFY_NOTSENT_UNKNOWNERROR );
|
286 |
}
|
267 |
$user_email = $user->user_email;
|
268 |
}
|
269 |
$notifyrecipients = trim(preg_replace('/%useremail%/', $user_email, $params["notifyrecipients"]));
|
270 |
+
$search = array ('/%n%/');
|
271 |
+
$replace = array ("\n");
|
272 |
+
$notifyheaders = preg_replace($search, $replace, $params["notifyheaders"]);
|
273 |
$search = array ('/%username%/', '/%useremail%/', '/%filename%/', '/%filepath%/', '/%n%/');
|
274 |
$replace = array ($user_login, ( $user_email == "" ? "no email" : $user_email ), $only_filename_list, $target_path_list, "\n");
|
275 |
foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
|
276 |
+
$ind = 1 + $userdata_key;
|
277 |
+
array_push($search, '/%userdata'.$ind.'%/');
|
278 |
array_push($replace, $userdata_field["value"]);
|
279 |
}
|
280 |
$notifysubject = preg_replace($search, $replace, $params["notifysubject"]);
|
281 |
$notifymessage = preg_replace($search, $replace, $params["notifymessage"]);
|
282 |
if ( $params["attachfile"] == "true" ) {
|
283 |
$attachments = explode(",", $attachment_list);
|
284 |
+
$notify_sent = wp_mail($notifyrecipients, $notifysubject, $notifymessage, $notifyheaders, $attachments);
|
285 |
}
|
286 |
else {
|
287 |
+
$notify_sent = wp_mail($notifyrecipients, $notifysubject, $notifymessage, $notifyheaders);
|
288 |
}
|
289 |
return ( $notify_sent ? "" : WFU_WARNING_NOTIFY_NOTSENT_UNKNOWNERROR );
|
290 |
}
|
readme.txt
CHANGED
@@ -92,6 +92,11 @@ The plugin is designed not to expose website information by using sessions. Para
|
|
92 |
|
93 |
== Changelog ==
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
= 2.0.1 =
|
96 |
This is the initial release of Wordpress File Upload. Since this plugin is the successor of Inline Upload, the whole changelog since the creation of the later is included.
|
97 |
|
@@ -218,6 +223,9 @@ Initial version.
|
|
218 |
|
219 |
== Upgrade Notice ==
|
220 |
|
|
|
|
|
|
|
221 |
= 2.0.1 =
|
222 |
Optional upgrade to add new features.
|
223 |
|
@@ -451,7 +459,7 @@ For the time being, the following variables are supported:
|
|
451 |
* **%filepath%:** Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage* and *successmessage*.
|
452 |
* **%blogid%:** Is replaced by the blog_id of the current site. Can be used inside attribute *uploadpath*.
|
453 |
* **%userdataXXX%:** Is replaced by the additional message that the user has sent together with the file upload. XXX is the number of the field (starting from 0). The shortcode attribute userdata must have been set to "true". Can be used inside attributes *notifysubject*, *notifymessage*.
|
454 |
-
* **%n%:** Denotes change of line (equivalent of \n). Can be used inside
|
455 |
|
456 |
== Requirements ==
|
457 |
|
92 |
|
93 |
== Changelog ==
|
94 |
|
95 |
+
= 2.0.2 =
|
96 |
+
* Bug fixes in Dashboard Settings Shortcode Composer.
|
97 |
+
* Correction of important bug that was breaking page in some cases.
|
98 |
+
* Minor improvements of user data fields and notification email attributes.
|
99 |
+
|
100 |
= 2.0.1 =
|
101 |
This is the initial release of Wordpress File Upload. Since this plugin is the successor of Inline Upload, the whole changelog since the creation of the later is included.
|
102 |
|
223 |
|
224 |
== Upgrade Notice ==
|
225 |
|
226 |
+
= 2.0.2 =
|
227 |
+
Important upgrade to address some serious bugs.
|
228 |
+
|
229 |
= 2.0.1 =
|
230 |
Optional upgrade to add new features.
|
231 |
|
459 |
* **%filepath%:** Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes *notifysubject*, *notifymessage* and *successmessage*.
|
460 |
* **%blogid%:** Is replaced by the blog_id of the current site. Can be used inside attribute *uploadpath*.
|
461 |
* **%userdataXXX%:** Is replaced by the additional message that the user has sent together with the file upload. XXX is the number of the field (starting from 0). The shortcode attribute userdata must have been set to "true". Can be used inside attributes *notifysubject*, *notifymessage*.
|
462 |
+
* **%n%:** Denotes change of line (equivalent of \n). Can be used inside attributes *notifymessage* and *notifyheaders*. It exists because of problems of using \n inside the classic page editor of Wordpress.
|
463 |
|
464 |
== Requirements ==
|
465 |
|
wordpress_file_upload.php
CHANGED
@@ -4,7 +4,7 @@ session_start();
|
|
4 |
Plugin Name: Wordpress File Upload
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
-
Version: 2.0.
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|
4 |
Plugin Name: Wordpress File Upload
|
5 |
Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
|
6 |
Description: Simple interface to upload files from a page.
|
7 |
+
Version: 2.0.2
|
8 |
Author: Nickolas Bossinas
|
9 |
Author URI: http://www.iptanus.com
|
10 |
*/
|