Re: Bloc Menu du Module Pages | Titre du sujet : Re: Bloc Menu du Module Pages par alain01 sur 19/04/2013 13:31:19
ouais, normal, suis vraiment pas bon :
Citation :<?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 /> <a href='http://tonlien.fr' title='titre lien'>lien visible</a>;"
} } else {$block['content'] = _MD_NOPAGE;} return $block; } ?>
Attention, j'ai enlevé un guillemet à la fin de $pagetitle . "</a><br />", pour le mettre plus loin...
|
|