本文整理汇总了PHP中parse_message::remove_nested_quotes方法的典型用法代码示例。如果您正苦于以下问题:PHP parse_message::remove_nested_quotes方法的具体用法?PHP parse_message::remove_nested_quotes怎么用?PHP parse_message::remove_nested_quotes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parse_message
的用法示例。
在下文中一共展示了parse_message::remove_nested_quotes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
parse_attachments($forum_id, $preview_message, $attachment_data, $update_count, true);
foreach ($attachment_data as $i => $attachment) {
$template->assign_block_vars('attachment', array('DISPLAY_ATTACHMENT' => $attachment));
}
unset($attachment_data);
}
if (!sizeof($error)) {
$template->assign_vars(array('PREVIEW_SUBJECT' => $preview_subject, 'PREVIEW_MESSAGE' => $preview_message, 'PREVIEW_SIGNATURE' => $preview_signature, 'S_DISPLAY_PREVIEW' => !empty($preview_message)));
}
}
// Remove quotes that would become nested too deep before decoding the text
$generate_quote = $mode == 'quote' && !$submit && !$preview && !$refresh;
if ($generate_quote && $config['max_quote_depth'] > 0) {
$tmp_bbcode_uid = $message_parser->bbcode_uid;
$message_parser->bbcode_uid = $post_data['bbcode_uid'];
$message_parser->remove_nested_quotes($config['max_quote_depth'] - 1);
$message_parser->bbcode_uid = $tmp_bbcode_uid;
}
// Decode text for message display
$post_data['bbcode_uid'] = $mode == 'quote' && !$preview && !$refresh && !sizeof($error) ? $post_data['bbcode_uid'] : $message_parser->bbcode_uid;
$message_parser->decode_message($post_data['bbcode_uid']);
if ($generate_quote) {
if ($config['allow_bbcode']) {
$message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
} else {
$offset = 0;
$quote_string = "> ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, ">") !== false) {
$offset = 10;