Salut, dans le même esprit, tu peux coller le code suivant dans un fichier php à la racine de ton site (requisition.php par exemple).
Change juste l'uid sur la première ligne de code puis appelle la page dans ton navigateur.
<?php
$uid = "1"; //indiquer l'uid du membre dont il faut récupérer les posts
include 'mainfile.php';
$db_server = XOOPS_DB_HOST; // server name
$db_user = XOOPS_DB_USER; // username
$db_pass = XOOPS_DB_PASS; // password
$xoops_db = XOOPS_DB_NAME; // xoop database name
$xoops_tbl = XOOPS_DB_PREFIX."_"; // table prefix
if( !$db = mysql_connect($db_server, $db_user, $db_pass) )
{
printf("There was an error while connecting to the database!", mysql_error($db));
//exit;
}
if( !mysql_select_db($xoops_db,$db) )
{
printf("There was an error while changing databases! %s", mysql_error($db));
//exit;
}
$sql = sprintf("select subject, from_unixtime(post_time), poster_ip, post_text from ".$xoops_tbl."bb_posts a, ".$xoops_tbl."bb_posts_text b where a.post_id = b.post_id and a.uid = '".$uid."';", $xoops_db, $xoops_tbl);
if( !$result = mysql_query($sql,$db) )
{
printf("<br />There was an error while selecting post!", mysql_error($db));
//exit;
}
echo "<table border='1'>";
echo "<tr align='center'><td>Date/ Heure</td><td>IP</td><td>Sujet</td><td>Message</td></tr>";
while ($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".$row[1]."</td>";
echo "<td>".long2ip($row[2])."</td>";
echo "<td>".$row[0]."</td>";
echo "<td>".$row[3]."</td>";
echo "</td></tr>";
} // while()
echo "</table>";
mysql_close($db);
?>
Ca devrait te donner le résultat ci-joint.