本文整理汇总了PHP中userPhoto函数的典型用法代码示例。如果您正苦于以下问题:PHP userPhoto函数的具体用法?PHP userPhoto怎么用?PHP userPhoto使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了userPhoto函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: toString
public function toString()
{
$users = Gdn::UserModel()->GetIDs($this->getBirthdays());
if (!$users) {
return;
}
$return = '<div class="Box BirthdayModule"><h4>' . plural(count($users), T("Today's Birthday"), T("Today's Birthdays")) . '</h4><p>';
foreach ($users as $user) {
$return .= userPhoto($user, 'Medium') . ' ';
}
$return .= '</p></div>';
return $return;
}
开发者ID:bleistivt,项目名称:BirthdayModule,代码行数:13,代码来源:class.birthdaymodule.php
示例2: date
<table cellpadding="10" cellspacing="0">
<tr>
<td width="100%" >
<div class="date">Recieved: <?php
echo date('l, F d, Y', $message['date']);
?>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30"></td>
<td>
<a href="<?php
echo getProfileLink($userInfo->ID);
?>
"><img src="<?php
echo userPhoto($userInfo->ID);
?>
" class="photo"/></a>
<br /><span style="color:#000;">From:</span> <a href="<?php
echo getProfileLink($userInfo->ID);
?>
" style="color:red"><?php
echo nm_user_public_name($userInfo->ID);
?>
</a><br />
<span style="color:#000">Subject:</span> <?php
echo $message['subject'];
?>
<br />
<br />
<p class="blogContent"><?php
开发者ID:popovdenis,项目名称:kmst,代码行数:31,代码来源:messages-single.php
示例3: writeDiscussion
function writeDiscussion($Discussion, &$Sender, &$Session)
{
$CssClass = CssClass($Discussion);
$DiscussionUrl = $Discussion->Url;
$Category = CategoryModel::categories($Discussion->CategoryID);
if ($Session->UserID) {
$DiscussionUrl .= '#latest';
}
$Sender->EventArguments['DiscussionUrl'] =& $DiscussionUrl;
$Sender->EventArguments['Discussion'] =& $Discussion;
$Sender->EventArguments['CssClass'] =& $CssClass;
$First = UserBuilder($Discussion, 'First');
$Last = UserBuilder($Discussion, 'Last');
$Sender->EventArguments['FirstUser'] =& $First;
$Sender->EventArguments['LastUser'] =& $Last;
$Sender->fireEvent('BeforeDiscussionName');
$DiscussionName = $Discussion->Name;
if ($DiscussionName == '') {
$DiscussionName = t('Blank Discussion Topic');
}
$Sender->EventArguments['DiscussionName'] =& $DiscussionName;
static $FirstDiscussion = TRUE;
if (!$FirstDiscussion) {
$Sender->fireEvent('BetweenDiscussion');
} else {
$FirstDiscussion = FALSE;
}
$Discussion->CountPages = ceil($Discussion->CountComments / $Sender->CountCommentsPerPage);
?>
<li id="Discussion_<?php
echo $Discussion->DiscussionID;
?>
" class="<?php
echo $CssClass;
?>
">
<?php
if (!property_exists($Sender, 'CanEditDiscussions')) {
$Sender->CanEditDiscussions = val('PermsDiscussionsEdit', CategoryModel::categories($Discussion->CategoryID)) && c('Vanilla.AdminCheckboxes.Use');
}
$Sender->fireEvent('BeforeDiscussionContent');
// WriteOptions($Discussion, $Sender, $Session);
?>
<span class="Options">
<?php
echo OptionsList($Discussion);
echo BookmarkButton($Discussion);
?>
</span>
<div class="ItemContent Discussion">
<!-- User Photo -->
<?php
echo '<div class="discussion-author">';
echo userPhoto($First, array('Size' => 'Medium'));
echo '</div>';
?>
<div class="discussion-info">
<div class="Title">
<?php
echo AdminCheck($Discussion, array('', ' ')) . anchor($DiscussionName, $DiscussionUrl);
$Sender->fireEvent('AfterDiscussionTitle');
?>
</div>
<div class="Meta Meta-Discussion">
<?php
WriteTags($Discussion);
?>
<span class="MItem MCount ViewCount"><?php
printf(PluralTranslate($Discussion->CountViews, '%s view html', '%s views html', t('%s view'), t('%s views')), BigPlural($Discussion->CountViews, '%s view'));
?>
</span>
<span class="MItem MCount CommentCount fontify-message-icon"><?php
printf(PluralTranslate($Discussion->CountComments, '%s comment html', '%s comments html', t('%s'), t('%s')), BigPlural($Discussion->CountComments, '%s comment'));
?>
</span>
<span class="MItem MCount DiscussionScore Hidden"><?php
$Score = $Discussion->Score;
if ($Score == '') {
$Score = 0;
}
printf(Plural($Score, '%s point', '%s points', BigPlural($Score, '%s point')));
?>
</span>
<?php
echo NewComments($Discussion);
$Sender->fireEvent('AfterCountMeta');
if ($Discussion->LastCommentID != '') {
echo ' <span class="MItem LastCommentBy">' . sprintf(t('Most recent by %1$s'), userAnchor($Last)) . '</span> ';
echo ' <span class="MItem LastCommentDate">' . Gdn_Format::date($Discussion->LastDate, 'html') . '</span>';
} else {
echo ' <span class="MItem LastCommentBy">' . sprintf(t('Started by %1$s'), userAnchor($First)) . '</span> ';
echo ' <span class="MItem LastCommentDate">' . Gdn_Format::date($Discussion->FirstDate, 'html');
if ($Source = val('Source', $Discussion)) {
echo ' ' . sprintf(t('via %s'), t($Source . ' Source', $Source));
}
echo '</span> ';
}
//.........这里部分代码省略.........
开发者ID:mcnasby,项目名称:datto-vanilla,代码行数:101,代码来源:helper_functions.php
示例4: foreach
<ol id="search-results" class="DataList DataList-Search" start="<?php
echo $this->data('From');
?>
">
<?php
foreach ($this->data('SearchResults') as $Row) {
?>
<li class="Item Item-Search">
<h3><?php
echo anchor(htmlspecialchars($Row['Title']), $Row['Url']);
?>
</h3>
<div class="Item-Body Media">
<?php
$Photo = userPhoto($Row, array('LinkClass' => 'Img'));
if ($Photo) {
echo $Photo;
}
?>
<div class="Media-Body">
<div class="Meta">
<?php
echo ' <span class="MItem-Author">' . sprintf(t('by %s'), userAnchor($Row)) . '</span>';
echo Bullet(' ');
echo ' <span clsss="MItem-DateInserted">' . Gdn_Format::date($Row['DateInserted'], 'html') . '</span> ';
if (isset($Row['Breadcrumbs'])) {
echo Bullet(' ');
echo ' <span class="MItem-Location">' . Gdn_Theme::Breadcrumbs($Row['Breadcrumbs'], false) . '</span> ';
}
if (isset($Row['Notes'])) {
开发者ID:caidongyun,项目名称:vanilla,代码行数:31,代码来源:results.php
示例5: RoleModel
$ModerationCount = $LogModel->GetOperationCount('moderate');
$DashboardCount += $ModerationCount;
}
// Applicant Count
if ($Session->checkPermission('Garden.Users.Approve')) {
$RoleModel = new RoleModel();
$ApplicantCount = $RoleModel->GetApplicantCount();
$DashboardCount += $ApplicantCount;
} else {
$ApplicantCount = null;
}
$this->EventArguments['DashboardCount'] =& $DashboardCount;
$this->fireEvent('BeforeFlyoutMenu');
if ($Session->isValid()) {
echo '<div class="MeBox' . $CssClass . '">';
echo userPhoto($User);
echo '<div class="WhoIs">';
echo userAnchor($User, 'Username');
echo '<div class="MeMenu">';
// Notifications
$CountNotifications = $User->CountNotifications;
$CNotifications = is_numeric($CountNotifications) && $CountNotifications > 0 ? '<span class="Alert NotificationsAlert">' . $CountNotifications . '</span>' : '';
echo '<span class="ToggleFlyout" rel="/profile/notificationspopin">';
echo anchor(sprite('SpNotifications', 'Sprite Sprite16') . Wrap(t('Notifications'), 'em') . $CNotifications, userUrl($User), 'MeButton FlyoutButton js-clear-notifications', array('title' => t('Notifications')));
echo sprite('SpFlyoutHandle', 'Arrow');
echo '<div class="Flyout FlyoutMenu"></div></span>';
// Inbox
if (Gdn::ApplicationManager()->CheckApplication('Conversations')) {
$CountInbox = val('CountUnreadConversations', Gdn::session()->User);
$CInbox = is_numeric($CountInbox) && $CountInbox > 0 ? ' <span class="Alert">' . $CountInbox . '</span>' : '';
echo '<span class="ToggleFlyout" rel="/messages/popin">';
开发者ID:caidongyun,项目名称:vanilla,代码行数:31,代码来源:me.php
示例6: foreach
</tr>
</thead>
-->
<tbody>
<?php
$Alt = '';
foreach ($this->ActiveUserData as $User) {
?>
<tr<?php
$Alt = $Alt == '' ? ' class="Alt"' : '';
echo $Alt;
?>
>
<th><?php
$PhotoUser = UserBuilder($User);
echo userPhoto($PhotoUser);
echo userAnchor($User);
?>
</th>
<td class="Alt"><?php
echo Gdn_Format::date($User->DateLastActive, 'html');
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="Column Column1 ReleasesColumn">
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:31,代码来源:index.php
示例7: foreach
<?php
foreach ($this->data('Conversations') as $Row) {
$Subject = '';
if ($Row['Subject']) {
$Subject = Gdn_Format::text($Row['Subject']);
} else {
$Subject = ConversationModel::participantTitle($Row, false);
}
$PhotoUser = userBuilder($Row, 'LastInsert');
?>
<li class="Item" rel="<?php
echo url("/messages/{$Row['ConversationID']}#Message_{$Row['LastMessageID']}");
?>
">
<div class="Author Photo"><?php
echo userPhoto($PhotoUser, ['NoLink' => true]);
?>
</div>
<div class="ItemContent">
<b class="Subject"><?php
echo anchor(htmlspecialchars($Subject), "/messages/{$Row['ConversationID']}#Message_{$Row['LastMessageID']}");
?>
</b>
<?php
$Excerpt = sliceString(Gdn_Format::plainText($Row['LastBody'], $Row['LastFormat']), 80);
echo wrap(nl2br(htmlspecialchars($Excerpt)), 'div', array('class' => 'Excerpt'));
?>
<div class="Meta">
<?php
echo ' <span class="MItem">' . plural($Row['CountMessages'], '%s message', '%s messages') . '</span> ';
if ($Row['CountNewMessages'] > 0) {
开发者ID:vanilla,项目名称:vanilla,代码行数:31,代码来源:popin.php
示例8: writeDiscussionRow
/**
* Writes a discussion in table row format.
*/
function writeDiscussionRow($Discussion, $Sender, $Session)
{
if (!property_exists($Sender, 'CanEditDiscussions')) {
$Sender->CanEditDiscussions = val('PermsDiscussionsEdit', CategoryModel::categories($Discussion->CategoryID)) && c('Vanilla.AdminCheckboxes.Use');
}
$CssClass = CssClass($Discussion);
$DiscussionUrl = $Discussion->Url;
if ($Session->UserID) {
$DiscussionUrl .= '#latest';
}
$Sender->EventArguments['DiscussionUrl'] =& $DiscussionUrl;
$Sender->EventArguments['Discussion'] =& $Discussion;
$Sender->EventArguments['CssClass'] =& $CssClass;
$First = UserBuilder($Discussion, 'First');
if ($Discussion->LastUserID) {
$Last = UserBuilder($Discussion, 'Last');
} else {
$Last = $First;
}
$Sender->EventArguments['FirstUser'] =& $First;
$Sender->EventArguments['LastUser'] =& $Last;
$Sender->fireEvent('BeforeDiscussionName');
$DiscussionName = $Discussion->Name;
// If there are no word character detected in the title treat it as if it is blank.
if (!preg_match('/\\w/u', $DiscussionName)) {
$DiscussionName = t('Blank Discussion Topic');
}
$Sender->EventArguments['DiscussionName'] =& $DiscussionName;
static $FirstDiscussion = true;
if (!$FirstDiscussion) {
$Sender->fireEvent('BetweenDiscussion');
} else {
$FirstDiscussion = false;
}
$Discussion->CountPages = ceil($Discussion->CountComments / $Sender->CountCommentsPerPage);
$FirstPageUrl = DiscussionUrl($Discussion, 1);
$LastPageUrl = DiscussionUrl($Discussion, val('CountPages', $Discussion)) . '#latest';
?>
<tr id="Discussion_<?php
echo $Discussion->DiscussionID;
?>
" class="<?php
echo $CssClass;
?>
">
<?php
$Sender->fireEvent('BeforeDiscussionContent');
?>
<?php
echo AdminCheck($Discussion, array('<td class="CheckBoxColumn"><div class="Wrap">', '</div></td>'));
?>
<td class="DiscussionName">
<div class="Wrap">
<span class="Options">
<?php
echo OptionsList($Discussion);
echo BookmarkButton($Discussion);
?>
</span>
<?php
$Sender->fireEvent('BeforeDiscussionTitle');
echo anchor($DiscussionName, $DiscussionUrl, 'Title') . ' ';
$Sender->fireEvent('AfterDiscussionTitle');
WriteMiniPager($Discussion);
echo NewComments($Discussion);
if ($Sender->data('_ShowCategoryLink', true)) {
echo CategoryLink($Discussion, ' ' . t('in') . ' ');
}
// Other stuff that was in the standard view that you may want to display:
echo '<div class="Meta Meta-Discussion">';
WriteTags($Discussion);
echo '</div>';
// if ($Source = val('Source', $Discussion))
// echo ' '.sprintf(t('via %s'), t($Source.' Source', $Source));
//
?>
</div>
</td>
<td class="BlockColumn BlockColumn-User FirstUser">
<div class="Block Wrap">
<?php
echo userPhoto($First, array('Size' => 'Small'));
echo userAnchor($First, 'UserLink BlockTitle');
echo '<div class="Meta">';
echo anchor(Gdn_Format::date($Discussion->FirstDate, 'html'), $FirstPageUrl, 'CommentDate MItem');
echo '</div>';
?>
</div>
</td>
<td class="BigCount CountComments">
<div class="Wrap">
<?php
// Exact Number
// echo number_format($Discussion->CountComments);
// Round Number
echo BigPlural($Discussion->CountComments, '%s comment');
?>
//.........这里部分代码省略.........
开发者ID:vanilla,项目名称:vanilla,代码行数:101,代码来源:table_functions.php
示例9: t
<?php
if (!defined('APPLICATION')) {
exit;
}
?>
<div class="Box RecentUsers">
<h4><?php
echo t('Recently Active Users');
?>
</h4>
<div class="Icons">
<?php
$Data = $this->_Sender->RecentUserData;
foreach ($Data->result() as $User) {
$Visitor = UserBuilder($User);
echo userPhoto($Visitor);
}
?>
</div>
</div>
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:22,代码来源:recentuser.php
示例10: userPhoto
?>
<li id="Message_<?php
echo $Message->MessageID;
?>
"<?php
echo $Class == '' ? '' : ' class="' . $Class . '"';
?>
>
<div id="Item_<?php
echo $CurrentOffset;
?>
" class="ConversationMessage">
<div class="Meta">
<span class="Author">
<?php
echo userPhoto($Author, 'Photo');
echo userAnchor($Author, 'Name');
?>
</span>
<span class="MItem DateCreated"><?php
echo Gdn_Format::date($Message->DateInserted, 'html');
?>
</span>
<?php
$this->fireEvent('AfterConversationMessageDate');
?>
</div>
<div class="Message">
<?php
$this->fireEvent('BeforeConversationMessageBody');
echo Gdn_Format::to($Message->Body, $Format);
开发者ID:caidongyun,项目名称:vanilla,代码行数:31,代码来源:messages.php
示例11: displayPhoto
/**
* Display user photo for first user in each discussion.
*/
protected function displayPhoto($Sender)
{
// Build user object & output photo
$FirstUser = userBuilder($Sender->EventArguments['Discussion'], 'First');
echo userPhoto($FirstUser, array('LinkClass' => 'IndexPhoto'));
}
开发者ID:caidongyun,项目名称:vanilla,代码行数:9,代码来源:class.indexphotos.plugin.php
示例12: userPhoto
$Conversation = (object) $Conversation;
$Alt = !$Alt;
// Figure out the last photo.
$LastPhoto = '';
if (empty($Conversation->Participants)) {
$User = Gdn::userModel()->getID($Conversation->LastInsertUserID);
$LastPhoto = userPhoto($User);
} else {
foreach ($Conversation->Participants as $User) {
if ($User['UserID'] == $Conversation->LastInsertUserID) {
$LastPhoto = userPhoto($User);
if ($LastPhoto) {
break;
}
} elseif (!$LastPhoto) {
$LastPhoto = userPhoto($User);
}
}
}
$CssClass = 'Item';
$CssClass .= $Alt ? ' Alt' : '';
$CssClass .= $Conversation->CountNewMessages > 0 ? ' New' : '';
$CssClass .= $LastPhoto != '' ? ' HasPhoto' : '';
$CssClass .= ' ' . ($Conversation->CountNewMessages <= 0 ? 'Read' : 'Unread');
$JumpToItem = $Conversation->CountMessages - $Conversation->CountNewMessages;
$Message = sliceString(Gdn_Format::plainText($Conversation->LastBody, $Conversation->LastFormat), 100);
if (stringIsNullOrEmpty(trim($Message))) {
$Message = t('Blank Message');
}
$this->EventArguments['Conversation'] = $Conversation;
?>
开发者ID:vanilla,项目名称:vanilla,代码行数:31,代码来源:conversations.php
示例13: writeActivityComment
function writeActivityComment($Comment, $Activity)
{
$Session = Gdn::session();
$Author = UserBuilder($Comment, 'Insert');
$PhotoAnchor = userPhoto($Author, 'Photo');
$CssClass = 'Item ActivityComment ActivityComment';
if ($PhotoAnchor != '') {
$CssClass .= ' HasPhoto';
}
?>
<li id="ActivityComment_<?php
echo $Comment['ActivityCommentID'];
?>
" class="<?php
echo $CssClass;
?>
">
<?php
if ($PhotoAnchor != '') {
?>
<div class="Author Photo"><?php
echo $PhotoAnchor;
?>
</div>
<?php
}
?>
<div class="ItemContent ActivityComment">
<?php
echo userAnchor($Author, 'Title Name');
?>
<div class="Excerpt"><?php
echo Gdn_Format::to($Comment['Body'], $Comment['Format']);
?>
</div>
<div class="Meta">
<span class="DateCreated"><?php
echo Gdn_Format::date($Comment['DateInserted'], 'html');
?>
</span>
<?php
if (ActivityModel::canDelete($Activity)) {
echo anchor(t('Delete'), "dashboard/activity/deletecomment?id={$Comment['ActivityCommentID']}&tk=" . $Session->TransientKey() . '&target=' . urlencode(Gdn_Url::Request()), 'DeleteComment');
}
?>
</div>
</div>
</li>
<?php
}
开发者ID:R-J,项目名称:vanilla,代码行数:50,代码来源:helper_functions.php
示例14: wrap
?>
<ul class="PopList Popin">
<?php
if (count($this->data('Discussions'))) {
?>
<li class="Item Title">
<?php
echo wrap($this->data('Title'), 'strong');
?>
</li>
<?php
foreach ($this->data('Discussions') as $Row) {
?>
<li class="Item">
<div class="Author Photo"><?php
echo userPhoto($Row, array('Px' => 'First'));
?>
</div>
<div class="ItemContent">
<b class="Subject"><?php
echo anchor($Row->Name, $Row->Url . '#latest');
?>
</b>
<div class="Meta">
<?php
echo ' <span class="MItem">' . plural($Row->CountComments, '%s comment', '%s comments') . '</span> ';
if ($Row->CountUnreadComments === TRUE) {
echo ' <strong class="HasNew"> ' . t('new') . '</strong> ';
} elseif ($Row->CountUnreadComments > 0) {
echo ' <strong class="HasNew"> ' . plural($Row->CountUnreadComments, '%s new', '%s new plural') . '</strong> ';
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:31,代码来源:popin.php
示例15: writeCommentFormHeader
function writeCommentFormHeader()
{
$Session = Gdn::session();
if (c('Vanilla.Comment.UserPhotoFirst', true)) {
echo userPhoto($Session->User);
echo userAnchor($Session->User, 'Username');
} else {
echo userAnchor($Session->User, 'Username');
echo userPhoto($Session->User);
}
}
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:11,代码来源:helper_functions.php
示例16: writeTableRow
function writeTableRow($Row, $Depth = 1)
{
$Children = $Row['Children'];
$WriteChildren = FALSE;
if (!empty($Children)) {
if ($Depth + 1 >= c('Vanilla.Categories.MaxDisplayDepth')) {
$WriteChildren = 'list';
} else {
$WriteChildren = 'rows';
}
}
$H = 'h' . ($Depth + 1);
?>
<tr class="<?php
echo CssClass($Row);
?>
">
<td class="CategoryName">
<div class="Wrap">
<?php
echo GetOptions($Row);
echo CategoryPhoto($Row);
echo "<{$H}>";
echo anchor(htmlspecialchars($Row['Name']), $Row['Url']);
Gdn::controller()->EventArguments['Category'] = $Row;
Gdn::controller()->fireEvent('AfterCategoryTitle');
echo "</{$H}>";
?>
<div class="CategoryDescription">
<?php
echo $Row['Description'];
?>
</div>
<?php
if ($WriteChildren === 'list') {
?>
<div class="ChildCategories">
<?php
echo wrap(t('Child Categories') . ': ', 'b');
echo CategoryString($Children, $Depth + 1);
?>
</div>
<?php
}
?>
</div>
</td>
<td class="BigCount CountDiscussions">
<div class="Wrap">
<?php
// echo "({$Row['CountDiscussions']})";
echo BigPlural($Row['CountAllDiscussions'], '%s discussion');
?>
</div>
</td>
<td class="BigCount CountComments">
<div class="Wrap">
<?php
// echo "({$Row['CountComments']})";
echo BigPlural($Row['CountAllComments'], '%s comment');
?>
</div>
</td>
<td class="BlockColumn LatestPost">
<div class="Block Wrap">
<?php
if ($Row['LastTitle']) {
?>
<?php
echo userPhoto($Row, array('Size' => 'Small', 'Px' => 'Last'));
echo anchor(SliceString(Gdn_Format::text($Row['LastTitle']), 100), $Row['LastUrl'], 'BlockTitle LatestPostTitle', array('title' => html_entity_decode($Row['LastTitle'])));
?>
<div class="Meta">
<?php
echo userAnchor($Row, 'UserLink MItem', 'Last');
?>
<span class="Bullet">•</span>
<?php
echo anchor(Gdn_Format::date($Row['LastDateInserted'], 'html'), $Row['LastUrl'], 'CommentDate MItem');
if (isset($Row['LastCategoryID'])) {
$LastCategory = CategoryModel::categories($Row['LastCategoryID']);
echo ' <span>', sprintf('in %s', anchor($LastCategory['Name'], CategoryUrl($LastCategory, '', '//'))), '</span>';
}
?>
</div>
<?php
}
?>
</div>
</td>
</tr>
<?php
if ($WriteChildren === 'rows') {
foreach ($Children as $ChildRow) {
WriteTableRow($ChildRow, $Depth + 1);
}
}
}
开发者ID:caidongyun,项目名称:vanilla,代码行数:98,代码来源:helper_functions.php
示例17: userPhoto
?>
" class="<?php
echo $CssClass;
?>
">
<div class="Discussion">
<div class="Item-Header DiscussionHeader">
<div class="AuthorWrap">
<span class="Author">
<?php
if ($UserPhotoFirst) {
echo userPhoto($Author);
echo userAnchor($Author, 'Username');
} else {
echo userAnchor($Author, 'Username');
echo userPhoto($Author);
}
echo formatMeAction($Discussion);
?>
</span>
<span class="AuthorInfo">
<?php
echo wrapIf(htmlspecialchars(val('Title', $Author)), 'span', array('class' => 'MItem AuthorTitle'));
echo wrapIf(htmlspecialchars(val('Location', $Author)), 'span', array('class' => 'MItem AuthorLocation'));
$this->fireEvent('AuthorInfo');
?>
</span>
</div>
<div class="Meta DiscussionMeta">
<span class="MItem DateCreated">
<?php
开发者ID:sitexa,项目名称:vanilla,代码行数:31,代码来源:discussion.php
示例18: writePromotedContent
/**
* Generates html output of $Content array
*
* @param array|object $Content
* @param PromotedContentModule $Sender
*/
function writePromotedContent($Content, $Sender)
{
static $UserPhotoFirst = NULL;
if ($UserPhotoFirst === null) {
$UserPhotoFirst = c('Vanilla.Comment.UserPhotoFirst', true);
}
$ContentType = val('RecordType', $Content);
$ContentID = val("{$ContentType}ID", $Content);
$Author = val('Author', $Content);
$ContentURL = val('Url', $Content);
$Sender->EventArguments['Content'] =& $Content;
$Sender->EventArguments['ContentUrl'] =& $ContentURL;
?>
<div id="<?php
echo "Promoted_{$ContentType}_{$ContentID}";
?>
" class="<?php
echo CssClass($Content);
?>
">
<div class="AuthorWrap">
<span class="Author">
<?php
if ($UserPhotoFirst) {
echo userPhoto($Author);
echo userAnchor($Author, 'Username');
} else {
echo userAnchor($Author, 'Username');
echo userPhoto($Author);
}
$Sender->fireEvent('AuthorPhoto');
?>
</span>
<span class="AuthorInfo">
<?php
echo ' ' . WrapIf(htmlspecialchars(val('Title', $Author)), 'span', array('class' => 'MItem AuthorTitle'));
echo ' ' . WrapIf(htmlspecialchars(val('Location', $Author)), 'span', array('class' => 'MItem AuthorLocation'));
$Sender->fireEvent('AuthorInfo');
?>
</span>
</div>
<div class="Meta CommentMeta CommentInfo">
<span class="MItem DateCreated">
<?php
echo anchor(Gdn_Format::date($Content['DateInserted'], 'html'), $ContentURL, 'Permalink', array('rel' => 'nofollow'));
?>
</span>
<?php
// Include source if one was set
if ($Source = val('Source', $Content)) {
echo wrap(sprintf(t('via %s'), t($Source . ' Source', $Source)), 'span', array('class' => 'MItem Source'));
}
$Sender->fireEvent('ContentInfo');
?>
</div>
<div
class="Title"><?php
echo anchor(Gdn_Format::text(sliceString($Content['Name'], $Sender->TitleLimit), false), $ContentURL, 'DiscussionLink');
?>
</div>
<div class="Body">
<?php
echo anchor(htmlspecialchars(sliceString(Gdn_Format::plainText($Content['Body'], $Content['Format']), $Sender->BodyLimit)), $ContentURL, 'BodyLink');
$Sender->fireEvent('AfterPromotedBody');
// separate event to account for less space.
?>
</div>
</div>
<?php
}
开发者ID:R-J,项目名称:vanilla,代码行数:76,代码来源:helper_functions.php
示例19: t
<h2 class="H"><?php
echo t("Add a Message");
?>
</h2>
<div class="MessageFormWrap">
<div class="Form-HeaderWrap">
<div class="Form-Header">
<span class="Author">
<?php
if (c('Vanilla.Comment.UserPhotoFirst', true)) {
echo userPhoto($Session->User);
echo userAnchor($Session->User, 'Username');
} else {
echo userAnchor($Session->User, 'Username');
echo userPhoto($Session->User);
}
?>
</span>
</div>
</div>
<div class="Form-BodyWrap">
<div class="Form-Body">
<div class="FormWrapper FormWrapper-Condensed">
<?php
echo $this->Form->open(array('id' => 'Form_ConversationMessage', 'action' => url('/messages/addmessage/')));
echo $this->Form->errors();
// echo wrap($this->Form->textBox('Body', array('MultiLine' => true, 'class' => 'TextBox')), 'div', array('class' => 'TextBoxWrapper'));
echo $this->Form->bodyBox('Body', array('Table' => 'ConversationMessage', 'FileUpload' => true, 'tabindex' => 1));
echo '<div class="Buttons">', $this->Form->button('Send Message', array('class' => 'Button Primary', 'tabindex' => 1)), '</div>';
echo $this->Form->close();
开发者ID:vanilla,项目名称:vanilla,代码行数:31,代码来源:addmessage.php
注:本文中的userPhoto函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论