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


PHP Gdn_Theme::BulletItem方法代码示例

本文整理汇总了PHP中Gdn_Theme::BulletItem方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Theme::BulletItem方法的具体用法?PHP Gdn_Theme::BulletItem怎么用?PHP Gdn_Theme::BulletItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gdn_Theme的用法示例。


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

示例1: base_AfterFlag_handler

 /**
  * Add 'Quote' option to Discussion.
  */
 public function base_AfterFlag_handler($Sender, $Args)
 {
     echo Gdn_Theme::BulletItem('Flags');
     $this->addQuoteButton($Sender, $Args);
 }
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:8,代码来源:class.quotes.plugin.php

示例2: addQuoteButton

 /**
  * Output Quote link.
  */
 protected function addQuoteButton($Sender, $Args)
 {
     if (!Gdn::session()->UserID) {
         return;
     }
     if (isset($Args['Comment'])) {
         $Object = $Args['Comment'];
         $ObjectID = 'Comment_' . $Args['Comment']->CommentID;
     } elseif (isset($Args['Discussion'])) {
         $Object = $Args['Discussion'];
         $ObjectID = 'Discussion_' . $Args['Discussion']->DiscussionID;
     } else {
         return;
     }
     echo Gdn_Theme::BulletItem('Flags');
     echo anchor(sprite('ReactQuote', 'ReactSprite') . ' ' . t('Quote'), url("post/quote/{$Object->DiscussionID}/{$ObjectID}", true), 'ReactButton Quote Visible') . ' ';
 }
开发者ID:mcnasby,项目名称:datto-vanilla,代码行数:20,代码来源:class.quotes.plugin.php

示例3: Base_AfterReactions_Handler

 /**
  * Add 'Twitter' option to the row.
  */
 public function Base_AfterReactions_Handler($Sender, $Args)
 {
     if (!$this->SocialReactions()) {
         return;
     }
     echo Gdn_Theme::BulletItem('Share');
     $this->AddReactButton($Sender, $Args);
 }
开发者ID:robhazkes,项目名称:Garden,代码行数:11,代码来源:class.twitter.plugin.php

示例4: 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

示例5: 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

示例6: 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

示例7: addQuoteButton

 /**
  * Output Quote link.
  */
 protected function addQuoteButton($Sender, $Args)
 {
     if (!isset($Args['Discussion'])) {
         return;
     }
     $session = Gdn::session();
     if (!$session->UserID) {
         return;
     }
     if (!$session->checkPermission('Vanilla.Comments.Add', false, 'Category', $Args['Discussion']->PermissionCategoryID)) {
         return;
     }
     if (isset($Args['Comment'])) {
         $Object = $Args['Comment'];
         $ObjectID = 'Comment_' . $Args['Comment']->CommentID;
     } elseif (isset($Args['Discussion'])) {
         $Object = $Args['Discussion'];
         $ObjectID = 'Discussion_' . $Args['Discussion']->DiscussionID;
     } else {
         return;
     }
     echo Gdn_Theme::BulletItem('Flags');
     echo anchor(sprite('ReactQuote', 'ReactSprite') . ' ' . t('Quote'), url("post/quote/{$Object->DiscussionID}/{$ObjectID}", true), 'ReactButton Quote Visible') . ' ';
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:27,代码来源:class.quotes.plugin.php


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