|
|
|
[Solved} xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
xtypo is working fine, but I have the following error message in some article :
Warning: preg_replace() [function.preg-replace]: Unknown modifier 't' in /home/www/mambots/content/xtypo.php on line 230
the script was
C'est avec un guillemet
It is because we use the ' (which is quite common in french)
Any idea to fix the problem ?
Regards
Patrick
|
|
|
|
|
|
|
Last Edit: 2007/11/01 02:39 By ricardosousa.
|
|
|
|
|
|
|
Re:xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
|
Same problem at me !!
|
|
|
|
|
|
|
|
|
|
|
Re:xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
|
Hi,
Same problem for me.
To fix it, edit xtypo.php located in /mambots/content/ and replace this line (at the very end of the file):
$row->text = preg_replace("'{".preg_quote($key)."}".preg_quote($match)."{/".preg_quote($key)."}'s", $startcode.$code.$endcode , $row->text );
by these 4 lines :
// FIX for XTypo Simple quote Bug
$a = preg_quote($match);
$a = str_replace("'", "\'", $a);
$row->text = preg_replace("'{".preg_quote($key)."}".$a."{/".preg_quote($key)."}'s", $startcode.$code.$endcode , $row->text );
Instructions in french :
Pour résoudre le problème, editer le fichier xtypo.php situé dans le repertoire /mambots/content/ et remplacer la ligne suivante :
$row->text = preg_replace("'{".preg_quote($key)."}".preg_quote($match)."{/".preg_quote($key)."}'s", $startcode.$code.$endcode , $row->text );
par ces 4 lignes :
// FIX for XTypo Simple quote Bug
$a = preg_quote($match);
$a = str_replace("'", "\'", $a);
$row->text = preg_replace("'{".preg_quote($key)."}".$a."{/".preg_quote($key)."}'s", $startcode.$code.$endcode , $row->text );
|
|
|
|
|
|
|
|
|
|
|
Re:xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
|
Hi, Bonjour
I mad ethe change, upload the new xtypo.php file, but it does not work, still have the same error message :
Warning: preg_replace() [function.preg-replace]: Unknown modifier 'a' in /home/www/ppotier/www/mambots/content/xtypo.php on line 233
Could you contact me by mail to check the problem ? and then we will give the patch.
Merci pour tout
email p.potier91 /at\ free.fr
|
|
|
|
|
|
|
|
|
|
|
Re:xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
Oups, the code i've inserted here was modified by the forum when published...
I try to republish it :
| Code: |
$a = preg_quote($match);
$a = str_replace("'", "\'", $a); // the first argument is : doublequote simplequote doublequote.
// the second argument is : doublequote [b]backslash simplequote [/b]doublequote.
$row->text = preg_replace("'{".preg_quote($key)."}".$a."{/".preg_quote($key)."}'s", $startcode.$code.$endcode , $row->text );
|
The backslash was skipped by the forum... ^ ^
Fred
|
|
|
|
|
|
|
|
|
|
|
Re:xtypo do not like the simple quote ? 1 Year, 7 Months ago
|
|
It's work ! thanks a lot !
Et oui, ça marche maintenant, merci beaucoup 
|
|
|
|
|
|
|
|
|