Categories > TinyButStrong general (FR) >

Première démarche - Aidez-moi a mettre en place svp

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Anthony
Date: 2008-07-18
Time: 21:24

Première démarche - Aidez-moi a mettre en place svp

Bonjour, je viens juste de découvrir ce moteur et a priori, il est super sympa. pouvez-vous m'aider à mettre ce code en séparant le php du html ?

Je galère trop.

Merci de votre aide


            <?php
        $commaff= mysql_query("SELECT * FROM ".T_NEWS." ORDER BY id DESC LIMIT 0,2");
        while ($donnees = mysql_fetch_array($commaff))
            {
            $max=100;
            $chaine=$donnees['description'];
            if(strlen($chaine)>=$max)

            {
                $chaine=substr($chaine,0,$max);
                $espace=strrpos($chaine," ");
            if($espace)
                $chaine=substr($chaine,0,$espace);
                $chaine .= ' ...';
            }       
            $numero=$donnees[0];
           
$url=$donnees[1];
$url = preg_replace("`\[.*\]`U","",$url);
$url = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$url);
$url = htmlentities($url, ENT_COMPAT);
$url = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i","\\1", $url );
$url = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $url);
$url = ( $url == "" ) ? $type : strtolower(trim($url, '-'));



                            echo'
<table width="100%" border="0" cellspacing="0" cellpadding="5">
                          <tr>
                            <td width="5%"  valign="top"><table border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td width="47" valign="top" ><a class="actualitetextelien" href="'.$numero.'-'.stripslashes ($url).'.html"><img src="images/news/'.$donnees['images'].'" width="49" height="49" border="0" class ="corners iradius5 ishadow33 iborder1 icolorffffff"></a></td>
                              </tr>
                            </table></td>
                      <td width="95%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td>


<a class="actualitetextelien" href="'.$numero.'-'.stripslashes ($url).'.html">


<strong><img src="images/flecheblanche.gif" width="3" height="5" border="0"> '.stripslashes ($donnees['titre']).'</strong></a><br />
'.stripslashes ($chaine).'</td>
                              </tr>
                            </table>
                            </td>
  </tr>
                        </table><div class="ligneblanche"></div>';                }
            ?>
By: Skrol29
Date: 2008-07-26
Time: 00:34

Re: Première démarche - Aidez-moi a mettre en place svp

toujours bloqué ?