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


PHP XenForo_BbCode_Parser::create方法代碼示例

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


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

示例1: renderHtml

 public function renderHtml()
 {
     XenForo_Application::set('view', $this);
     $bbCodeBase = XenForo_BbCode_Formatter_Base::create('Nobita_Teams_BbCode_Formatter_Base', array('view' => $this));
     $commentBbCode = XenForo_BbCode_Formatter_Base::create('Nobita_Teams_BbCode_Formatter_Comment', array('view', $this));
     $bbCodeParser = XenForo_BbCode_Parser::create($bbCodeBase);
     $commentBbCodeParser = XenForo_BbCode_Parser::create($commentBbCode);
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewAttachments']), 'contentType' => 'team_post', 'contentIdKey' => 'post_id');
     $this->_params['team']['aboutHtml'] = new XenForo_BbCode_TextWrapper($this->_params['team']['about'], $bbCodeParser);
     XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($this->_params['posts'], $bbCodeParser, $bbCodeOptions);
     foreach ($this->_params['posts'] as &$post) {
         if (!$post['comments']) {
             continue;
         }
         XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($post['comments'], $commentBbCodeParser, array());
     }
     XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($this->_params['stickyPosts'], $bbCodeParser, $bbCodeOptions);
     foreach ($this->_params['stickyPosts'] as &$post) {
         if (!$post['comments']) {
             continue;
         }
         XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($post['comments'], $commentBbCodeParser, array());
     }
     unset($post);
     $this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate($this, 'message', '', array('json' => array('buttonConfig' => $this->_params['customEditor']), 'height' => '60px'));
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:26,代碼來源:Wall.php

示例2: renderHtml

 public function renderHtml()
 {
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewImages']));
     $this->_params['showLimitedNotice'] = $this->_params['isLimited'];
     $this->_params['update']['messageHtml'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['update'], $bbCodeParser, $bbCodeOptions);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:ViewAjax.php

示例3: renderJson

 public function renderJson()
 {
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Nobita_Teams_BbCode_Formatter_Comment', array('view' => $this)));
     //$this->_params['comment']['messageHtml'] = new XenForo_BbCode_TextWrapper($this->_params['comment']['message'], $bbCodeParser);
     $this->_params['comment']['messageHtml'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['comment'], $bbCodeParser, array());
     return array('comment' => $this->createTemplateObject('Team_post_comment', $this->_params));
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:Comment.php

示例4: renderHtml

 public function renderHtml()
 {
     XenForo_Template_Helper_Core::setThreadPrefixes($this->_params['prefixes']);
     // don't pass a view to this, because the templates don't exist in the admin
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base'));
     $this->_params['entry']['messageHtml'] = new XenForo_BbCode_TextWrapper($this->_params['entry']['message'], $bbCodeParser);
 }
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:7,代碼來源:Preview.php

示例5: renderHtml

 public function renderHtml()
 {
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $fields =& $this->_params['fields'];
     foreach ($fields as $fieldId => &$field) {
         if ($field['field_type'] == 'wysiwyg') {
             $field['editor'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate($this, 'fields[' . $field['field_id'] . '][editor]', $field['default_value'], array('editorId' => $fieldId . '_editor'));
         }
         if ($field['field_type'] == 'rating') {
             $field['fieldChoices'] = array();
             for ($i = 1; $i <= XenForo_Application::getOptions()->lpsfRatingMax; $i++) {
                 $field['fieldChoices'][] = $i;
             }
         }
         // render the pre text
         if ($field['pre_text'] != '') {
             $field['pre_text'] = new XenForo_BbCode_TextWrapper($field['pre_text'], $bbCodeParser);
         }
         // render the post text
         if ($field['post_text'] != '') {
             $field['post_text'] = new XenForo_BbCode_TextWrapper($field['post_text'], $bbCodeParser);
         }
         // datetime default_value editor
         if (array_key_exists('field_type', $field) && $field['field_type'] == 'datetime') {
             $temp = explode(' ', $field['default_value']);
             if (count($temp) == 2) {
                 $field['default_value'] = array('date' => $temp[0], 'time' => $temp[1]);
             } else {
                 $field['default_value'] = array('date' => '', 'time' => '');
             }
         }
     }
 }
開發者ID:jljr222,項目名稱:xenforo-simple-forms,代碼行數:33,代碼來源:Respond.php

示例6: renderHtml

 public function renderHtml()
 {
     XenForo_Application::set('view', $this);
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $this->_params['team']['aboutHtml'] = new XenForo_BbCode_TextWrapper($this->_params['team']['about'], $bbCodeParser);
     foreach ($this->_params['customFieldsGrouped'] as $id => &$fields) {
         if (empty($fields['fieldChoices'])) {
             // hard remove if custom fields did not have any values
             // @link https://nobita.me/threads/227/
             unset($this->_params['customFieldsGrouped'][$id]);
             continue;
         }
         foreach ($fields as &$field) {
             if ($field['field_type'] == 'bbcode') {
                 $field['fieldValueHtml'] = new XenForo_BbCode_TextWrapper($field['field_value'], $bbCodeParser);
             } else {
                 $field['fieldValueHtml'] = Nobita_Teams_ViewPublic_Helper_Team::getTeamFieldValueHtml($this->_params['team'], $field, $field['field_value']);
             }
         }
     }
     unset($fields, $field);
     foreach ($this->_params['parentTabsGrouped'] as &$fields) {
         foreach ($fields as &$field) {
             if ($field['field_type'] == 'bbcode') {
                 $field['fieldValueHtml'] = new XenForo_BbCode_TextWrapper($field['field_value'], $bbCodeParser);
             } else {
                 $field['fieldValueHtml'] = Nobita_Teams_ViewPublic_Helper_Team::getTeamFieldValueHtml($this->_params['team'], $field, $field['field_value']);
             }
         }
     }
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:31,代碼來源:Extra.php

示例7: renderHtml

 public function renderHtml()
 {
     XenForo_Application::set('view', $this);
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewImages']), 'showSignature' => false);
     $this->_params['update']['messageHtml'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['update'], $bbCodeParser, $bbCodeOptions);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:Description.php

示例8: renderHtml

 public function renderHtml()
 {
     $this->_params['editorTemplate'] = XenForo_ViewPublic_Helper_Editor::getQuickReplyEditor($this, 'message', $this->_params['post']['message'], array('json' => array('buttonConfig' => $this->_params['customEditor'])));
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Nobita_Teams_BbCode_Formatter_Base', array('view' => $this)));
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewAttachments']), 'contentType' => 'team_post', 'contentIdKey' => 'post_id');
     $this->_params['post']['messageHtml'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['post'], $bbCodeParser, $bbCodeOptions);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:Post.php

示例9: renderJson

 public function renderJson()
 {
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewAttachments']), 'contentType' => 'post', 'contentIdKey' => 'post_id', 'showSignature' => XenForo_Visitor::getInstance()->get('content_show_signature'), 'states' => array());
     $this->_params['comment']['messageHtml'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['comment'], $bbCodeParser, $bbCodeOptions);
     return array('comment' => $this->createTemplateObject('BRCR_post_comment', $this->_params));
 }
開發者ID:darkearl,項目名稱:projectT122015,代碼行數:7,代碼來源:Comment.php

示例10: _getXenParser

 /**
  * @return XenForo_BbCode_Parser
  */
 protected function _getXenParser()
 {
     static $parse = null;
     if (!$parse) {
         $parse = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base'));
     }
     return $parse;
 }
開發者ID:dautushenka,項目名稱:dle-xenforo,代碼行數:11,代碼來源:DLE.php

示例11: renderHtml

 public function renderHtml()
 {
     if (!empty($this->_params['verse'])) {
         $formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_Base');
         $parser = XenForo_BbCode_Parser::create($formatter);
         $this->_params['verseParsed'] = $parser->render($this->_params['verse']);
     }
 }
開發者ID:ThemeHouse-XF,項目名稱:Biblea,代碼行數:8,代碼來源:Tooltip.php

示例12: renderHtml

 public function renderHtml()
 {
     $formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_Base', array('view' => $this));
     $parser = XenForo_BbCode_Parser::create($formatter);
     foreach ($this->_params['posts'] as $postId => $post) {
         $this->_params['posts'][$postId]['messageParsed'] = $parser->render($post['message']);
     }
 }
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:8,代碼來源:MultiQuoteOverlay.php

示例13: _parseMessageForNotification

 protected function _parseMessageForNotification(array $post)
 {
     $bbCodeParserText = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Text'));
     $post['messageText'] = new XenForo_BbCode_TextWrapper($post['message'], $bbCodeParserText);
     $bbCodeParserHtml = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('HtmlEmail'));
     $post['messageHtml'] = new XenForo_BbCode_TextWrapper($post['message'], $bbCodeParserHtml);
     return $post;
 }
開發者ID:ThemeHouse-XF,項目名稱:ForumEmailNot,代碼行數:8,代碼來源:Post.php

示例14: renderHtml

 public function renderHtml()
 {
     $previewLength = XenForo_Application::get('options')->discussionPreviewLength;
     if ($previewLength && !empty($this->_params['update'])) {
         $formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_Text');
         $parser = XenForo_BbCode_Parser::create($formatter);
         $this->_params['update']['messageParsed'] = $parser->render($this->_params['update']['message']);
     }
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:QuickPreview.php

示例15: renderJson

 public function renderJson()
 {
     $bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $this->_params['comment']['messageHtml'] = new XenForo_BbCode_TextWrapper($this->_params['comment']['message'], $bbCodeParser);
     $this->_params['comment']['message'] = $this->_params['comment']['messageHtml'];
     // sanity check in case template not updated
     $this->_params['comment']['comment_state'] = 'visible';
     return XenForo_ViewRenderer_Json::jsonEncodeForOutput(array('templateHtml' => $this->createTemplateObject('xengallery_comment', $this->_params), 'commentId' => $this->_params['comment']['comment_id']));
 }
開發者ID:VoDongMy,項目名稱:xenforo-laravel5.1,代碼行數:9,代碼來源:ShowComment.php


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