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


PHP XenForo_View类代码示例

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


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

示例1: renderOption

 /**
  * Renders the guest time zone option.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $forumOptions = XenForo_Option_NodeChooser::getNodeOptions($value['node_id'], sprintf('(%s)', new XenForo_Phrase('unspecified')), 'Forum');
     return $view->createTemplateObject('option_template_spamThreadAction', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:17,代码来源:SpamThreadAction.php

示例2: renderInternal

 /**
  * Renders the CAPTCHA template.
  *
  * @see XenForo_Captcha_Abstract::renderInternal()
  */
 public function renderInternal(XenForo_View $view)
 {
     if (!$this->_config['publicKey']) {
         return '';
     }
     return $view->createTemplateObject('captcha_recaptcha', array('publicKey' => $this->_config['publicKey']));
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:12,代码来源:ReCaptcha.php

示例3: renderVerification

 public function renderVerification(XenForo_View $view, $context, array $user, array $providerData, array $triggerData)
 {
     $issuer = XenForo_Helper_String::wholeWordTrim(str_replace(':', '', XenForo_Application::getOptions()->boardTitle), 50);
     $user = str_replace(':', '', $user['username']);
     $params = array('secret' => $providerData['secret'], 'otpUrl' => $this->_getAuthHandler()->getOtpAuthUrl("{$issuer}: {$user}", $providerData['secret'], $issuer), 'data' => $providerData, 'context' => $context);
     return $view->createTemplateObject('two_step_totp', $params)->render();
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:7,代码来源:Totp.php

示例4: renderResults

 /**
  * Creates a template object in which to display the search results.
  *
  * @param array $results
  * @param XenForo_View $view
  *
  * @return XenForo_Template_Admin
  */
 public function renderResults($results, XenForo_View $view)
 {
     /* @var $styleModel XenForo_Model_Style */
     $styleModel = $this->getModelFromCache('XenForo_Model_Style');
     $styleId = $styleModel->getStyleIdFromCookie();
     return $view->createTemplateObject($this->_getTemplateName(), array('results' => $this->_limitResults($results), 'styleId' => $styleId ? $styleId : false));
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:15,代码来源:Template.php

示例5: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), false, '(unspecified)');
     return $view->createTemplateObject('option_list_option_multi_EWRmedio', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:ForumChooser.php

示例6: renderOption

 /**
  * Renders the exif options.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $choices = array();
     if (isset($value['FILE'])) {
         foreach ($value['FILE'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['COMPUTED'])) {
         foreach ($value['COMPUTED'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['IFD0'])) {
         foreach ($value['IFD0'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['EXIF'])) {
         foreach ($value['EXIF'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_template_xengallery_exif_options', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'choices' => $choices, 'nextCounter' => count($choices)));
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:37,代码来源:ExifOptions.php

示例7: renderInternal

 /**
  * Renders the CAPTCHA template.
  *
  * @see XenForo_Captcha_Abstract::renderInternal()
  */
 public function renderInternal(XenForo_View $view)
 {
     if (!$this->_cKey) {
         return '';
     }
     return $view->createTemplateObject('captcha_solve_media', array('cKey' => $this->_cKey));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:12,代码来源:SolveMedia.php

示例8: renderMultiple

 public static function renderMultiple(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     /* @var $nodeModel XenForo_Model_Node */
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), $preparedOption['option_value'], '(unspecified)');
     return $view->createTemplateObject('el_portal_nodeoptions', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:NixFifty,项目名称:XenForo-SimplePortal,代码行数:8,代码来源:MultiNode.php

示例9: renderHtml

 public function renderHtml(array $photo, XenForo_View $view)
 {
     $album = null;
     if (isset($photo['album'])) {
         $album = $photo['album'];
     }
     return $view->createTemplateObject('sonnb_xengallery_photo_list_item', array('photo' => $photo, 'album' => $album));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:Photo.php

示例10: renderMultiple

 public static function renderMultiple(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     /* @var $nodeModel XenForo_Model_Node */
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes());
     return $view->createTemplateObject('option_list_option_multi_MODM_AJAXChat', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink, 'multiple' => true));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:NodeChooser.php

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

示例12: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $styleModel = self::_getStyleModel();
     $styleOptions = $styleModel->getStylesForOptionsTag($value['style']);
     return $view->createTemplateObject('option_template_styleChooser_EWRporta', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $styleOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:StyleChooser.php

示例13: renderInternal

 /**
  * Renders the CAPTCHA template.
  *
  * @see XenForo_Captcha_Abstract::renderInternal()
  */
 public function renderInternal(XenForo_View $view)
 {
     if (!$this->_siteKey) {
         return '';
     }
     $template = $view->createTemplateObject('captcha_nocaptcha', array('siteKey' => $this->_siteKey));
     return $template;
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:13,代码来源:NoCaptcha.php

示例14: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), $preparedOption['option_value'], '(None)');
     return $view->createTemplateObject('borbole_helper_rating_forums', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:ForumChooser.php

示例15: renderHtml

 /**
  * @param array $content
  * @param XenForo_View $view
  * @return XenForo_Template_Abstract
  */
 public function renderHtml(array $content, XenForo_View $view)
 {
     $album = null;
     if (isset($content['album'])) {
         $album = $content['album'];
     }
     return $view->createTemplateObject('sonnb_xengallery_' . $content['content_type'] . '_list_item', array('content' => $content, 'album' => $album));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:13,代码来源:Content.php


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