本文整理汇总了PHP中Timestamp::format2方法的典型用法代码示例。如果您正苦于以下问题:PHP Timestamp::format2方法的具体用法?PHP Timestamp::format2怎么用?PHP Timestamp::format2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timestamp
的用法示例。
在下文中一共展示了Timestamp::format2方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($trackbacks as $trackback) {
?>
<li><a href="<?php
echo $context->getProperty('uri.blog');
?>
/trackback/<?php
echo $trackback['entry'];
?>
"><?php
echo htmlspecialchars($trackback['subject']);
?>
</a><br /><?php
echo htmlspecialchars($trackback['site']);
?>
(<?php
echo Timestamp::format2($trackback['written']);
?>
)</li>
<?php
}
if (count($trackbacks) > 0) {
echo '</ul>';
}
?>
<!--
<h2><?php
echo _text('글 보관함');
?>
</h2>
<ul>
<?php
示例2: getDefaultCenterPanel
//.........这里部分代码省略.........
"><?php
echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 20));
?>
</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
$noticeURL = TEXTCUBE_NOTICE_URL;
$noticeURLRSS = $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko") . "/rss";
$noticeEntries = array();
if (!is_null(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')))) {
$noticeEntries = unserialize(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')));
} else {
list($result, $feed, $xml) = getRemoteFeed($noticeURLRSS);
if ($result == 0) {
$xmls = new XMLStruct();
$xmls->setXPathBaseIndex(1);
$noticeEntries = array();
if ($xmls->open($xml, $ctx->getProperty('service.encoding'))) {
if ($xmls->getAttribute('/rss', 'version')) {
for ($i = 1; $link = $xmls->getValue("/rss/channel/item[{$i}]/link"); $i++) {
$item = array('permalink' => rawurldecode($link));
$item['title'] = $xmls->getValue("/rss/channel/item[{$i}]/title");
if ($xmls->getValue("/rss/channel/item[{$i}]/pubDate")) {
$item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/pubDate"));
} else {
if ($xmls->getValue("/rss/channel/item[{$i}]/dc:date")) {
$item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/dc:date"));
} else {
$item['written'] = 0;
}
}
array_push($noticeEntries, $item);
}
}
}
Setting::setServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language'), serialize($noticeEntries));
}
}
?>
<div id="textcube-notice">
<h4 class="caption"><span><a href="<?php
echo $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko");
?>
"><?php
echo _t('공지사항');
?>
</a></span></h4>
<?php
if (count($noticeEntries) > 0) {
array_splice($noticeEntries, 3, count($noticeEntries) - 3);
?>
<table>
<tbody>
<?php
foreach ($noticeEntries as $item) {
?>
<tr>
<td class="date"><?php
echo Timestamp::format2($item['written']);
?>
</td>
<td class="title"><a href="<?php
echo $item['permalink'];
?>
" onclick="return openLinkInNewWindow(this);" ><?php
echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 35));
?>
</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
} else {
?>
<div id="fail-notice">
<?php
echo _t('공지사항을 가져올 수 없습니다. 잠시 후 다시 시도해 주십시오.');
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
<?php
}
示例3: getRecentTrackbacksView
function getRecentTrackbacksView($trackbacks, $trackbackView = null, $template = null)
{
$context = Model_Context::getInstance();
$recentTrackbackView = '';
if (is_null($template)) {
$skin = new Skin($context->getProperty('skin.skin'));
$template = $skin->recentTrackbackItem;
}
foreach ($trackbacks as $trackback) {
$view = "{$template}";
dress('rcttb_rep_link', $context->getProperty('uri.blog') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/" . URL::encode($trackback['slogan'], $context->getProperty('service.useEncodedURL')) : $trackback['entry']) . "#trackback{$trackback['id']}", $view);
dress('rcttb_rep_desc', htmlspecialchars(Utils_Unicode::lessenAsEm($trackback['subject'], $context->getProperty('skin.recentTrackbackLength'))), $view);
dress('rcttb_rep_time', fireEvent('ViewRecentTrackbackDate', Timestamp::format2($trackback['written']), $trackback['written']), $view);
dress('rcttb_rep_name', htmlspecialchars(Utils_Unicode::lessenAsEm($trackback['site'], $context->getProperty('skin.recentTrackbackLength'))), $view);
$recentTrackbackView .= $view;
}
if (!is_null($trackbackView)) {
dress('rcttb_rep', $recentTrackbackView, $trackbackView);
// IE webslice support
if ($context->getProperty('blog.useMicroformat', 3) == 3) {
$recentTrackbackView = addWebSlice($trackbackView, 'recentCommentWebslice', htmlspecialchars($context->getProperty('blog.title') . ' - ' . _t('최근 트랙백')));
} else {
return $trackbackView;
}
}
return $recentTrackbackView;
}
示例4: getTimestamp2
function getTimestamp2($time)
{
return Timestamp::format2($time);
}