当前位置: 首页>>代码示例>>PHP>>正文


PHP userPhoto函数代码示例

本文整理汇总了PHP中userPhoto函数的典型用法代码示例。如果您正苦于以下问题:PHP userPhoto函数的具体用法?PHP userPhoto怎么用?PHP userPhoto使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了userPhoto函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的userPhoto函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。