Hi guys,
I'm using the external code, and I need help for it to display only one portion/thread with attachment only. Please help:
PHP Code:
<script type="text/javascript">
<!--
var js2count = 0;
for (var i = 0; i < js2threads.length; i++)
{
if (js2threads[i].attachmentid != 0 && (js2threads[i].forumid == 4))
{
if (js2count == 0)
{
document.writeln('<a href="http://community.vbulletin.com/showthread.php?t=' + js2threads[i].threadid + '"><div style="padding-left:13px "><font size="4" color="#598c29"><b>' + js2threads[i].threadtitle + '</a></b></font></div>');
}
else if (js2threads[i].threadid != js2threads[i-1].threadid)
{
document.writeln('<hr style="height: 1px; width: 100%; border-style: dashed; border-color: #FFFFFF;" /><a href="http://community.vbulletin.com/showthread.php?t=' + js2threads[i].threadid + '">' + js2threads[i].threadtitle + '</a><br />');
document.writeln('<br /><a href="http://community.vbulletin.com/showpost.php?p=' + js2threads[i].firstpostid + '"><span class="smallfont">test' + js2threads[i].firstpostpreview + '</span></a><br /><br />');
}
document.writeln('<a href="http://community.vbulletin.com/attachment.php?attachmentid=' + js2threads[i].attachmentid + '&d=' + js2threads[i].attachmentdateline + '"><img width=380 height=200 src="http://community.vbulletin.com/attachment.php?attachmentid=' + js2threads[i].attachmentid + '&thumb=0&d=' + js2threads[i].attachmentdateline + '" border="0"></a> ');
document.writeln('<br /><span class="smallfont"><strong>' + js2threads[i].firstpostpreview + '</span></strong><a href="http://community.vbulletin.com/showpost.php?p=' + js2threads[i].firstpostid + '" class="light">Read more...</a> <br /><br />');
js2count = 0;
}
}
//-->
</script>
<noscript>
JavaScript is not detected. Set your browser to allow JavaScript or try another browser with JavaScript support.
</noscript>