当前位置: 首页>>代码示例>>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;未经允许,请勿转载。