• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP XenForo_BbCode_Formatter_Base类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中XenForo_BbCode_Formatter_Base的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_BbCode_Formatter_Base类的具体用法?PHP XenForo_BbCode_Formatter_Base怎么用?PHP XenForo_BbCode_Formatter_Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: quoteVerse

 public static function quoteVerse(array $tag, array $rendererStates, XenForo_BbCode_Formatter_Base $formatter)
 {
     $option = explode(',', $tag['option']);
     $xenOptions = XenForo_Application::get('options');
     $verse = '';
     $version = null;
     if (count($option) > 1) {
         $verse = $option[0];
         $version = strtoupper($option[1]);
     } elseif ($option[0]) {
         if (preg_match('#^[A-z]+$#', $tag['option'])) {
             $verse = '';
             $version = strtoupper($tag['option']);
         } else {
             $verse = $tag['option'];
             $version = strtoupper($xenOptions->th_bible_defaultBible);
         }
     }
     if (!$verse && count($tag['children']) == 1 && is_string($tag['children'][0])) {
         $bibleId = $version ? strtolower($version) : null;
         /* @var $verseModel ThemeHouse_Bible_Model_Verse */
         $verseModel = XenForo_Model::create('ThemeHouse_Bible_Model_Verse');
         $verseText = $verseModel->getVerseFromText($tag['children'][0], $bibleId, true);
         if ($verseText) {
             $verse = $tag['children'][0];
             $version = strtoupper($bibleId);
             $tag['children'] = $verseText;
         }
     }
     $link = '';
     $params = array('bible_id' => strtolower($version));
     if (in_array(strtolower($version), $xenOptions->th_bible_bbCodeBibles)) {
         if (preg_match('#^(.*)\\s+([0-9\\-:]+)$#', $verse, $matches)) {
             $urlPortion = strtolower(XenForo_Link::getTitleForUrl($matches[1], true));
             $link = XenForo_Link::buildPublicLink('bible/' . $urlPortion . '/' . $matches[2] . '/', null, $params);
             /* @var $bibleModel ThemeHouse_Bible_Model_Bible */
             $bibleModel = XenForo_Model::create('ThemeHouse_Bible_Model_Bible');
             $titlePhraseName = $bibleModel->getBibleTitlePhraseName(strtolower($version));
             $bibleTitle = new XenForo_Phrase($titlePhraseName);
             $bibleTitle->setPhraseNameOnInvalid(false);
             if ((string) $bibleTitle) {
                 $version = $bibleTitle;
             }
         } else {
             $urlPortion = strtolower(XenForo_Link::getTitleForUrl($verse, true));
             $link = XenForo_Link::buildPublicLink('bible/' . $urlPortion . '/', null, $params);
         }
     } else {
         $link = '';
     }
     $content = $formatter->renderSubTree($tag['children'], $rendererStates);
     $view = $formatter->getView();
     if ($view) {
         $template = $view->createTemplateObject('th_bb_code_verse_bible', array('content' => $content, 'verse' => $verse, 'version' => $version, 'link' => $link));
         $content = $template->render();
         return trim($content);
     }
     return $content;
 }
开发者ID:ThemeHouse-XF,项目名称:Biblea,代码行数:59,代码来源:Verse.php


示例2: actionList

 public function actionList()
 {
     $viewParams = array();
     $taigamodel = $this->_getTaigaChatModel();
     $options = XenForo_Application::get('options');
     $visitor = XenForo_Visitor::getInstance();
     $sidebar = false;
     if (!$taigamodel->canViewMessages()) {
         //throw $this->getErrorOrNoPermissionResponseException('dark_no_permission_view_message');
         return $this->responseView('Dark_TaigaChat_ViewPublic_TaigaChat_List_Blank', 'dark_taigachat_blank');
     }
     if ($this->_input->inRequest('sidebar') && $this->_input->filterSingle('sidebar', XenForo_Input::UINT)) {
         $sidebar = true;
     }
     $query = array("page" => 1, "perPage" => $sidebar ? $options->dark_taigachat_sidebarperpage : $options->dark_taigachat_fullperpage, "lastRefresh" => $this->_input->filterSingle('lastrefresh', XenForo_Input::UINT));
     $messages = $taigamodel->getMessages($this->_input->filterSingle('room', XenForo_Input::UINT), $query);
     $messageIds = $taigamodel->getMessageIds($this->_input->filterSingle('room', XenForo_Input::UINT), $query);
     foreach ($messages as &$message) {
         if ($taigamodel->canModifyMessage($message)) {
             $message['canModify'] = true;
         }
     }
     $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base'));
     $motd = new XenForo_BbCode_TextWrapper($options->dark_taigachat_motd, $bbCodeParser);
     if (!$this->_input->filterSingle('fake', XenForo_Input::UINT)) {
         $taigamodel->updateActivity($visitor['user_id']);
     }
     $onlineUsersTaiga = array();
     if ($options->dark_taigachat_sidebar) {
         $onlineUsersTaiga = $taigamodel->getActivityUserList($visitor->toArray());
     }
     $viewParams = array('taigachat' => array("messages" => $messages, "sidebar" => $sidebar, "messageIds" => $messageIds, "editside" => $options->dark_taigachat_editside, "timedisplay" => $options->dark_taigachat_timedisplay, "miniavatar" => $options->dark_taigachat_miniavatar, "lastrefresh" => $this->_input->filterSingle('lastrefresh', XenForo_Input::UINT), "numInChat" => $taigamodel->getActivityUserCount(), "motd" => $motd, 'online' => $onlineUsersTaiga, "route" => $options->dark_taigachat_route, "canBan" => $taigamodel->canBanFromShoutbox()));
     return $this->responseView('Dark_TaigaChat_ViewPublic_TaigaChat_List', 'dark_taigachat_list', $viewParams);
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:34,代码来源:TaigaChat.php


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


示例4: renderJson

 public function renderJson()
 {
     $output = array();
     $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $bbCodeOptions = array('states' => array('viewAttachments' => $this->_params['canViewAttachments']));
     XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($this->_params['posts'], $bbCodeParser, $bbCodeOptions);
     $viewParams = $this->_params;
     unset($viewParams['posts']);
     foreach ($this->_params['posts'] as &$post) {
         $viewParams['post'] = $post;
         $template = $this->createTemplateObject('post', $viewParams);
         $output['posts'][] = $template->render();
     }
     if (XenForo_Application::getOptions()->sonnb_LiveThread_reserveOrder) {
         $lastPost = reset($this->_params['posts']);
     } else {
         $lastPost = end($this->_params['posts']);
     }
     $template = $this->createTemplateObject('', $viewParams);
     $viewOutput = $template->render();
     $output['css'] = $template->getRequiredExternals('css');
     $output['js'] = $template->getRequiredExternals('js');
     $output['lastDate'] = $lastPost['post_date'];
     $output['reserveOrder'] = isset($viewParams['reserveOrder']) ? $viewParams['reserveOrder'] : false;
     return XenForo_ViewRenderer_Json::jsonEncodeForOutput($output);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:26,代码来源:ReplyLive.php


示例5: renderTagMedio

 public function renderTagMedio(array $tag, array $rendererStates)
 {
     $text = $this->renderSubTree($tag['children'], $rendererStates);
     $topt = $tag['option'];
     if ($media = XenForo_Model::create('EWRmedio_Model_Media')->getMediaByID($text, false)) {
         if ($this->_view) {
             if ($topt == 'full') {
                 $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base'));
                 $media['media_description'] = new XenForo_BbCode_TextWrapper($media['media_description'], $bbCodeParser);
                 $keywords = explode(",", $media['media_keywords']);
                 foreach ($keywords as &$keyword) {
                     $keyword = trim($keyword);
                     $keyword = '<a href="' . XenForo_Link::buildPublicLink('media/keyword', array('keyword_text' => $keyword)) . '">' . $keyword . '</a>';
                 }
                 $media['media_keywords'] = implode(", ", $keywords);
                 $template = $this->_view->createTemplateObject('EWRmedio_BBcode_Full', array('media' => $media));
             } else {
                 $viewParams = array('media' => $media);
                 if ($topt == 'left' || $topt == 'right') {
                     $viewParams['float'] = $topt;
                 }
                 $template = $this->_view->createTemplateObject('EWRmedio_BBcode', $viewParams);
             }
             return $template->render();
         }
         return '<a href="' . XenForo_Link::buildPublicLink('media', $media) . '">' . $media['media_title'] . '</a>';
     } else {
         return '[medio]' . $text . '[/medio]';
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:30,代码来源:Formatter.php


示例6: getTags

 /**
  * Gets the list of valid BB code tags. This removes most behaviors.
  *
  * @see XenForo_BbCode_Formatter_Base::getTags()
  */
 public function getTags()
 {
     if ($this->_tags !== null) {
         return $this->_tags;
     }
     if (is_array($this->_generalTagCallback) && $this->_generalTagCallback[0] == '$this') {
         $this->_generalTagCallback[0] = $this;
     }
     $tags = parent::getTags();
     foreach ($tags as $tagName => &$tag) {
         unset($tag['replace'], $tag['callback'], $tag['trimLeadingLinesAfter']);
         if (!empty($this->_overrideCallbacks[$tagName])) {
             $override = $this->_overrideCallbacks[$tagName];
             if (is_array($override) && $override[0] == '$this') {
                 $override[0] = $this;
             }
             $tag['callback'] = $override;
         } else {
             if ($this->_generalTagCallback) {
                 $tag['callback'] = $this->_generalTagCallback;
             }
         }
     }
     return $tags;
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:30,代码来源:Abstract.php


示例7: 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'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($this->_params['comment'], $bbCodeParser, array());
     $output = $this->_renderer->getDefaultOutputArray(get_class($this), $this->_params, $this->_templateName);
     return XenForo_ViewRenderer_Json::jsonEncodeForOutput($output);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:Comment.php


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


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


示例10: renderHtml

 public function renderHtml()
 {
     $options = XenForo_Application::get('options');
     $parserModel = XenForo_Model::create('EWRcarta_Model_Parser');
     if ($this->_params['page']['page_type'] == 'phpfile') {
         $this->_params['page'] = $parserModel->parsePagePHP($this->_params['page']);
     } else {
         $cacheModel = XenForo_Model::create('EWRcarta_Model_Cache');
         $cache = $cacheModel->getCache($this->_params['page']);
         if ($this->_params['page']['page_date'] >= $cache['cache_date'] || strtotime($options->EWRcarta_cache, $cache['cache_date']) < XenForo_Application::$time) {
             $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
             $bbCodeOptions = array('viewAttachments' => true, 'stopLineBreakConversion' => $this->_params['page']['page_type'] == 'html' ? true : false, 'attachments' => $this->_params['page']['attachments']);
             $this->_params['page']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['page']['page_content'], $bbCodeParser, $bbCodeOptions);
             $this->_params['page']['HTML'] = (string) $this->_params['page']['HTML'];
             if ($this->_params['page']['page_type'] == 'html') {
                 $this->_params['page']['HTML'] = htmlspecialchars_decode($this->_params['page']['HTML']);
             }
             $this->_params['page'] = $parserModel->parseContents($this->_params['page']);
             $this->_params['page'] = $parserModel->parseTemplates($this->_params['page']);
             $this->_params['page'] = $parserModel->parseAutolinks($this->_params['page']);
             $dw = XenForo_DataWriter::create('EWRcarta_DataWriter_Cache', XenForo_DataWriter::ERROR_SILENT);
             if ($cache) {
                 $dw->setExistingData($cache);
             }
             $dw->bulkSet(array('page_id' => $this->_params['page']['page_id'], 'cache_content' => $this->_params['page']['HTML']));
             $dw->save();
         } else {
             $this->_params['page']['HTML'] = $cache['cache_content'];
             $this->_params['page']['cache'] = $cache['cache_date'];
         }
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:32,代码来源:PageView.php


示例11: renderHtml

 public function renderHtml()
 {
     $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
     $this->_params['media']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['media']['media_description'], $bbCodeParser);
     $bbCodeStripper = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_Text'));
     $this->_params['media']['TEXT'] = $bbCodeStripper->render($this->_params['media']['media_description']);
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:MediaView.php


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


示例13: renderHtml

 public function renderHtml()
 {
     $parserModel = XenForo_Model::create('EWRcarta_Model_Parser');
     if ($this->_params['history']['history_type'] == 'phpfile') {
         $this->_params['history']['page_content'] = $this->_params['history']['history_content'];
         $this->_params['history'] = $parserModel->parsePagePHP($this->_params['history']);
     } else {
         $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
         $bbCodeOptions = array('stopLineBreakConversion' => $this->_params['history']['history_type'] == 'html' ? true : false);
         $this->_params['history']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['history']['history_content'], $bbCodeParser, $bbCodeOptions);
         $this->_params['history']['HTML'] = (string) $this->_params['history']['HTML'];
         if ($this->_params['history']['history_type'] == 'html') {
             $this->_params['history']['HTML'] = htmlspecialchars_decode($this->_params['history']['HTML']);
         }
         if ($this->_params['history']['history_type'] == 'bbcode') {
             $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
             $this->_params['history']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['history']['history_content'], $bbCodeParser);
             $this->_params['history']['HTML'] = (string) $this->_params['history']['HTML'];
         } else {
             $this->_params['history']['HTML'] = $this->_params['history']['history_content'];
         }
         $this->_params['history'] = $parserModel->parseContents($this->_params['history']);
         $this->_params['history'] = $parserModel->parseTemplates($this->_params['history']);
         $this->_params['history'] = $parserModel->parseAutolinks($this->_params['history']);
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:26,代码来源:PageArchive.php


示例14: renderHtml

 public function renderHtml()
 {
     if (!empty($this->_params['item']['listing_description'])) {
         $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
         $this->_params['item']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['item']['listing_description'], $bbCodeParser);
     }
 }
开发者ID:samuelsweet,项目名称:xf,代码行数:7,代码来源:ItemView.php


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


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


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


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


示例19: viewCallback

 /**
  * A callback that is called when viewing the full report.
  *
  * @see XenForo_ReportHandler_Abstract::viewCallback()
  */
 public function viewCallback(XenForo_View $view, array &$report, array &$contentInfo)
 {
     $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $view)));
     $contentInfo['comment']['messageHtml'] = new XenForo_BbCode_TextWrapper($contentInfo['comment']['message'], $bbCodeParser);
     $contentInfo['comment']['message'] = $contentInfo['comment']['messageHtml'];
     // sanity check in case template not update
     return $view->createTemplateObject('xengallery_report_comment_content', array('report' => $report, 'content' => $contentInfo));
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:13,代码来源:Comment.php


示例20: _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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP XenForo_BbCode_Parser类代码示例发布时间:2022-05-23
下一篇:
PHP XenForo_Autoloader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap