当前位置: 首页>>代码示例>>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;未经允许,请勿转载。