php Bullet类(方法)实例源码

下面列出了php Bullet 类(方法)源码代码实例,从而了解它的用法。

作者:elpu    项目:TgaForumBundl   
<h1 class="H"><?php 
echo htmlspecialchars($this->User->Name);
echo '<span class="Gloss">';
if ($this->User->Title) {
    echo ' ' . Bullet() . ' ' . Wrap(htmlspecialchars($this->User->Title), 'span', array('class' => 'User-Title'));
}
$this->FireEvent('UsernameMeta');
echo '</span>';
?>
</h1>

作者:3marproo    项目:vanill   
<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="DataListWrap">
<h1 class="H">
   <?php 
echo $this->Participants;
if ($this->Data('Conversation.Subject')) {
    echo Bullet(' ') . '<span class="Gloss">' . htmlspecialchars($this->Data('Conversation.Subject')) . '</span>';
}
?>
</h1>
<?php 
if ($this->Data('Conversation.Type')) {
    $this->FireEvent('Conversation' . str_replace('_', '', $this->Data('Conversation.Type')));
}
if ($this->Data('_HasDeletedUsers')) {
    echo '<div class="Info">', T('One or more users have left this conversation.', 'One or more users have left this conversation. They won\'t receive any more messages unless you add them back in to the conversation.'), '</div>';
}
$this->FireEvent('BeforeConversation');
echo $this->Pager->ToString('less');
?>
<ul class="DataList MessageList Conversation">
   <?php 
$MessagesViewLocation = $this->FetchViewLocation('messages');
include $MessagesViewLocation;
?>
</ul>

作者:mcnasb    项目:datto-vanill   
/**
  * Write the accept/reject buttons.
  * @staticvar null $DiscussionModel
  * @staticvar boolean $InformMessage
  * @param type $Sender
  * @param type $Args
  * @return type
  */
 public function DiscussionController_AfterCommentBody_Handler($Sender, $Args)
 {
     $Discussion = $Sender->Data('Discussion');
     $Comment = GetValue('Comment', $Args);
     if (!$Comment) {
         return;
     }
     $CommentID = GetValue('CommentID', $Comment);
     if (!is_numeric($CommentID)) {
         return;
     }
     if (!$Discussion) {
         static $DiscussionModel = NULL;
         if ($DiscussionModel === NULL) {
             $DiscussionModel = new DiscussionModel();
         }
         $Discussion = $DiscussionModel->GetID(GetValue('DiscussionID', $Comment));
     }
     if (!$Discussion || strtolower(GetValue('Type', $Discussion)) != 'question') {
         return;
     }
     // Check permissions.
     $CanAccept = Gdn::Session()->CheckPermission('Garden.Moderation.Manage');
     $CanAccept |= Gdn::Session()->UserID == GetValue('InsertUserID', $Discussion) && Gdn::Session()->UserID != GetValue('InsertUserID', $Comment);
     if (!$CanAccept) {
         return;
     }
     $QnA = GetValue('QnA', $Comment);
     if ($QnA) {
         return;
     }
     // Write the links.
     //      $Types = GetValue('ReactionTypes', $Sender->EventArguments);
     //      if ($Types)
     //         echo Bullet();
     $Query = http_build_query(array('commentid' => $CommentID, 'tkey' => Gdn::Session()->TransientKey()));
     echo '<div class="ActionBlock QnA-Feedback">';
     //      echo '<span class="FeedbackLabel">'.T('Feedback').'</span>';
     echo '<span class="DidThisAnswer">' . T('Did this answer the question?') . '</span> ';
     echo '<span class="QnA-YesNo">';
     echo Anchor(T('Yes'), '/discussion/qna/accept?' . $Query, array('class' => 'React QnA-Yes', 'title' => T('Accept this answer.')));
     echo ' ' . Bullet() . ' ';
     echo Anchor(T('No'), '/discussion/qna/reject?' . $Query, array('class' => 'React QnA-No', 'title' => T('Reject this answer.')));
     echo '</span>';
     echo '</div>';
     //      static $InformMessage = TRUE;
     //
     //      if ($InformMessage && Gdn::Session()->UserID == GetValue('InsertUserID', $Discussion) && in_array(GetValue('QnA', $Discussion), array('', 'Answered'))) {
     //         $Sender->InformMessage(T('Click accept or reject beside an answer.'), 'Dismissable');
     //         $InformMessage = FALSE;
     //      }
 }

作者:mcnasb    项目:datto-vanill   
/**
  * Call before starting a row of bullet-seperated items.
  *
  * @param strng|bool $Sep The seperator used to seperate each section.
  * @since 2.1
  */
 public static function bulletRow($Sep = false)
 {
     if (!$Sep) {
         if (!self::$_BulletSep) {
             self::$_BulletSep = ' ' . Bullet() . ' ';
         }
     } else {
         self::$_BulletSep = $Sep;
     }
     self::$_BulletSection = false;
 }

作者:vanill    项目:addon   
protected function OutputButton($ButtonType, $Context, $Sender)
 {
     // Signed in users only. No guest reporting!
     if (!Gdn::Session()->UserID) {
         return;
     }
     // Reporting permission checks
     if (!is_object($Sender->EventArguments['Author'])) {
         $ElementAuthorID = 0;
         $ElementAuthor = 'Unknown';
     } else {
         $ElementAuthorID = $Sender->EventArguments['Author']->UserID;
         $ElementAuthor = $Sender->EventArguments['Author']->Name;
     }
     switch ($Context) {
         case 'comment':
             $ElementID = $Sender->EventArguments['Comment']->CommentID;
             $URL = "/discussion/comment/{$ElementID}/#Comment_{$ElementID}";
             break;
         case 'discussion':
             $ElementID = $Sender->EventArguments['Discussion']->DiscussionID;
             $URL = "/discussion/{$ElementID}/" . Gdn_Format::Url($Sender->EventArguments['Discussion']->Name);
             break;
         case 'conversation':
             break;
         default:
             return;
     }
     $ButtonTitle = T(ucfirst($ButtonType));
     $ContainerCSS = $ButtonTitle . 'Post';
     $EncodedURL = str_replace('=', '-', base64_encode($URL));
     $EventUrl = "plugin/reporting/{$ButtonType}/{$Context}/{$ElementID}/{$EncodedURL}";
     //$Sender->EventArguments['CommentOptions'][$ButtonTitle] = array('Label' => $ButtonTitle, 'Url' => "plugin/reporting/{$ButtonType}/{$Context}/{$ElementID}/{$EncodedURL}", $ContainerCSS.' ReportContent Popup');
     $SpriteType = "React" . ucfirst($ButtonType);
     $Text = Anchor(Sprite($SpriteType, 'ReactSprite') . $ButtonTitle, $EventUrl, "ReactButton React {$ContainerCSS} Popup");
     echo Bullet();
     echo $Text;
 }

作者:caidongyu    项目:vanill   
<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'])) {
        echo ' <span class="Aside Debug">debug(' . $Row['Notes'] . ')</span>';
    }
    ?>
                        </div>
                        <div class="Summary">
                            <?php 
    echo $Row['Summary'];
    ?>
                        </div>
                        <?php 
    $Count = val('Count', $Row);
    //            $i = 0;

作者:caidongyu    项目:vanill   
if ($Session->checkPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false)) {
            echo wrap(Anchor(sprite('SpMod') . ' ' . t('Moderation Queue') . $CModeration, '/dashboard/log/moderation'), 'li', array('class' => 'link-moderation'));
        }
        if ($Session->checkPermission(array('Garden.Settings.View', 'Garden.Settings.Manage'), false)) {
            echo wrap(Anchor(sprite('SpDashboard') . ' ' . t('Dashboard'), '/dashboard/settings'), 'li', array('class' => 'link-dashboard'));
        }
    }
    $this->fireEvent('FlyoutMenu');
    echo wrap('<hr />' . anchor(sprite('SpSignOut') . ' ' . t('Sign Out'), SignOutUrl()), 'li', array('class' => 'SignInOutWrap SignOutWrap link-signout'));
    echo '</ul>';
    echo '</div>';
    echo '</span>';
    // Sign Out
    // echo anchor(sprite('SpSignOut', 'Sprite16').Wrap(t('Sign Out'), 'em'), SignOutUrl(), 'MeButton', array('title' => t('Sign Out')));
    echo '</div>';
    echo '</div>';
    echo '</div>';
} else {
    echo '<div class="MeBox MeBox-SignIn' . $CssClass . '">';
    echo '<div class="SignInLinks">';
    echo anchor(t('Sign In'), SignInUrl($this->_Sender->SelfUrl), SignInPopup() ? ' SignInPopup' : '', array('rel' => 'nofollow'));
    $Url = RegisterUrl($this->_Sender->SelfUrl);
    if (!empty($Url)) {
        echo Bullet(' ') . anchor(t('Register'), $Url, 'ApplyButton', array('rel' => 'nofollow')) . ' ';
    }
    echo '</div>';
    echo ' <div class="SignInIcons">';
    $this->fireEvent('SignInIcons');
    echo '</div>';
    echo '</div>';
}

作者:edward-tsa    项目:vanilla4chin   
/**
  * Call before starting a row of bullet-seperated items.
  *
  * @param strng|bool $Sep The seperator used to seperate each section.
  * @since 2.1
  */
 public static function BulletRow($Sep = FALSE)
 {
     if (!$Sep) {
         if (!self::$_BulletSep) {
             self::$_BulletSep = ' ' . Bullet() . ' ';
         }
     } else {
         self::$_BulletSep = $Sep;
     }
     self::$_BulletSection = FALSE;
 }


问题


面经


文章

微信
公众号

扫码关注公众号