一、首先上传自己的在线下线的图标到服务器上,目录是 static/image/common/,起名叫如附件里面的名字,图片可以根据自己需要更换一下;
default.zip
二、修改模板文件 template/default/forum/viewthread_node.htm 判断是否在线是否,性别男女还是保密:
找到代码:21 行
- <div ><a href="home.php?mod=space&uid=$post['authorid']" target="_blank" >$post[author]</a>$authorverifys</div>
修改这些代码为:
- <div ><a href="home.php?mod=space&uid=$post['authorid']" target="_blank" >$post[author]</a>
- <!--{if $_G['setting']['vtonlinestatus'] && $post['authorid']}-->
- <!--{if ($_G['setting']['vtonlinestatus'] == 2 && $_G[forum_onlineauthors][$post[authorid]]) || ($_G['setting']['vtonlinestatus'] == 1 && (TIMESTAMP - $post['lastactivity'] <= 10800) && !$post['authorinvisible'])}-->
- <!--{if $post[gender] == 1}-->
- <img src="{IMGDIR}/male.gif" alt="{lang male}-{lang online}">
- <!--{elseif $post[gender] == 2}-->
- <img src="{IMGDIR}/female.gif" alt="{lang female}-{lang online}">
- <!--{else}-->
- <img src="{IMGDIR}/secret.gif" alt="{lang secret}-{lang online}">
- <!--{/if}-->
- <!--{else}-->
- <!--{if $post[gender] == 1}-->
- <img src="{IMGDIR}/male_offline.gif" alt="{lang male}-{lang offline}">
- <!--{elseif $post[gender] == 2}-->
- <img src="{IMGDIR}/female_offline.gif" alt="{lang female}-{lang offline}">
- <!--{else}-->
- <img src="{IMGDIR}/secret_offline.gif" alt="{lang secret}-{lang offline}">
- <!--{/if}-->
- <!--{/if}-->
- <!--{/if}-->
- $authorverifys</div>
OK!