Discuz教程网

Discuz X2帖子美化框

  [复制链接]
authicon dly 发表于 2011-6-5 21:27:16 | 显示全部楼层 |阅读模式
找到template/default/forum/打开viewthread_node_body.htm文件
找到第54行
  1. <table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post[pid]">
  2. <!--{if !$_G['inajax']}-->
  3. <!--{if $ad_a_pr}-->
  4. $ad_a_pr
  5. <!--{/if}-->
  6. <!--{/if}-->
  7. $post[message]</td></tr></table>
复制代码

替换为:
  1. <table cellspacing="0" cellpadding="0" border="0">
  2. <tr>
  3. <td width="40"><img height="40" src="static/image/mh/td_01.gif" width="40"/></td>
  4. <td width:=auto background="static/image/mh/td_02.gif"></td>
  5. <td width="40"><img height="40" src="static/image/mh/td_03.gif" width="40"/></td>
  6. </tr>
  7. <tr>
  8. <td valign="top" background="static/image/mh/td_04.gif"></td>
  9. <td background="static/image/mh/td_05.gif">
  10. <div id="postmessage_$post[pid]" class="t_f">$post[message]</div><br />
  11. </td>
  12. <td valign="top" width="40" background="static/image/mh/td_06.gif"></td>
  13. </tr>
  14. <tr>
  15. <td vAlign="top" width="40"><img height="40" src="static/image/mh/td_07.gif" width="40"/></td>
  16. <td background="static/image/mh/td_08.gif"></td>
  17. <td align="right" width="40"><img height="40" src="static/image/mh/td_09.gif" width="40"/></td>
  18. </tr>
  19. </table>
  20. <SCRIPT language="JavaScript">
  21. <!--
  22. today=new Date();
  23. jran=today.getTime();
  24. function rnd() {
  25. ia=9301;
  26. ic=49297;
  27. im=233280;
  28. jran = (jran*ia+ic) % im;
  29. return jran/(im*1.0);
  30. };
  31. function rand(number) {
  32. return Math.ceil(rnd()*number);
  33. };
  34. document.write("<div>");
  35. for(i=1;i<=1;i++) {
  36. myNum=(rand(10)); //改成你要随机显示的图片数;
  37. if(myNum == 1) document.write("<img src='static/image/mh/face1.gif'>");
  38. if(myNum == 2) document.write("<img src='static/image/mh/face2.gif'>"); //图片路径,可用http://
  39. if(myNum == 3) document.write("<img src='static/image/mh/face3.gif'>");
  40. if(myNum == 4) document.write("<img src='static/image/mh/face4.gif'>");
  41. if(myNum == 5) document.write("<img src='static/image/mh/face5.gif'>");
  42. if(myNum == 6) document.write("<img src='static/image/mh/face6.gif'>");
  43. if(myNum == 7) document.write("<img src='static/image/mh/face7.gif'>");
  44. if(myNum == 8) document.write("<img src='static/image/mh/face8.gif'>");
  45. if(myNum == 9) document.write("<img src='static/image/mh/face9.gif'>");
  46. if(myNum == 10) document.write("<img src='static/image/mh/face10.gif'>");
  47. else {
  48. document.write();
  49. }
  50. };
  51. document.write(" $post[author]说:</div>");
  52. //-->
  53. </SCRIPT>
  54. <br>
复制代码

再找到代码:
  1. <table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_$post[pid]">$post[message]</td></tr></table>
复制代码

替换为:
  1. <table cellspacing="0" cellpadding="0" border="0">
  2. <tr>
  3. <td width="40"><img height="40" src="static/image/mh/td_01.gif" width="40"/></td>
  4. <td width:=auto background="static/image/mh/td_02.gif"></td>
  5. <td width="40"><img height="40" src="static/image/mh/td_03.gif" width="40"/></td>
  6. </tr>
  7. <tr>
  8. <td valign="top" background="static/image/mh/td_04.gif"></td>
  9. <td background="static/image/mh/td_05.gif">
  10. <div id="postmessage_$post[pid]" class="t_f">$post[message]</div><br />
  11. </td>
  12. <td valign="top" width="40" background="static/image/mh/td_06.gif"></td>
  13. </tr>
  14. <tr>
  15. <td vAlign="top" width="40"><img height="40" src="static/image/mh/td_07.gif" width="40"/></td>
  16. <td background="static/image/mh/td_08.gif"></td>
  17. <td align="right" width="40"><img height="40" src="static/image/mh/td_09.gif" width="40"/></td>
  18. </tr>
  19. </table>
  20. <SCRIPT language="JavaScript">
  21. <!--
  22. today=new Date();
  23. jran=today.getTime();
  24. function rnd() {
  25. ia=9301;
  26. ic=49297;
  27. im=233280;
  28. jran = (jran*ia+ic) % im;
  29. return jran/(im*1.0);
  30. };
  31. function rand(number) {
  32. return Math.ceil(rnd()*number);
  33. };
  34. document.write("<div>");
  35. for(i=1;i<=1;i++) {
  36. myNum=(rand(10)); //改成你要随机显示的图片数;
  37. if(myNum == 1) document.write("<img src='static/image/mh/face1.gif'>");
  38. if(myNum == 2) document.write("<img src='static/image/mh/face2.gif'>"); //图片路径,可用http://
  39. if(myNum == 3) document.write("<img src='static/image/mh/face3.gif'>");
  40. if(myNum == 4) document.write("<img src='static/image/mh/face4.gif'>");
  41. if(myNum == 5) document.write("<img src='static/image/mh/face5.gif'>");
  42. if(myNum == 6) document.write("<img src='static/image/mh/face6.gif'>");
  43. if(myNum == 7) document.write("<img src='static/image/mh/face7.gif'>");
  44. if(myNum == 8) document.write("<img src='static/image/mh/face8.gif'>");
  45. if(myNum == 9) document.write("<img src='static/image/mh/face9.gif'>");
  46. if(myNum == 10) document.write("<img src='static/image/mh/face10.gif'>");
  47. else {
  48. document.write();
  49. }
  50. };
  51. document.write(" $post[author]说:</div>");
  52. //-->
  53. </SCRIPT>
  54. <br>
复制代码

下载图片附件并解压,上传到跟目录
附件下载:
游客,如果您要查看本帖隐藏内容请回复





上一篇:Discuz X2循环滚动的广播台
下一篇:Discuz! X2 自动回帖顶帖 GBK 后台插件版
authicon 逸晓仙 发表于 2011-6-7 12:58:22 | 显示全部楼层
怎么个美化法呢
authicon chxmoon 发表于 2011-6-7 21:19:08 | 显示全部楼层
具体看哈图示再说!!!!
authicon 一生有你 发表于 2011-6-7 22:07:57 | 显示全部楼层
嘿嘿终于搞到邀请码了!
authicon 4397363 发表于 2011-6-7 22:10:30 | 显示全部楼层
0000000000000
authicon shiyong281 发表于 2011-6-8 16:55:42 | 显示全部楼层
看看, 也没有图片,是什么样子的
authicon toycaners 发表于 2011-6-8 22:03:20 | 显示全部楼层
需要图片啊!!!
authicon lode1208 发表于 2011-6-8 23:19:31 | 显示全部楼层
看看美化到什么程度
authicon 让测试飞起来 发表于 2011-6-8 23:52:27 | 显示全部楼层
这个是体无完肤那个升级?
authicon 丁加丁 发表于 2011-6-18 08:59:55 | 显示全部楼层
楼主真强大
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2024-4-30 12:18

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表