本文整理汇总了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
}
示例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>
示例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');
示例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>•</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
echo '</div>';
echo '</div>';
?>
</li>
<?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
}
示例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>•</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
echo '</div>';
echo '</div>';
?>
</li>
<?php
}