• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Implemented Please implement autolinkBBcode in Comment Replies

Ludachris

Active Member
AMS Premium
CAS Premium
RMS Premium
SC Premium
UBS Premium
I know I've posted a few replies to comments myself where I was answering questions and needed to post a link to a thread within the site, or an external link to information posted on another site.

EDIT: I've modified the title to reflect the actual functionality that you are wanting.
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
NOTE: The TITLE of this thread has been changed so that it matches the actual implemented feature. The Old title was asking for BBCode to be parsed, which is already happening.

BBCode in Comment Replies IS being parsed and has always been parsed since I added comment replies.

As you can see here, comment replies are being parsed in the "VIEW" so that if they contain any BBCode, that BBCode will be parsed into HTML for output.
PHP:
        $commentBbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
        $commentBbCodeOptions = array(
            'states' => array(
                'viewAttachments' => $this->_params['canViewCommentImages']
            )
        );
       
        if ($this->_params['comments'])
        {
            foreach ($this->_params['comments'] AS $itemCommentId => $itemComment)
            {
                $itemComment['message'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($itemComment, $bbCodeParser, $commentBbCodeOptions);
               
                foreach ($itemComment['replys'] AS $commenReplytId => $commentReply)
                {
                    $commentReply['message'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($commentReply, $bbCodeParser);
               
                    $itemComment['replys'][$commenReplytId] = $commentReply;
                }              

                $this->_params['comments'][$itemCommentId] = $itemComment;
            }
        }

I think you are confusing the parsing of BBCode being tied to having to use the Rich Text Editor as the INPUT. That is not the case. You can still manually add BBCode to a text input and that BBCode will be parsed the same as if it was added via the Rich Text Editor (as will smiles).

I know I've posted a few replies to comments myself where I was answering questions and needed to post a link to a thread within the site, or an external link to information posted on another site.
What you are wanting is called autoLinkBbCode. This will allow you to paste in a plain URL and when saving the reply, will convert that URL into a BBCode URL that when parsed will be turned into a LINK.

Here is an example. I've added this to both the create reply and edit reply functions. You can now paste in links and when saving, they will be converted into BBCode.

Selection_242.png


Here I am replying to a comment. I've pasted in a LINK.
Selection_240.png

And here you can see that when I post the reply, the Link is now an actual HTML Link vs plain text.

Selection_241.png

If you EDIT that reply, you can now see that the function wrapped that link with the XF Standard URL BBcode.

Selection_243.png


You can and always have been able to add BBCode manually into comment replies. Here I am adding some BOLD text and Colored Text using standard XenForo BBCode.

Selection_245.png


And as you can see, the BBCode in the comment reply is being parsed (as are smiles).

Selection_244.png
 
Back
Top