本文整理汇总了PHP中forum::timeago方法的典型用法代码示例。如果您正苦于以下问题:PHP forum::timeago方法的具体用法?PHP forum::timeago怎么用?PHP forum::timeago使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类forum
的用法示例。
在下文中一共展示了forum::timeago方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
echo $comment->body;
?>
</div>
<div class="comment_meta">
<div class="meta">
by:<a href="/profile/<?php
echo $comment->owner->username;
?>
"><?php
echo $comment->owner->username;
?>
</a>
- <?php
echo forum::timeago($comment->created);
?>
</div>
<?php
if ($owner == $comment->owner->id) {
?>
<div class="owner_actions"><a href="<?php
echo url::site("{$this->page_name}/edit/comment/{$comment->id}");
?>
" class="forum_load_main">edit</a> - <a href="#" class="forum_load_main">delete</a></div>
<?php
}
?>
</div>
<div class="clearboth"></div>
</div>
示例2:
echo $post->forum_cat_post_comment->owner->username;
?>
</a>
in <a href="<?php
echo url::site("{$this->page_name}/category/{$post->url}");
?>
" class="forum_load_main"><?php
echo $post->name;
?>
</a>
<?php
echo forum::timeago($post->forum_cat_post_comment->created);
?>
<span>
<em>last active</em> <?php
echo forum::timeago($post->last_active);
?>
</span>
</div>
</div>
</div>
<div class="post_comment" id="preview_<?php
echo $post->id;
?>
"><?php
echo $post->forum_cat_post_comment->body;
?>
</div>
<?php