Bon, en m'appuyant sur le code de recherche pour MxBoard, je suis arrivé à mes fins
http://www.myrmecosphere.fr/modules.php?topic=&days=0&type=forum&sid=0&name=Search&query=lasius+nigerça propose une vue simple (loin de celle du module de recherche de SMF), mais ainsi, je dispose d'une vue succcincte et rapide, et si l'utilisateur le veut, il peut effectuer une recherche approfondie sur SMF.
// ######################ENDE CONTENT#################################
// ######################BEGINN eBOARD################################
elseif ($type == "forum") {
unset($table_posts);
if (@file_exists(PMX_MODULES_DIR . DS . 'Forum/smf/Settings.php')) {
include(PMX_MODULES_DIR . DS . 'Forum/smf/Settings.php');
$tablepre = $prefix . '_smf_';
$table_threads = $tablepre.'topics';
$result = sql_query("SELECT " . $tablepre . "messages.ID_MSG, " . $tablepre . "messages.ID_TOPIC, " . $tablepre . "messages.ID_BOARD AS BOARD, " . $tablepre . "messages.subject, " . $tablepre . "messages.posterName, " . $tablepre . "messages.icon, " . $tablepre . "messages.body, " . $tablepre . "messages.subject, " . $tablepre . "topics.ID_FIRST_MSG
FROM " . $tablepre . "messages
INNER JOIN " . $table_threads . "
ON " . $tablepre . "messages.ID_MSG = " . $tablepre . "topics.ID_FIRST_MSG
WHERE ((subject LIKE '%" . $search_querystring . "%' OR body LIKE '%" . $search_querystring . "%') AND (" . $tablepre . "messages.ID_BOARD <> [color=red][b]NUMERO_DE_BOARD_INTERDIT_AU_PUBLIC[/b][/color])) ORDER BY ID_TOPIC DESC limit " . intval($min) . "," . intval($offset)) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
$nrows = sql_num_rows($result);
} else {
$nrows = 0;
$result = false;
}
//print "<br /><strong>Forum</strong><br /><br />";
$x = 0;
if (!empty($query)) {
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" border=\"0\" bgcolor=\"$bgcolor1\">\n";
echo "
<tr bgcolor=\"$bgcolor2\">
<th></th>
<th>Topic</th>
<th>Membre</th>
</tr>";
if ($nrows > 0) {
while (list($ID_MSG, $ID_TOPIC, $ID_BOARD, $subject, $posterName, $icon, $body, $subject, $ID_FIRST_MSG) = sql_fetch_row($result)) {
// Anzahl der Antworten
// $neuezahl=$tid;
// $result1 = sql_query("select tid from ".$prefix."_eBoard_posts where (tid like ".intval($neuezahl).") ORDER BY tid DESC limit ".intval($min).",".intval($offset));
// $nrows1 = sql_num_rows($result1);
// Ende
//$text = trim(substr($body, 0, 45));
if ($icon == "") $icon = "exclamation.gif";
echo "<tr bgcolor=\"$bgcolor2\"><td width=\"5%\">"
. mxCreateImage('modules/Forum/smf/Themes/VOTRE_THEME/images/post/' . $icon . '.gif')
. "</td><td width =\"70%\"><strong><a href=\"modules.php?name=Forum&topic=" . $ID_TOPIC . ".msg" . $ID_MSG . "#msg" . $ID_MSG . "\">" . $subject . "</a></strong>"
. "</td><td width=\"25%\">"
. mxCreateUserprofileLink($posterName)
// . "</td><td width=\"15%\">"
// ."$nrows1 Antwort (en)."
. "</td></tr>";
$x++;
}
echo"</table>";
} else {
echo "<tr><td><center><font class=\"option\"><b>" . _NOMATCHES . "</b></font></center><br /><br />";
echo "</td></tr></table>";
}
$prev = $min - $offset;
if ($prev >= 0) {
print "<br /><br /><center><a href=\"modules.php?name=Search&author=$author&topic=$t&min=$prev&query=" . $search_urlstring . "&type=$type\">";
print "<b>$min " . _PREVMATCHES . "</b></a></center>";
}
$next = $min + $offset;
if ($x >= ($offset-1)) {
print "<br /><br /><center><a href=\"modules.php?name=Search&author=$author&topic=$t&min=$max&query=" . $search_urlstring . "&type=$type\">";
print "<b>" . _NEXTMATCHES . "</b></a></center>";
}
echo '<hr /><center><p><strong><a href="http://www.myrmecosphere.fr/modules.php?name=Forum&action=search">Recherche approfondie</a></strong></p></center><hr />';
}
// ############ Antworten
/*
if (isset($table_posts)) {
$tablepre = $prefix . '_smf_';
$table_threads = $tablepre.'messages';
$result2 = sql_query("SELECT ID_BOARD, ID_MSG, ID_TOPIC, posterName, body, posterTime from " . $table_posts . " where (message LIKE '%" . $search_querystring . "%') ORDER BY pid DESC limit " . intval($min) . "," . intval($offset));
$nrows2 = sql_num_rows($result2);
} else {
$nrows2 = 0;
$result2 = false;
}
print '<br /><strong>' . _INANSWERS . ': </strong><br /><br />';
if (!empty($query)) {
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" border=\"0\" bgcolor=\"$bgcolor1\">\n";
while (list($ID_BOARD, $ID_MSG, $ID_TOPIC, $posterName, $body, $posterTime) = sql_fetch_row($result2)) {
$antwort = trim(substr($body, 0, 45));
echo "<tr bgcolor=\"$bgcolor2\"><td width =\"60%\">"
. "<a href=\"modules.php?name=Forum&topic=" . $ID_TOPIC . ".msg" . $ID_MSG . "#msg" . $ID_MSG . "\">"
. mxCreateImage('modules/Forum/smf/Themes/default/images/post/exclamation.gif')
. $antwort . "...</td><td width=\"25%\">"
. mxCreateUserprofileLink($posterName)
. "</td><td width=\"15%\">"
. "<a href=\"modules.php?name=Forum&board=" . $ID_BOARD . ".0\">"
. "Forum ID: " . $ID_BOARD . "</a>"
. "</td></tr>";
}
echo"</table>";
}
*/
}