Modification lien image

This commit is contained in:
Michael RICOIS 2010-04-02 14:29:37 +00:00
parent 617f8909cd
commit 6c9535b8b6

View File

@ -30,7 +30,7 @@ function commentaires_liste($content){
function commentaires_image($content){ function commentaires_image($content){
$pattern = '/IMAGE\((.*?)\)/i'; $pattern = '/IMAGE\((.*?)\)/i';
preg_match($pattern, $content, $matches); preg_match($pattern, $content, $matches);
$replace = '<img src="../img/commentaires/'.strtolower($matches[1]).'"/>'; $replace = '<img src="./img/commentaires/'.strtolower($matches[1]).'"/>';
$output = str_replace($matches[0], $replace, $content); $output = str_replace($matches[0], $replace, $content);
return $output; return $output;
} }