2007-02-20, 05:13 PM
2007-02-20, 08:10 PM
You want to show all the threads of a user in their profile? That will mess up a lot. i mean a long list that will not help in anything as it gets longer and longer.
2007-02-20, 09:55 PM
How about "only last 10 threads" or if possible "most viewed 10 threads"? If possible both of two?
2007-02-21, 09:15 AM
Alright then..
Open member.php
find
Just add anywhere you like the following
Regards
Open member.php
find
eval("\$profile = \"".$templates->get("member_profile")."\";");
Above it add$threadlist = '';
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE uid='".$memprofile['uid']."' AND visible='1' ORDER by dateline DESC LIMIT 0,10");
while($threads = $db->fetch_array($query))
{
$threadlist .= "<a href=\"showthread.php?tid=".$threads['tid']."\">".$threads['subject']."</a><br />";
}
Now in the profile template Just add anywhere you like the following
<br /><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>Latest threads</strong></td>
</tr>
<tr>
<td class="trow1">
{$threadlist}
</td>
</tr>
</table>
This will show the links to the latest threads by this user we are visiting his profile in a box.Regards
2007-02-21, 10:06 AM
Thank you so much.
Is it possible to show "most viewed 10 threads" of a member on profile page too?
Is it possible to show "most viewed 10 threads" of a member on profile page too?
2007-02-21, 12:22 PM
Sure.. with a little modification tho.., but anyway i will put the full codes and steps for future reference.
Open member.php
find
Now in the member_profile template put the following anywhere
Open member.php
find
eval("\$profile = \"".$templates->get("member_profile")."\";");
Above it add$mostviewed = '';
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE uid='".$memprofile['uid']."' AND visible='1' ORDER by views DESC LIMIT 0,10");
while($viewedthreads = $db->fetch_array($query))
{
$mostviewed .= "<a href=\"showthread.php?tid=".$viewedthreads['tid']."\">".$viewedthreads['subject']."</a><br />";
}
Now in the member_profile template put the following anywhere
<br /><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>Most viewed threads by user</strong></td>
</tr>
<tr>
<td class="trow1">
{$mostviewed}
</td>
</tr>
</table>