Discuz教程网

[代码修改] 【Discuz X1.5】个人信息美化插件

  [复制链接]
authicon 09927306 发表于 2011-1-11 11:03:33 | 显示全部楼层 |阅读模式
本帖最后由 诸葛晓明 于 2011-3-18 23:10 编辑

修改步骤:
打开template/default/forum/viewthread.htm(模块文件)
查找:
  1. <!--{eval $postcount = 0;}-->
复制代码


在下面加入:
  1. <SCRIPT>
  2. <!--
  3. function flip(ud, img) {
  4. if (ud.style.display == "block") {
  5. ud.style.display="none";
  6. img.src = \'./static/image/In-meihua/qqshow_1.gif\';
  7. }else{
  8. ud.style.display="block";
  9. img.src = \'./static/image/In-meihua/qqshow_2.gif\';
  10. }
  11. }
  12. // --></SCRIPT>
复制代码

2.打开:template/default/forum/viewthread_node.htm
查找:
  1. $post[newpostanchor] $post[lastpostanchor]
  2. <!--{if $post[\'authorid\'] && $post[\'username\'] && !$post[\'anonymous\']}-->
  3. <!--{if $_G[\'setting\'][\'authoronleft\']}-->
  4. <div class="pi">
  5. <div class="authi"><a href="home.php?mod=space&uid=$post[\'authorid\']" target="_blank" class="xw1">$post[author]</a>$authorverifys</div>
  6. </div>
  7. <!--{/if}-->
  8. <div class="p_pop blk bui" id="userinfo$post[pid]" style="display: none; {if $_G[\'setting\'][\'authoronleft\']}margin-top: -11px;{/if}">
  9. <div class="m z">
  10. <div id="userinfo$post[pid]_ma"></div>
  11. <ul>
  12. <li class="pm2"><a href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_$post[authorid]&touid=$post[authorid]&pmid=0&daterange=2&pid=$post[pid]" onclick="hideMenu(\'userinfo$post[pid]\');showWindow(\'sendpm\', this.href)" title="{lang send_pm}">{lang send_pm}</a></li>
  13. <!--{if $post[authorid] != $_G[uid]}-->
  14. <li class="buddy"><a href="home.php?mod=spacecp&ac=friend&op=add&uid=$post[authorid]&handlekey=addfriendhk_{$post[authorid]}" id="a_friend_li_{$post[pid]}" onclick="showWindow(this.id, this.href, \'get\', 1, {\'ctrlid\':this.id,\'pos\':\'00\'});">{lang add_to_buddylist}</a></li>
  15. <!--{/if}-->
  16. </ul>
  17. <!--{if $_G[\'setting\'][\'magicstatus\']}-->
  18. <!--{if !empty($_G[\'setting\'][\'magics\'][\'showip\'])}-->
  19. <img src="{STATICURL}/image/magic/showip.small.gif" class="vm" /> <a href="home.php?mod=magic&mid=showip&idtype=user&id={echo rawurlencode($post[author])}" id="a_showip_li_{$post[pid]}" onclick="showWindow(this.id, this.href)">$_G[\'setting\'][\'magics\'][\'showip\']</a><br />
  20. <!--{/if}-->
  21. <!--{if !empty($_G[\'setting\'][\'magics\'][\'checkonline\']) && $post[\'authorid\'] != $_G[\'uid\']}-->
  22. <img src="{STATICURL}/image/magic/checkonline.small.gif" class="vm" /> <a href="home.php?mod=magic&mid=checkonline&idtype=user&id={echo rawurlencode($post[author])}" id="a_repent_$post[pid]" onclick="showWindow(this.id, this.href)">$_G[\'setting\'][\'magics\'][\'checkonline\']</a><br />
  23. <!--{/if}-->
  24. <!--{hook/viewthread_magic_user $postcount}-->
  25. <!--{/if}-->
  26. <!--{hook/viewthread_profileside $postcount}-->
  27. </div>
  28. <div class="i y">
  29. <div>
  30. <strong><a href="home.php?mod=space&uid=$post[authorid]" target="_blank">$post[author]</a></strong>
  31. <!--{if $_G[\'setting\'][\'vtonlinestatus\'] && $post[\'authorid\']}-->
  32. <!--{if ($_G[\'setting\'][\'vtonlinestatus\'] == 2 && $_G[forum_onlineauthors][$post[authorid]]) || ($_G[\'setting\'][\'vtonlinestatus\'] == 1 && (TIMESTAMP - $post[\'lastactivity\'] <= 10800) && !$post[\'authorinvisible\'])}-->
  33. <em>{lang online}
  34. <!--{else}-->
  35. <em>{lang offline}
  36. <!--{/if}-->
  37. </em>
  38. <!--{/if}-->
  39. </div>
  40. <dl class="cl"><!--{eval @eval(\'echo "\'.$customauthorinfo[2].\'";\');}--></dl>
  41. <div class="imicn">
  42. <!--{if $post[\'qq\']}--><a href="http://wpa.qq.com/msgrd?V=1&Uin=$post[qq]&Site=$_G[\'setting\'][\'bbname\']&Menu=yes" target="_blank" title="QQ"><img src="{IMGDIR}/qq.gif" alt="QQ" /></a><!--{/if}-->
  43. <!--{if $post[\'icq\']}--><a href="http://wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank" title="ICQ"><img src="{IMGDIR}/icq.gif" alt="ICQ" /></a><!--{/if}-->
  44. <!--{if $post[\'yahoo\']}--><a href="http://edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank" title="Yahoo"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" /></a><!--{/if}-->
  45. <!--{if $post[\'taobao\']}--><a href="javascript:;" onclick="window.open(\'http://amos.im.alisoft.com/msg.aw?v=2&uid=\'+encodeURIComponent(\'$post[taobaoas]\')+\'&site=cntaobao&s=2&charset=utf-8\')" title="{lang taobao}"><img src="{IMGDIR}/taobao.gif" alt="{lang taobao}" /></a><!--{/if}-->
  46. <!--{if $post[\'site\']}--><a href="$post[site]" target="_blank" title="{lang member_homepage}"><img src="{IMGDIR}/forumlink.gif" alt="{lang member_homepage}" /></a><!--{/if}-->
  47. <a href="home.php?mod=space&uid=$post[authorid]&do=profile" target="_blank" title="{lang member_viewpro}"><img src="{IMGDIR}/userinfo.gif" alt="{lang member_viewpro}" /></a>
  48. <!--{hook/viewthread_imicons $postcount}-->
  49. </div>
  50. <div id="avatarfeed"><span id="threadsortswait"></span></div>
  51. </div>
  52. </div>
  53. <!--{/if}-->
  54. <!--{if $post[\'authorid\'] && $post[\'username\'] && !$post[\'anonymous\']}-->
  55. <div>
  56. <!--{if $_G[\'setting\'][\'bannedmessages\'] & 2 && (($post[\'authorid\'] && !$post[\'username\']) || ($post[\'groupid\'] == 4 || $post[\'groupid\'] == 5) || ($post[\'status\'] & 1))}-->
  57. <div class="avatar">{lang member_avatar_banned}</div>
  58. <!--{elseif $post[\'avatar\'] && $showavatars}-->
  59. <div class="avatar" onmouseover="showauthor(this, \'userinfo$post[pid]\')"><a href="home.php?mod=space&uid=$post[authorid]" target="_blank">$post[avatar]</a></div>
  60. <!--{/if}-->
  61. <!--{if $post[groupicon]}--><p>$post[groupicon]</p><!--{/if}-->
  62. <p><em><a href="home.php?mod=spacecp&ac=usergroup&gid=$post[groupid]" target="_blank">{$post[authortitle]}</a></em></p>
  63. <!--{if $post[\'customstatus\'] && $_G[\'group\'][\'allowcstatus\']}--><p class="xg1">$post[customstatus]</p><!--{/if}-->
  64. </div>
  65. <p{if $post[\'upgradecredit\'] !== false} id="g_up$post[pid]" onmouseover="showMenu({\'ctrlid\':this.id, \'pos\':\'12\'});"{/if}><!--{eval showstars($post[\'stars\']);}--></p>
  66. <!--{if $post[\'upgradecredit\'] !== false}-->
  67. <div id="g_up$post[pid]_menu" class="g_up" style="display:none">
  68. <div class="crly">
  69. $post[\'authortitle\'], {lang credits} $post[\'credits\'], {lang thread_groupupgrade} $post[\'upgradecredit\'] {lang credits}
  70. </div>
  71. <div class="mncr"></div>
  72. </div>
  73. <!--{/if}-->
  74. <!--{hook/viewthread_sidetop $postcount}-->
  75. <!--{if $customauthorinfo[1]}--><dl class="pil cl"><!--{eval @eval(\'echo "\'.$customauthorinfo[1].\'";\');}--></dl><!--{/if}-->
  76. <!--{if $post[\'medals\']}--><p>
  77. <!--{loop $post[\'medals\'] $medal}-->
  78. <img src="{STATICURL}image/common/$medal[image]" alt="$medal[name]" title="$medal[name]" />
  79. <!--{/loop}--></p>
  80. <!--{/if}-->
  81. <!--{hook/viewthread_sidebottom $postcount}-->
  82. <!--{else}-->
  83. <div class="pi">
  84. <!--{if !$post[\'authorid\']}-->
  85. <a href="javascript:;">{lang guest} <em>$post[useip]</em></a>
  86. <!--{elseif $post[\'authorid\'] && $post[\'username\'] && $post[\'anonymous\']}-->
  87. <!--{if $_G[\'forum\'][\'ismoderator\']}--><a href="home.php?mod=space&uid=$post[authorid]" target="_blank">{lang anonymous}</a><!--{else}-->{lang anonymous}<!--{/if}-->
  88. <!--{else}-->
  89. $post[author] <em>{lang member_deleted}</em>
  90. <!--{/if}-->
  91. </div>
  92. <!--{/if}-->
  93. <!--{if $_G[\'group\'][\'allowedituser\'] || $_G[\'group\'][\'allowbanuser\'] || ($_G[\'forum\'][\'ismoderator\'] && $_G[\'group\'][\'allowviewip\'] && !$post[\'first\'])}-->
  94. <p>
  95. <!--{if $_G[\'forum\'][\'ismoderator\'] && $_G[\'group\'][\'allowviewip\']}-->
  96. <a href="forum.php?mod=topicadmin&action=getip&fid=$_G[fid]&tid=$_G[tid]&pid=$post[pid]" onclick="ajaxmenu(this, 0, 0, 2);doane(event)">IP</a>
  97. <!--{/if}-->
  98. <!--{if $_G[\'group\'][\'allowedituser\']}-->
  99. <a href="{if $_G[\'adminid\'] == 1}admin.php?frames=yes&action=members&operation=search&uid=$post[authorid]&submit=yes{else}forum.php?mod=modcp&action=member&op=edit&uid=$post[authorid]{/if}" target="_blank">{lang edit}</a>
  100. <!--{/if}-->
  101. <!--{if $_G[\'group\'][\'allowbanuser\']}-->
  102. <!--{if $_G[\'adminid\'] == 1}-->
  103. <a href="admin.php?action=members&operation=ban&username=$post[usernameenc]&frames=yes" target="_blank">{lang ban_member}</a>
  104. <!--{else}-->
  105. <a href="forum.php?mod=modcp&action=member&op=ban&uid=$post[authorid]" target="_blank">{lang ban_member}</a>
  106. <!--{/if}-->
  107. <!--{/if}-->
  108. <a href="forum.php?mod=modcp&action=thread&op=post&do=search&searchsubmit=1&users=$post[usernameenc]" target="_blank">{lang posts}</a>
  109. </p>
  110. <!--{/if}-->
  111. </td>
复制代码
其实就是14行到124行替换成:
  1. {subtemplate forum/show}
复制代码
3.上传附件至根目录

4.更新缓存


下载:  
电信本地下载地址1
电信本地下载地址2
电信本地下载地址3
网通本地下载地址1
网通本地下载地址2
其他下载-个人信息美化__for_Discuz!_X.rar






上一篇:【Discuz for all】2010在线交友插件
下一篇:人际交往有:五项原则、七个技巧、及26条处事小节
authicon 勿忘我科技 发表于 2011-1-20 12:56:14 | 显示全部楼层
没演示图吗
authicon dly 发表于 2011-1-20 16:58:58 | 显示全部楼层
回复 勿忘我科技 的帖子

貌似大概也许好像就是本站用的这个,演示直接看左边
authicon test 发表于 2011-1-22 17:48:40 | 显示全部楼层
真的很感谢楼主,谢谢。
authicon  楼主| 09927306 发表于 2011-1-23 17:58:54 | 显示全部楼层
回复 test 的帖子

客气了
authicon qcyy8 发表于 2011-1-25 23:16:45 | 显示全部楼层
zhichi !!!!!
authicon qyb 发表于 2011-1-26 00:32:26 | 显示全部楼层
我看不错噢 谢谢楼主!1314学习网越来越好!
authicon qcyy8 发表于 2011-1-27 23:43:58 | 显示全部楼层
本帖最后由 qcyy8 于 2011-1-27 23:44 编辑

发现BUG   
  两边兰色不一样宽    形象栏里
authicon 沧海逆天 发表于 2011-1-29 16:00:33 | 显示全部楼层
回复 qcyy8 的帖子

貌似我们站正常的
authicon hurq1 发表于 2011-2-13 23:49:24 | 显示全部楼层
寂寞轩 听寂寞在唱歌,孤独寂寞人的网络家园,寂寞让我们走在一起…… - www.jimox.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

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

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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