當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gdn_Theme::BulletRow方法代碼示例

本文整理匯總了PHP中Gdn_Theme::BulletRow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gdn_Theme::BulletRow方法的具體用法?PHP Gdn_Theme::BulletRow怎麽用?PHP Gdn_Theme::BulletRow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gdn_Theme的用法示例。


在下文中一共展示了Gdn_Theme::BulletRow方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: writeReactions

 function writeReactions($Row)
 {
     $Attributes = GetValue('Attributes', $Row);
     if (is_string($Attributes)) {
         $Attributes = @unserialize($Attributes);
         SetValue('Attributes', $Row, $Attributes);
     }
     Gdn::Controller()->EventArguments['ReactionTypes'] = array();
     if ($ID = GetValue('CommentID', $Row)) {
         $RecordType = 'comment';
     } elseif ($ID = GetValue('ActivityID', $Row)) {
         $RecordType = 'activity';
     } else {
         $RecordType = 'discussion';
         $ID = GetValue('DiscussionID', $Row);
     }
     Gdn::Controller()->EventArguments['RecordType'] = $RecordType;
     Gdn::Controller()->EventArguments['RecordID'] = $ID;
     echo '<div class="Reactions">';
     Gdn_Theme::BulletRow();
     // Write the flags.
     static $Flags = null;
     if ($Flags === null) {
         Gdn::Controller()->EventArguments['Flags'] =& $Flags;
         Gdn::Controller()->FireEvent('Flags');
     }
     // Allow addons to work with flags
     Gdn::Controller()->EventArguments['Flags'] =& $Flags;
     Gdn::Controller()->FireEvent('BeforeFlag');
     if (!empty($Flags) && is_array($Flags)) {
         echo Gdn_Theme::BulletItem('Flags');
         echo ' <span class="FlagMenu ToggleFlyout">';
         // Write the handle.
         echo Anchor(Sprite('ReactFlag', 'ReactSprite') . ' ' . Wrap(T('Flag'), 'span', array('class' => 'ReactLabel')), '', 'Hijack ReactButton-Flag FlyoutButton', array('title' => 'Flag'), true);
         echo Sprite('SpFlyoutHandle', 'Arrow');
         echo '<ul class="Flyout MenuItems Flags" style="display: none;">';
         foreach ($Flags as $Flag) {
             if (is_callable($Flag)) {
                 echo '<li>' . call_user_func($Flag, $Row, $RecordType, $ID) . '</li>';
             } else {
                 echo '<li>' . ReactionButton($Row, $Flag['UrlCode']) . '</li>';
             }
         }
         Gdn::Controller()->FireEvent('AfterFlagOptions');
         echo '</ul>';
         echo '</span> ';
     }
     Gdn::Controller()->FireEvent('AfterFlag');
     Gdn::Controller()->FireEvent('AfterReactions');
     echo '</div>';
     Gdn::Controller()->FireEvent('Replies');
 }
開發者ID:rensi4rn,項目名稱:vanilla,代碼行數:52,代碼來源:functions.render.php

示例2: WriteReactions

 function WriteReactions($Row, $Type = 'Comment')
 {
     list($RecordType, $RecordID) = RecordType($Row);
     Gdn::Controller()->EventArguments['RecordType'] = strtolower($RecordType);
     Gdn::Controller()->EventArguments['RecordID'] = $RecordID;
     echo '<div class="Reactions">';
     Gdn_Theme::BulletRow();
     Gdn::Controller()->FireEvent('AfterFlag');
     Gdn::Controller()->FireEvent('AfterReactions');
     echo '</div>';
 }
開發者ID:robhazkes,項目名稱:Garden,代碼行數:11,代碼來源:helper_functions.php

示例3: htmlspecialchars

<?php

if (!defined('APPLICATION')) {
    exit;
}
$Session = Gdn::session();
?>
<div class="User" itemscope itemtype="http://schema.org/Person">
    <h1 class="H"><?php 
echo htmlspecialchars($this->User->Name);
echo '<span class="Gloss">';
Gdn_Theme::BulletRow();
if ($this->User->Title) {
    echo Gdn_Theme::BulletItem('Title');
    echo ' ' . Bullet() . ' ' . Wrap(htmlspecialchars($this->User->Title), 'span', array('class' => 'User-Title'));
}
$this->fireEvent('UsernameMeta');
echo '</span>';
?>
</h1>
    <?php 
if ($this->User->Admin == 2) {
    echo '<div class="DismissMessage InfoMessage">', t('This is a system account and does not represent a real person.'), '</div>';
}
if ($this->User->About != '') {
    echo '<div id="Status" itemprop="description">' . Wrap(Gdn_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, 'Hijack');
    }
    echo '</div>';
}
開發者ID:korelstar,項目名稱:vanilla,代碼行數:31,代碼來源:user.php

示例4: WriteReactions

 function WriteReactions($Row)
 {
     list($RecordType, $RecordID) = RecordType($Row);
     Gdn::Controller()->EventArguments['RecordType'] = strtolower($RecordType);
     Gdn::Controller()->EventArguments['RecordID'] = $RecordID;
     echo '<div class="Reactions">';
     Gdn_Theme::BulletRow();
     // Write the flags.
     static $Flags = NULL;
     // Allow addons to work with flags menu
     Gdn::Controller()->EventArguments['Flags'] =& $Flags;
     Gdn::Controller()->FireEvent('BeforeFlag');
     if (!empty($Flags)) {
         echo Gdn_Theme::BulletItem('Flags');
         echo ' <span class="FlagMenu ToggleFlyout">';
         // Write the handle.
         echo Anchor(Sprite('ReactFlag', 'ReactSprite') . ' ' . Wrap(T('Flag'), 'span', array('class' => 'ReactLabel')), '', 'Hijack ReactButton-Flag FlyoutButton', array('title' => 'Flag'), TRUE);
         echo Sprite('SpFlyoutHandle', 'Arrow');
         echo '<ul class="Flyout MenuItems Flags" style="display: none;">';
         Gdn::Controller()->FireEvent('AfterFlagOptions');
         echo '</ul>';
         echo '</span> ';
     }
     Gdn::Controller()->FireEvent('AfterFlag');
     Gdn::Controller()->FireEvent('AfterReactions');
     echo '</div>';
     Gdn::Controller()->FireEvent('Replies');
 }
開發者ID:elpum,項目名稱:TgaForumBundle,代碼行數:28,代碼來源:functions.render.php


注:本文中的Gdn_Theme::BulletRow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。