本文整理汇总了PHP中Gdn_Format::FuzzyTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Format::FuzzyTime方法的具体用法?PHP Gdn_Format::FuzzyTime怎么用?PHP Gdn_Format::FuzzyTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Format
的用法示例。
在下文中一共展示了Gdn_Format::FuzzyTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FormatString
<div class="RegardingEvent">
<span class="InformSprite Skull"/> </span> <?php
echo FormatString(T("{ReportingUser} reported this {EntityType} written by {ReportedUser}"), array('ReportingUser' => UserAnchor(GetValue('ReportingUser', $this->Data('ReportInfo')), 'ReportingUser'), 'EntityType' => GetValue('EntityType', $this->Data('ReportInfo')), 'ReportedUser' => UserAnchor(GetValue('ReportedUser', $this->Data('ReportInfo')), 'ReportedUser')));
?>
<div class="RegardingTime"><?php
$ReportedDate = GetValue('ReportedTime', $this->Data('ReportInfo'));
echo Gdn_Format::FuzzyTime($ReportedDate);
?>
</div>
<?php
$ReportedReason = GetValue('ReportedReason', $this->Data('ReportInfo'), NULL);
if (!is_null($ReportedReason)) {
?>
<div class="ReportedReason">"<?php
echo $ReportedReason;
?>
"</div>
<?php
}
?>
</div>
<div class="RegardingActions">
<?php
$ForeignURL = GetValue('ForeignURL', $this->Data('RegardingData'), NULL);
if (!is_null($ForeignURL)) {
?>
<div class="ActionButton"><a href="<?php
echo $ForeignURL;
?>
" title="<?php
echo T("Visit reported content location");
示例2:
echo Gdn_Format::Text($this->Data('MostPlayedGame')->hoursPlayed . ' hrs / ' . $this->Data('MostPlayedGame')->hoursOnRecord) . ' hrs';
?>
</br>
<?php
echo Gdn_Theme::Link('http://steamcommunity.com/profiles/' . $this->Data('SteamProfile')->steamID64 . '/stats/' . $this->Data('MostPlayedGame')->statsName, 'View stats', '<a href="%url" class="%class" target="_blank" >%text</a>');
?>
</dd>
<?php
}
?>
<dt></dt>
<dd><?php
echo Gdn_Theme::Link('http://steamcommunity.com/profiles/' . $this->Data('SteamProfile')->steamID64 . '/games?tab=all', 'View All Games', '<a href="%url" class="%class" target="_blank" >%text</a>');
?>
</dd>
<dt></dt>
<dd><?php
echo Gdn_Theme::Link('http://steamcommunity.com/profiles/' . $this->Data('SteamProfile')->steamID64 . '/wishlist', 'View Wishlist', '<a href="%url" class="%class" target="_blank" >%text</a>');
?>
</dd>
<?php
}
?>
<dt class="SteamUpdated">Updated</dt>
<dd class="SteamUpdated"><?php
echo Gdn_Format::FuzzyTime($this->Data('SteamProfile')->DateRetrieved, TRUE);
?>
</dd>
</dl>
</div>