آخرین ارسال های جاوا اسکریپت

Silver PC

Well-Known Member
امروز یکی درخواست این آخرین نوع آخرین ارسال انجمن رو داده بود ، اینم از این نوعش

خیلی ساده هست فقط جای site.com آدری فروم خودتون رو وارد کنید و فایل (latest.js) که پیوست شده رو در پوشه رو در پوشه clientscript آپلود کنید و کد زیر رو در هر جایی که میخوایید نمایش داده بشه قرار بدید

کد:
 <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" HEIGHT="30" align="center">
    <tbody>

      <tr>
        <td class="thead" colspan="2" align="center"><a style="float:left" href="#top" onClick="return toggle_collapse('forumhome_external')"><img id="collapseimg_forumhome_external" src="talkfa/buttons/collapse_thead.gif" alt="" border="0" /></a> <a href="search.php?do=getnew">آخرين ارسال هاي</a> </td>
      </tr>
    </tbody>
    <tbody id="collapseobj_forumhome_external" style="">
      <tr>
        <td class="alt1" width="100%"><div align="right" style="padding-right:2pt">

<script type="text/javascript" src="http://www.site.com/external.php?type=js&lastpost=1"></script>
<script type="text/javascript">
var fcontent=new Array();
begintag='<nobr>'; //set opening tag, such as font declarations
for (x = 0; x < 5; x++)  
{
    fcontent[x] = "<a href=\"http://www.site.com/showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"talkfa/buttons/firstnew.gif\" alt=\"\" border=\"0\" ></a>&nbsp;&nbsp;<a href=\"showthread.php?t="+threads[x].threadid+"\" >"+threads[x].title+"</a>&nbsp;&nbsp;<span class=\"smallfont\">(نويسنده : "+threads[x].poster+")</span>";
}
closetag='</nobr>';

var fcontent2=new Array();
begintag2='<nobr>'; //set opening tag, such as font declarations
for (x = 5; x < 10; x++)  
{
    fcontent2[x-5] = "<a href=\"http://www.site.com/showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"talkfa/buttons/firstnew.gif\" alt=\"\" border=\"0\" ></a>&nbsp;&nbsp;<a href=\"showthread.php?t="+threads[x].threadid+"\" >"+threads[x].title+"</a>&nbsp;&nbsp;<span class=\"smallfont\">(نويسنده : "+threads[x].poster+")</span>";
}
closetag2='</nobr>';

var fcontent3=new Array();
begintag3='<nobr>'; //set opening tag, such as font declarations
for (x = 10; x < 15; x++)  
{
    fcontent3[x-10] = "<a href=\"http://www.site.com/showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"talkfa/buttons/firstnew.gif\" alt=\"\" border=\"0\" ></a>&nbsp;&nbsp;<a href=\"showthread.php?t="+threads[x].threadid+"\" >"+threads[x].title+"</a>&nbsp;&nbsp;<span class=\"smallfont\">(نويسنده : "+threads[x].poster+")</span>";
}
closetag3='</nobr>';
</script>
<script type="text/javascript" src="http://www.site.com/clientscript/latest.js"></script>
<script type="text/javascript">
    if (window.addEventListener)
     window.addEventListener("load", changecontentA, false)
    else if (window.attachEvent)
     window.attachEvent("onload", changecontentA)
    else if (document.getElementById)
     window.onload=changecontentA
</script>
        </div></td>
      </tr>
    </tbody>
  </table>

منبع : منبع
 

پیوست ها

  • latest.zip
    1.8 کیلوبایت · بازدیدها: 0
آخرین ویرایش:

جدیدترین ارسال ها

بالا