I am currently using a javascript code to display the latest posts from the forum on our site's html homepage. I would like to show also random posts from selected subforums. What should I change in this code to achieve this ?
Code:
<script type="text/javascript" src="http://www.forum.com/forum/external.php?forumids=26,2,43,44,28,3&type=js"></script>
<script type="text/javascript">
<!--
var max = 10;
if(threads.length < max) max = threads.length;
for(i = 0; i < max; i++)
{
if (threads[i].title.length > 40)
{ threads[i].title = threads[i].title.substring(0, 40) + '...'; }
document.writeln("<li><a href=\"http://www.forum.com/forum/showthread.php?t=" + threads[i].threadid + "\">" + threads[i].title + "</a> (" + threads[i].poster + ", " + threads[i].threaddate + ") </li>");
}
//-->
</script>