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


PHP Format::Display方法代碼示例

本文整理匯總了PHP中Format::Display方法的典型用法代碼示例。如果您正苦於以下問題:PHP Format::Display方法的具體用法?PHP Format::Display怎麽用?PHP Format::Display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Format的用法示例。


在下文中一共展示了Format::Display方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: WriteActivityComment

function WriteActivityComment($Comment, &$Sender, &$Session)
{
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    ?>
"><?php 
    if ($Comment->ActivityPhoto != '') {
        if ($Comment->InsertUserID == $Session->UserID) {
            echo '<a href="' . Url('/garden/profile/' . urlencode($Comment->ActivityName)) . '">' . $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto) . '</a>';
        } else {
            echo $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto);
        }
    }
    ?>
<h3><?php 
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request()), 'Delete') : '';
    ?>
<strong><?php 
    echo Format::ActivityHeadline($Comment, $Sender->ProfileUserID);
    ?>
<em><?php 
    echo Format::Date($Comment->DateInserted);
    ?>
</em></strong></h3>
   <blockquote><?php 
    echo Format::Display($Comment->Story);
    ?>
</blockquote>
</li>
<?php 
}
開發者ID:kidmax,項目名稱:Garden,代碼行數:35,代碼來源:helper_functions.php

示例2: Anchor

<?php

if (!defined('APPLICATION')) {
    exit;
}
$Session = Gdn::Session();
?>
<div class="User">
   <h1><?php 
echo $this->User->Name;
?>
</h1>
   <?php 
if ($this->User->About != '') {
    echo '<div id="Status">' . Format::Display($this->User->About);
    if ($this->User->About != '' && ($Session->UserID == $this->User->UserID || $Session->CheckPermission('Garden.Users.Edit'))) {
        echo ' - ' . Anchor(T('Clear'), '/profile/clear/' . $this->User->UserID . '/' . $Session->TransientKey(), 'Change');
    }
    echo '</div>';
}
?>
</div>
開發者ID:sirnot,項目名稱:Garden,代碼行數:22,代碼來源:user.php

示例3: foreach

   <ul class="PanelActivity">
      <?php 
foreach ($this->_ActivityData->Result() as $Activity) {
    echo '<li class="Activity ' . $Activity->ActivityType . '">';
    // If this was a status update or a wall comment, don't bother with activity strings
    $ActivityType = explode(' ', $Activity->ActivityType);
    // Make sure you strip out any extra css classes munged in here
    $ActivityType = $ActivityType[0];
    $Author = UserBuilder($Activity, 'Activity');
    if (in_array($ActivityType, array('WallComment', 'AboutUpdate'))) {
        echo UserAnchor($Author, 'Name');
        if ($Activity->ActivityType == 'WallComment' && $Activity->RegardingUserID > 0) {
            $Author = UserBuilder($Activity, 'Regarding');
            echo '<span>→</span>' . UserAnchor($Author, 'Name');
        }
        echo Format::Display($Activity->Story);
        echo '<em>' . Format::Date($Activity->DateInserted) . '</em>';
    } else {
        echo Format::ActivityHeadline($Activity);
        echo '<em>' . Format::Date($Activity->DateInserted) . '</em>';
        if ($Activity->Story != '') {
            echo '<div class="Story">';
            echo $Activity->Story;
            echo '</div>';
        }
    }
    echo '</li>';
}
?>
      <li class="ShowAll"><?php 
echo Anchor(T('↳ Show All'), 'activity');
開發者ID:nbudin,項目名稱:Garden,代碼行數:31,代碼來源:recentactivity.php

示例4: WriteActivityComment

function WriteActivityComment($Comment, &$Sender, &$Session)
{
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    if ($Comment->ActivityPhoto != '') {
        echo ' HasPhoto';
    }
    ?>
"><?php 
    if ($Comment->ActivityPhoto != '') {
        echo '<a href="' . Url('/garden/profile/' . urlencode($Comment->ActivityName)) . '" class="Photo">' . $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto) . '</a>';
    }
    echo '<div>';
    echo UserAnchor($Comment->ActivityName, 'Name');
    echo Format::Display($Comment->Story);
    echo '<div class="Meta">';
    echo Format::Date($Comment->DateInserted);
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? '<span>&bull;</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
    echo '</div>';
    echo '</div>';
    ?>
</li>
<?php 
}
開發者ID:jhampha,項目名稱:Garden,代碼行數:28,代碼來源:helper_functions.php

示例5: WriteActivityComment

function WriteActivityComment($Comment, &$Sender, &$Session)
{
    $Author = UserBuilder($Comment, 'Activity');
    $PhotoAnchor = UserPhoto($Author, 'Photo');
    $CssClass = 'Item ActivityComment Condensed ' . $Comment->ActivityType;
    if ($PhotoAnchor != '') {
        $CssClass .= ' HasPhoto';
    }
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $CssClass;
    ?>
">
   <?php 
    if ($PhotoAnchor != '') {
        ?>
   <div class="Photo"><?php 
        echo $PhotoAnchor;
        ?>
</div>
   <?php 
    }
    ?>
   <div class="ItemContent ActivityComment">
      <?php 
    echo UserAnchor($Author, 'Title Name');
    ?>
      <div class="Excerpt"><?php 
    echo Format::Display($Comment->Story);
    ?>
</div>
      <div class="Meta">
         <span class="DateCreated"><?php 
    echo Format::Date($Comment->DateInserted);
    ?>
</span>
         <?php 
    if ($Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete')) {
        echo Anchor(T('Delete'), 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request()), 'DeleteComment');
    }
    ?>
      </div>
   </div>
</li>
<?php 
}
開發者ID:nbudin,項目名稱:Garden,代碼行數:49,代碼來源:helper_functions.php

示例6: WriteActivityComment

function WriteActivityComment($Comment, &$Sender, &$Session)
{
    $Author = UserBuilder($Comment, 'Activity');
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    if ($Comment->ActivityPhoto != '') {
        echo ' HasPhoto';
    }
    ?>
"><?php 
    echo UserPhoto($Author, 'Photo');
    echo '<div>';
    echo UserAnchor($Author, 'Name');
    echo Format::Display($Comment->Story);
    echo '<div class="Meta">';
    echo Format::Date($Comment->DateInserted);
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? '<span>&bull;</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
    echo '</div>';
    echo '</div>';
    ?>
</li>
<?php 
}
開發者ID:Aetasiric,項目名稱:Garden,代碼行數:27,代碼來源:helper_functions.php


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