如何从kunena1.7中的dateTime中删除时间

时间:2013-01-23 10:22:19

标签: joomla joomla1.5

我在我的网站中使用kunena,我希望在主页或帖子页面中用户的最新帖子中删除日期时间。 我从语言文件中的变量中删除%H:%i,但时间仍然显示。 我该如何删除?

2 个答案:

答案 0 :(得分:1)

编辑kunena核心的代码。 例如,在这条路径中:

components/com_kunena/template/yourTemplate/view/message.php

我编辑了这个:

<span class="kmsgdate kmsgdate-left" title="<?php echo CKunenaTimeformat::showDate($this->msg->time, 'config_post_dateformat_hover') ?>">
<?php echo CKunenaTimeformat::showDate($this->msg->time, 'config_post_dateformat'); ?>
</span>

要:

<span class="kmsgdate kmsgdate-left" title="<?php echo CKunenaTimeformat::showDate($this->msg->time, 'config_post_dateformat_hover') ?>">
<?php 
     $dateTime = CKunenaTimeformat::showDate($this->msg->time, 'config_post_dateformat');
     $date = explode(" ", $dateTime);
     echo  $date[1]; 
?>
</span>

只会显示日期。

答案 1 :(得分:0)

在Joomla后端:

  1. 转到Kunena配置页面
  2. 转到“前端”标签
  3. 有一个名为“消息时间格式”的参数,您可以将其设置为“隐藏
  4. <强>更新

    话虽如此,我意识到我正在使用Kunena 2.0.x,你也应该这样做。所以我建议升级到最新版本的Kunena,它仍然与Joomla 1.5兼容。