我在我的网站中使用kunena,我希望在主页或帖子页面中用户的最新帖子中删除日期时间。
我从语言文件中的变量中删除%H:%i
,但时间仍然显示。
我该如何删除?
答案 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后端:
<强>更新强>
话虽如此,我意识到我正在使用Kunena 2.0.x,你也应该这样做。所以我建议升级到最新版本的Kunena,它仍然与Joomla 1.5兼容。