搜索
 找回密码
 加入

在个人信息中显示在线时间FOR DZ5.5.0

ctgwglzc 2007-3-25 03:27:01 1692
1.修改 viewthread.php

  1. mf.spacename $fieldsadd
复制代码
改为
  1. mf.spacename, o.thismonth AS thismonthol, o.total AS totalol $fieldsadd
复制代码
  1. LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid
复制代码
下加
  1. LEFT JOIN {$tablepre}onlinetime o ON o.uid=mf.uid
复制代码
再找
  1. $post['regdate'] = gmdate($dateformat, $post['regdate'] + $timeoffset * 3600);
复制代码
上加
  1. $post['totalol'] = round($post['totalol'] / 60, 2);
  2. $post['thismonthol'] = gmdate('Yn', $post['lastactivity']) == gmdate('Yn', $timestamp) ? round($post['thismonthol'] / 60, 2) : 0;
复制代码
2.修改模板 templates/default/viewthread.htm

  1. <!--{if $post['location']}--><br>{lang location} $post[location]<!--{/if}--><br>
复制代码
下加
  1. 在线 <font color="#CC3333">$post[totalol]</font> {lang hours}
复制代码


  

0 回复

高级模式
游客