intégration image

This commit is contained in:
Michael RICOIS 2010-04-01 09:50:47 +00:00
parent d847133d26
commit f7967331b9
13 changed files with 9 additions and 6 deletions

View File

@ -8,9 +8,8 @@ function commentaires_siren($content){
}
function commentaires_liste($content){
$pattern = '/(.*?)<li([\+|-]?)>(.+?)/Usi';
$pattern = '/(.*?)<li([\+|-]?)>(.+?)/i';
if(preg_match($pattern, $content, $matches)){
FB::log($matches, 'li');
switch($matches[2]){
case '+':
$class = 'plus';
@ -29,8 +28,11 @@ function commentaires_liste($content){
}
function commentaires_image($content){
$pattern = '/IMAGE\((.*?)\)/i';
preg_match($pattern, $content, $matches);
$replace = '<img src="../img/commentaires/'.strtolower($matches[1]).'"/>';
$output = str_replace($matches[0], $replace, $content);
return $output;
}
function commentaires_lien($content){

View File

@ -89,7 +89,7 @@
}
#commentaires span{
padding-left:10px;
padding-left:15px;
}
#commentaires span.plus{

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1673,7 +1673,8 @@ if(count($tabCommentaires)>0)
$commentaires = commentaires_lien($commentaires);
//Traitement des balises li+, li-, li
$commentaires = commentaires_liste($commentaires);
//Traitement des images
$commentaires = commentaires_image($commentaires);
//Traitement des graphiques
$pattern = '/\[GRAPHIQUE id=(.*?) titre=\'(.*?)\',(.*?#[a-zA-Z]{1})]/';
if( preg_match($pattern, $commentaires, $matches) ){