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


PHP XenForo_Helper_String::autoLinkPlainText方法代码示例

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


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

示例1: helperBodyText

 /**
  * Prepares simple body text with word wrap, censoring, and nl2br.
  * HTML/BB code is not parsed within string.
  *
  * @param string $string
  *
  * @return string
  */
 public static function helperBodyText($string)
 {
     $string = XenForo_Helper_String::censorString($string);
     $string = XenForo_Helper_String::autoLinkPlainText(htmlspecialchars($string));
     return nl2br($string);
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:14,代码来源:Core.php

示例2: prepareField

 public function prepareField(array $field, $editMode = true, $viewingUser = null)
 {
     $this->standardizeViewingUserReference($viewingUser);
     if (!empty($field)) {
         $field['title'] = XenForo_Helper_String::censorString($field['title']);
         $field['description'] = XenForo_Helper_String::censorString($field['description']);
         $field['isMultiChoice'] = $field['field_type'] === 'checkbox' || $field['field_type'] === 'multiselect';
         if (!empty($field['field_choices']) && !is_array($field['field_choices'])) {
             $field['fieldChoices'] = @unserialize($field['field_choices']);
         }
         if (isset($field['field_value'])) {
             if ($field['isMultiChoice']) {
                 if (is_string($field['field_value'])) {
                     $field['field_value'] = @unserialize($field['field_value']);
                 } else {
                     if (!is_array($field['field_value'])) {
                         $field['field_value'] = array();
                     }
                 }
             }
             if ($field['match_type'] === 'url' && $editMode === false) {
                 $field['field_value'] = XenForo_Helper_String::autoLinkPlainText($field['field_value']);
             }
             $field['hasValue'] = is_string($field['field_value']) && $field['field_value'] !== '' || !is_string($field['field_value']) && $field['field_value'];
         } else {
             $field['hasValue'] = false;
         }
         if (!is_array($field['category'])) {
             $field['category'] = @unserialize($field['category']);
         }
         if (!is_array($field['content'])) {
             $field['content'] = @unserialize($field['content']);
         }
     }
     return $field;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:36,代码来源:Field.php

示例3: prepareCamera

 public function prepareCamera(array $camera)
 {
     if ($camera) {
         if (!empty($camera['camera_data'])) {
             $camera['camera_data'] = @unserialize($camera['camera_data']);
             foreach ($camera['camera_data'] as $key => &$data) {
                 $data = array('name' => new XenForo_Phrase('sonnb_xengallery_camera_data__' . $key), 'value' => Zend_Uri::check($data) ? XenForo_Helper_String::autoLinkPlainText($data) : $data);
             }
             if (!isset($camera['photo_count'])) {
                 $camera['photo_count'] = $this->countCameras(array('camera_name' => $camera['camera_name']));
             }
             $camera['camera_data']['total_photos'] = array('name' => new XenForo_Phrase('sonnb_xengallery_camera_data__total_photos'), 'value' => $camera['photo_count']);
         }
     }
     return $camera;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:16,代码来源:Camera.php


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