"; // Display user field input if ($profile_method == "input") { $options += [ 'type' => 'url', // We only accept websites that start with http(s) 'regex' => 'http(s)?\:\/\/(.*?)', 'inline' => TRUE, 'label_icon' => $icon // TODO: Change the error text in case a value was entered but is not valid ]; $user_fields = form_text('user_web', $locale['uf_web'], $field_value, $options); // Display in profile } else if ($profile_method == "display") { if ($field_value) { $field_value = !preg_match("@^http(s)?\:\/\/@i", $field_value) ? "http://".$field_value : $field_value; $field_value = (fusion_get_settings('index_url_userweb') ? "" : "")."".$locale['uf_web_001']."".(fusion_get_settings('index_url_userweb') ? "" : ""); } $user_fields = [ 'title' => $locale['uf_web'], 'value' => $field_value ?: '', 'icon' => $icon ]; }