Jump to content

Parsing Emoticons in comments!

Featured Replies

Posted

This makes no sense => why is there no smily-parsing...??? :(

They should only be parsed once after someone writes a new topic and get stored in database as html.

Smileys are parsed...

Smileys are parsed...


No, they're not in comments.

commentsia5.jpg

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.

sorry, i meant like in subject "after someone writes a new comment" :/

I don

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.

awesome, thank you!

They should only be parsed once after someone writes a new topic and get stored in database as html.


Bad idea, it's hard to revert back to BBCode. D:

Bad idea, it's hard to revert back to BBCode. D:


There

Archived

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

Recently Browsing 0

  • No registered users viewing this page.