1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Add "Start Conversation" button to post

Discussion in 'XenForo Questions and Support' started by MOZ, Jul 28, 2012.

  1. MOZ

    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?
  2. ragtek

    ragtek Guest

  3. MOZ

    MOZ Well-Known Member

    Exactly what I had in mind :D

    PC me?
  4. MOZ

    MOZ Well-Known Member

    However I want this only in a particular forum, so I am more inclined towards a template edit if possible.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Untested but...


    Add the red 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>' . $phrase . '</span></a>
  6. MOZ

    MOZ Well-Known Member

    Got it working (y)

Share This Page