Discuz教程网

[代码修改] 【Discuz X1.5】帖子美化框,主题与回复分别美化

[复制链接]
authicon dly 发表于 2011-1-11 14:19:30 | 显示全部楼层 |阅读模式
截图65.jpg


打开/template/default/forum找到viewthread_node_body.htm文件进行编辑
找到:
  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_plus/td_01.gif" width="40"/></td>
  4. <td width:=auto background="static/image/mh_plus/td_02.gif"></td>
  5. <td width="40"><img height="40" src="static/image/mh_plus/td_03.gif" width="40"/></td>
  6. </tr>
  7. <tr>
  8. <td valign="top" background="static/image/mh_plus/td_04.gif"></td>
  9. <td background="static/image/mh_plus/td_05.gif"><font color=#a7a7a7>本帖<!--{if $thread['special'] != 3 || $thread['price'] >= 0 || $thread['dateline'] + 1 != $post['dbdateline'] || $post['first']}-->{lang poston} $post[dateline]<!--{/if}-->,加油,亲爱的楼主...<a href="space.php?uid=$post['authorid']" target="_blank"><font color="#0000FF">$post[author]</a></font></font></span></span><br /><br />
  10. <hr size="1" noshade="noshade" style="border-top:1px #dddddd dashed;margin-bottom: 0px;margin-top: -1px;"/><br />
  11. <div id="postmessage_$post[pid]" class="t_f">$post[message]</div><br />
  12. </td>
  13. <td valign="top" background="static/image/mh_plus/td_06.gif"></td>
  14. </tr>
  15. <tr>
  16. <td vAlign="top" width="40"><img height="40" src="static/image/mh_plus/td_07.gif" width="40"/></td>
  17. <td background="static/image/mh_plus/td_08.gif"></td>
  18. <td align="right" width="40"><img height="40" src="static/image/mh_plus/td_09.gif" width="40"/></td>
  19. </tr>
  20. </table>
  21. <SCRIPT language="JavaScript">
  22. <!--
  23. today=new Date();
  24. jran=today.getTime();
  25. function rnd() {
  26. ia=9301;
  27. ic=49297;
  28. im=233280;
  29. jran = (jran*ia+ic) % im;
  30. return jran/(im*1.0);
  31. };
  32. function rand(number) {
  33. return Math.ceil(rnd()*number);
  34. };
  35. document.write("<div>");
  36. for(i=1;i<=1;i++) {
  37. myNum=(rand(10)); //改成你要随机显示的图片数;
  38. if(myNum == 1) document.write("<img src='static/image/mh_plus/face1.gif'>");
  39. if(myNum == 2) document.write("<img src='static/image/mh_plus/face2.gif'>"); //图片路径,可用http://
  40. if(myNum == 3) document.write("<img src='static/image/mh_plus/face3.gif'>");
  41. if(myNum == 4) document.write("<img src='static/image/mh_plus/face4.gif'>");
  42. if(myNum == 5) document.write("<img src='static/image/mh_plus/face5.gif'>");
  43. if(myNum == 6) document.write("<img src='static/image/mh_plus/face6.gif'>");
  44. if(myNum == 7) document.write("<img src='static/image/mh_plus/face7.gif'>");
  45. if(myNum == 8) document.write("<img src='static/image/mh_plus/face8.gif'>");
  46. if(myNum == 9) document.write("<img src='static/image/mh_plus/face9.gif'>");
  47. if(myNum == 10) document.write("<img src='static/image/mh_plus/face10.gif'>");
  48. else {
  49. document.write();
  50. }
  51. };
  52. document.write(" $post[author]说:</div>");
  53. //-->
  54. </SCRIPT>
  55. <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_plus/td_01.gif" width="40"/></td>
  4. <td width:=auto background="static/image/mh_plus/td_02.gif"></td>
  5. <td width="40"><img height="40" src="static/image/mh_plus/td_03.gif" width="40"/></td>
  6. </tr>
  7. <tr>
  8. <td valign="top" background="static/image/mh_plus/td_04.gif"></td>
  9. <td background="static/image/mh_plus/td_05.gif"><font color=#a7a7a7>本回复帖<!--{if $thread['special'] != 3 || $thread['price'] >= 0 || $thread['dateline'] + 1 != $post['dbdateline'] || $post['first']}-->{lang poston} $post[dateline]...<!--{/if}--> ... 认真回复,您的回复对楼主是莫大的鼓舞</font></span></span><br /><br />
  10. <hr size="1" noshade="noshade" style="border-top:1px #dddddd dashed;margin-bottom: 0px;margin-top: -1px;"/><br />
  11. <div id="postmessage_$post[pid]" class="t_f">$post[message]</div><br />
  12. </td>
  13. <td valign="top" width="40" background="static/image/mh_plus/td_06.gif"></td>
  14. </tr>
  15. <tr>
  16. <td vAlign="top" width="40"><img height="40" src="static/image/mh_plus/td_07.gif" width="40"/></td>
  17. <td background="static/image/mh_plus/td_08.gif"></td>
  18. <td align="right" width="40"><img height="40" src="static/image/mh_plus/td_09.gif" width="40"/></td>
  19. </tr>
  20. </table>
  21. <SCRIPT language="JavaScript">
  22. <!--
  23. today=new Date();
  24. jran=today.getTime();
  25. function rnd() {
  26. ia=9301;
  27. ic=49297;
  28. im=233280;
  29. jran = (jran*ia+ic) % im;
  30. return jran/(im*1.0);
  31. };
  32. function rand(number) {
  33. return Math.ceil(rnd()*number);
  34. };
  35. document.write("<div>");
  36. for(i=1;i<=1;i++) {
  37. myNum=(rand(10)); //改成你要随机显示的图片数;
  38. if(myNum == 1) document.write("<img src='static/image/mh_plus/face1.gif'>");
  39. if(myNum == 2) document.write("<img src='static/image/mh_plus/face2.gif'>"); //图片路径,可用http://
  40. if(myNum == 3) document.write("<img src='static/image/mh_plus/face3.gif'>");
  41. if(myNum == 4) document.write("<img src='static/image/mh_plus/face4.gif'>");
  42. if(myNum == 5) document.write("<img src='static/image/mh_plus/face5.gif'>");
  43. if(myNum == 6) document.write("<img src='static/image/mh_plus/face6.gif'>");
  44. if(myNum == 7) document.write("<img src='static/image/mh_plus/face7.gif'>");
  45. if(myNum == 8) document.write("<img src='static/image/mh_plus/face8.gif'>");
  46. if(myNum == 9) document.write("<img src='static/image/mh_plus/face9.gif'>");
  47. if(myNum == 10) document.write("<img src='static/image/mh_plus/face10.gif'>");
  48. else {
  49. document.write();
  50. }
  51. };
  52. document.write(" $post[author]说:</div>");
  53. //-->
  54. </SCRIPT>
  55. <br>
复制代码
图片上传到static/image/mh_plus
分别有三种颜色,根据你自己的爱好选择

下载地址:点击进入下载-帖子框美化.rar





上一篇:【Discuz X1.5】快速回到顶部和底部、向上滚动、返回、登录QQ的网页右边按钮
下一篇:【Discuz X1.5】公告栏美化插件
authicon  楼主| dly 发表于 2011-1-11 15:13:22 | 显示全部楼层
代码经过测试不存在问题,如你在使用过程中存在问题请回帖提出,本站帮你解决。。。
authicon test 发表于 2011-1-22 18:23:18 | 显示全部楼层
图片在那?
authicon 诸葛晓明 发表于 2011-1-22 19:13:39 | 显示全部楼层
回复 test 的帖子

==,我找给你
authicon  楼主| dly 发表于 2011-1-22 20:15:49 | 显示全部楼层
回复 test 的帖子

附件已上传
下载地址:点击进入下载-帖子框美化.rar
authicon 空心邂逅 发表于 2011-2-13 17:34:28 | 显示全部楼层
楼主发贴辛苦了,谢谢楼主分享!我觉得1314学习网是注册对了!
authicon rin421 发表于 2011-5-11 15:59:41 | 显示全部楼层
顶啦,不错吧
authicon fantuanzi 发表于 2011-5-14 08:59:40 | 显示全部楼层
谢谢,学习了
authicon 咫尺天 发表于 2011-5-16 04:00:03 | 显示全部楼层
好东西要顶的。
authicon yuki佳 发表于 2011-5-24 01:59:44 | 显示全部楼层
继续来索要
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 12:33

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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