- 積分
- 7573
- 威望
- 7573
- 金錢
- 9482
- 最後登錄
- 2024-11-17
|
[分享] 【原創】帖內發言框的美化 FOR SCLUB
為答謝眾多壇友的支持,送大家一款美妙的代碼。
此代碼本壇現正使用中。
截圖:[attach]27[/attach]
這個美化最大的特點有兩個:
1.隨機顯示不同的小頭像
2.在帖內顯示會員名
請大家注意:代碼中的圖片地址請大家複製到瀏覽器后,看到圖片,把圖片下載到電腦里,再用附件上傳到自己的空間或論壇里,提取圖片地址后更換為自己的地址。
安裝方法:
打開模板文件viewthread_node.htm
查找:- <table cellspacing="0" cellpadding="0"><tr><td class="t_msgfont" id="postmessage_$post[pid]">$post[message]</td></tr></table>
複製代碼 替換成:- <table cellspacing=0 cellpadding=0 border=0 >
- <tr >
- <td width=14><img height=8 src=http://liwan.bbs.vg/attachments/month_1004/10041823030cf9f7b4f2916022.gif width=14/></td>
- <td width:=auto background=http://liwan.bbs.vg/attachments/month_1004/1004182303f43afe9b0d627b80.gif></td>
- <td width=16><img height=8 src=http://liwan.bbs.vg/attachments/month_1004/10041823038b34931d0bca3666.gif width=16/></td>
- </tr>
- <tr>
- <td valign=top width=14 background=http://liwan.bbs.vg/attachments/month_1004/100418230355987af5671aae43.gif></td>
- <td bgColor=#fffff1> <div id="postmessage_$post[pid]" class="t_msgfont">$post[message]</div> </td>
- <td valign=top width=16 background=http://liwan.bbs.vg/attachments/month_1004/1004182303c8e08dc273188c27.gif></td>
- </tr>
- <tr>
- <td vAlign=top width=14><img height=42 src=http://liwan.bbs.vg/attachments/month_1004/1004182303a5a4b9f9f0f98f31.gif width=14/></td>
- <td background=http://liwan.bbs.vg/attachments/month_1004/10041823039ec8f9224e0e4a07.gif><img height=42 src=http://liwan.bbs.vg/attachments/month_1004/1004182303fc0b9a875949eab9.gif width=36/></td>
- <td align=right width=16><img height=42 src=http://liwan.bbs.vg/attachments/month_1004/10041823037f6d658a8a55245a.gif width=16/></td>
- </tr>
- </table>
- <SCRIPT language="JavaScript">
- <!--
- today=new Date();
- jran=today.getTime();
- function rnd() {
- ia=9301;
- ic=49297;
- im=233280;
- jran = (jran*ia+ic) % im;
- return jran/(im*1.0);
- };
- function rand(number) {
- return Math.ceil(rnd()*number);
- };
- document.write("<div>");
- for(i=1;i<=1;i++) {
- myNum=(rand(21)); //改成你要随机显示的图片数;
- if(myNum == 1) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/10041823030cf9f7b4f2916022.gif'>");
- if(myNum == 2) document.write("<img src=http://liwan.bbs.vg/attachments/month_1004/1004182303d2144a97ee15d345.gif'>"); //图片路径,可用http://
- if(myNum == 3) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/10041823031af9b28e64676f78.gif'>");
- if(myNum == 4) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303a87109bcb946a3f3.gif'>");
- if(myNum == 5) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230321d1afa0fcf2533e.gif'>");
- if(myNum == 6) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303d5220ad114fd7779.gif'>");
- if(myNum == 7) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230328b1daf8109688e5.gif'>");
- if(myNum == 8) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230309bd45821b257e86.gif'>");
- if(myNum == 9) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303d79825ee8a082ed6.gif'>");
- if(myNum == 10) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303772202a0c4f12de9.gif'>");
- if(myNum == 11) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303ce3e108ea7f7d159.gif'>");
- if(myNum == 12) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/10041823032f9b8d0b04954f77.gif'>");
- if(myNum == 13) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230340c9e610c31d7361.gif'>");
- if(myNum == 14) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303437d1e272eb2766a.gif'>");
- if(myNum == 15) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230312f07460fa29bed0.gif'>");
- if(myNum == 16) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303d48936c8415940dd.gif'>");
- if(myNum == 17) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/10041823039b1d001ec0ce305f.gif'>");
- if(myNum == 18) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230335d033a4f878e7dd.gif'>");
- if(myNum == 19) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/1004182303e62dffb08ef111a5.gif'>");
- if(myNum == 20) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/10041823035a1701fe8d5409ba.gif'>");
- if(myNum == 21) document.write("<img src='http://liwan.bbs.vg/attachments/month_1004/100418230363bd0e8e88071b48.gif'>");
- else {
- document.write();
- }
- };
- document.write(" $post[author]:如是說</div>");
- //-->
- </SCRIPT>
- <br>
複製代碼 演示:http://2010.hotbbs.info |
|