【Discuz】引用回复表情没有了的解决办法

    升级了Discuz 7.2后,引用回复表情没有了,其实是表情码在引用时被过滤掉了。

    不过解决方法也挺简单。

    1、打开include/post.func.php

    在以下代码之前



    ?>

    增加

    //quote with smilies start
    function messagecutstrwithsmile($str, $length) {
            global $language, $_DCACHE;
            if(empty($language['post_edit_regexp']) || empty($language['post_hidden'])) {
                    include language('misc');
            }
            include_once DISCUZ_ROOT.'./forumdata/cache/cache_post.php';
            $bbcodes = 'b|i|u|p|color|size|font|align|list|indent|float';
            $bbcodesclear = 'url|email|code|free|table|tr|td|img|swf|flash|attach|media|audio|payto'.($_DCACHE['bbcodes_display'] ? '|'.implode('|', array_keys($_DCACHE['bbcodes_display'])) : '');
            $str = cutstr(strip_tags(preg_replace(array(
                            "/\[hide=?\d*\](.+?)\[\/hide\]/is",
                            "/\[quote](.*?)\[\/quote]/si",
                            $language['post_edit_regexp'],
                            "/\[($bbcodesclear)=?.*?\].+?\[\/\\1\]/si",
                            "/\[($bbcodes)=?.*?\]/i",
                            "/\[\/($bbcodes)\]/i",
                    ), array(
                            "[b]$language[post_hidden][/b]",
                            '',
                            '',
                            '',
                            '',
                            ''
                    ), $str)), $length);
            return trim($str);
    }
    //quote with smilies end

    2、打开include/newreply.inc.php

    找到

    $message = messagecutstr($message, 100);

    替换为

    $message = messagecutstrwithsmile($message, 100);//quote with smilies

    搞定。

    参考:http://www.discuz.net/forum.php?mod=viewthread&tid=1579776



    本博客所有文章如无特别注明均为原创。
    复制或转载请以超链接形式注明转自枫芸志,原文地址《【Discuz】引用回复表情没有了的解决办法
    标签:
    分享:

还没有人抢沙发呢~

无觅相关文章插件,快速提升流量