When I’m trying to add a website URL without "http://", the system gives me an error.
It takes time for users to find out what was the problem.
So, I’m considering this as a Bad User experience.
Please refer to the snapshot in attachment.
When I’m trying to add a website URL without "http://", the system gives me an error.
It takes time for users to find out what was the problem.
So, I’m considering this as a Bad User experience.
Please refer to the snapshot in attachment.
Last edited by PGGO; May 8, 2012 at 02:00 AM.
Hi Petnax,
check this ->
open the File includes/classes/rlValid.class.php
In Line 266 there is the function getDomain
The following code checked the url for http, https and also ftp. But u need only the check for http.Code:Only registered members can view the code.
Change function getDomain with following code and test itCode:Only registered members can view the code.
Now the website Field will check for http://Code:Only registered members can view the code.
The only Problem is the message. I found no solution for this. But i think the Flynax Team can help you for this.
The regular message is:
It would be better Message:The data you have entered in the "Website" field are incorrect.
This Message is in the phrase key: notice_field_incorrectThe data you have entered in the "Website" field are incorrect. Correct input for example http:// www. your-domain. com
But this message is not only for the Website Field. It is better to use a separate phrase for the Website field error. this is a Job for Flynax team...
Best regards
Steffen
Last edited by Steffen Buschkemper; May 8, 2012 at 06:08 AM.
Hi Steffen,
Thank you for your suggestion; however, after I added this code, nothing happened.
I hope Flynax will take some action in order to fix this error.
Hi Petnax,
It works for me. There are no problems.
Best regards
Steffen
Hi all,
If you want to remove url checking you can just edit the field, open edit field page in AP and you'll see that the field has URL as checking condition.
You can just remove it for the field and it will allow any text.
If it's not what you want and you want script to validate urls with or without www solution in code is below.
<b>For those who want to allow links without leading http:// try changes below.</b>
includes/classes/rlValid.class.php
Code:Only registered members can view the code.
<b>To make different error message for the URL fields make following changes.</b>
open includes/classes/rlCommon.class.php and find function checkDynamicForm
find code in the function which handles text fields with condition:
~340 line
and change toCode:Only registered members can view the code.
Code:Only registered members can view the code.
And through Languages manager add new phrase with key notice_url_field_incorrect with your new error message
Phrase text should be like this
"The data you have entered in the {field} field are incorrect. Correct input for example http://www.your-domain.com/"
Last edited by Mike; May 9, 2012 at 04:26 AM.
Mike:
I added the code (first code) you suggest; however, it does not work.
Getting the same issue, the system does not allow me to add a website URL without “http://”
I want to add "www.mysite.com", but system accept it only as "http://www.mysite.com"
Hi Pentax,
there is an mistake. LoL
But i think the url with http:// is a better solution.
Not all urls must have a www. syntax!
Flynax has a problem without www!
But not if you type http://your-domain.de
Best regards
Steffen
The reason why I’m considering this as a bad user experience, because most people prefer to type their own domain name starting with www.mysite.com rather than with http://www.mysite.com
It's not a good idea to serve an error every time someone is trying to add a new listing.
The best solution is to accept both version, with http:// and without.
There is mistake! Sorry for that.
getDomain is wrong function for those changes
please roll back changes made to getDomain function and apply them to isUrl function (rlValid class)
Code:Only registered members can view the code.
Hi Petnax,
Forget everything that was written before!
I have a good solution for you.
This solution is at first only for Account details.
There is also the same problem!
Open the file in templates/*your-template*/tpl/controllers/profile.tplBut the same solution you can us in add listings, but the input field name is other and must be changed in my script!
Its this part-> $('input[name="-Here you must put in the input fieldname-"]').blur(function()
The easy way to find out the field name is firebug (Firefox). I think the fieldname is -> f[website]. But i am not sure.
Then you can put in the script in templates/*your-template*/tpl/add_listing.tpl after <script type="text/javascript" src="{$smarty.const.RL_LIBS_URL}ckeditor/ckeditor.js"></script>
After the follow part ->
Paste the following code belowCode:Only registered members can view the code.
And now there are no problems!Code:Only registered members can view the code.
You can write without http:// -> "your-domain.de" or www. your-domain.de
The script add automatically the "http://" and there are no Error 404
I think that is what you want.
jQuery Rocks! :cool:
Sorry for my bad english!
Best regards
Steffen
Last edited by Steffen Buschkemper; May 16, 2012 at 06:58 PM.