|
Accept ñ o Ñ or tildes
|
|
06-03-2011, 07:57 AM
Post: #1
|
|||
|
|||
|
Accept ñ o Ñ or tildes
Hola alguien sabe como hacer para que el formulario de registro acepte Ñ y acentos?
Gracias _______________________________________________________________ Hi anyone knows how to have the registration form accept Ñ and accents? Thanks Quote:NyU Hosting Gratis Con Soporte En Español. |
|||
|
06-03-2011, 01:31 PM
Post: #2
|
|||
|
|||
|
RE: Accept ñ o Ñ or tildes
It should accept it if you reconfigure the database to use the correct encoding. A quick google for me brough up that either of these should work...
"UTF-8" or "ISO-8859-1"
|
|||
|
06-03-2011, 04:35 PM
Post: #3
|
|||
|
|||
|
RE: Accept ñ o Ñ or tildes
THT v1.2.3 has a default database encoding of utf8_general_ci. This should be able to handle most international characters.
Kevin Mark - TheHostingTool Lead Developer |
|||
|
06-04-2011, 05:34 AM
Post: #4
|
|||
|
|||
|
RE: Accept ñ o Ñ or tildes
Yes that is for encoding characters in the THT, but im answering for the new sign ups in the sign up form if itry to put a name like (begoña) is a female spanish name is marked with a red cross because the (ñ) is not a valid character in regex, but i dont know witch file i have to modify is the ajax.php or is in another file
Quote:NyU Hosting Gratis Con Soporte En Español. |
|||
|
06-04-2011, 04:39 PM
(This post was last modified: 06-04-2011 04:42 PM by zzbomb.)
Post: #5
|
|||
|
|||
|
RE: Accept ñ o Ñ or tildes
Well why didnt you say so?!? I thought it was a database issue...
I guess you could do something like this... Replace lines 66 to 204 with the following code. in the ajax.php file. Code: if(!preg_match("/^([0-9a-zA-ZÁÉÍÓÚáéíóuñÑ])+$/",$main->getvar['user'])) {Oh also. I think it would be a great idea to make implementation of this easier in future versions. Perhaps write a few functions to improve regular expression checking across multiple languages and requirements or something. Idk. But yea, my fix is sorta Hackish. Oh and i did not text this code.. so if you get lots of errors... WOOPS. lol. i have no idea if this will actually work Theoretically it should >.<
|
|||
|
06-04-2011, 09:15 PM
Post: #6
|
|||
|
|||
|
RE: Accept ñ o Ñ or tildes
That code work only in the username if i put begoña is working but in the address i put Dr. Ibañez N 4 2 IZQ and not accept it, by the way if a new customer do sign up with the name begoña in username when he/she try to login it takes error, is because in the database it stores like begoña instead of begoña and when THT is trying to get the username it not match.
But is ok im not going to try any more i just put a warning in signup form thanks Quote:NyU Hosting Gratis Con Soporte En Español. |
|||
|
06-04-2011, 09:31 PM
Post: #7
|
|||
|
|||
RE: Accept ñ o Ñ or tildes
(06-04-2011 09:15 PM)draculia Wrote: That code work only in the username if i put begoña is working but in the address i put Dr. Ibañez N 4 2 IZQ and not accept it, by the way if a new customer do sign up with the name begoña in username when he/she try to login it takes error, is because in the database it stores like begoña instead of begoña and when THT is trying to get the username it not match. Hmmm. Alright. That is strange. Perhaps this will get improved in future versions
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)




![[Image: sig.png]](http://zzbomb.com/sig.png)

![[Image: standard.png]](http://twitstamp.com/kmark937/standard.png)
![[Image: standard.png]](http://twitstamp.com/thehostingtool/standard.png)
Theoretically it should >.<