本文整理汇总了PHP中XenForo_Helper_String::stripQuotes方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Helper_String::stripQuotes方法的具体用法?PHP XenForo_Helper_String::stripQuotes怎么用?PHP XenForo_Helper_String::stripQuotes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XenForo_Helper_String
的用法示例。
在下文中一共展示了XenForo_Helper_String::stripQuotes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _insertIntoIndex
protected function _insertIntoIndex(XenForo_Search_Indexer $indexer, array $data, array $parentData = null)
{
$message = $data['message'];
$message = trim(XenForo_Helper_String::stripQuotes($message, 0));
$tagTexts = Tinhte_XenTag_Integration::parseHashtags($message);
if (!empty($tagTexts)) {
$extraMetadata = array();
$extraMetadata[Tinhte_XenTag_Constants::SEARCH_METADATA_TAGS] = Tinhte_XenTag_Helper::getSafeTagsTextArrayForSearch($tagTexts);
$indexer = new Tinhte_XenTag_XenForo_Search_Indexer($indexer, $extraMetadata);
}
$result = parent::_insertIntoIndex($indexer, $data, $parentData);
}
示例2: getQuoteForConversationMessage
/**
* Gets the quote text for the specified conversation message.
*
* @param array $message
* @param integer $maxQuoteDepth Max depth of quotes (-1 for unlimited)
*
* @return string
*/
public function getQuoteForConversationMessage(array $message, $maxQuoteDepth = 0)
{
return '[quote="' . $message['username'] . '"]' . trim(XenForo_Helper_String::stripQuotes($message['message'], $maxQuoteDepth)) . "[/quote]\n";
}
示例3: getQuoteTextForPost
/**
* Gets the quote text for the specified post.
*
* @param array $post
* @param integer $maxQuoteDepth Max depth of quoted text (-1 for unlimited)
*
* @return string
*/
public function getQuoteTextForPost(array $post, $maxQuoteDepth = 0)
{
if ($post['message_state'] != 'visible') {
// non-visible posts shouldn't be quoted
return '';
}
/*
* Note that if this syntax changes, changes must be applied to
* XenForo_DataWriter_DiscussionMessage::_alertQuoted()
* and to
* XenForo_BbCode_Formatter_Base::renderTagQuote()
*/
return '[quote="' . $post['username'] . ', post: ' . $post['post_id'] . '"]' . trim(XenForo_Helper_String::stripQuotes($post['message'], $maxQuoteDepth)) . "[/quote]\n";
}
示例4: getQuoteTextForPostFromHtml
/**
* Converts some HTML into quotable BB code
*
* @param array $post
* @param string $messageHtml
* @param integer $maxQuoteDepth Max depth of quoted text (-1 for unlimited)
*
* @return string
*/
public function getQuoteTextForPostFromHtml(array $post, $messageHtml, $maxQuoteDepth = 0)
{
$message = $this->getModelFromCache('XenForo_Model_BbCode')->getBbCodeFromSelectionHtml($messageHtml);
$message = trim(XenForo_Helper_String::stripQuotes($message, $maxQuoteDepth));
return $this->_getQuoteWrapperBbCode($post, $message);
}