開啟 source/module/forum/forum_viewthread.php 檔案,查詢:

  1. m.groupid, m.adminid,

後面新增 (注意 前面有個空格)

  1. m.groupexpiry,

再查詢:

  1. $post['lastdate'] = dgmdate($post['lastactivity'], 'd');

下面新增:

  1.                 //使用者組有效期 by www.12345.la Fieah
  2.                 $post['groupexpiry'] = $post['groupexpiry']
    && in_array($post['groupid'], array(17)) ? gmdate('Y-n-j',
    $post['groupexpiry'] + $timeoffset * 3600) : '';

裡面的 array(17),裡面的 17 是使用者組 id,自己修改

儲存覆蓋回去

再開啟 templates/default/forum/viewthread_node.htm,找到

  1. <p><em><a
    href="home.php?mod=spacecp&ac=usergroup&gid=$post[groupid]"
    target="_blank">{$post[authortitle]}</a></em></p>

下面新增:

  1.                         <!--{if $post['groupexpiry']}--><p> 有效期至 $post['groupexpiry']</p><!--{/if}-->