Столкнулся с проблеммой объема цитат, Цитаты в IPB 3.0.4 просто перегружали форум излишними операциями, в итоге оказалось, что виноват алгорим обработки цитат, который работал задом наперед, многократно увеличивая объем оперций при поиске тегов цитат.
Если кому нужно готовое решение, обновленный файл \admin\sources\classes\bbcode\custom\defaults.php лежит <a href="http://holdsense.com/IPB3_bbcode_defaults.rar" target="_blank">здесь</a>
<a href="http://xnsnet.cln.ru/index.php?/topic/5-%d1%86%d0%b8%d1%82%d0%b0%d1%82%d1%8b/" target="_blank">Здесь</a> дубликат этого описания.
Проблема возникла <a href="http://board.holdsense.com/index.php?/topic/189-%D1%86%D0%B8%D1%82%D0%B0%D1%82%D1%8B/" target="_blank">здесь</a>
Или просто поправить код класса bbcode_quote
<!--c1--><div class='codetop'>Код</div><div class='codemain'><!--ec1--> protected function _replaceText( $txt )
{
$_tags = $this->_retrieveTags();
foreach( $_tags as $_tag )
{
$open_tag = '[' . $_tag;
$close_tag = '[/' . $_tag . ']';
while( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )
{
if( $_iteration > 500 )
{
break;
}
$_iteration++;
$open_length = strlen($open_tag);
$_option = '';
$quoteOptions = array();
if( substr( $txt, $this->cur_pos + strlen($open_tag), 1 ) == ' ' )
{
$open_length += 1;
$_option = substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );
$quoteOptions = $this->_extractSurgicallyTehOptions( $_option );
}
else if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )
{
$this->cur_pos = strpos( $txt, ']', $this->cur_pos );
continue;
}
$_content = substr( $txt, ($this->cur_pos + $open_length + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + $open_length + strlen($_option) + 1)) );
preg_match_all( "#\[attachment=(.+?)
.+?)\]#", $_content, $matches );
if( is_array( $matches[1] ) && count( $matches[1] ) )
{
foreach( $matches[1] as $idx => $attach_id )
{
$_content = str_replace( "[attachment={$attach_id}:{$matches[2][$idx]}]", $this->registry->getClass('output')->getReplacement('post_attach_link') . " <a href='{$this->settings['base_url']}app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$attach_id}' target='_blank'>{$matches[2][$idx]}</a>", $_content );
}
}
$_content = IPSText::br2nl( $_content );
$_content = trim( $_content );
$_content = nl2br( $_content );
$txt = substr_replace( $txt, $this->_buildOutput( $_content, $quoteOptions ? $quoteOptions : '' ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );
$this->cur_pos = strpos( $txt, $open_tag ) ? strpos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;
if( $this->cur_pos > strlen($txt) )
{
$this->cur_pos = 0;
break;
}
}
}
return $txt;
}<!--c2--></div><!--ec2-->
Если кому нужно готовое решение, обновленный файл \admin\sources\classes\bbcode\custom\defaults.php лежит <a href="http://holdsense.com/IPB3_bbcode_defaults.rar" target="_blank">здесь</a>
<a href="http://xnsnet.cln.ru/index.php?/topic/5-%d1%86%d0%b8%d1%82%d0%b0%d1%82%d1%8b/" target="_blank">Здесь</a> дубликат этого описания.
Проблема возникла <a href="http://board.holdsense.com/index.php?/topic/189-%D1%86%D0%B8%D1%82%D0%B0%D1%82%D1%8B/" target="_blank">здесь</a>
Или просто поправить код класса bbcode_quote
<!--c1--><div class='codetop'>Код</div><div class='codemain'><!--ec1--> protected function _replaceText( $txt )
{
$_tags = $this->_retrieveTags();
foreach( $_tags as $_tag )
{
$open_tag = '[' . $_tag;
$close_tag = '[/' . $_tag . ']';
while( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )
{
if( $_iteration > 500 )
{
break;
}
$_iteration++;
$open_length = strlen($open_tag);
$_option = '';
$quoteOptions = array();
if( substr( $txt, $this->cur_pos + strlen($open_tag), 1 ) == ' ' )
{
$open_length += 1;
$_option = substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );
$quoteOptions = $this->_extractSurgicallyTehOptions( $_option );
}
else if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )
{
$this->cur_pos = strpos( $txt, ']', $this->cur_pos );
continue;
}
$_content = substr( $txt, ($this->cur_pos + $open_length + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + $open_length + strlen($_option) + 1)) );
preg_match_all( "#\[attachment=(.+?)
if( is_array( $matches[1] ) && count( $matches[1] ) )
{
foreach( $matches[1] as $idx => $attach_id )
{
$_content = str_replace( "[attachment={$attach_id}:{$matches[2][$idx]}]", $this->registry->getClass('output')->getReplacement('post_attach_link') . " <a href='{$this->settings['base_url']}app=core&module=attach&section=attach&attach_rel_module=post&attach_id={$attach_id}' target='_blank'>{$matches[2][$idx]}</a>", $_content );
}
}
$_content = IPSText::br2nl( $_content );
$_content = trim( $_content );
$_content = nl2br( $_content );
$txt = substr_replace( $txt, $this->_buildOutput( $_content, $quoteOptions ? $quoteOptions : '' ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );
$this->cur_pos = strpos( $txt, $open_tag ) ? strpos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;
if( $this->cur_pos > strlen($txt) )
{
$this->cur_pos = 0;
break;
}
}
}
return $txt;
}<!--c2--></div><!--ec2-->