psoexplorer |
09-14-2005 09:56 AM |
external.php quick question - latest replies, not newest threads?
I'm currently using the following code to show the latest threads from my forum on my main site.
Code:
<script type="text/javascript" src="http://www.mysite.com/forum/external.php?type=js"></script>
<script type="text/javascript">
<!--
CutOff = 16 // Number of maximum chars to cut off before adding '...'
function cutOffTitle(title)
{
if (title.length > CutOff)
{
title = title.substring(0, 16) + '..'
}
return title
}
for (var i = 0; i < 7; i++)
{
document.write('<a href="http://www.mysite.com/forum/showthread.php?t=' + threads[i]['threadid'] + '">' + cutOffTitle(threads[i]['title']) + '</a><br />');
}
//-->
</script>
My question is - what do I need to change/add to make the listings show the most recently updated threads? For example, if a thread is made, and then a week later somebody posts a new reply, it will show up in the list as the latest change to that thread. Because right now it merely shows the latest NEW threads.
|