intégration image
@ -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){
|
||||
|
@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
#commentaires span{
|
||||
padding-left:10px;
|
||||
padding-left:15px;
|
||||
}
|
||||
|
||||
#commentaires span.plus{
|
||||
|
BIN
www/img/commentaires/schema_bilan_bon.gif
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
www/img/commentaires/schema_bilan_bon_reduit.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
www/img/commentaires/schema_bilan_equilibre.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
www/img/commentaires/schema_bilan_equilibre_reduit.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
www/img/commentaires/schema_bilan_mauvais.gif
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
www/img/commentaires/schema_bilan_mauvais_reduit.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
www/img/commentaires/schema_bilan_tresbon.gif
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
www/img/commentaires/schema_bilan_tresbon_reduit.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
www/img/commentaires/schema_bilan_tresmauvais.gif
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
www/img/commentaires/schema_bilan_tresmauvais_reduit.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
@ -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) ){
|
||||
|