4images Forum & Community

4images Issues / Ausgaben => Feedback & Suggestions => Topic started by: thunderstrike on October 03, 2007, 04:05:46 AM

Title: [FIX] - includes/functions.php file - Spanish and french chars
Post by: thunderstrike 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);
Title: Re: [FIX] - includes/functions.php file - Spanish and french chars
Post by: Nicky 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
Title: Re: [FIX] - includes/functions.php file - Spanish and french chars
Post by: thunderstrike on October 03, 2007, 12:55:31 PM
Oh ok thank for this.
Title: Re: [FIX] - includes/functions.php file - Spanish and french chars
Post by: SISOR on October 05, 2007, 09:08:09 AM
The problem is solved.

Thank you very much.