XF 1.1 Add "Start Conversation" button to post

MOZ

Well-known member
I'd like to add a "Start Conversation" button to post right where we have the reply button. How would I go about this?
 
However I want this only in a particular forum, so I am more inclined towards a template edit if possible.

Untested but...

library/Ragtek/QPC/StaticMethods.php

Add the red code:

Rich (BB code):
    public static function templateHooks($name, &$contents, array $params, XenForo_Template_Abstract $template)
    {
        if ($name == 'post_public_controls' AND  XenForo_Visitor::getInstance()->hasPermission('conversation', 'start') AND $thread = $template->getParam('thread') AND $thread['node_id'] == 1) {

            $post = $params['post'];
            $quoteLink = XenForo_Link::buildPublicLink('postconversation', $post);
            $phrase = new XenForo_Phrase('ragtek_quote_in_conversation');
            $contents .= '<a href="' . $quoteLink . '" class="item control">
            <span></span>
            <span>' . $phrase . '</span></a>
				';
        }
    }
 
Top Bottom