Dont want to take your thread off topic Garciat, move this is you wish, but I managed to get what I was looking for working Using 1.2, the below will show latest topics on the users profile instead of latest posts. I still haven't got the hang of making extensions but maybe this can easily be ported over also, or added as an option to this extension?
The original query I used:
<?php
$result = $db->query('SELECT * FROM '.$db_prefix.'topics WHERE poster = \''.pun_htmlspecialchars($user['username']).'\' AND forum_id = x ORDER BY last_post DESC LIMIT 6') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
while($cur_topic = $db->fetch_assoc($result))
{
?>
<li><a href="viewtopic.php?id=<?php echo $cur_topic['id']; ?>"><?php echo $cur_topic['subject']; ?></a></li>
<?php
}
?>
This matches the poster name in the *topics field to that of the username.
The query below is thanks to MattF, improving the query by using User ID instead of usernames:
<?php
$result = $db->query('SELECT DISTINCT t.id, t.subject, t.poster FROM '.$db_prefix.'topics FROM '.$db_prefix.'topics AS t LEFT JOIN '.$db_prefix.'posts AS p ON t.poster=p.poster WHERE p.poster_id= \''.intval($user['id']).'\' AND forum_id=x ORDER BY t.id DESC LIMIT 6') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
while($cur_topic = $db->fetch_assoc($result))
{
?>
<a href="viewtopic.php?id=<?php echo $cur_topic['id']; ?>"><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></a>
<?php
}
?>