PDA

View Full Version : latest threads by specific user with external.php


HyperActiv
09-20-2010, 10:27 PM
Hey there!
I've wanted to ask you guys if there any option to use the latest threads code as you see:

<script type="text/javascript" src="external.php?type=js"></script>
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
}
//-->
</script></div>


but just for specific users?

what I mean is that the code will only show latest threads of a specific member of the forum. and will show it in public [in forumhome].

Thanks for the answers.

HyperActiv
09-22-2010, 07:56 PM
anyone?

Guest190829
09-24-2010, 11:06 PM
Maybe you could try:


<script type="text/javascript" src="external.php?type=js"></script>
<script language="" type="text/javascript">
<!--
for (var x in threads)
{
if(threads[x].userid == xx)
{
document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span><br />");
}
}

//-->
</script></div>

Though I am not sure why you would want to do this? Also, I don't have the code available to me, so please test the code, as I am not sure threads[x].userid is a valid variable off the top of my head.