Форум IP.Board

Смайлы в комментариях

Начиная с IP.Board 2.2.х, можно оставлять комментарии в профилях пользователей. Однако смайлики там использовать нельзя. Исправить это можно так…

Открыть: sources/action_public/profile.php

Найти (в function personal_iframe_comments()):
[sourcecode language=”css”]if( $row[‘login_anonymous’]{0} == ‘1’ )
{
// Member last logged in anonymous

if( $this->ipsclass->member[‘mgroup’] != $this->ipsclass->vars[‘admin_group’] OR $this->ipsclass->vars[‘disable_admin_anon’] )
{
$row[‘_last_active’] = $this->ipsclass->lang[‘private’];
}
}

$row[‘comment_content’] = $this->ipsclass->txt_wordwrap( $row[‘comment_content’], ’19’, ‘ ‘ );[/sourcecode] Ниже добавить:
[sourcecode language=”css”]//—————————————–
// Parse smilies in comments START
//—————————————–

$parser = $this->ipsclass->load_class( ROOT_PATH.’sources/handlers/han_parse_bbcode.php’, ‘parse_bbcode’ );
$parser->parse_smilies = 1;

$row[‘comment_content’] = $parser->pre_display_parse( $parser->pre_db_parse( $row[‘comment_content’] ) );

//—————————————–
// Parse smilies in comments END
//—————————————–[/sourcecode] Найти (в function personal_build_comments( $member, $new_id=0, $return_msg=” )):
[sourcecode language=”css”]if( $row[‘login_anonymous’]{0} == ‘1’ )
{
// Member last logged in anonymous

if( $this->ipsclass->member[‘mgroup’] != $this->ipsclass->vars[‘admin_group’] OR $this->ipsclass->vars[‘disable_admin_anon’] )
{
$row[‘_last_active’] = $this->ipsclass->lang[‘private’];
}
}

$row[‘comment_content’] = $this->ipsclass->txt_wordwrap( $row[‘comment_content’], ’19’, ‘ ‘ );[/sourcecode] Ниже добавить:
[sourcecode language=”css”]//—————————————–
// Parse smilies in comments START
//—————————————–

$parser = $this->ipsclass->load_class( ROOT_PATH.’sources/handlers/han_parse_bbcode.php’, ‘parse_bbcode’ );
$parser->parse_smilies = 1;

$row[‘comment_content’] = $parser->pre_display_parse( $parser->pre_db_parse( $row[‘comment_content’] ) );

//—————————————–
// Parse smilies in comments END
//—————————————–[/sourcecode]

Кнопка «Наверх»