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


PHP UserAnchor函数代码示例

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


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

示例1: ToString

    public function ToString()
    {
        if (!$this->_Data) {
            return;
        }
        if ($this->_Data->NumRows() == 0) {
            return;
        }
        ob_start();
        ?>
      <div id="SharedFingerprint" class="Box">
         <h4><?php 
        echo T("Shared Accounts");
        ?>
 <span class="Count"><?php 
        echo $this->_Data->NumRows();
        ?>
</span></h4>
			<ul class="PanelInfo">
         <?php 
        foreach ($this->_Data->Result() as $SharedAccount) {
            echo '<li><strong>' . UserAnchor($SharedAccount) . '</strong><br /></li>';
        }
        ?>
			</ul>
		</div>
		<?php 
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
开发者ID:SatiricMan,项目名称:addons,代码行数:31,代码来源:class.sharedfingerprintmodule.php

示例2: ToString

    public function ToString()
    {
        $String = '';
        ob_start();
        ?>
      <div class="Box">
         <h4><?php 
        echo T('In this Discussion');
        ?>
</h4>
         <ul class="PanelInfo">
         <?php 
        foreach ($this->_UserData->Result() as $User) {
            ?>
            <li>
               <strong><?php 
            echo UserAnchor($User, 'UserLink');
            ?>
</strong>
               <?php 
            echo Gdn_Format::Date($User->DateLastActive);
            ?>
            </li>
            <?php 
        }
        ?>
         </ul>
      </div>
      <?php 
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
开发者ID:sheldon,项目名称:Garden,代码行数:33,代码来源:class.inthisdiscussionmodule.php

示例3: writeModuleDiscussion

    function writeModuleDiscussion($Discussion, $Px = 'Bookmark')
    {
        ?>
        <li id="<?php 
        echo "{$Px}_{$Discussion->DiscussionID}";
        ?>
" class="<?php 
        echo CssClass($Discussion);
        ?>
">
   <span class="Options">
      <?php 
        //      echo OptionsList($Discussion);
        echo BookmarkButton($Discussion);
        ?>
   </span>

            <div class="Title"><?php 
        echo anchor(Gdn_Format::text($Discussion->Name, false), DiscussionUrl($Discussion) . ($Discussion->CountCommentWatch > 0 ? '#Item_' . $Discussion->CountCommentWatch : ''), 'DiscussionLink');
        ?>
</div>
            <div class="Meta">
                <?php 
        $Last = new stdClass();
        $Last->UserID = $Discussion->LastUserID;
        $Last->Name = $Discussion->LastName;
        echo NewComments($Discussion);
        echo '<span class="MItem">' . Gdn_Format::date($Discussion->LastDate, 'html') . UserAnchor($Last) . '</span>';
        ?>
            </div>
        </li>
    <?php 
    }
开发者ID:R-J,项目名称:vanilla,代码行数:33,代码来源:helper_functions.php

示例4: renderOrigin

 public function renderOrigin($Sender)
 {
     $Discussion = $Sender->EventArguments['Discussion'];
     if ($Discussion !== NULL && $Discussion->LastCommentID != '') {
         $Creator = UserBuilder($Discussion, 'First');
         $CreationDate = $Discussion->DateInserted;
         echo ' <span class="MItem LastCommentBy">' . sprintf(T('Started by %1$s'), UserAnchor($Creator)) . '</span>';
         echo ' <span class="MItem LastCommentDate">' . Gdn_Format::Date($CreationDate, 'html') . '</span>';
     }
 }
开发者ID:Nordic-T,项目名称:vanilla-plugins,代码行数:10,代码来源:class.DiscussionOrigin.plugin.php

示例5: ToString

    public function ToString()
    {
        $String = '';
        $Session = Gdn::Session();
        ob_start();
        //Hide the top poster box id there's no post greater than 0
        if ($this->_TopPosters->NumRows() > 0) {
            ?>
		
			<div id="TopPosters" class="Box">
				<h4><?php 
            echo Gdn::Translate("Top Posters");
            ?>
</h4>
				<ul class="PanelInfo">
				<?php 
            $i = 1;
            foreach ($this->_TopPosters->Result() as $User) {
                ?>
					<li>
						<?php 
                echo $User->AllPosted;
                ?>
						<?php 
                if (Gdn::Config('TopPosters.Show.Medal') == "both" || Gdn::Config('TopPosters.Show.Medal') == "side") {
                    ?>
						<img src="<?php 
                    echo str_replace("index.php?p=", "", Url('/plugins/TopPosters/badges/' . (file_exists('plugins/TopPosters/badges/' . $i . '.png') ? $i . '.png' : 'medal-icon.png')));
                    ?>
">
						<?php 
                }
                ?>
		 				<strong>
		    				<?php 
                echo UserAnchor($User);
                ?>
		 				</strong>
		 				
					</li>
				<?php 
                $i++;
            }
            ?>
			</ul>
		</div>
		<?php 
        }
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
开发者ID:ru4,项目名称:arabbnota,代码行数:52,代码来源:class.toppostersmodule.php

示例6: WriteComment

function WriteComment($Comment, &$Sender, &$Session, $CurrentOffset)
{
    $Author = UserBuilder($Comment, 'Insert');
    $Sender->EventArguments['Comment'] =& $Comment;
    $Sender->Options = '';
    $CssClass = 'Item Comment';
    $CssClass .= $Comment->InsertUserID == $Session->UserID ? ' Mine' : '';
    ?>
<li class="<?php 
    echo $CssClass;
    ?>
" id="Comment_<?php 
    echo $Comment->CommentID;
    ?>
">
   <?php 
    WriteOptions($Comment, $Sender, $Session);
    ?>
   <div class="Comment">
      <div class="Meta">
         <span class="Author">
            <?php 
    echo UserPhoto($Author);
    echo UserAnchor($Author);
    ?>
         </span>
         <span class="DateCreated">
            <?php 
    echo Format::Date($Comment->DateInserted);
    ?>
         </span>
         <span class="Permalink">
            <?php 
    echo Anchor(T('Permalink'), '/discussion/comment/' . $Comment->CommentID . '/#Comment_' . $Comment->CommentID, 'Permalink', array('name' => 'Item_' . $CurrentOffset));
    ?>
         </span>
         <?php 
    $Sender->FireEvent('AfterCommentMeta');
    ?>
      </div>
      <div class="Message"><?php 
    echo Format::To($Comment->Body, $Comment->Format);
    ?>
</div>
      <?php 
    $Sender->FireEvent('AfterCommentBody');
    ?>
   </div>
</li>
<?php 
}
开发者ID:nbudin,项目名称:Garden,代码行数:51,代码来源:helper_functions.php

示例7: DiscussionsController_AfterCountMeta_Handler

 public function DiscussionsController_AfterCountMeta_Handler(&$Sender)
 {
     $Discussion = $Sender->EventArguments['Discussion'];
     if (C('Plugins.AuthorTimeView.Show_AuthorTime')) {
         $First = UserBuilder($Discussion, 'First');
         $Last = UserBuilder($Discussion, 'Last');
         if ($Discussion->LastCommentID != '') {
             echo '<span class="LastCommentBy">' . sprintf(T(' %1$s'), UserAnchor($First)) . '</span>';
             echo '<span class="AuthorDate">' . Gdn_Format::Date($Discussion->FirstDate) . '</span>';
             echo '<span class="LastCommentBy">' . sprintf(T('| Recent %1$s'), UserAnchor($Last)) . '</span>';
         } else {
             // leave space preceding Started in ' Started by' or it will be removed by locale definitions
             echo '<span class="LastCommentBy">' . sprintf(T(' Started by %1$s'), UserAnchor($First)) . '</span>';
         }
     }
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:16,代码来源:default.php

示例8: ToString

    public function ToString()
    {
        $String = '';
        $Session = Gdn::Session();
        ob_start();
        ?>
			<div id="WhosOnline" class="Box">
				<h4><?php 
        echo T("Who's Online");
        ?>
 (<?php 
        echo $this->_OnlineUsers->NumRows();
        ?>
)</h4>
				<ul class="PanelInfo">
				<?php 
        if ($this->_OnlineUsers->NumRows() > 0) {
            foreach ($this->_OnlineUsers->Result() as $User) {
                ?>
					<li>
		 				<strong <?php 
                echo $User->Invisible == 1 ? 'class="Invisible"' : '';
                ?>
>
		    				<?php 
                echo UserAnchor($User);
                ?>
		 				</strong>
		 				<?php 
                echo Gdn_Format::Date($User->Timestamp);
                ?>
					</li>
				<?php 
            }
        }
        ?>
			</ul>
		</div>
		<?php 
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
开发者ID:ru4,项目名称:arabbnota,代码行数:43,代码来源:class.whosonlinemodule.php

示例9: writeModuleDiscussion

    function writeModuleDiscussion($Discussion, $Px = 'Bookmark', $showPhotos = false)
    {
        ?>
        <li id="<?php 
        echo "{$Px}_{$Discussion->DiscussionID}";
        ?>
" class="<?php 
        echo CssClass($Discussion);
        ?>
">
            <?php 
        if ($showPhotos) {
            $firstUser = userBuilder($Discussion, 'First');
            echo userPhoto($firstUser, ['LinkClass' => 'IndexPhoto']);
        }
        ?>
   <span class="Options">
      <?php 
        //      echo OptionsList($Discussion);
        echo BookmarkButton($Discussion);
        ?>
   </span>

            <div class="Title"><?php 
        echo anchor(Gdn_Format::text($Discussion->Name, false), DiscussionUrl($Discussion) . ($Discussion->CountCommentWatch > 0 ? '#Item_' . $Discussion->CountCommentWatch : ''), 'DiscussionLink');
        ?>
</div>
            <div class="Meta DiscussionsModuleMeta">
                <?php 
        $Last = new stdClass();
        $Last->UserID = $Discussion->LastUserID;
        $Last->Name = $Discussion->LastName;
        echo NewComments($Discussion);
        $translation = pluralTranslate($Discussion->CountComments, '%s comment html', '%s comments html', t('%s comment'), t('%s comments'));
        echo '<span class="MItem">' . Gdn_Format::date($Discussion->LastDate, 'html') . UserAnchor($Last) . '</span>';
        echo '<span class="MItem CountComments Hidden">' . sprintf($translation, $Discussion->CountComments) . '</span>';
        ?>
            </div>
        </li>
    <?php 
    }
开发者ID:vanilla,项目名称:vanilla,代码行数:41,代码来源:helper_functions.php

示例10: ToString

    public function ToString($Results)
    {
        $UserIDs = array();
        foreach ($Results as $Row) {
            $UserIDs[] = $Row->{SS_ATTR_USERID};
            ///IMPORTANT, this is lowercase since grab results directly from sphinx
        }
        // print_r($Return); die;
        $Sql = clone Gdn::Sql();
        $Users = $Sql->Select('Photo, UserID, Name')->From('User')->WhereIn('UserID', $UserIDs)->Get()->ResultObject();
        ob_start();
        ?>
        <div id="People" class="Box People">
            <h4 class="Header"><?php 
        echo T('People');
        ?>
</h4>
            <ul class="PanelInfo PanelDiscussions">
                <?php 
        foreach ($Users as $Row) {
            ?>
                    <li class="Item">
                        <?php 
            $User = UserBuilder($Row);
            ?>
                        <?php 
            echo UserPhoto($User);
            echo UserAnchor($User);
            ?>
                    </li>
                <?php 
        }
        ?>
            </ul>
        </div>
        <?php 
        $String = ob_get_contents();
        @ob_end_clean();
        return $String;
    }
开发者ID:Nordic-T,项目名称:vanilla-plugins,代码行数:40,代码来源:class.widget.member.php

示例11: 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="Author Photo"><?php 
        echo $PhotoAnchor;
        ?>
</div>
   <?php 
    }
    ?>
   <div class="ItemContent ActivityComment">
      <?php 
    echo UserAnchor($Author, 'Title Name');
    ?>
      <div class="Excerpt"><?php 
    echo Gdn_Format::Display($Comment->Story);
    ?>
</div>
      <div class="Meta">
         <span class="DateCreated"><?php 
    echo Gdn_Format::Date($Comment->DateInserted);
    ?>
</span>
         <?php 
    if ($Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete')) {
        echo Anchor(T('Delete'), 'dashboard/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request()), 'DeleteComment');
    }
    ?>
      </div>
   </div>
</li>
<?php 
}
开发者ID:seedbank,项目名称:old-repo,代码行数:49,代码来源:helper_functions.php

示例12: UserPhoto

echo 'Discussion_' . $Discussion->DiscussionID;
?>
" 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(GetValue('Title', $Author)), 'span', array('class' => 'MItem AuthorTitle'));
echo WrapIf(htmlspecialchars(GetValue('Location', $Author)), 'span', array('class' => 'MItem AuthorLocation'));
$this->FireEvent('AuthorInfo');
?>
            </span>
         </div>
         <div class="Meta DiscussionMeta">
            <span class="MItem DateCreated">
开发者ID:3marproof,项目名称:vanilla,代码行数:31,代码来源:discussion.php

示例13: UserPhoto

if (!defined('APPLICATION')) {
    exit;
}
if (property_exists($this, 'Discussion')) {
    ?>
<h2><?php 
    echo Format::Text($this->Discussion->Name);
    ?>
</h2>
<?php 
}
?>
<ul class="Discussion Preview">
   <li class="Comment">
      <ul class="Info">
         <li class="Author"><?php 
echo UserPhoto($this->Comment->InsertName, $this->Comment->InsertPhoto);
echo UserAnchor($this->Comment->InsertName);
?>
</li>
         <li class="Created"><?php 
echo Format::Date($this->Comment->DateInserted);
?>
</li>
      </ul>
      <div class="Body"><?php 
echo Format::To($this->Comment->Body, Gdn::Config('Garden.InputFormatter'));
?>
</div>
   </li>
</ul>
开发者ID:kidmax,项目名称:Garden,代码行数:31,代码来源:preview.php

示例14: empty

    $Format = empty($Message->Format) ? 'Display' : $Message->Format;
    $Author = UserBuilder($Message, 'Insert');
    ?>
<li id="<?php 
    echo $Message->MessageID;
    ?>
"<?php 
    echo $Class == '' ? '' : ' class="' . $Class . '"';
    ?>
>
   <div class="ConversationMessage">
      <div class="Meta">
         <span class="Author">
            <?php 
    echo UserPhoto($Author, 'Photo');
    echo UserAnchor($Author, 'Name');
    ?>
         </span>
         <span class="DateCreated"><?php 
    echo Format::Date($Message->DateInserted);
    ?>
</span>
         <span class="ItemLink"><a name="Item_<?php 
    echo $CurrentOffset;
    ?>
" class="Item"></a></span>
      </div>
      <div class="Message"><?php 
    echo Format::To($Message->Body, $Format);
    ?>
</div>
开发者ID:nbudin,项目名称:Garden,代码行数:31,代码来源:messages.php

示例15: T

      <dt class="Label LastActive"><?php 
    echo T('Last Active');
    ?>
<dt>
      <dd class="Value LastActive"><?php 
    echo Gdn_Format::Date($this->User->DateLastActive);
    ?>
</dd>
      <dt class="Label Roles"><?php 
    echo T('Roles');
    ?>
<dt>
      <dd class="Value Roles"><?php 
    echo implode(', ', $this->Roles);
    ?>
</dd>
      <?php 
    if ($this->User->InviteUserID > 0) {
        $Inviter = new stdClass();
        $Inviter->UserID = $this->User->InviteUserID;
        $Inviter->Name = $this->User->InviteName;
        echo '<dt class="Label InvitedBy">' . T('Invited by') . '</dt>
         <dd class="Value InvitedBy">' . UserAnchor($Inviter) . '</dd>';
    }
    $this->FireEvent('OnBasicInfo');
    ?>
   </dl>
</div>
<?php 
}
$this->FireEvent('AfterInfo');
开发者ID:rnovino,项目名称:Garden,代码行数:31,代码来源:info.php


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