Jump to content

Parsing Emoticons in comments!


Guest Fabian169

Recommended Posts

I read this

They should only be parsed once

after someone writes a new topic

and get stored in database as html.



If you are referring to the profile, it's because it's a comment, and we don't want to parse all the bbcode stuff for the comments.
Link to comment
Share on other sites

Sources/action_public/profile.php

Find:

            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', ' ' );

Add below:

            require_once( ROOT_PATH.'sources/handlers/han_parse_bbcode.php' );
            $this->postlib->parser = new parse_bbcode();
            $this->postlib->parser->ipsclass =& $this->ipsclass;
            $this->postlib->parser->parse_smilies     = 1;                            
            
            $row['comment_content'] = $this->postlib->parser->pre_display_parse( $this->postlib->parser->pre_db_parse( $row['comment_content'] ) );



Then save it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...