Fork me on GitHub

Rapport de message :*
 

Re: Module News : Classement alphabétique

Titre du sujet : Re: Module News : Classement alphabétique
par montuy337513 sur 26/09/2012 11:54:12

Je ne t'avais pas oublié, juste un peu débordé

Là il y a du travail de modification a faire sur le fichier archive.php

A partir de la 89 cela devient :
//$fromyear = (isset($_GET['year'])) ? intval ($_GET['year']): 0;
$fromyear =  0;
//$frommonth = (isset($_GET['month'])) ? intval($_GET['month']) : 0;
$frommonth 0;

//$pgtitle='';
//if($fromyear && $frommonth) {
//    $pgtitle=sprintf(" - %d - %d",$fromyear,$frommonth);
//}


ensuite a partir de la ligne 105 :
//$xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars(_NW_NEWSARCHIVES) . $pgtitle . ' - ' . $xoopsModule->name('s'));
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars(_NW_NEWSARCHIVES) . ' - ' $xoopsModule->name('s'));


ensuite a partir de la ligne 120 :
} else {
/*    $years = array();
    $months = array();
    $i = 0;
    while (list($time) = $xoopsDB->fetchRow($result)) {
        $time = formatTimestamp($time, 'mysql', $useroffset);
            if (preg_match("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/", $time, $datetime)) {
                $this_year  = intval($datetime[1]);
                $this_month = intval($datetime[2]);
            if (empty($lastyear)) {
                $lastyear = $this_year;
            }
            if ($lastmonth == 0) {
                $lastmonth = $this_month;
                $months[$lastmonth]['string'] = $months_arr[$lastmonth];
                $months[$lastmonth]['number'] = $lastmonth;
            }
            if ($lastyear != $this_year) {
                $years[$i]['number'] = $lastyear;
                $years[$i]['months'] = $months;
                $months = array();
                $lastmonth = 0;
                $lastyear = $this_year;
                $i++;
            }
            if ($lastmonth != $this_month) {
                $lastmonth = $this_month;
                $months[$lastmonth]['string'] = $months_arr[$lastmonth];
                $months[$lastmonth]['number'] = $lastmonth;
            }
        }
    }
    $years[$i]['number'] = $this_year;
    $years[$i]['months'] = $months;
    $xoopsTpl->assign('years', $years);*/
}

//if ($fromyear != 0 && $frommonth != 0) {


ensuite a partir de la ligne 160 :
//    $xoopsTpl->assign('currentmonth', $months_arr[$frommonth]);
    
$xoopsTpl->assign('currentmonth''');


ensuite a partir de la ligne 175 :
//$storyarray = $news->getArchive($monthstart, $monthend, $restricted);
    
$storyarray $news->getArchive(0time(), $restricted);


et enfin a partir de la ligne 196
$xoopsTpl->assign('lang_storytotal'sprintf(_NW_THEREAREINTOTAL$count));
//} else {
 //   $xoopsTpl->assign('show_articles', false);
//}

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

11 Personne(s) en ligne (9 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 11 | Plus ...