本文整理汇总了PHP中XoopsLocale::formatTimeStamp方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsLocale::formatTimeStamp方法的具体用法?PHP XoopsLocale::formatTimeStamp怎么用?PHP XoopsLocale::formatTimeStamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsLocale
的用法示例。
在下文中一共展示了XoopsLocale::formatTimeStamp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
$id = $comments_arr[$i]->getVar('id');
$comments_poster_uname = $xoops->getConfig('anonymous');
if ($comments_arr[$i]->getVar('uid') > 0) {
$poster = $member_handler->getUser($comments_arr[$i]->getVar('uid'));
if (is_object($poster)) {
$comments_poster_uname = '<a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $comments_arr[$i]->getVar('uid') . '">' . $poster->getVar('uname') . '</a>';
}
}
$comments_icon = $comments_arr[$i]->getVar('icon') == '' ? '/images/icons/no_posticon.gif' : '/images/subject/' . htmlspecialchars($comments_arr[$i]->getVar('icon'), ENT_QUOTES);
$comments_icon = '<img src="' . \XoopsBaseConfig::get('url') . $comments_icon . '" alt="" />';
$comments['comments_id'] = $id;
$comments['comments_poster'] = $comments_poster_uname;
$comments['comments_icon'] = $comments_icon;
$comments['comments_title'] = '<a href="main.php?op=comments_jump&item_id=' . $comments_arr[$i]->getVar("id") . '">' . $comments_arr[$i]->getVar("title") . '</a>';
$comments['comments_ip'] = $comments_arr[$i]->getVar('ip');
$comments['comments_date'] = XoopsLocale::formatTimeStamp($comments_arr[$i]->getVar('created'));
$comments['comments_text'] = $myts->undoHtmlSpecialChars($comments_arr[$i]->getVar('text'));
$comments['comments_status'] = @$status_array2[$comments_arr[$i]->getVar('status')];
$comments['comments_date_created'] = XoopsLocale::formatTimestamp($comments_arr[$i]->getVar('created'), 'm');
$comments['comments_modid'] = @$module_array[$comments_arr[$i]->getVar('modid')];
//$comments['comments_view_edit_delete'] = '<img class="cursorpointer" onclick="display_dialog('.$id.', true, true, \'slide\', \'slide\', 300, 500);" src="images/icons/view.png" alt="'._AM_COMMENTS_VIEW.'" title="'._AM_COMMENTS_VIEW.'" /><a href="admin/comments/comment_edit.php?id='.$id.'"><img src="./images/icons/edit.png" border="0" alt="'._EDIT.'" title="'._EDIT.'"></a><a href="admin/comments/comment_delete.php?id='.$id.'"><img src="./images/icons/delete.png" border="0" alt="'._DELETE.'" title="'._DELETE.'"></a>';
$xoops->tpl()->appendByRef('comments', $comments);
$xoops->tpl()->appendByRef('comments_popup', $comments);
unset($comments);
}
if ($comments_count > $comments_limit) {
$nav = new XoopsPageNav($comments_count, $comments_limit, $comments_start, 'comments_start', 'comments_module=' . $comments_module . '&comments_status=' . $comments_status);
$xoops->tpl()->assign('nav', $nav->renderNav());
}
}
break;