Version Description
Download this release
Release Info
Developer | Cimmo |
Plugin | ![]() |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.1.0
- README_OFFICIAL.txt +24 -1
- cimy_uef_admin.php +23 -13
- cimy_uef_db.php +12 -0
- cimy_uef_email_handler.php +10 -10
- cimy_uef_functions.php +83 -0
- cimy_uef_options.php +26 -0
- cimy_uef_profile.php +58 -25
- cimy_uef_register.php +233 -28
- cimy_user_extra_fields.php +15 -8
- js/img_selection.js +21 -0
- langs/cimy_uef-bg_BG.mo +0 -0
- langs/cimy_uef-bg_BG.po +376 -328
- langs/cimy_uef-da_DK.mo +0 -0
- langs/cimy_uef-da_DK.po +376 -328
- langs/cimy_uef-de_DE.mo +0 -0
- langs/cimy_uef-de_DE.po +376 -328
- langs/cimy_uef-es_ES.mo +0 -0
- langs/cimy_uef-es_ES.po +376 -328
- langs/cimy_uef-fr_FR.mo +0 -0
- langs/cimy_uef-fr_FR.po +377 -328
- langs/cimy_uef-it_IT.mo +0 -0
- langs/cimy_uef-it_IT.po +375 -328
- langs/cimy_uef-pl_PL.mo +0 -0
- langs/cimy_uef-pl_PL.po +376 -328
- langs/cimy_uef-pt_BR.mo +0 -0
- langs/cimy_uef-pt_BR.po +377 -328
- langs/cimy_uef-ru_RU.mo +0 -0
- langs/cimy_uef-ru_RU.po +376 -328
- langs/cimy_uef-sv_SE.mo +0 -0
- langs/cimy_uef-sv_SE.po +376 -328
- readme.txt +5 -2
README_OFFICIAL.txt
CHANGED
@@ -37,8 +37,11 @@ Following WordPress hidden fields can be enabled during registration:
|
|
37 |
|
38 |
Other features:
|
39 |
* reCAPTCHA
|
|
|
40 |
* custom registration logo (non MS installations)
|
41 |
* email confirmation (non MS installations)
|
|
|
|
|
42 |
* much more!
|
43 |
|
44 |
The plug-in adds two new menu voices in the admin for the administrator and two for users.
|
@@ -458,6 +461,19 @@ HOW TO USE AVATAR SUPPORT:
|
|
458 |
Create the same directory needed for PICTURE support, avatars will be stored in a subdirectory and will not interfere with other pictures uploaded by the same plug-in
|
459 |
|
460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
KNOWN ISSUES:
|
462 |
- if you add too many fields in the "Users Extended" menu they will go out of frame
|
463 |
- some rules are never applied if you are using PHP 4.x please update to PHP 5.x as stated in the REQUIREMENTS
|
@@ -587,11 +603,18 @@ A lot of times I cannot reproduce the problem and I need more details, so if you
|
|
587 |
|
588 |
|
589 |
CHANGELOG:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
v2.0.5 - 11/05/2011
|
591 |
- Added 'view_cimy_extra_fields' capability and rule to Show field if user has this cap (thanks to Matt)
|
592 |
- A&U Extended is now renamed to Users Extended
|
593 |
- Updated Users Extended page to use newer functions and to show # of search results
|
594 |
-
- Updated equalTo field can now
|
595 |
- Fixed several html bugs in Users Extended page
|
596 |
- Fixed several (but minor) security issues
|
597 |
|
37 |
|
38 |
Other features:
|
39 |
* reCAPTCHA
|
40 |
+
* custom welcome email (non MS installations)
|
41 |
* custom registration logo (non MS installations)
|
42 |
* email confirmation (non MS installations)
|
43 |
+
* form confirmation (non MS installations)
|
44 |
+
* image upload with crop/resize functions
|
45 |
* much more!
|
46 |
|
47 |
The plug-in adds two new menu voices in the admin for the administrator and two for users.
|
461 |
Create the same directory needed for PICTURE support, avatars will be stored in a subdirectory and will not interfere with other pictures uploaded by the same plug-in
|
462 |
|
463 |
|
464 |
+
ADVANCED OPTIONS:
|
465 |
+
Advanced options have been introduced in v2.1.0 to accommodate some extra options per field.
|
466 |
+
Multiple options should be comma separated ','
|
467 |
+
|
468 |
+
[AVATAR, PICTURE]
|
469 |
+
no-thumb=1 - do not crate the thumbnail (if equalTO rule is set it will resize the original image)
|
470 |
+
crop_ratio=4:3 - fix cropping ratio
|
471 |
+
crop_x1=0,crop_y1=0,crop_x2=80,crop_y2=90 - pre-select cropping window
|
472 |
+
|
473 |
+
[AVATAR, PICTURE, FILE]
|
474 |
+
filename=default.pdf - rename the uploaded file to the given file name
|
475 |
+
|
476 |
+
|
477 |
KNOWN ISSUES:
|
478 |
- if you add too many fields in the "Users Extended" menu they will go out of frame
|
479 |
- some rules are never applied if you are using PHP 4.x please update to PHP 5.x as stated in the REQUIREMENTS
|
603 |
|
604 |
|
605 |
CHANGELOG:
|
606 |
+
v2.1.0 - 28/06/2011
|
607 |
+
- Added confirmation registration (thanks to Marcello Foglia for sponsoring it)
|
608 |
+
- Added custom welcome email (thanks to Marcello Foglia for sponsoring it)
|
609 |
+
- Added crop functionalities for picture and avatar fields (thanks to Marcello Foglia for sponsoring it)
|
610 |
+
- Added advanced options (thanks to Marcello Foglia for sponsoring it)
|
611 |
+
- Code cleanup
|
612 |
+
|
613 |
v2.0.5 - 11/05/2011
|
614 |
- Added 'view_cimy_extra_fields' capability and rule to Show field if user has this cap (thanks to Matt)
|
615 |
- A&U Extended is now renamed to Users Extended
|
616 |
- Updated Users Extended page to use newer functions and to show # of search results
|
617 |
+
- Updated equalTo field can now accommodate up to 500 characters string
|
618 |
- Fixed several html bugs in Users Extended page
|
619 |
- Fixed several (but minor) security issues
|
620 |
|
cimy_uef_admin.php
CHANGED
@@ -246,13 +246,13 @@ function cimy_admin_define_extra_fields() {
|
|
246 |
$maxLen = $max_length_value;
|
247 |
/* end overwrite previous values */
|
248 |
|
249 |
-
if ($minlen
|
250 |
$store_rule['min_length'] = intval($_POST['minlength'][$field_order]);
|
251 |
|
252 |
-
if ($exactlen
|
253 |
$store_rule['exact_length'] = intval($_POST['exactlength'][$field_order]);
|
254 |
|
255 |
-
if ($maxlen
|
256 |
$store_rule['max_length'] = intval($_POST['maxlength'][$field_order]);
|
257 |
|
258 |
$empty = $_POST['empty'][$field_order];
|
@@ -264,14 +264,15 @@ function cimy_admin_define_extra_fields() {
|
|
264 |
$email == "1" ? $store_rule['email'] = true : $store_rule['email'] = false;
|
265 |
$equal = $_POST['equal'][$field_order];
|
266 |
|
267 |
-
if ($equal
|
268 |
$store_rule['equal_to'] = stripslashes($_POST['equalto'][$field_order]);
|
269 |
|
270 |
$equalto_casesens = $_POST['equalto_casesens'][$field_order];
|
271 |
|
272 |
$equalto_regex = $_POST['equalto_regex'][$field_order];
|
273 |
}
|
274 |
-
|
|
|
275 |
$show_in_reg = $_POST['show_in_reg'][$field_order];
|
276 |
$show_in_reg == "1" ? $store_rule['show_in_reg'] = true : $store_rule['show_in_reg'] = false;
|
277 |
|
@@ -334,10 +335,8 @@ function cimy_admin_define_extra_fields() {
|
|
334 |
$maxlen = "";
|
335 |
}
|
336 |
|
337 |
-
if ($equal
|
338 |
-
if (
|
339 |
-
$errors['equalTo'] = __("Equal TO not specified", $cimy_uef_domain);
|
340 |
-
else if ($store_rule['equal_to'] == "")
|
341 |
$errors['equalTo'] = __("Equal TO not specified", $cimy_uef_domain);
|
342 |
else if ((strtoupper($store_rule['equal_to']) != "YES") && (strtoupper($store_rule['equal_to']) != "NO")) {
|
343 |
if ($type == "checkbox")
|
@@ -347,7 +346,7 @@ function cimy_admin_define_extra_fields() {
|
|
347 |
$errors['equalTo2'] = __("With radio type Equal TO can only be", $cimy_uef_domain).": [Yes, No]";
|
348 |
}
|
349 |
|
350 |
-
if (($equalto_casesens
|
351 |
$store_rule['equal_to_case_sensitive'] = true;
|
352 |
else
|
353 |
$store_rule['equal_to_case_sensitive'] = false;
|
@@ -358,7 +357,7 @@ function cimy_admin_define_extra_fields() {
|
|
358 |
$store_rule['equal_to_regex'] = false;
|
359 |
}
|
360 |
|
361 |
-
if (($value
|
362 |
if ($type == "checkbox")
|
363 |
$errors['value'] = __("With checkbox type Value can only be", $cimy_uef_domain).": [Yes, No]";
|
364 |
|
@@ -483,6 +482,7 @@ function cimy_admin_define_extra_fields() {
|
|
483 |
$selected_input["minlen"] = '';
|
484 |
$selected_input["exactlen"] = '';
|
485 |
$selected_input["maxlen"] = '';
|
|
|
486 |
|
487 |
if ($action == "add") {
|
488 |
// CAN BE MODIFIED OR NOT
|
@@ -538,6 +538,10 @@ function cimy_admin_define_extra_fields() {
|
|
538 |
if ($store_rule['email'] == true)
|
539 |
$selected_input["email"] = ' checked="checked"';
|
540 |
|
|
|
|
|
|
|
|
|
541 |
// SHOW LEVEL
|
542 |
switch ($store_rule['show_level']) {
|
543 |
case '-1':
|
@@ -707,7 +711,7 @@ function cimy_admin_define_extra_fields() {
|
|
707 |
<input type="checkbox" name="show_in_profile[0]" value="1"<?php echo $selected_input["show_in_profile"]; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
|
708 |
|
709 |
<!-- SHOW IN A&U EXTENDED -->
|
710 |
-
<input type="checkbox" name="show_in_aeu[0]" value="1"<?php echo $selected_input["show_in_aeu"]; ?> /> <?php _e("Show the field in
|
711 |
|
712 |
<!-- SHOW IN THE SEARCH ENGINE -->
|
713 |
<input type="checkbox" name="show_in_search[0]" value="1"<?php echo $selected_input["show_in_search"]; ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
|
@@ -730,6 +734,8 @@ function cimy_admin_define_extra_fields() {
|
|
730 |
|
731 |
<!-- EMAIL ADMIN -->
|
732 |
<input type="checkbox" name="email_admin[0]" value="1"<?php echo $selected_input["email_admin"]; ?> /> <?php _e("Send an email to the admin if the user changes its value", $cimy_uef_domain); ?><br />
|
|
|
|
|
733 |
|
734 |
</td>
|
735 |
<td align="center" style="vertical-align: middle;">
|
@@ -1011,6 +1017,8 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields, $err
|
|
1011 |
else
|
1012 |
$email_admin = "";
|
1013 |
|
|
|
|
|
1014 |
// SHOW LEVEL
|
1015 |
$show_anonymous = '';
|
1016 |
$show_subscriber = '';
|
@@ -1156,7 +1164,7 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields, $err
|
|
1156 |
}
|
1157 |
?>
|
1158 |
<!-- SHOW IN A&U EXTENDED -->
|
1159 |
-
<input type="checkbox" name="show_in_aeu[<?php echo $order ?>]" value="1"<?php echo $show_in_aeu ?> /> <?php _e("Show the field in
|
1160 |
|
1161 |
<!-- SHOW IN THE SEARCH -->
|
1162 |
<input type="checkbox" name="show_in_search[<?php echo $order ?>]" value="1"<?php echo $show_in_search ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
|
@@ -1185,6 +1193,8 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields, $err
|
|
1185 |
<?php
|
1186 |
}
|
1187 |
?>
|
|
|
|
|
1188 |
</td>
|
1189 |
<td align="center" style="vertical-align: middle;">
|
1190 |
<p class="submit" style="border-width: 0px;">
|
246 |
$maxLen = $max_length_value;
|
247 |
/* end overwrite previous values */
|
248 |
|
249 |
+
if (!empty($minlen))
|
250 |
$store_rule['min_length'] = intval($_POST['minlength'][$field_order]);
|
251 |
|
252 |
+
if (!empty($exactlen))
|
253 |
$store_rule['exact_length'] = intval($_POST['exactlength'][$field_order]);
|
254 |
|
255 |
+
if (!empty($maxlen))
|
256 |
$store_rule['max_length'] = intval($_POST['maxlength'][$field_order]);
|
257 |
|
258 |
$empty = $_POST['empty'][$field_order];
|
264 |
$email == "1" ? $store_rule['email'] = true : $store_rule['email'] = false;
|
265 |
$equal = $_POST['equal'][$field_order];
|
266 |
|
267 |
+
if (!empty($equal)) {
|
268 |
$store_rule['equal_to'] = stripslashes($_POST['equalto'][$field_order]);
|
269 |
|
270 |
$equalto_casesens = $_POST['equalto_casesens'][$field_order];
|
271 |
|
272 |
$equalto_regex = $_POST['equalto_regex'][$field_order];
|
273 |
}
|
274 |
+
|
275 |
+
$store_rule["advanced_options"] = stripslashes($_POST['advanced_options'][$field_order]);
|
276 |
$show_in_reg = $_POST['show_in_reg'][$field_order];
|
277 |
$show_in_reg == "1" ? $store_rule['show_in_reg'] = true : $store_rule['show_in_reg'] = false;
|
278 |
|
335 |
$maxlen = "";
|
336 |
}
|
337 |
|
338 |
+
if (!empty($equal)) {
|
339 |
+
if (empty($store_rule['equal_to']))
|
|
|
|
|
340 |
$errors['equalTo'] = __("Equal TO not specified", $cimy_uef_domain);
|
341 |
else if ((strtoupper($store_rule['equal_to']) != "YES") && (strtoupper($store_rule['equal_to']) != "NO")) {
|
342 |
if ($type == "checkbox")
|
346 |
$errors['equalTo2'] = __("With radio type Equal TO can only be", $cimy_uef_domain).": [Yes, No]";
|
347 |
}
|
348 |
|
349 |
+
if ((!empty($equalto_casesens)) && (in_array($type, $rule_equalto_case_sensitive)))
|
350 |
$store_rule['equal_to_case_sensitive'] = true;
|
351 |
else
|
352 |
$store_rule['equal_to_case_sensitive'] = false;
|
357 |
$store_rule['equal_to_regex'] = false;
|
358 |
}
|
359 |
|
360 |
+
if ((!empty($value)) && (strtoupper($value) != "YES") && (strtoupper($value) != "NO")) {
|
361 |
if ($type == "checkbox")
|
362 |
$errors['value'] = __("With checkbox type Value can only be", $cimy_uef_domain).": [Yes, No]";
|
363 |
|
482 |
$selected_input["minlen"] = '';
|
483 |
$selected_input["exactlen"] = '';
|
484 |
$selected_input["maxlen"] = '';
|
485 |
+
$selected_input["advanced_options"] = '';
|
486 |
|
487 |
if ($action == "add") {
|
488 |
// CAN BE MODIFIED OR NOT
|
538 |
if ($store_rule['email'] == true)
|
539 |
$selected_input["email"] = ' checked="checked"';
|
540 |
|
541 |
+
// ADVANCED OPTIONS
|
542 |
+
if (isset($store_rule['advanced_options']))
|
543 |
+
$selected_input["advanced_options"] = $store_rule['advanced_options'];
|
544 |
+
|
545 |
// SHOW LEVEL
|
546 |
switch ($store_rule['show_level']) {
|
547 |
case '-1':
|
711 |
<input type="checkbox" name="show_in_profile[0]" value="1"<?php echo $selected_input["show_in_profile"]; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
|
712 |
|
713 |
<!-- SHOW IN A&U EXTENDED -->
|
714 |
+
<input type="checkbox" name="show_in_aeu[0]" value="1"<?php echo $selected_input["show_in_aeu"]; ?> /> <?php _e("Show the field in Users Extended menu", $cimy_uef_domain); ?><br />
|
715 |
|
716 |
<!-- SHOW IN THE SEARCH ENGINE -->
|
717 |
<input type="checkbox" name="show_in_search[0]" value="1"<?php echo $selected_input["show_in_search"]; ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
|
734 |
|
735 |
<!-- EMAIL ADMIN -->
|
736 |
<input type="checkbox" name="email_admin[0]" value="1"<?php echo $selected_input["email_admin"]; ?> /> <?php _e("Send an email to the admin if the user changes its value", $cimy_uef_domain); ?><br />
|
737 |
+
<!-- ADVANCED OPTIONS -->
|
738 |
+
<?php _e("Advanced options", $cimy_uef_domain); ?>: <input type="text" name="advanced_options[0]" maxlength="500" value="<?php echo $selected_input["advanced_options"]; ?>"/><br />
|
739 |
|
740 |
</td>
|
741 |
<td align="center" style="vertical-align: middle;">
|
1017 |
else
|
1018 |
$email_admin = "";
|
1019 |
|
1020 |
+
$advanced_options = $rules['advanced_options'];
|
1021 |
+
|
1022 |
// SHOW LEVEL
|
1023 |
$show_anonymous = '';
|
1024 |
$show_subscriber = '';
|
1164 |
}
|
1165 |
?>
|
1166 |
<!-- SHOW IN A&U EXTENDED -->
|
1167 |
+
<input type="checkbox" name="show_in_aeu[<?php echo $order ?>]" value="1"<?php echo $show_in_aeu ?> /> <?php _e("Show the field in Users Extended menu", $cimy_uef_domain); ?><br />
|
1168 |
|
1169 |
<!-- SHOW IN THE SEARCH -->
|
1170 |
<input type="checkbox" name="show_in_search[<?php echo $order ?>]" value="1"<?php echo $show_in_search ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
|
1193 |
<?php
|
1194 |
}
|
1195 |
?>
|
1196 |
+
<!-- ADVANCED OPTIONS -->
|
1197 |
+
<?php _e("Advanced options", $cimy_uef_domain); ?>: <input type="text" name="advanced_options[<?php echo $order ?>]" maxlength="500" value="<?php echo $advanced_options; ?>"/><br />
|
1198 |
</td>
|
1199 |
<td align="center" style="vertical-align: middle;">
|
1200 |
<p class="submit" style="border-width: 0px;">
|
cimy_uef_db.php
CHANGED
@@ -209,6 +209,13 @@ function cimy_plugin_install () {
|
|
209 |
}
|
210 |
}
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
$options['version'] = $cimy_uef_version;
|
213 |
|
214 |
cimy_set_options($options);
|
@@ -279,6 +286,10 @@ function cimy_manage_db($command) {
|
|
279 |
if (!cimy_check_admin('activate_plugins'))
|
280 |
return;
|
281 |
|
|
|
|
|
|
|
|
|
282 |
$options = array(
|
283 |
'extra_fields_title' => __("Extra Fields", $cimy_uef_domain),
|
284 |
'users_per_page' => 50,
|
@@ -286,6 +297,7 @@ function cimy_manage_db($command) {
|
|
286 |
'wp_hidden_fields' => array(),
|
287 |
'fieldset_title' => '',
|
288 |
'captcha' => 'none',
|
|
|
289 |
);
|
290 |
|
291 |
switch ($command) {
|
209 |
}
|
210 |
}
|
211 |
|
212 |
+
if (version_compare($options['version'], "2.1.0-beta1", "<=") === true) {
|
213 |
+
$welcome_email = sprintf(__('Username: %s'), "USERNAME") . "\r\n";
|
214 |
+
$welcome_email .= sprintf(__('Password: %s'), "PASSWORD") . "\r\n";
|
215 |
+
$welcome_email .= "LOGINLINK" . "\r\n";
|
216 |
+
$options["welcome_email"] = $welcome_email;
|
217 |
+
}
|
218 |
+
|
219 |
$options['version'] = $cimy_uef_version;
|
220 |
|
221 |
cimy_set_options($options);
|
286 |
if (!cimy_check_admin('activate_plugins'))
|
287 |
return;
|
288 |
|
289 |
+
$welcome_email = sprintf(__('Username: %s'), "USERNAME") . "\r\n";
|
290 |
+
$welcome_email .= sprintf(__('Password: %s'), "PASSWORD") . "\r\n";
|
291 |
+
$welcome_email .= "LOGINLINK" . "\r\n";
|
292 |
+
|
293 |
$options = array(
|
294 |
'extra_fields_title' => __("Extra Fields", $cimy_uef_domain),
|
295 |
'users_per_page' => 50,
|
297 |
'wp_hidden_fields' => array(),
|
298 |
'fieldset_title' => '',
|
299 |
'captcha' => 'none',
|
300 |
+
'welcome_email' => $welcome_email,
|
301 |
);
|
302 |
|
303 |
switch ($command) {
|
cimy_uef_email_handler.php
CHANGED
@@ -9,22 +9,22 @@ if ( !function_exists('wp_new_user_notification') ) :
|
|
9 |
*/
|
10 |
function wp_new_user_notification($user_id, $plaintext_pass = '') {
|
11 |
if (isset($_POST["cimy_uef_wp_PASSWORD"]))
|
12 |
-
|
13 |
|
14 |
$options = cimy_get_options();
|
15 |
if (!is_multisite()) {
|
16 |
if (!$options["confirm_email"])
|
17 |
-
wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
|
18 |
// if confirmation email is enabled delete the default_password_nag but checks first if has not been done on top of this function!
|
19 |
else if (!isset($_POST["cimy_uef_wp_PASSWORD"]))
|
20 |
-
|
21 |
}
|
22 |
else
|
23 |
wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
|
24 |
}
|
25 |
endif;
|
26 |
|
27 |
-
function wp_new_user_notification_original($user_id, $plaintext_pass = '', $include_fields = false, $activation_data = false) {
|
28 |
$user = new WP_User($user_id);
|
29 |
|
30 |
$user_login = stripslashes($user->user_login);
|
@@ -54,14 +54,14 @@ function wp_new_user_notification_original($user_id, $plaintext_pass = '', $incl
|
|
54 |
if ( empty($plaintext_pass) )
|
55 |
return;
|
56 |
|
57 |
-
$
|
58 |
-
$
|
59 |
|
60 |
if ($include_fields)
|
61 |
-
$
|
62 |
-
$
|
63 |
|
64 |
-
wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $
|
65 |
}
|
66 |
|
67 |
function cimy_uef_mail_fields($user = false, $activation_data = false) {
|
@@ -270,7 +270,7 @@ function cimy_uef_activate_signup($key) {
|
|
270 |
return new WP_Error( 'user_already_exists', __( 'That username is already activated.', $cimy_uef_domain), $signup);
|
271 |
|
272 |
$options = cimy_get_options();
|
273 |
-
wp_new_user_notification_original($user_id, $password, $options["mail_include_fields"], $meta);
|
274 |
return array('user_id' => $user_id, 'password' => $password, 'meta' => $meta);
|
275 |
}
|
276 |
|
9 |
*/
|
10 |
function wp_new_user_notification($user_id, $plaintext_pass = '') {
|
11 |
if (isset($_POST["cimy_uef_wp_PASSWORD"]))
|
12 |
+
delete_user_meta($user_id, 'default_password_nag');
|
13 |
|
14 |
$options = cimy_get_options();
|
15 |
if (!is_multisite()) {
|
16 |
if (!$options["confirm_email"])
|
17 |
+
wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"], false, $options["welcome_email"]);
|
18 |
// if confirmation email is enabled delete the default_password_nag but checks first if has not been done on top of this function!
|
19 |
else if (!isset($_POST["cimy_uef_wp_PASSWORD"]))
|
20 |
+
delete_user_meta($user_id, 'default_password_nag');
|
21 |
}
|
22 |
else
|
23 |
wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
|
24 |
}
|
25 |
endif;
|
26 |
|
27 |
+
function wp_new_user_notification_original($user_id, $plaintext_pass = '', $include_fields = false, $activation_data = false, $welcome_email = '') {
|
28 |
$user = new WP_User($user_id);
|
29 |
|
30 |
$user_login = stripslashes($user->user_login);
|
54 |
if ( empty($plaintext_pass) )
|
55 |
return;
|
56 |
|
57 |
+
$welcome_email = str_replace("USERNAME", $user_login, $welcome_email);
|
58 |
+
$welcome_email = str_replace("PASSWORD", $plaintext_pass, $welcome_email);
|
59 |
|
60 |
if ($include_fields)
|
61 |
+
$welcome_email .= cimy_uef_mail_fields($user, $activation_data);
|
62 |
+
$welcome_email = str_replace("LOGINLINK", wp_login_url(), $welcome_email);
|
63 |
|
64 |
+
wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $welcome_email, $headers);
|
65 |
}
|
66 |
|
67 |
function cimy_uef_mail_fields($user = false, $activation_data = false) {
|
270 |
return new WP_Error( 'user_already_exists', __( 'That username is already activated.', $cimy_uef_domain), $signup);
|
271 |
|
272 |
$options = cimy_get_options();
|
273 |
+
wp_new_user_notification_original($user_id, $password, $options["mail_include_fields"], $meta, $options["welcome_email"]);
|
274 |
return array('user_id' => $user_id, 'password' => $password, 'meta' => $meta);
|
275 |
}
|
276 |
|
cimy_uef_functions.php
CHANGED
@@ -529,4 +529,87 @@ function cimy_uef_is_field_disabled($type, $edit_rule, $old_value) {
|
|
529 |
return false;
|
530 |
}
|
531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
?>
|
529 |
return false;
|
530 |
}
|
531 |
|
532 |
+
function cimy_uef_crop_image($file, $field_id_data) {
|
533 |
+
if (!empty($_POST[$field_id_data."_button"]) && (!empty($_POST[$field_id_data.'_w'])) && (!empty($_POST[$field_id_data.'_h']))) {
|
534 |
+
$targ_w = $_POST[$field_id_data.'_w'];
|
535 |
+
$targ_h = $_POST[$field_id_data.'_h'];
|
536 |
+
$jpeg_quality = 100;
|
537 |
+
|
538 |
+
$src = $file;
|
539 |
+
$dst = $file;
|
540 |
+
$size = getimagesize($src);
|
541 |
+
switch ($size["mime"]) {
|
542 |
+
case "image/jpeg":
|
543 |
+
$img_r = imagecreatefromjpeg($src); //jpeg file
|
544 |
+
break;
|
545 |
+
case "image/gif":
|
546 |
+
$img_r = imagecreatefromgif($src); //gif file
|
547 |
+
break;
|
548 |
+
case "image/png":
|
549 |
+
$img_r = imagecreatefrompng($src); //png file
|
550 |
+
break;
|
551 |
+
default:
|
552 |
+
$img_r = false;
|
553 |
+
}
|
554 |
+
if (!empty($img_r)) {
|
555 |
+
$dst_r = ImageCreateTrueColor($targ_w, $targ_h);
|
556 |
+
imagecopyresampled($dst_r, $img_r, 0, 0, $_POST[$field_id_data.'_x1'],$_POST[$field_id_data.'_y1'], $targ_w, $targ_h, $targ_w, $targ_h);
|
557 |
+
switch ($size["mime"]) {
|
558 |
+
case "image/jpeg":
|
559 |
+
imagejpeg($dst_r, $dst, $jpeg_quality); //jpeg file
|
560 |
+
break;
|
561 |
+
case "image/gif":
|
562 |
+
imagegif($dst_r, $dst); //gif file
|
563 |
+
break;
|
564 |
+
case "image/png":
|
565 |
+
imagepng($dst_r, $dst); //png file
|
566 |
+
break;
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
}
|
571 |
+
|
572 |
+
function cimy_uef_parse_advanced_options($options) {
|
573 |
+
$advanced_options = array();
|
574 |
+
$adv_array = explode(",", $options);
|
575 |
+
foreach ($adv_array as $item) {
|
576 |
+
$tmp_array = explode("=", $item);
|
577 |
+
if (count($tmp_array) < 2)
|
578 |
+
continue;
|
579 |
+
if (strtolower($tmp_array[0]) == "filename")
|
580 |
+
$advanced_options["filename"] = $tmp_array[1];
|
581 |
+
else if (strtolower($tmp_array[0]) == "crop_ratio")
|
582 |
+
$advanced_options["crop_ratio"] = $tmp_array[1];
|
583 |
+
else if (strtolower($tmp_array[0]) == "crop_x1")
|
584 |
+
$advanced_options["crop_x1"] = $tmp_array[1];
|
585 |
+
else if (strtolower($tmp_array[0]) == "crop_y1")
|
586 |
+
$advanced_options["crop_y1"] = $tmp_array[1];
|
587 |
+
else if (strtolower($tmp_array[0]) == "crop_x2")
|
588 |
+
$advanced_options["crop_x2"] = $tmp_array[1];
|
589 |
+
else if (strtolower($tmp_array[0]) == "crop_y2")
|
590 |
+
$advanced_options["crop_y2"] = $tmp_array[1];
|
591 |
+
else if (strtolower($tmp_array[0]) == "no-thumb")
|
592 |
+
$advanced_options["no-thumb"] = $tmp_array[1];
|
593 |
+
}
|
594 |
+
return $advanced_options;
|
595 |
+
}
|
596 |
+
|
597 |
+
function cimy_uef_get_dir_or_filename($user_login, $url="", $is_thumbnail=false) {
|
598 |
+
global $cimy_uef_plugins_dir, $cuef_upload_path;
|
599 |
+
|
600 |
+
$blog_path = $cuef_upload_path;
|
601 |
+
if (($cimy_uef_plugins_dir == "plugins") && (is_multisite())) {
|
602 |
+
global $blog_id;
|
603 |
+
|
604 |
+
$blog_path .= $blog_id."/";
|
605 |
+
}
|
606 |
+
|
607 |
+
if (empty($url))
|
608 |
+
return $blog_path.$user_login;
|
609 |
+
else if ($is_thumbnail)
|
610 |
+
return $blog_path.$user_login."/".cimy_get_thumb_path(basename($url));
|
611 |
+
else
|
612 |
+
return $blog_path.$user_login."/".basename($url);
|
613 |
+
}
|
614 |
+
|
615 |
?>
|
cimy_uef_options.php
CHANGED
@@ -24,6 +24,7 @@ function cimy_save_options() {
|
|
24 |
$options['aue_hidden_fields'] = array();
|
25 |
$options['wp_hidden_fields'] = array();
|
26 |
|
|
|
27 |
$options['extra_fields_title'] = stripslashes($_POST['extra_fields_title']);
|
28 |
$options['extra_fields_title'] = substr($options['extra_fields_title'], 0, $max_length_extra_fields_title);
|
29 |
|
@@ -120,6 +121,7 @@ function cimy_save_options() {
|
|
120 |
$action = "add";
|
121 |
|
122 |
(isset($_POST['confirm_email'])) ? $options['confirm_email'] = true : $options['confirm_email'] = false;
|
|
|
123 |
if ($options['confirm_email'])
|
124 |
cimy_force_signup_table_creation();
|
125 |
(isset($_POST['redirect_to'])) ? $options['redirect_to'] = $_POST['redirect_to'] : $options['redirect_to'] = "";
|
@@ -381,6 +383,8 @@ function cimy_show_options($results, $embedded) {
|
|
381 |
$options['fieldset_title'] = esc_attr($options['fieldset_title']);
|
382 |
$options['mail_include_fields'] ? $mail_include_fields = ' checked="checked"' : $mail_include_fields = '';
|
383 |
$options['confirm_email'] ? $confirm_email = ' checked="checked"' : $confirm_email = '';
|
|
|
|
|
384 |
$options['redirect_to'] == "source" ? $redirect_to_source = ' checked="checked"' : $redirect_to_source = '';
|
385 |
($options['captcha'] == "recaptcha") ? $recaptcha = ' checked="checked"' : $recaptcha = '';
|
386 |
($options['captcha'] == "securimage") ? $securimage = ' checked="checked"' : $securimage = '';
|
@@ -414,7 +418,9 @@ function cimy_show_options($results, $embedded) {
|
|
414 |
$db_options = false;
|
415 |
$options['fieldset_title'] = "";
|
416 |
$mail_include_fields= '';
|
|
|
417 |
$confirm_email = '';
|
|
|
418 |
$redirect_to_source = '';
|
419 |
$recaptcha = '';
|
420 |
$recaptcha_public_key = '';
|
@@ -583,6 +589,26 @@ function cimy_show_options($results, $embedded) {
|
|
583 |
?>
|
584 |
</td>
|
585 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
<tr>
|
587 |
<th scope="row">
|
588 |
<input type="checkbox" name="redirect_to" value="source"<?php echo $redirect_to_source; ?> />
|
24 |
$options['aue_hidden_fields'] = array();
|
25 |
$options['wp_hidden_fields'] = array();
|
26 |
|
27 |
+
$options['welcome_email'] = stripslashes($_POST['welcome_email']);
|
28 |
$options['extra_fields_title'] = stripslashes($_POST['extra_fields_title']);
|
29 |
$options['extra_fields_title'] = substr($options['extra_fields_title'], 0, $max_length_extra_fields_title);
|
30 |
|
121 |
$action = "add";
|
122 |
|
123 |
(isset($_POST['confirm_email'])) ? $options['confirm_email'] = true : $options['confirm_email'] = false;
|
124 |
+
(isset($_POST['confirm_form'])) ? $options['confirm_form'] = true : $options['confirm_form'] = false;
|
125 |
if ($options['confirm_email'])
|
126 |
cimy_force_signup_table_creation();
|
127 |
(isset($_POST['redirect_to'])) ? $options['redirect_to'] = $_POST['redirect_to'] : $options['redirect_to'] = "";
|
383 |
$options['fieldset_title'] = esc_attr($options['fieldset_title']);
|
384 |
$options['mail_include_fields'] ? $mail_include_fields = ' checked="checked"' : $mail_include_fields = '';
|
385 |
$options['confirm_email'] ? $confirm_email = ' checked="checked"' : $confirm_email = '';
|
386 |
+
$options['confirm_form'] ? $confirm_form = ' checked="checked"' : $confirm_form = '';
|
387 |
+
$welcome_email = $options['welcome_email'];
|
388 |
$options['redirect_to'] == "source" ? $redirect_to_source = ' checked="checked"' : $redirect_to_source = '';
|
389 |
($options['captcha'] == "recaptcha") ? $recaptcha = ' checked="checked"' : $recaptcha = '';
|
390 |
($options['captcha'] == "securimage") ? $securimage = ' checked="checked"' : $securimage = '';
|
418 |
$db_options = false;
|
419 |
$options['fieldset_title'] = "";
|
420 |
$mail_include_fields= '';
|
421 |
+
$welcome_email = '';
|
422 |
$confirm_email = '';
|
423 |
+
$confirm_form = '';
|
424 |
$redirect_to_source = '';
|
425 |
$recaptcha = '';
|
426 |
$recaptcha_public_key = '';
|
589 |
?>
|
590 |
</td>
|
591 |
</tr>
|
592 |
+
<tr>
|
593 |
+
<th scope="row">
|
594 |
+
<input type="checkbox" name="confirm_form" value="1"<?php echo $confirm_form; ?> />
|
595 |
+
<?php _e("Enable form confirmation", $cimy_uef_domain); ?>
|
596 |
+
</th>
|
597 |
+
<td>
|
598 |
+
<?php
|
599 |
+
_e("a summary of the registration form will be presented to the user", $cimy_uef_domain);
|
600 |
+
?>
|
601 |
+
</td>
|
602 |
+
</tr>
|
603 |
+
<tr>
|
604 |
+
<th scope="row">
|
605 |
+
<?php _e("Customize welcome email sent to the new user", $cimy_uef_domain); ?>
|
606 |
+
</th>
|
607 |
+
<td>
|
608 |
+
<textarea name="welcome_email" rows="6" cols="50"><?php echo esc_html($welcome_email); ?></textarea><br />
|
609 |
+
<?php _e("if you change or remove the placeholders then the email won't have the correct information", $cimy_uef_domain); ?>
|
610 |
+
</td>
|
611 |
+
</tr>
|
612 |
<tr>
|
613 |
<th scope="row">
|
614 |
<input type="checkbox" name="redirect_to" value="source"<?php echo $redirect_to_source; ?> />
|
cimy_uef_profile.php
CHANGED
@@ -50,6 +50,7 @@ function cimy_extract_ExtraFields() {
|
|
50 |
|
51 |
$radio_checked = array();
|
52 |
$upload_file_function = false;
|
|
|
53 |
$current_fieldset = -1;
|
54 |
$tiny_mce_objects = "";
|
55 |
|
@@ -74,6 +75,8 @@ function cimy_extract_ExtraFields() {
|
|
74 |
$description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
|
75 |
$fieldset = $thisField['FIELDSET'];
|
76 |
$input_name = $fields_name_prefix.esc_attr($name);
|
|
|
|
|
77 |
|
78 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
79 |
// apply only for EXTRA FIELDS
|
@@ -275,10 +278,11 @@ function cimy_extract_ExtraFields() {
|
|
275 |
|
276 |
case "avatar":
|
277 |
case "picture":
|
|
|
278 |
case "file":
|
279 |
$allowed_exts = '';
|
280 |
if (isset($rules['equal_to']))
|
281 |
-
if ($rules['equal_to']
|
282 |
$allowed_exts = "'".implode("', '", explode(",", $rules['equal_to']))."'";
|
283 |
|
284 |
// javascript will be added later
|
@@ -357,7 +361,7 @@ function cimy_extract_ExtraFields() {
|
|
357 |
|
358 |
echo "\t\t<td>";
|
359 |
|
360 |
-
if (($description
|
361 |
echo $description."<br />";
|
362 |
|
363 |
if (in_array($type, $cimy_uef_file_types)) {
|
@@ -366,35 +370,29 @@ function cimy_extract_ExtraFields() {
|
|
366 |
|
367 |
if ($type == "avatar") {
|
368 |
$user_email = $profileuser->user_email;
|
369 |
-
|
|
|
|
|
370 |
}
|
371 |
|
372 |
-
if ((in_array($type, $cimy_uef_file_types)) && ($value
|
373 |
-
global $cimy_uef_plugins_dir;
|
374 |
-
|
375 |
-
$blog_path = $cuef_upload_path;
|
376 |
$old_value = basename($old_value);
|
377 |
-
|
378 |
-
if (($cimy_uef_plugins_dir == "plugins") && (is_multisite())) {
|
379 |
-
global $blog_id;
|
380 |
-
|
381 |
-
$blog_path .= $blog_id."/";
|
382 |
-
}
|
383 |
-
|
384 |
$user_login = $profileuser->user_login;
|
385 |
|
386 |
if ($type == "picture") {
|
387 |
$value_thumb = cimy_get_thumb_path($value);
|
388 |
-
$
|
389 |
-
$
|
|
|
|
|
390 |
|
391 |
echo "\n\t\t";
|
392 |
if (is_file($file_thumb)) {
|
393 |
-
echo '<a target="_blank" href="'.$value.'"><img src="'.$value_thumb.'" alt="picture" /></a><br />';
|
394 |
echo "\n\t\t";
|
395 |
}
|
396 |
else if (is_file($file_on_server)) {
|
397 |
-
echo '<img src="'.$value.'" alt="picture" /><br />';
|
398 |
echo "\n\t\t";
|
399 |
}
|
400 |
}
|
@@ -418,7 +416,30 @@ function cimy_extract_ExtraFields() {
|
|
418 |
// echo '<input type="hidden" name="'.$input_name.'_oldfile" value="'.basename($value).'" />';
|
419 |
// echo "\n\t\t";
|
420 |
}
|
421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
echo '<input type="checkbox" name="'.$input_name.'_del" value="1" style="width:auto; border:0; background:white;"'.$dis_delete_img.' />';
|
423 |
|
424 |
if ($type == "file") {
|
@@ -458,7 +479,7 @@ function cimy_extract_ExtraFields() {
|
|
458 |
else
|
459 |
echo $obj_value;
|
460 |
|
461 |
-
if (($description
|
462 |
if (($type == "textarea") || ($type == "textarea-rich"))
|
463 |
echo "<br />";
|
464 |
else
|
@@ -473,9 +494,14 @@ function cimy_extract_ExtraFields() {
|
|
473 |
|
474 |
echo "</table>";
|
475 |
|
476 |
-
if ($tiny_mce_objects
|
477 |
require_once($cuef_plugin_dir.'/cimy_uef_init_mce.php');
|
478 |
}
|
|
|
|
|
|
|
|
|
|
|
479 |
|
480 |
if ($upload_file_function)
|
481 |
wp_print_scripts("cimy_uef_upload_file");
|
@@ -519,6 +545,8 @@ function cimy_update_ExtraFields() {
|
|
519 |
$label = $thisField["LABEL"];
|
520 |
$rules = $thisField["RULES"];
|
521 |
$input_name = $fields_name_prefix.$wpdb->escape($name);
|
|
|
|
|
522 |
|
523 |
cimy_insert_ExtraFields_if_not_exist($get_user_id, $field_id);
|
524 |
|
@@ -616,9 +644,9 @@ function cimy_update_ExtraFields() {
|
|
616 |
else
|
617 |
$old_file = false;
|
618 |
|
619 |
-
$field_value = cimy_manage_upload($input_name, $user_login, $rules, $old_file, $delete_file, $type);
|
620 |
|
621 |
-
if (($field_value
|
622 |
if ($i > 0)
|
623 |
$field_ids.= ", ";
|
624 |
else
|
@@ -632,8 +660,13 @@ function cimy_update_ExtraFields() {
|
|
632 |
$query.= " WHEN ".$field_id." THEN ";
|
633 |
$query.= $value;
|
634 |
}
|
635 |
-
else
|
636 |
$prev_value = $value;
|
|
|
|
|
|
|
|
|
|
|
637 |
}
|
638 |
|
639 |
if ($type == 'checkbox') {
|
@@ -696,4 +729,4 @@ function cimy_update_ExtraFields() {
|
|
696 |
}
|
697 |
}
|
698 |
|
699 |
-
?>
|
50 |
|
51 |
$radio_checked = array();
|
52 |
$upload_file_function = false;
|
53 |
+
$crop_image_function = false;
|
54 |
$current_fieldset = -1;
|
55 |
$tiny_mce_objects = "";
|
56 |
|
75 |
$description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
|
76 |
$fieldset = $thisField['FIELDSET'];
|
77 |
$input_name = $fields_name_prefix.esc_attr($name);
|
78 |
+
$field_id_data = $input_name."_".$field_id."_data";
|
79 |
+
$advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
|
80 |
|
81 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
82 |
// apply only for EXTRA FIELDS
|
278 |
|
279 |
case "avatar":
|
280 |
case "picture":
|
281 |
+
$crop_image_function = true;
|
282 |
case "file":
|
283 |
$allowed_exts = '';
|
284 |
if (isset($rules['equal_to']))
|
285 |
+
if (!empty($rules['equal_to']))
|
286 |
$allowed_exts = "'".implode("', '", explode(",", $rules['equal_to']))."'";
|
287 |
|
288 |
// javascript will be added later
|
361 |
|
362 |
echo "\t\t<td>";
|
363 |
|
364 |
+
if ((!empty($description)) && (($type == "picture") || ($type == "picture-url")))
|
365 |
echo $description."<br />";
|
366 |
|
367 |
if (in_array($type, $cimy_uef_file_types)) {
|
370 |
|
371 |
if ($type == "avatar") {
|
372 |
$user_email = $profileuser->user_email;
|
373 |
+
$img_avatar = get_avatar($user_email, $size = '128');
|
374 |
+
$img_avatar = str_replace("<img", "<img id='$field_id_data'", $img_avatar);
|
375 |
+
echo '<div id="profpic">'.$img_avatar."</div>\n\t\t";
|
376 |
}
|
377 |
|
378 |
+
if ((in_array($type, $cimy_uef_file_types)) && (!empty($value))) {
|
|
|
|
|
|
|
379 |
$old_value = basename($old_value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
$user_login = $profileuser->user_login;
|
381 |
|
382 |
if ($type == "picture") {
|
383 |
$value_thumb = cimy_get_thumb_path($value);
|
384 |
+
$file_on_server = cimy_uef_get_dir_or_filename($user_login, $value, false);
|
385 |
+
$file_thumb = cimy_uef_get_dir_or_filename($user_login, $value, true);
|
386 |
+
if ((!empty($advanced_options["no-thumb"])) && (is_file($file_thumb)))
|
387 |
+
rename($file_thumb, $file_on_server);
|
388 |
|
389 |
echo "\n\t\t";
|
390 |
if (is_file($file_thumb)) {
|
391 |
+
echo '<a target="_blank" href="'.$value.'"><img id="'.$field_id_data.'" src="'.$value_thumb.'" alt="picture" /></a><br />';
|
392 |
echo "\n\t\t";
|
393 |
}
|
394 |
else if (is_file($file_on_server)) {
|
395 |
+
echo '<img id="'.$field_id_data.'" src="'.$value.'" alt="picture" /><br />';
|
396 |
echo "\n\t\t";
|
397 |
}
|
398 |
}
|
416 |
// echo '<input type="hidden" name="'.$input_name.'_oldfile" value="'.basename($value).'" />';
|
417 |
// echo "\n\t\t";
|
418 |
}
|
419 |
+
|
420 |
+
if ((($type == "picture") || ($type == "avatar")) && ((empty($rules["equal_to"])) || ($advanced_options["no-thumb"]))) {
|
421 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_x1\" id=\"".$field_id_data."_x1\" value=\"\" />";
|
422 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_y1\" id=\"".$field_id_data."_y1\" value=\"\" />";
|
423 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_x2\" id=\"".$field_id_data."_x2\" value=\"\" />";
|
424 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_y2\" id=\"".$field_id_data."_y2\" value=\"\" />";
|
425 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_w\" id=\"".$field_id_data."_w\" value=\"\" />";
|
426 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_h\" id=\"".$field_id_data."_h\" value=\"\" />";
|
427 |
+
// echo "<p class=\"submit\"><input type=\"submit\" name=\"".$field_id_data."_button\" class=\"button-primary\" value=\"".__("Edit Image")."\" /></p>";
|
428 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_button\" id=\"".$field_id_data."_button\" value=\"1\" />";
|
429 |
+
$imgarea_options = "handles: true, fadeSpeed: 200, onSelectChange: preview";
|
430 |
+
if ((isset($advanced_options["crop_x1"])) && (isset($advanced_options["crop_y1"])) && (isset($advanced_options["crop_x2"])) && (isset($advanced_options["crop_y2"]))) {
|
431 |
+
$imgarea_options.= ", x1: ".intval($advanced_options["crop_x1"]);
|
432 |
+
$imgarea_options.= ", y1: ".intval($advanced_options["crop_y1"]);
|
433 |
+
$imgarea_options.= ", x2: ".intval($advanced_options["crop_x2"]);
|
434 |
+
$imgarea_options.= ", y2: ".intval($advanced_options["crop_y2"]);
|
435 |
+
}
|
436 |
+
|
437 |
+
if (!empty($advanced_options["crop_ratio"]))
|
438 |
+
$imgarea_options.= ", aspectRatio: '".esc_js($advanced_options["crop_ratio"])."'";
|
439 |
+
else if ($type == "avatar")
|
440 |
+
$imgarea_options.= ", aspectRatio: '1:1'";
|
441 |
+
echo "<script type='text/javascript'>jQuery(document).ready(function () { jQuery('#".esc_js($field_id_data)."').imgAreaSelect({ ".$imgarea_options." }); });</script>";
|
442 |
+
}
|
443 |
echo '<input type="checkbox" name="'.$input_name.'_del" value="1" style="width:auto; border:0; background:white;"'.$dis_delete_img.' />';
|
444 |
|
445 |
if ($type == "file") {
|
479 |
else
|
480 |
echo $obj_value;
|
481 |
|
482 |
+
if ((!empty($description)) && ($type != "picture") && ($type != "picture-url")) {
|
483 |
if (($type == "textarea") || ($type == "textarea-rich"))
|
484 |
echo "<br />";
|
485 |
else
|
494 |
|
495 |
echo "</table>";
|
496 |
|
497 |
+
if (!empty($tiny_mce_objects)) {
|
498 |
require_once($cuef_plugin_dir.'/cimy_uef_init_mce.php');
|
499 |
}
|
500 |
+
if ($crop_image_function) {
|
501 |
+
wp_print_scripts('imgareaselect');
|
502 |
+
wp_print_styles('imgareaselect');
|
503 |
+
wp_print_scripts('cimy_uef_img_selection');
|
504 |
+
}
|
505 |
|
506 |
if ($upload_file_function)
|
507 |
wp_print_scripts("cimy_uef_upload_file");
|
545 |
$label = $thisField["LABEL"];
|
546 |
$rules = $thisField["RULES"];
|
547 |
$input_name = $fields_name_prefix.$wpdb->escape($name);
|
548 |
+
$field_id_data = $input_name."_".$field_id."_data";
|
549 |
+
$advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
|
550 |
|
551 |
cimy_insert_ExtraFields_if_not_exist($get_user_id, $field_id);
|
552 |
|
644 |
else
|
645 |
$old_file = false;
|
646 |
|
647 |
+
$field_value = cimy_manage_upload($input_name, $user_login, $rules, $old_file, $delete_file, $type, (!empty($advanced_options["filename"])) ? $advanced_options["filename"] : "");
|
648 |
|
649 |
+
if ((!empty($field_value)) || ($delete_file)) {
|
650 |
if ($i > 0)
|
651 |
$field_ids.= ", ";
|
652 |
else
|
660 |
$query.= " WHEN ".$field_id." THEN ";
|
661 |
$query.= $value;
|
662 |
}
|
663 |
+
else {
|
664 |
$prev_value = $value;
|
665 |
+
|
666 |
+
$file_on_server = cimy_uef_get_dir_or_filename($user_login, $old_file, false);
|
667 |
+
if (($type == "picture") || ($type == "avatar"))
|
668 |
+
cimy_uef_crop_image($file_on_server, $field_id_data);
|
669 |
+
}
|
670 |
}
|
671 |
|
672 |
if ($type == 'checkbox') {
|
729 |
}
|
730 |
}
|
731 |
|
732 |
+
?>
|
cimy_uef_register.php
CHANGED
@@ -118,13 +118,14 @@ function cimy_register_user_extra_fields($user_id, $password="", $meta=array())
|
|
118 |
}
|
119 |
|
120 |
foreach ($fields as $thisField) {
|
121 |
-
|
122 |
$type = $thisField["TYPE"];
|
123 |
$name = $thisField["NAME"];
|
124 |
$field_id = $thisField["ID"];
|
125 |
$label = $thisField["LABEL"];
|
126 |
$rules = $thisField["RULES"];
|
127 |
$input_name = $prefix.$wpdb->escape($name);
|
|
|
|
|
128 |
|
129 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
130 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
@@ -163,7 +164,20 @@ function cimy_register_user_extra_fields($user_id, $password="", $meta=array())
|
|
163 |
}
|
164 |
|
165 |
if (in_array($type, $cimy_uef_file_types)) {
|
166 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
else {
|
169 |
if ($type == "picture-url")
|
@@ -317,6 +331,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
317 |
$description = $thisField['DESCRIPTION'];
|
318 |
$input_name = $prefix.$wpdb->escape($name);
|
319 |
$unique_id = $prefix.$field_id;
|
|
|
320 |
|
321 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
322 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
@@ -366,8 +381,15 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
366 |
$label = esc_html($ret['label']);
|
367 |
$html = $ret['html'];
|
368 |
}
|
369 |
-
|
370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
// filesize in Byte transformed in KiloByte
|
372 |
$file_size = $_FILES[$input_name]['size'] / 1024;
|
373 |
$file_type = $_FILES[$input_name]['type'];
|
@@ -386,7 +408,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
386 |
}
|
387 |
|
388 |
// if the flag can be empty is NOT set OR the field is not empty then other check can be useful, otherwise skip all
|
389 |
-
if ((!$rules['can_be_empty']) || ($value
|
390 |
if (($i == 1) && ($input_name == ($prefix."PASSWORD2"))) {
|
391 |
if ($value != $_POST[$prefix."PASSWORD"])
|
392 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('does not match.', $cimy_uef_domain));
|
@@ -396,14 +418,14 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
396 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('hasn’t a correct email syntax.', $cimy_uef_domain));
|
397 |
}
|
398 |
|
399 |
-
if ((!$rules['can_be_empty']) && (in_array($type, $rule_canbeempty)) && ($value
|
400 |
$empty_error = true;
|
401 |
|
402 |
// IF 1. it's a file type
|
403 |
// AND 2. there is an old one uploaded
|
404 |
// AND 3. this old one is not gonna be deleted
|
405 |
// THEN do not throw the empty error.
|
406 |
-
if ((in_array($type, $cimy_uef_file_types)) && ($old_file
|
407 |
$empty_error = false;
|
408 |
|
409 |
if ($empty_error)
|
@@ -446,7 +468,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
446 |
|
447 |
// CHECK IF IT IS A REAL PICTURE
|
448 |
if (($type == "picture") || ($type == "avatar")) {
|
449 |
-
if ((stristr($file_type, "image/") === false) && ($value
|
450 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('should be an image.', $cimy_uef_domain));
|
451 |
}
|
452 |
}
|
@@ -537,6 +559,12 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
537 |
$errors->add("recaptcha_code", '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.__('Typed code is not correct.', $cimy_uef_domain));
|
538 |
}
|
539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
cimy_switch_current_blog();
|
541 |
|
542 |
return $errors;
|
@@ -544,6 +572,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
|
|
544 |
|
545 |
// show_type == 0 - normal form
|
546 |
// show_type == 1 - search form, all fields are text, password fields are skipped
|
|
|
547 |
function cimy_registration_form($errors=null, $show_type=0) {
|
548 |
global $wpdb, $start_cimy_uef_comment, $end_cimy_uef_comment, $rule_maxlen_needed, $fields_name_prefix, $wp_fields_name_prefix, $cuef_plugin_dir, $cimy_uef_file_types, $cimy_uef_textarea_types, $user_level, $cimy_uef_domain;
|
549 |
|
@@ -566,18 +595,52 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
566 |
$input_class = "cimy_uef_input_27";
|
567 |
|
568 |
$options = cimy_get_options();
|
569 |
-
|
570 |
$tabindex = 21;
|
571 |
|
572 |
echo $start_cimy_uef_comment;
|
573 |
-
echo "\t";
|
574 |
// needed to apply default values only first time and not in case of errors
|
575 |
-
echo
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
577 |
$radio_checked = array();
|
578 |
|
579 |
$i = 1;
|
580 |
$upload_file_function = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
|
582 |
// do first the WP fields then the EXTRA fields
|
583 |
while ($i <= 2) {
|
@@ -599,11 +662,11 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
599 |
$tiny_mce_objects = "";
|
600 |
|
601 |
foreach ($fields as $thisField) {
|
602 |
-
|
603 |
$field_id = $thisField['ID'];
|
604 |
$name = $thisField['NAME'];
|
605 |
$rules = $thisField['RULES'];
|
606 |
$type = $thisField['TYPE'];
|
|
|
607 |
$label = cimy_uef_sanitize_content($thisField['LABEL']);
|
608 |
$description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
|
609 |
$fieldset = empty($thisField['FIELDSET']) ? 0 : $thisField['FIELDSET'];
|
@@ -611,6 +674,8 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
611 |
$post_input_name = $prefix.$wpdb->escape($name);
|
612 |
$maxlen = 0;
|
613 |
$unique_id = $prefix.$field_id;
|
|
|
|
|
614 |
|
615 |
// showing the search then there is no need to upload buttons
|
616 |
if ($show_type == 1) {
|
@@ -620,6 +685,9 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
620 |
if (($type == "avatar") || ($type == "picture") || ($type == "file"))
|
621 |
$type = "text";
|
622 |
}
|
|
|
|
|
|
|
623 |
|
624 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
625 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
@@ -648,13 +716,13 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
648 |
continue;
|
649 |
|
650 |
if (isset($_POST[$post_input_name])) {
|
651 |
-
if ($type == "dropdown-multi")
|
652 |
$value = stripslashes(implode(",", $_POST[$post_input_name]));
|
653 |
else
|
654 |
$value = stripslashes($_POST[$post_input_name]);
|
655 |
}
|
656 |
else if (isset($_GET[$name])) {
|
657 |
-
if ($type == "dropdown-multi")
|
658 |
$value = stripslashes(implode(",", $_GET[$name]));
|
659 |
else
|
660 |
$value = stripslashes($_GET[$name]);
|
@@ -664,7 +732,6 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
664 |
$value = $thisField['VALUE'];
|
665 |
|
666 |
switch($type) {
|
667 |
-
|
668 |
case "radio":
|
669 |
if ($value == "YES")
|
670 |
$value = $field_id;
|
@@ -684,8 +751,11 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
684 |
}
|
685 |
else
|
686 |
$value = "";
|
687 |
-
|
688 |
-
$
|
|
|
|
|
|
|
689 |
|
690 |
if (($i != 1) && ($fieldset > $current_fieldset) && (isset($fieldset_titles[$fieldset]))) {
|
691 |
$current_fieldset = $fieldset;
|
@@ -694,7 +764,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
694 |
echo "\n\t<h2>".esc_html($fieldset_titles[$current_fieldset])."</h2>\n";
|
695 |
}
|
696 |
|
697 |
-
if (($description
|
698 |
echo "\t";
|
699 |
echo '<p id="'.$prefix.'p_desc_'.$field_id.'" class="desc"><br />'.$description.'</p>';
|
700 |
echo "\n";
|
@@ -842,6 +912,48 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
842 |
$obj_closing_tag = false;
|
843 |
break;
|
844 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
case "registration-date":
|
846 |
$obj_label = '';
|
847 |
$obj_class = '';
|
@@ -885,6 +997,41 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
885 |
|
886 |
if ($obj_closing_tag)
|
887 |
$form_object.= ">".$obj_value2."</".$obj_tag.">";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
888 |
else
|
889 |
$form_object.= " />";
|
890 |
|
@@ -900,7 +1047,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
900 |
// write to the html the form object built
|
901 |
echo $form_object;
|
902 |
|
903 |
-
if (($i == 1) && ($options['password_meter'])) {
|
904 |
if ($input_name == ($prefix."PASSWORD"))
|
905 |
$pass1_id = $unique_id;
|
906 |
|
@@ -922,16 +1069,27 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
922 |
|
923 |
$i++;
|
924 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
|
926 |
-
|
927 |
-
|
928 |
}
|
929 |
|
930 |
-
if ($
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
require_once($cuef_plugin_dir.'/cimy_uef_init_strength_meter.php');
|
935 |
}
|
936 |
|
937 |
if ($options['captcha'] == "securimage") {
|
@@ -981,4 +1139,51 @@ function cimy_registration_form($errors=null, $show_type=0) {
|
|
981 |
echo $end_cimy_uef_comment;
|
982 |
}
|
983 |
|
984 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
foreach ($fields as $thisField) {
|
|
|
121 |
$type = $thisField["TYPE"];
|
122 |
$name = $thisField["NAME"];
|
123 |
$field_id = $thisField["ID"];
|
124 |
$label = $thisField["LABEL"];
|
125 |
$rules = $thisField["RULES"];
|
126 |
$input_name = $prefix.$wpdb->escape($name);
|
127 |
+
$field_id_data = $input_name."_".$field_id."_data";
|
128 |
+
$advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
|
129 |
|
130 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
131 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
164 |
}
|
165 |
|
166 |
if (in_array($type, $cimy_uef_file_types)) {
|
167 |
+
$user_login_sanitized = sanitize_user($_POST['user_login']);
|
168 |
+
if ((isset($_POST["register_confirmation"])) && ($_POST["register_confirmation"] == 2)) {
|
169 |
+
$temp_user_login = $_POST["temp_user_login"];
|
170 |
+
$temp_dir = cimy_uef_get_dir_or_filename($temp_user_login);
|
171 |
+
$final_dir = cimy_uef_get_dir_or_filename($user_login_sanitized);
|
172 |
+
rename($temp_dir, $final_dir);
|
173 |
+
$data = str_replace("/".$temp_user_login."/", "/".$user_login_sanitized."/", $data);
|
174 |
+
$file_on_server = cimy_uef_get_dir_or_filename($user_login_sanitized, $data, false);
|
175 |
+
|
176 |
+
if (($type == "picture") || ($type == "avatar"))
|
177 |
+
cimy_uef_crop_image($file_on_server, $field_id_data);
|
178 |
+
}
|
179 |
+
else
|
180 |
+
$data = cimy_manage_upload($input_name, $user_login_sanitized, $rules, false, false, $type, (!empty($advanced_options["filename"])) ? $advanced_options["filename"] : "");
|
181 |
}
|
182 |
else {
|
183 |
if ($type == "picture-url")
|
331 |
$description = $thisField['DESCRIPTION'];
|
332 |
$input_name = $prefix.$wpdb->escape($name);
|
333 |
$unique_id = $prefix.$field_id;
|
334 |
+
$field_id_data = $input_name."_".$field_id."_data";
|
335 |
|
336 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
337 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
381 |
$label = esc_html($ret['label']);
|
382 |
$html = $ret['html'];
|
383 |
}
|
384 |
+
|
385 |
+
// confirmation page
|
386 |
+
if ((!empty($_POST["register_confirmation"])) && ($_POST["register_confirmation"] == 2)) {
|
387 |
+
$file_size = $_POST[$field_id_data."_size"];
|
388 |
+
$file_type = $_POST[$field_id_data."_type"];
|
389 |
+
$old_file = "";
|
390 |
+
$del_old_file = "";
|
391 |
+
}
|
392 |
+
else if (in_array($type, $cimy_uef_file_types)) {
|
393 |
// filesize in Byte transformed in KiloByte
|
394 |
$file_size = $_FILES[$input_name]['size'] / 1024;
|
395 |
$file_type = $_FILES[$input_name]['type'];
|
408 |
}
|
409 |
|
410 |
// if the flag can be empty is NOT set OR the field is not empty then other check can be useful, otherwise skip all
|
411 |
+
if ((!$rules['can_be_empty']) || (!empty($value))) {
|
412 |
if (($i == 1) && ($input_name == ($prefix."PASSWORD2"))) {
|
413 |
if ($value != $_POST[$prefix."PASSWORD"])
|
414 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('does not match.', $cimy_uef_domain));
|
418 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('hasn’t a correct email syntax.', $cimy_uef_domain));
|
419 |
}
|
420 |
|
421 |
+
if ((!$rules['can_be_empty']) && (in_array($type, $rule_canbeempty)) && (empty($value))) {
|
422 |
$empty_error = true;
|
423 |
|
424 |
// IF 1. it's a file type
|
425 |
// AND 2. there is an old one uploaded
|
426 |
// AND 3. this old one is not gonna be deleted
|
427 |
// THEN do not throw the empty error.
|
428 |
+
if ((in_array($type, $cimy_uef_file_types)) && (!empty($old_file)) && (empty($del_old_file)))
|
429 |
$empty_error = false;
|
430 |
|
431 |
if ($empty_error)
|
468 |
|
469 |
// CHECK IF IT IS A REAL PICTURE
|
470 |
if (($type == "picture") || ($type == "avatar")) {
|
471 |
+
if ((stristr($file_type, "image/") === false) && (!empty($value))) {
|
472 |
$errors->add($unique_id, '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.$label.' '.__('should be an image.', $cimy_uef_domain));
|
473 |
}
|
474 |
}
|
559 |
$errors->add("recaptcha_code", '<strong>'.__("ERROR", $cimy_uef_domain).'</strong>: '.__('Typed code is not correct.', $cimy_uef_domain));
|
560 |
}
|
561 |
|
562 |
+
if ($options['confirm_form']) {
|
563 |
+
if ((empty($errors->errors)) && (isset($_POST["register_confirmation"])) && ($_POST["register_confirmation"] == 1)) {
|
564 |
+
$errors->add('register_confirmation', 'true');
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
cimy_switch_current_blog();
|
569 |
|
570 |
return $errors;
|
572 |
|
573 |
// show_type == 0 - normal form
|
574 |
// show_type == 1 - search form, all fields are text, password fields are skipped
|
575 |
+
// show_type == 2 - confirmation form, all fields are plain text, images can be cropped
|
576 |
function cimy_registration_form($errors=null, $show_type=0) {
|
577 |
global $wpdb, $start_cimy_uef_comment, $end_cimy_uef_comment, $rule_maxlen_needed, $fields_name_prefix, $wp_fields_name_prefix, $cuef_plugin_dir, $cimy_uef_file_types, $cimy_uef_textarea_types, $user_level, $cimy_uef_domain;
|
578 |
|
595 |
$input_class = "cimy_uef_input_27";
|
596 |
|
597 |
$options = cimy_get_options();
|
|
|
598 |
$tabindex = 21;
|
599 |
|
600 |
echo $start_cimy_uef_comment;
|
|
|
601 |
// needed to apply default values only first time and not in case of errors
|
602 |
+
echo "\t<input type=\"hidden\" name=\"cimy_post\" value=\"1\" />\n";
|
603 |
+
if ($options['confirm_form']) {
|
604 |
+
if ($show_type == 0)
|
605 |
+
echo "\t<input type=\"hidden\" name=\"register_confirmation\" value=\"1\" />\n";
|
606 |
+
else if ($show_type == 2)
|
607 |
+
echo "\t<input type=\"hidden\" name=\"register_confirmation\" value=\"2\" />\n";
|
608 |
+
}
|
609 |
$radio_checked = array();
|
610 |
|
611 |
$i = 1;
|
612 |
$upload_file_function = false;
|
613 |
+
$is_jquery_added = false;
|
614 |
+
$crop_image_function = false;
|
615 |
+
|
616 |
+
// confirmation page, all fields are plain text + hidden fields to carry over values
|
617 |
+
if ($show_type == 2) {
|
618 |
+
$upload_dir = cimy_uef_get_dir_or_filename("");
|
619 |
+
$dirs = glob($upload_dir.".cimytemp_*.tmp");
|
620 |
+
if (is_array($dirs)) {
|
621 |
+
foreach ($dirs as $dir) {
|
622 |
+
$diff = current_time('timestamp', true) - (filemtime($dir));
|
623 |
+
// If older than two days delete!
|
624 |
+
if ($diff > 172800) {
|
625 |
+
cimy_rfr($dir."/", "*");
|
626 |
+
if (is_dir($dir))
|
627 |
+
rmdir($dir);
|
628 |
+
}
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
$temp_user_login = ".cimytemp_".sanitize_user($_POST['user_login']).'_'.rand().'.tmp';
|
633 |
+
?>
|
634 |
+
<input type="hidden" name="temp_user_login" value="<?php echo esc_attr($temp_user_login); ?>" />
|
635 |
+
<p id="user_login_p">
|
636 |
+
<label for="user_login"><?php _e("Username"); ?> </label><input type="hidden" name="user_login" id="user_login" value="<?php echo esc_attr($_POST["user_login"]); ?>" /><?php echo esc_html($_POST["user_login"]); ?>
|
637 |
+
</p>
|
638 |
+
<p id="user_email_p">
|
639 |
+
<label for="user_email"><?php _e("E-mail"); ?> </label><input type="hidden" name="user_email" id="user_email" value="<?php echo esc_attr($_POST["user_email"]); ?>" /><?php echo esc_html($_POST["user_email"]); ?>
|
640 |
+
</p>
|
641 |
+
<br />
|
642 |
+
<?php
|
643 |
+
}
|
644 |
|
645 |
// do first the WP fields then the EXTRA fields
|
646 |
while ($i <= 2) {
|
662 |
$tiny_mce_objects = "";
|
663 |
|
664 |
foreach ($fields as $thisField) {
|
|
|
665 |
$field_id = $thisField['ID'];
|
666 |
$name = $thisField['NAME'];
|
667 |
$rules = $thisField['RULES'];
|
668 |
$type = $thisField['TYPE'];
|
669 |
+
$old_type = $type;
|
670 |
$label = cimy_uef_sanitize_content($thisField['LABEL']);
|
671 |
$description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
|
672 |
$fieldset = empty($thisField['FIELDSET']) ? 0 : $thisField['FIELDSET'];
|
674 |
$post_input_name = $prefix.$wpdb->escape($name);
|
675 |
$maxlen = 0;
|
676 |
$unique_id = $prefix.$field_id;
|
677 |
+
$field_id_data = $input_name."_".$field_id."_data";
|
678 |
+
$advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
|
679 |
|
680 |
// showing the search then there is no need to upload buttons
|
681 |
if ($show_type == 1) {
|
685 |
if (($type == "avatar") || ($type == "picture") || ($type == "file"))
|
686 |
$type = "text";
|
687 |
}
|
688 |
+
else if ($show_type == 2) {
|
689 |
+
$type = "hidden";
|
690 |
+
}
|
691 |
|
692 |
// if the current user LOGGED IN has not enough permissions to see the field, skip it
|
693 |
if ($rules['show_level'] == 'view_cimy_extra_fields')
|
716 |
continue;
|
717 |
|
718 |
if (isset($_POST[$post_input_name])) {
|
719 |
+
if (($type == "dropdown-multi") || ($old_type == "dropdown-multi"))
|
720 |
$value = stripslashes(implode(",", $_POST[$post_input_name]));
|
721 |
else
|
722 |
$value = stripslashes($_POST[$post_input_name]);
|
723 |
}
|
724 |
else if (isset($_GET[$name])) {
|
725 |
+
if (($type == "dropdown-multi") || ($old_type == "dropdown-multi"))
|
726 |
$value = stripslashes(implode(",", $_GET[$name]));
|
727 |
else
|
728 |
$value = stripslashes($_GET[$name]);
|
732 |
$value = $thisField['VALUE'];
|
733 |
|
734 |
switch($type) {
|
|
|
735 |
case "radio":
|
736 |
if ($value == "YES")
|
737 |
$value = $field_id;
|
751 |
}
|
752 |
else
|
753 |
$value = "";
|
754 |
+
|
755 |
+
if ($show_type == 2)
|
756 |
+
$value = cimy_uef_sanitize_content($value);
|
757 |
+
else
|
758 |
+
$value = esc_attr($value);
|
759 |
|
760 |
if (($i != 1) && ($fieldset > $current_fieldset) && (isset($fieldset_titles[$fieldset]))) {
|
761 |
$current_fieldset = $fieldset;
|
764 |
echo "\n\t<h2>".esc_html($fieldset_titles[$current_fieldset])."</h2>\n";
|
765 |
}
|
766 |
|
767 |
+
if ((!empty($description)) && ($type != "registration-date")) {
|
768 |
echo "\t";
|
769 |
echo '<p id="'.$prefix.'p_desc_'.$field_id.'" class="desc"><br />'.$description.'</p>';
|
770 |
echo "\n";
|
912 |
$obj_closing_tag = false;
|
913 |
break;
|
914 |
|
915 |
+
case "hidden":
|
916 |
+
$obj_label = "";
|
917 |
+
$obj_value2 = "";
|
918 |
+
switch ($old_type) {
|
919 |
+
case 'checkbox':
|
920 |
+
$value == 1 ? $obj_value2 = __("YES", $cimy_uef_domain) : $obj_value2 = __("NO", $cimy_uef_domain);
|
921 |
+
break;
|
922 |
+
case 'radio':
|
923 |
+
intval($value) == intval($field_id) ? $obj_value2 = __("YES", $cimy_uef_domain) : $obj_value2 = __("NO", $cimy_uef_domain);
|
924 |
+
break;
|
925 |
+
case 'dropdown':
|
926 |
+
case 'dropdown-multi':
|
927 |
+
$ret = cimy_dropDownOptions($label, $value);
|
928 |
+
$label = $ret['label'];
|
929 |
+
break;
|
930 |
+
case 'picture':
|
931 |
+
case 'avatar':
|
932 |
+
case 'file':
|
933 |
+
$value = cimy_manage_upload($input_name, $temp_user_login, $rules, false, false, $type, (!empty($advanced_options["filename"])) ? $advanced_options["filename"] : "");
|
934 |
+
$file_on_server = cimy_uef_get_dir_or_filename($temp_user_login, $value, false);
|
935 |
+
$file_thumb = cimy_uef_get_dir_or_filename($temp_user_login, $value, true);
|
936 |
+
if (($advanced_options["no-thumb"]) && (is_file($file_thumb)))
|
937 |
+
rename($file_thumb, $file_on_server);
|
938 |
+
|
939 |
+
// yea little trick
|
940 |
+
$obj_value2 = " ";
|
941 |
+
break;
|
942 |
+
}
|
943 |
+
if ($old_type != "password") {
|
944 |
+
$obj_label = '<label for="'.$unique_id.'">'.$label.' </label>';
|
945 |
+
if (empty($obj_value2))
|
946 |
+
$obj_value2 = $value;
|
947 |
+
}
|
948 |
+
$obj_class = '';
|
949 |
+
$obj_name = ' name="'.$input_name.'"';
|
950 |
+
$obj_type = ' type="hidden"';
|
951 |
+
$obj_value = ' value="'.$value.'"';
|
952 |
+
$obj_checked = "";
|
953 |
+
$obj_tag = "input";
|
954 |
+
$obj_closing_tag = false;
|
955 |
+
break;
|
956 |
+
|
957 |
case "registration-date":
|
958 |
$obj_label = '';
|
959 |
$obj_class = '';
|
997 |
|
998 |
if ($obj_closing_tag)
|
999 |
$form_object.= ">".$obj_value2."</".$obj_tag.">";
|
1000 |
+
else if ($type == "hidden") {
|
1001 |
+
$form_object.= " />".$obj_value2;
|
1002 |
+
if (in_array($old_type, $cimy_uef_file_types)) {
|
1003 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_size\" id=\"".$field_id_data."_size\" value=\"".strval($_FILES[$input_name]['size'] / 1024)."\" />";
|
1004 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_type\" id=\"".$field_id_data."_type\" value=\"".strval($_FILES[$input_name]['type'])."\" />";
|
1005 |
+
}
|
1006 |
+
if (($old_type == "picture") || ($old_type == "avatar")) {
|
1007 |
+
if (!$is_jquery_added) {
|
1008 |
+
wp_print_scripts("jquery");
|
1009 |
+
$is_jquery_added = true;
|
1010 |
+
}
|
1011 |
+
$crop_image_function = true;
|
1012 |
+
echo '<img id="'.$field_id_data.'" src="'.$value.'" alt="picture" /><br />';
|
1013 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_button\" id=\"".$field_id_data."_button\" value=\"1\" />";
|
1014 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_x1\" id=\"".$field_id_data."_x1\" value=\"\" />";
|
1015 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_y1\" id=\"".$field_id_data."_y1\" value=\"\" />";
|
1016 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_x2\" id=\"".$field_id_data."_x2\" value=\"\" />";
|
1017 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_y2\" id=\"".$field_id_data."_y2\" value=\"\" />";
|
1018 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_w\" id=\"".$field_id_data."_w\" value=\"\" />";
|
1019 |
+
echo "<input type=\"hidden\" name=\"".$field_id_data."_h\" id=\"".$field_id_data."_h\" value=\"\" />";
|
1020 |
+
$imgarea_options = "handles: true, fadeSpeed: 200, onSelectChange: preview";
|
1021 |
+
if ((isset($advanced_options["crop_x1"])) && (isset($advanced_options["crop_y1"])) && (isset($advanced_options["crop_x2"])) && (isset($advanced_options["crop_y2"]))) {
|
1022 |
+
$imgarea_options.= ", x1: ".intval($advanced_options["crop_x1"]);
|
1023 |
+
$imgarea_options.= ", y1: ".intval($advanced_options["crop_y1"]);
|
1024 |
+
$imgarea_options.= ", x2: ".intval($advanced_options["crop_x2"]);
|
1025 |
+
$imgarea_options.= ", y2: ".intval($advanced_options["crop_y2"]);
|
1026 |
+
}
|
1027 |
+
if (!empty($advanced_options["crop_ratio"]))
|
1028 |
+
$imgarea_options.= ", aspectRatio: '".esc_js($advanced_options["crop_ratio"])."'";
|
1029 |
+
else if ($type == "avatar")
|
1030 |
+
$imgarea_options.= ", aspectRatio: '1:1'";
|
1031 |
+
echo "<script type='text/javascript'>jQuery(document).ready(function () { jQuery('#".esc_js($field_id_data)."').imgAreaSelect({ ".$imgarea_options." }); });</script>";
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
}
|
1035 |
else
|
1036 |
$form_object.= " />";
|
1037 |
|
1047 |
// write to the html the form object built
|
1048 |
echo $form_object;
|
1049 |
|
1050 |
+
if (($show_type == 0) && ($i == 1) && ($options['password_meter'])) {
|
1051 |
if ($input_name == ($prefix."PASSWORD"))
|
1052 |
$pass1_id = $unique_id;
|
1053 |
|
1069 |
|
1070 |
$i++;
|
1071 |
}
|
1072 |
+
echo "\t<br />";
|
1073 |
+
|
1074 |
+
if ($show_type == 0) {
|
1075 |
+
if (!empty($tiny_mce_objects)) {
|
1076 |
+
require_once($cuef_plugin_dir.'/cimy_uef_init_mce.php');
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
if ($options['password_meter']) {
|
1080 |
+
if (!$is_jquery_added) {
|
1081 |
+
wp_print_scripts("jquery");
|
1082 |
+
$is_jquery_added = true;
|
1083 |
+
}
|
1084 |
|
1085 |
+
require_once($cuef_plugin_dir.'/cimy_uef_init_strength_meter.php');
|
1086 |
+
}
|
1087 |
}
|
1088 |
|
1089 |
+
if ($crop_image_function) {
|
1090 |
+
wp_print_scripts('imgareaselect');
|
1091 |
+
wp_print_styles('imgareaselect');
|
1092 |
+
wp_print_scripts('cimy_uef_img_selection');
|
|
|
1093 |
}
|
1094 |
|
1095 |
if ($options['captcha'] == "securimage") {
|
1139 |
echo $end_cimy_uef_comment;
|
1140 |
}
|
1141 |
|
1142 |
+
function cimy_confirmation_form() {
|
1143 |
+
$confirmation = false;
|
1144 |
+
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
1145 |
+
$user_login = '';
|
1146 |
+
$user_email = '';
|
1147 |
+
|
1148 |
+
if ($http_post) {
|
1149 |
+
$user_login = $_POST['user_login'];
|
1150 |
+
$user_email = $_POST['user_email'];
|
1151 |
+
$errors = register_new_user($user_login, $user_email);
|
1152 |
+
|
1153 |
+
if (!is_wp_error($errors)) {
|
1154 |
+
$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
|
1155 |
+
wp_safe_redirect( $redirect_to );
|
1156 |
+
exit();
|
1157 |
+
}
|
1158 |
+
else if ((count($errors->errors) == 1) && (isset($errors->errors["register_confirmation"]))) {
|
1159 |
+
$confirmation = true;
|
1160 |
+
}
|
1161 |
+
}
|
1162 |
+
if ($confirmation) {
|
1163 |
+
global $cimy_uef_domain;
|
1164 |
+
$redirect_to = apply_filters( 'registration_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' );
|
1165 |
+
$message = new WP_Error();
|
1166 |
+
$message->add('confirmation', __('Confirm your registration', $cimy_uef_domain), 'message');
|
1167 |
+
|
1168 |
+
login_header(__("Confirm your registration", $cimy_uef_domain), "", $message);
|
1169 |
+
?>
|
1170 |
+
<form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
|
1171 |
+
<?php
|
1172 |
+
cimy_registration_form(null, 2);
|
1173 |
+
?>
|
1174 |
+
<p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p>
|
1175 |
+
<br class="clear" />
|
1176 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
|
1177 |
+
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Register'); ?>" tabindex="100" /></p>
|
1178 |
+
</form>
|
1179 |
+
|
1180 |
+
<p id="nav">
|
1181 |
+
<a href="javascript: history.go(-1)"><?php _e('← Back', $cimy_uef_domain) ?></a>
|
1182 |
+
</p>
|
1183 |
+
<?php
|
1184 |
+
login_footer("");
|
1185 |
+
exit(0);
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
?>
|
cimy_user_extra_fields.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cimy User Extra Fields
|
4 |
Plugin URI: http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/
|
5 |
Plugin Description: Add some useful fields to registration and user's info
|
6 |
-
Version: 2.0
|
7 |
Author: Marco Cimmino
|
8 |
Author URI: mailto:cimmino.marco@gmail.com
|
9 |
*/
|
@@ -170,6 +170,7 @@ $cuef_js_webpath = plugins_url($cimy_uef_plugins_dirprefix."js", __FILE__);
|
|
170 |
$cuef_securimage_webpath = plugins_url($cimy_uef_plugins_dirprefix."securimage", __FILE__);
|
171 |
|
172 |
wp_register_script("cimy_uef_upload_file", $cuef_js_webpath."/upload_file.js", false, false);
|
|
|
173 |
wp_register_style("cimy_uef_register", $cuef_css_webpath."/cimy_uef_register.css", false, false);
|
174 |
|
175 |
function cimy_uef_admin_init() {
|
@@ -189,7 +190,7 @@ require_once($cuef_plugin_dir.'/cimy_uef_options.php');
|
|
189 |
require_once($cuef_plugin_dir.'/cimy_uef_admin.php');
|
190 |
|
191 |
$cimy_uef_name = "Cimy User Extra Fields";
|
192 |
-
$cimy_uef_version = "2.0
|
193 |
$cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
|
194 |
$cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
|
195 |
|
@@ -528,6 +529,9 @@ else {
|
|
528 |
// add custom login/registration logo
|
529 |
add_action('login_head', 'cimy_change_login_registration_logo');
|
530 |
|
|
|
|
|
|
|
531 |
// add filter for email activation
|
532 |
add_filter('login_message', 'cimy_uef_activate');
|
533 |
|
@@ -620,7 +624,7 @@ function cimy_uef_avatar_filter($avatar, $id_or_email, $size, $default, $alt="")
|
|
620 |
if (!isset($field_id))
|
621 |
return $avatar;
|
622 |
|
623 |
-
if ($overwrite_default
|
624 |
$overwrite_default = "<img alt='{$safe_alt}' src='{$overwrite_default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
|
625 |
|
626 |
$email = '';
|
@@ -765,7 +769,7 @@ function cimy_admin_menu_custom() {
|
|
765 |
add_action('admin_print_scripts-'.$aue_page, 'cimy_uef_admin_ajax_edit');
|
766 |
}
|
767 |
|
768 |
-
function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $delete_file=false, $type="") {
|
769 |
global $cuef_upload_path, $cuef_upload_webpath, $cuef_plugin_dir, $cimy_uef_plugins_dir;
|
770 |
|
771 |
$type_path = "";
|
@@ -800,7 +804,10 @@ function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $
|
|
800 |
$user_path = $blog_path;
|
801 |
$file_path = $blog_path.$type_path."/";
|
802 |
}
|
803 |
-
|
|
|
|
|
|
|
804 |
|
805 |
// protect from site traversing
|
806 |
$file_name = str_replace('../', '', $file_name);
|
@@ -887,8 +894,8 @@ function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $
|
|
887 |
if ($file_size > (intval($rules['max_length'])))
|
888 |
$file_error = 1;
|
889 |
|
890 |
-
// if there are no errors and filename is empty
|
891 |
-
if (($file_error == 0) && ($file_name
|
892 |
if (move_uploaded_file($file_tmp_name, $file_full_path)) {
|
893 |
// change file permissions for broken servers
|
894 |
if (defined("FS_CHMOD_FILE"))
|
@@ -927,7 +934,7 @@ function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $
|
|
927 |
}
|
928 |
else
|
929 |
$data = "";
|
930 |
-
|
931 |
return $data;
|
932 |
}
|
933 |
|
3 |
Plugin Name: Cimy User Extra Fields
|
4 |
Plugin URI: http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/
|
5 |
Plugin Description: Add some useful fields to registration and user's info
|
6 |
+
Version: 2.1.0
|
7 |
Author: Marco Cimmino
|
8 |
Author URI: mailto:cimmino.marco@gmail.com
|
9 |
*/
|
170 |
$cuef_securimage_webpath = plugins_url($cimy_uef_plugins_dirprefix."securimage", __FILE__);
|
171 |
|
172 |
wp_register_script("cimy_uef_upload_file", $cuef_js_webpath."/upload_file.js", false, false);
|
173 |
+
wp_register_script("cimy_uef_img_selection", $cuef_js_webpath."/img_selection.js", false, false);
|
174 |
wp_register_style("cimy_uef_register", $cuef_css_webpath."/cimy_uef_register.css", false, false);
|
175 |
|
176 |
function cimy_uef_admin_init() {
|
190 |
require_once($cuef_plugin_dir.'/cimy_uef_admin.php');
|
191 |
|
192 |
$cimy_uef_name = "Cimy User Extra Fields";
|
193 |
+
$cimy_uef_version = "2.1.0";
|
194 |
$cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
|
195 |
$cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
|
196 |
|
529 |
// add custom login/registration logo
|
530 |
add_action('login_head', 'cimy_change_login_registration_logo');
|
531 |
|
532 |
+
// add confirmation form
|
533 |
+
add_action('login_form_register', 'cimy_confirmation_form');
|
534 |
+
|
535 |
// add filter for email activation
|
536 |
add_filter('login_message', 'cimy_uef_activate');
|
537 |
|
624 |
if (!isset($field_id))
|
625 |
return $avatar;
|
626 |
|
627 |
+
if (!empty($overwrite_default))
|
628 |
$overwrite_default = "<img alt='{$safe_alt}' src='{$overwrite_default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
|
629 |
|
630 |
$email = '';
|
769 |
add_action('admin_print_scripts-'.$aue_page, 'cimy_uef_admin_ajax_edit');
|
770 |
}
|
771 |
|
772 |
+
function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $delete_file=false, $type="", $new_filename="") {
|
773 |
global $cuef_upload_path, $cuef_upload_webpath, $cuef_plugin_dir, $cimy_uef_plugins_dir;
|
774 |
|
775 |
$type_path = "";
|
804 |
$user_path = $blog_path;
|
805 |
$file_path = $blog_path.$type_path."/";
|
806 |
}
|
807 |
+
if (!empty($new_filename))
|
808 |
+
$file_name = $new_filename;
|
809 |
+
else
|
810 |
+
$file_name = $_FILES[$input_name]['name'];
|
811 |
|
812 |
// protect from site traversing
|
813 |
$file_name = str_replace('../', '', $file_name);
|
894 |
if ($file_size > (intval($rules['max_length'])))
|
895 |
$file_error = 1;
|
896 |
|
897 |
+
// if there are no errors and filename is NOT empty
|
898 |
+
if (($file_error == 0) && (!empty($file_name))) {
|
899 |
if (move_uploaded_file($file_tmp_name, $file_full_path)) {
|
900 |
// change file permissions for broken servers
|
901 |
if (defined("FS_CHMOD_FILE"))
|
934 |
}
|
935 |
else
|
936 |
$data = "";
|
937 |
+
|
938 |
return $data;
|
939 |
}
|
940 |
|
js/img_selection.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function preview(img, selection) {
|
2 |
+
if (!selection.width || !selection.height)
|
3 |
+
return;
|
4 |
+
|
5 |
+
var scaleX = 100 / selection.width;
|
6 |
+
var scaleY = 100 / selection.height;
|
7 |
+
|
8 |
+
jQuery('#preview img').css({
|
9 |
+
width: Math.round(scaleX * 300),
|
10 |
+
height: Math.round(scaleY * 300),
|
11 |
+
marginLeft: -Math.round(scaleX * selection.x1),
|
12 |
+
marginTop: -Math.round(scaleY * selection.y1)
|
13 |
+
});
|
14 |
+
|
15 |
+
jQuery('#'+img.id+'_x1').val(selection.x1);
|
16 |
+
jQuery('#'+img.id+'_y1').val(selection.y1);
|
17 |
+
jQuery('#'+img.id+'_x2').val(selection.x2);
|
18 |
+
jQuery('#'+img.id+'_y2').val(selection.y2);
|
19 |
+
jQuery('#'+img.id+'_w').val(selection.width);
|
20 |
+
jQuery('#'+img.id+'_h').val(selection.height);
|
21 |
+
}
|
langs/cimy_uef-bg_BG.mo
CHANGED
Binary file
|
langs/cimy_uef-bg_BG.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Cimy User Extra Fields\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-
|
6 |
-
"PO-Revision-Date: 2011-
|
7 |
"Last-Translator: Marco Cimmino <cimmino.marco@gmail.com>\n"
|
8 |
"Language-Team: <cimmino.marco@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -16,116 +16,145 @@ msgstr ""
|
|
16 |
"X-Poedit-Basepath: .\n"
|
17 |
"X-Poedit-SearchPath-0: /var/www/wp-content/plugins/cimy-user-extra-fields\n"
|
18 |
|
19 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
20 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
21 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
22 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
23 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:458
|
24 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:465
|
25 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
26 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
27 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
28 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
29 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
30 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
31 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
32 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
33 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/
|
|
|
34 |
msgid "ERROR"
|
35 |
msgstr "ГРЕШКА"
|
36 |
|
37 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
38 |
msgid "does not match."
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
42 |
msgid "hasn’t a correct email syntax."
|
43 |
msgstr "няма правилен email синтаксис."
|
44 |
|
45 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
46 |
msgid "couldn’t be empty."
|
47 |
msgstr "не може да е празно."
|
48 |
|
49 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
50 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
51 |
msgid "isn’t correct"
|
52 |
msgstr "не е правилно"
|
53 |
|
54 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
|
|
|
|
55 |
msgid "YES"
|
56 |
msgstr "ДА"
|
57 |
|
58 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
|
|
|
|
59 |
msgid "NO"
|
60 |
msgstr "НЕ"
|
61 |
|
62 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
63 |
msgid "should be"
|
64 |
msgstr "трябва да е"
|
65 |
|
66 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
67 |
msgid "should be an image."
|
68 |
msgstr "трябва да е снимка."
|
69 |
|
70 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
71 |
msgid "couldn’t have size less than"
|
72 |
msgstr "не може да е с по-малък размер от"
|
73 |
|
74 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
75 |
msgid "couldn’t have length less than"
|
76 |
msgstr "не може да има по-малка дължина от"
|
77 |
|
78 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
79 |
msgid "couldn’t have size different than"
|
80 |
msgstr "не може да има размер различен от"
|
81 |
|
82 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
83 |
msgid "couldn’t have length different than"
|
84 |
msgstr "не може да има дължина различна от"
|
85 |
|
86 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
87 |
msgid "couldn’t have size more than"
|
88 |
msgstr "не може да има размер по-голям от"
|
89 |
|
90 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
91 |
msgid "couldn’t have length more than"
|
92 |
msgstr "не може да има дължина по-голяма от"
|
93 |
|
94 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
95 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
96 |
msgid "Typed code is not correct."
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
100 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
#, fuzzy
|
102 |
msgid "Please upload a file with one of the following extensions"
|
103 |
msgstr "Моля качете снимка с някое от тези разширения"
|
104 |
|
105 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
106 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
107 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
108 |
msgid "Please upload an image with one of the following extensions"
|
109 |
msgstr "Моля качете снимка с някое от тези разширения"
|
110 |
|
111 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
112 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_init_strength_meter.php:47
|
113 |
msgid "Strength indicator"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
117 |
msgid "Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ & )."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
121 |
#, fuzzy
|
122 |
msgid "Change image"
|
123 |
msgstr "Смени реда"
|
124 |
|
125 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_register.php:
|
126 |
msgid "Insert the code:"
|
127 |
msgstr ""
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_functions.php:424
|
130 |
#, fuzzy
|
131 |
msgid "no fieldset"
|
@@ -135,342 +164,358 @@ msgstr "Опции по колекция"
|
|
135 |
msgid "All"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
139 |
msgid "WordPress Fields table emptied"
|
140 |
msgstr "Таблицата с WordPress полета е изпразнена"
|
141 |
|
142 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
143 |
msgid "WordPress Fields table deleted"
|
144 |
msgstr "Таблицата с WordPress полета е изтрита"
|
145 |
|
146 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
147 |
msgid "Extra Fields table emptied"
|
148 |
msgstr "Таблицата с допълнителни полета е изпразнена"
|
149 |
|
150 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
151 |
msgid "Extra Fields table deleted"
|
152 |
msgstr "Таблицата с допълнителни полета е изтрита"
|
153 |
|
154 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
155 |
msgid "Users Data table emptied"
|
156 |
msgstr "Таблицата с потребителски данни е изпразнена"
|
157 |
|
158 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
159 |
msgid "Users Data table deleted"
|
160 |
msgstr "Таблицата с потребителски данни е изтрита"
|
161 |
|
162 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
163 |
msgid "Options set to default values"
|
164 |
msgstr "Вариантите са сменени по подразбиране"
|
165 |
|
166 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
167 |
msgid "Options deleted"
|
168 |
msgstr "Вариантите са изтрити"
|
169 |
|
170 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
171 |
msgid "Options changed"
|
172 |
msgstr "Вариантите са променени"
|
173 |
|
174 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
175 |
msgid "This operation will create/update all missing tables/options, do you want to proceed?"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
179 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
180 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
181 |
msgid "Options"
|
182 |
msgstr "Настройки"
|
183 |
|
184 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
185 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
186 |
msgid "Add a new Field"
|
187 |
msgstr "Добави друго поле"
|
188 |
|
189 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
190 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
191 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
192 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
193 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_db.php:114
|
194 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_db.php:
|
195 |
msgid "Extra Fields"
|
196 |
msgstr "Допълнителни полета"
|
197 |
|
198 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
199 |
msgid "Support the Cimy Project"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
203 |
msgid "This plug-in is the results of hours of development to add new features, support new WordPress versions and fix bugs, please donate money if saved you from spending all these hours!"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
207 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
208 |
msgid "SUCCESSFUL"
|
209 |
msgstr "УСПЕХ"
|
210 |
|
211 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
212 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
213 |
msgid "Save Changes"
|
214 |
msgstr "Запази промените"
|
215 |
|
216 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
217 |
msgid "General"
|
218 |
msgstr "Общи"
|
219 |
|
220 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
221 |
msgid "installed is"
|
222 |
msgstr "инсталирано е"
|
223 |
|
224 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
225 |
msgid "OPTIONS DELETED!"
|
226 |
msgstr "ВАРИАНТИТЕ СА ИЗТРИТИ!"
|
227 |
|
228 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
229 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
230 |
msgid "Fix the problem"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
234 |
msgid "VERSIONS MISMATCH! This because you haven't de-activated and re-activated the plug-in after the update! This could give problems..."
|
235 |
msgstr "ВЕРСИТЕ НЕ ПАСВАТ! Това е защото ти не си дезактивирал и активирал добавката след подновяване! Това може да създаде проблеми..."
|
236 |
|
237 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
238 |
msgid "Picture/Avatar upload"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
242 |
msgid "is created and writable"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
246 |
msgid "is NOT created or webserver does NOT have permission to write on it"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
250 |
#, fuzzy
|
251 |
msgid "Show all fields in the welcome email"
|
252 |
msgstr "Покажи полето при регистрация"
|
253 |
|
254 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
255 |
msgid "the email sent to the admin and to the user upon registration will have all fields"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
259 |
msgid "Enable email confirmation"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
263 |
msgid "user that registers should confirm its email address via a link click"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
267 |
msgid "<strong>note:</strong> this option turned on will automatically disable (only during the registration) all upload fields: file, picture, avatar"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
msgid "Redirect to the source"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
275 |
msgid "after the registration or confirmation the user will be redirected to the address where was exactly before clicking on the registration link"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
279 |
msgid "No captcha"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
283 |
msgid "Enable <a href=\"http://www.google.com/recaptcha\" target=\"_blank\">reCAPTCHA</a>"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
287 |
msgid "Public KEY"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
291 |
msgid "Private KEY"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
295 |
msgid "Enable <a href=\"http://www.phpcaptcha.org/\" target=\"_blank\">Securimage Captcha</a>"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
299 |
msgid "This captcha is probably weaker, but is easier for users"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
303 |
#, php-format
|
304 |
msgid "<strong>WARNING: to activate this captcha download <a href=\"http://www.phpcaptcha.org/latest.zip\" target=\"_blank\">this package</a> and unpack it under %s</strong>"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
308 |
msgid "Change login/registration page logo"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
312 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
313 |
#, fuzzy
|
314 |
msgid "Delete the picture"
|
315 |
msgstr "Изтрий поле"
|
316 |
|
317 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
318 |
msgid "Maximum recommended logo width is 328px, but any height should work."
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
322 |
msgid "Database"
|
323 |
msgstr "База данни"
|
324 |
|
325 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
326 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
327 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
328 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
329 |
msgid "select action"
|
330 |
msgstr "избери действие"
|
331 |
|
332 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
333 |
msgid "Default values"
|
334 |
msgstr "Стойност по подразбиране"
|
335 |
|
336 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
337 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
338 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
339 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
340 |
msgid "Delete"
|
341 |
msgstr "Изтрий"
|
342 |
|
343 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
344 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
345 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
346 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
347 |
msgid "NOT PRESENT"
|
348 |
msgstr "НЕ СЪЩЕСТВУВА"
|
349 |
|
350 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
351 |
msgid "WordPress Fields table"
|
352 |
msgstr "Таблица с WordPress полета"
|
353 |
|
354 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
355 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
356 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
357 |
msgid "Empty"
|
358 |
msgstr "Празно"
|
359 |
|
360 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
361 |
msgid "Extra Fields table"
|
362 |
msgstr "Таблица с допълнителни полета"
|
363 |
|
364 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
365 |
msgid "Users Data table"
|
366 |
msgstr "Таблица с потребителски данни"
|
367 |
|
368 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
369 |
msgid "all data inserted by users in all and only extra fields"
|
370 |
msgstr "всички данни въведени от потребителите във всички и само допълнители полета"
|
371 |
|
372 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
373 |
msgid "Force tables creation"
|
374 |
msgstr "Задължително създаване на таблица"
|
375 |
|
376 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
377 |
msgid "equivalent to de-activate and activate the plug-in; no other operation will be performed"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
381 |
msgid "User Profile"
|
382 |
msgstr "Потребителски профил"
|
383 |
|
384 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
385 |
#, fuzzy
|
386 |
msgid "Extra Fields section title"
|
387 |
msgstr "Таблица с допълнителни полета"
|
388 |
|
389 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
390 |
msgid "Fieldset's titles, separates with comma"
|
391 |
msgstr "Заглавията на колекция разделени със запетайка"
|
392 |
|
393 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
394 |
msgid "example: title1,title2,title3"
|
395 |
msgstr "пример: заглавие1,заглавие2,заглавие3"
|
396 |
|
397 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
398 |
msgid "<strong>note:</strong> if you change order or remove fieldsets you may need to set all extra fields' fieldset assigment again"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
402 |
msgid "Authors & Users Extended"
|
403 |
msgstr "Автори & Потребители с разширения"
|
404 |
|
405 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
406 |
msgid "Hide username field"
|
407 |
msgstr "Скрий полето за потребителско име"
|
408 |
|
409 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
410 |
msgid "Hide name field"
|
411 |
msgstr "Скрий полето за име"
|
412 |
|
413 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
414 |
msgid "Hide email field"
|
415 |
msgstr "Скрий полето за email"
|
416 |
|
417 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
418 |
msgid "Hide role field"
|
419 |
msgstr "Скрий полето за роля"
|
420 |
|
421 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
422 |
msgid "Hide website field"
|
423 |
msgstr "Скрий полето за интернет сайт"
|
424 |
|
425 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
426 |
msgid "Hide n. posts field"
|
427 |
msgstr "Скрий полето за брой постове"
|
428 |
|
429 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
430 |
msgid "WordPress hidden fields"
|
431 |
msgstr "Скрити полета на WordPress"
|
432 |
|
433 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
434 |
msgid "Show password"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
438 |
msgid "Show confirmation password"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
442 |
msgid "Show password strength meter"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
446 |
msgid "Show first name"
|
447 |
msgstr "Покажи първото име"
|
448 |
|
449 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
450 |
msgid "Show last name"
|
451 |
msgstr "Покажи второто име"
|
452 |
|
453 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
454 |
msgid "Show nickname"
|
455 |
msgstr "Покажи потребителското име"
|
456 |
|
457 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
458 |
msgid "Show website"
|
459 |
msgstr "Покажи интернет сайта"
|
460 |
|
461 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
462 |
msgid "Show AIM"
|
463 |
msgstr "Покажи AIM"
|
464 |
|
465 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
466 |
msgid "Show Yahoo IM"
|
467 |
msgstr "Покажи Yahoo IM"
|
468 |
|
469 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
470 |
msgid "Show Jabber / Google Talk"
|
471 |
msgstr "Покажи Jabber / Google Talk"
|
472 |
|
473 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_options.php:
|
474 |
msgid "Show Biographical Info"
|
475 |
msgstr ""
|
476 |
|
@@ -496,62 +541,62 @@ msgstr ""
|
|
496 |
msgid "Mismatch"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
500 |
msgid "Password"
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
504 |
msgid "Password confirmation"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
508 |
#, fuzzy
|
509 |
msgid "First name"
|
510 |
msgstr "Покажи първото име"
|
511 |
|
512 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
513 |
#, fuzzy
|
514 |
msgid "Last name"
|
515 |
msgstr "Покажи второто име"
|
516 |
|
517 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
518 |
#, fuzzy
|
519 |
msgid "Nickname"
|
520 |
msgstr "Име"
|
521 |
|
522 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
523 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
524 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
525 |
msgid "Website"
|
526 |
msgstr "Интернет сайт"
|
527 |
|
528 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
529 |
msgid "AIM"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
533 |
#, fuzzy
|
534 |
msgid "Yahoo IM"
|
535 |
msgstr "Покажи Yahoo IM"
|
536 |
|
537 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
538 |
#, fuzzy
|
539 |
msgid "Jabber / Google Talk"
|
540 |
msgstr "Покажи Jabber / Google Talk"
|
541 |
|
542 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
543 |
msgid "Biographical Info"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
547 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
548 |
msgid "Fields"
|
549 |
msgstr "Полета"
|
550 |
|
551 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:752
|
552 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:756
|
553 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_user_extra_fields.php:
|
554 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/
|
|
|
555 |
#, fuzzy
|
556 |
msgid "Users Extended"
|
557 |
msgstr "Разширен списък с Автори & Потребители"
|
@@ -570,31 +615,31 @@ msgstr ""
|
|
570 |
msgid "File '%s' is not an image."
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
574 |
#, fuzzy
|
575 |
msgid "Delete the file"
|
576 |
msgstr "Изтрий поле"
|
577 |
|
578 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
579 |
#, fuzzy
|
580 |
msgid "Update the file"
|
581 |
msgstr "Поднови поле"
|
582 |
|
583 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
584 |
#, fuzzy
|
585 |
msgid "Update the picture"
|
586 |
msgstr "Поднови поле"
|
587 |
|
588 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
589 |
msgid "Picture URL:"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
593 |
#, php-format
|
594 |
msgid "%s previous value: %s new value: %s"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php:
|
598 |
#, php-format
|
599 |
msgid "%s (%s) has changed one or more fields"
|
600 |
msgstr ""
|
@@ -605,8 +650,9 @@ msgid "New user registration on your site %s:"
|
|
605 |
msgstr ""
|
606 |
|
607 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:46
|
608 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:57
|
609 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:223
|
|
|
|
|
610 |
#, fuzzy, php-format
|
611 |
msgid "Username: %s"
|
612 |
msgstr "Потребителско име"
|
@@ -621,12 +667,6 @@ msgstr "e-mail: %s"
|
|
621 |
msgid "[%s] New User Registration"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:58
|
625 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:223
|
626 |
-
#, php-format
|
627 |
-
msgid "Password: %s"
|
628 |
-
msgstr ""
|
629 |
-
|
630 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:64
|
631 |
#, php-format
|
632 |
msgid "[%s] Your username and password"
|
@@ -665,6 +705,13 @@ msgstr ""
|
|
665 |
msgid "An error occurred during the activation"
|
666 |
msgstr ""
|
667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_email_handler.php:236
|
669 |
msgid "Invalid activation key."
|
670 |
msgstr ""
|
@@ -693,446 +740,447 @@ msgstr ""
|
|
693 |
msgid "That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing."
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
697 |
msgid "Add field"
|
698 |
msgstr "Добави поле"
|
699 |
|
700 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
701 |
msgid "Update field"
|
702 |
msgstr "Поднови поле"
|
703 |
|
704 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
705 |
msgid "Delete field"
|
706 |
msgstr "Изтрий поле"
|
707 |
|
708 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
709 |
msgid "Delete selected fields"
|
710 |
msgstr "Изтрий маркираните полета"
|
711 |
|
712 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
713 |
msgid "Change order"
|
714 |
msgstr "Смени реда"
|
715 |
|
716 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
717 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
718 |
msgid "Min length"
|
719 |
msgstr "Минимална дължина"
|
720 |
|
721 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
722 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
723 |
msgid "Exact length"
|
724 |
msgstr "Точна дължина"
|
725 |
|
726 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
727 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
728 |
msgid "Max length"
|
729 |
msgstr "Максимална дължина"
|
730 |
|
731 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
732 |
msgid "Exact or Max length"
|
733 |
msgstr "Точна или максимална дължина"
|
734 |
|
735 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
736 |
msgid "changed to"
|
737 |
msgstr "променен на"
|
738 |
|
739 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
740 |
msgid "You cannot give an order that misses some numbers"
|
741 |
msgstr "Не може да даваш ред, в който липсват числа"
|
742 |
|
743 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
744 |
-
#: /var/www/wp-content/plugins/cimy-user-extra-fields/cimy_uef_admin.php:
|
745 |
msgid "Nothing selected"
|
746 |
msgstr "Нищо не е избрано"
|
747 |
|
748 |
-
|