Thanks M-Jay, I have some small fixes on it so it works for V2.08 & V2.5 :
<?php
//
// TorrentTrader v2.x
// $LastChangedDate: 2021-06-19 22:35:58 +0000 (Sat, 19 Jun 2021) $
// $LastChangedBy: M-Jay $
//
// http://www.torrenttrader.uk
//
//
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
require_once("backend/functions.php");
dbconn();
$id = (int)$_GET["id"];
if (!isset($id) || !$id) {
autolink('', "no id");
}
$res = SQL_Query_exec("SELECT forum_posts.id, topicid, userid, forum_posts.added, body, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM forum_posts LEFT JOIN users ON forum_posts.userid = users.id WHERE userid = $id ORDER BY forum_posts.userid "); //$limit
$row = mysql_fetch_assoc($res);
if (!$row) {
autolink('', "User has not posted in forum");
}
$title = T_("ALLFORUMPOST") . "<a href='account-details.php?id=" . $row['userid'] . "'> $row[username]</a>";
stdhead($title);
begin_frame($title);
while ($row = mysql_fetch_assoc($res)) {
$postername = $row["username"];
if ($postername == "") {
$postername = T_("DELUSER");
$title = T_("DELETED_ACCOUNT");
$avatar = "";
$usersignature = "";
$userdownloaded = "";
$useruploaded = "";
} else {
$privacylevel = $row["privacy"];
$avatar = htmlspecialchars($row["avatar"]);
$title = format_comment($row["title"]);
$usersignature = stripslashes(format_comment($row["signature"]));
$userdownloaded = mksize($row["downloaded"]);
$useruploaded = mksize($row["uploaded"]);
}
if ($row["downloaded"] > 0) {
$userratio = number_format($row["uploaded"] / $row["downloaded"], 2);
} else {
$userratio = "---";
}
if (!$avatar) {
$avatar = "/images/default_avatar.png";
}
$commenttext = format_comment($row["body"]);
$edit = null;
if ($CURUSER["edit_torrents"] == "yes" || $CURUSER["edit_news"] == "yes" || $CURUSER['id'] == $row['user']) {
$edit = ' <a href="../forums.php?action=editpost&postid=' . $row['id'] . '" class="button"> Edit</a> ';
}
$delete = null;
if ($CURUSER["delete_torrents"] == "yes" || $CURUSER["delete_news"] == "yes") {
$delete = ' <a href="../forums.php?action=deletepost&postid=' . $row['id'] . '&sure=0" class="button"> Delete</a> ';
}
print('<div><table border="0" class="table table-bordered2" width="100" cellpadding="3" cellspacing="3">');
print('<tr class="b-title">');
print('<th align="center" width="150"><span class="small" style="color:gold;text-shadow: 1px 1px 1px #000;">Posted: ' . date("d-m-Y \\u\\ H:i:s", utc_to_tz_time($row["added"])) . '<a id="comment' . $row["id"] . '"></a></span></th>');
print('<th align="right">' . $edit . $delete . ' <a href="../report.php?forumid=' . $row['topicid'] . '&forumpost=' . $row['id'] . '" class="button"> Report</a> </th>');
print('</tr>');
print('<tr valign="top">');
if ($CURUSER['edit_users'] == 'no' && $privacylevel == 'strong') {
print('<td align="left" width="170"><center><a href="account-details.php?id=' . $row['userid'] . '"><b>' . $postername . '</b></a><br /><i>' . $title . '</i><br /><img width="100" height="100" class="img" src="' . $avatar . '" alt="" /><br /><br /><a href="account-details.php?id=' . $row['userid'] . '"><button type="button" class="button"> Profil</button></a> <a href="mailbox.php?compose&id=' . $row['userid'] . '" class="button"><i class="far fa-envelope"></i> P.M </a></center></td>');
} else {
print('<td align="left" width="170"><center><a href="account-details.php?id=' . $row['userid'] . '"><b>' . $postername . '</b></a><br /><i>' . $title . '</i><br /><img width="100" height="100" class="img" src="' . $avatar . '" alt="" /><br /><br /><a href="account-details.php?id=' . $row['userid'] . '"><button type="button" class="button"> Profil</button></a> <a href="mailbox.php?compose&id=' . $row['userid'] . '" class="button"><i class="far fa-envelope"></i> P.M </a></center></td>');
}
print('<td>' . $commenttext . '<hr />' . $usersignature . '</td>');
print('</tr>');
print('</table></div><br />');
}
end_frame();
stdfoot();
?>
Link to implemente is:
<a href="userforumpost.php?id=<?php echo $id ?>"<?php echo number_format($numforumposts); ?> </a>
Regards to all of you guys
www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2021-06-20 19:35:34