Index du Forum » » Questions

Auteur

Equivalent lastarticle pour sections
B-Mag
2386       
 

  Posté : 15-01-2012 17:57

salut

non je ne pense pas

si cela peut aider vailace que j'ai sur les section en meta mot ( c'est OIN qui avait donné ceci)
OIN...revient



---------------------------------------------
!modifsection!

Retourne le dernier texte crée ou modifié&nbs p;dans les sections.

function MM_modifsection()
{

    global $NPDS_Prefix;

    $query=sql_query("SELECT artid,title FROM&n bsp;".$NPDS_Prefix."seccont ORDER BY timestamp DESC LI MIT 0,1");
    while (list($artid,$title)=sql_fetch_row($query) )
    {

        $MM_modifsection =  '<a href="sections.php?op=viewarticle&artid='.$artid.'">'.aff_la ngue($title).'</a>';

    }

    return ($MM_modifsection);

}
----------------------------------------------
!lastsection!

Retourne le dernier article crée dans les  ;sections.

function MM_lastsection()
{
    global $NPDS_Prefix;

    $query=sql_query("SELECT artid,title FROM&n bsp;".$NPDS_Prefix."seccont ORDER BY artid DESC LIMIT& nbsp;0,1");
    while (list($artid,$title)=sql_fetch_row($query) )
    {

        $MM_lastsection = ' <a href="sections.php?op=viewarticle&artid='.$artid.'">'.aff_lan gue($title).'</a>';

    }

    return ($MM_lastsection);

}
------------------------------------------------
!toparticles!

Retourne les X articles les plus lus dans& nbsp;section.
Variables que vous devez configurer :
top : nombre de posts que vous voulez  ;afficher.

function MM_toparticles()
{

    global $NPDS_Prefix;

    $MM_toparticles .= '<table width="1 00%" cellspacing="2" cellpadding="2" border="0">';

    settype($top,"integer");
    $top = "10";
    $max_caracteres=30;

    $result = sql_query("select artid,&nbs p;secid, title, content, counter from ".$NPDS_Prefix." seccont order by counter DESC limit 0,$top");
    $lugar=1;
    $i=0;
    while (list($artid, $secid, $title,&nb sp;$content, $counter) = sql_fetch_row($result))
    {

        $rowcolor=tablos();

        $MM_toparticles .=  '<tr '.$rowcolor.'>'
        .'<td>'.$lugar.' :  <a href="sections.php?op=viewarticle&artid='.$artid.'">'.a ff_langue($title).'</a></td>'
        .'<td align="right"&g t;'.$counter.' '.translate('times').'</td>'
        .'</tr>';

        $lugar++;

    }

    $MM_toparticles .= '</table>';

    return ($MM_toparticles);

}
---------------------------------------




Cet article provient de NPDS

http://www.npds.org/viewtopic.php?topic=25340&forum=9