Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2006, 07:36 PM
nhatrang nhatrang is offline
 
Join Date: Jun 2004
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default limit uno (one)

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 + '&amp;d=' + js2threads[i].attachmentdateline + '"><img width=380 height=200 src="http://community.vbulletin.com/attachment.php?attachmentid=' + js2threads[i].attachmentid + '&amp;thumb=0&amp;d=' + js2threads[i].attachmentdateline + '" border="0"></a>&nbsp;');
            
            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> 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:20 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.