Author Topic: [FIX] - includes/functions.php file - Spanish and french chars  (Read 11160 times)

0 Members and 2 Guests are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
[FIX] - includes/functions.php file - Spanish and french chars
« on: October 03, 2007, 04:05:46 AM »
Quote
when somebody add a comment with the "ñ", an accent "áéíóúàèìùòù", the "¿" or the "¡", the comment does not appear. 

Inexplicably, once sent the comment, it is possible to edit and add these symbols.

http://www.4homepages.de/forum/index.php?topic=18929

This is for fix spanish and french chars in comments and forms.

In includes/functions.php file,

find:

Quote
$text = str_replace("\\'", "'", $text);

add after:

Code: [Select]
$text = str_replace("á", "á", $text);
$text = str_replace("Á", "Á", $text);
$text = str_replace("é", "é", $text);
$text = str_replace("É", "É", $text);
$text = str_replace("í", "í", $text);
$text = str_replace("Í", "Í", $text);
$text = str_replace("ó", "ó", $text);
$text = str_replace("Ó", "Ó", $text);
$text = str_replace("ú", "ú", $text);
$text = str_replace("Ú", "Ú", $text);
$text = str_replace("à", "à", $text);
$text = str_replace("À", "À", $text);
$text = str_replace("è", "è", $text);
$text = str_replace("È", "È", $text);
$text = str_replace("ì", "ì", $text);
$text = str_replace("Ì", "Ì", $text);
$text = str_replace("ù", "ù", $text);
$text = str_replace("Ù", "Ù", $text);
$text = str_replace("ò", "ò", $text);
$text = str_replace("Ò", "Ò", $text);
$text = str_replace("¡", "¡", $text);
$text = str_replace("¿", "¿", $text);
$text = str_replace("ñ", "ñ", $text);
$text = str_replace("Ñ", "Ñ", $text);
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [FIX] - includes/functions.php file - Spanish and french chars
« Reply #1 on: October 03, 2007, 11:59:00 AM »
this is the correct fix.

http://www.4homepages.de/forum/index.php?topic=18256.msg99614#msg99614

no matter if french, spanish, russian, etc..

live demo > http://www.nicky.net/4test/details.php?image_id=1
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [FIX] - includes/functions.php file - Spanish and french chars
« Reply #2 on: October 03, 2007, 12:55:31 PM »
Oh ok thank for this.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline SISOR

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [FIX] - includes/functions.php file - Spanish and french chars
« Reply #3 on: October 05, 2007, 09:08:09 AM »
The problem is solved.

Thank you very much.