Re: Bloc Menu du Module Pages | Titre du sujet : Re: Bloc Menu du Module Pages par alain01 sur 19/04/2013 11:23:25
je pense avoir compris...
<?php
function b_pages_list() {
global $xoopsDB, $xoopsModule, $myts;
$myts =& MyTextSanitizer::getInstance();
$block['content'] =" ";
$result2 = $xoopsDB->query("SELECT CID FROM " . $xoopsDB->prefix("pages") . "");
$numrows = $xoopsDB->getRowsNum($result2);
if ($numrows > 0)
{
$sql = "SELECT CID, pagetitle, pageheadline, weight, publishdate FROM " . $xoopsDB->prefix("pages") . " WHERE mainpage <>0 OR defaultpage =1 ORDER BY weight, pagetitle ASC";
$result = $xoopsDB->query($sql) ;
while (list($CID, $pagetitle, $pageheadline, $publishdate) = $xoopsDB->fetchrow($result))
{
$pagetitle = $myts->htmlSpecialChars($pagetitle);
$block['content'] .= "<a href='" . XOOPS_URL . "/modules/pages/index.php?pagenum=$CID' title='" . $pagetitle . "'>" . $pagetitle . "</a><br />";
$block['content'] .="<a href='nnnnn' title='bbbb'>mon lien 1</a><br /><a href='oooo' title='ccc'>mon lien 2</a><br />
}
} else {$block['content'] = _MD_NOPAGE;}
return $block;
}
?>
Si c'est pas pile poil cela, c'est quelque chose de ce genre...
il faut ajouter à $block['content'] tes liens...
|
|