當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gdn_Format::FuzzyTime方法代碼示例

本文整理匯總了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"/>&nbsp;</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");
開發者ID:SatiricMan,項目名稱:addons,代碼行數:31,代碼來源:report-regarding.php

示例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>
開發者ID:29th,項目名稱:VanillaAddons,代碼行數:30,代碼來源:panel.php


注:本文中的Gdn_Format::FuzzyTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。