Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

add buttons plus online now

Im trying to figure out 2 small problems I want to add a flag button beside the quote button at the bottom of post, and and how can i add a new discussion button to the right of the new discussion form

Comments

  • If you are speaking about the flag that you see here in this forum, it is the flagging plugin.

    The other thing you are asking for needs some css and a themehooks file. I guess you want to show a panel like it is available on other pages. So first thing is that you have to display it. It is hidden by CSS. I think it needs some extra styling to make it look good, but I cannot give much further information.
    Showing the panel is the first step, the next is attaching the module to the PostController. Maybe the following would be enough:

    public function postController_render_before($sender) {
        $sender->addModule('NewDiscussionModule');
    }
    
  • @R_J Im trying to add the flag link beside the quote

  • GotchaGotcha New
    edited September 2017

    @R_J in 2.3.1 the flag link shows beside the date of the post not by the quote

  • Try changing

        /**
         * Add 'Flag' link for comments.
         */
        public function discussionController_insideCommentMeta_handler($Sender, $Args) {
            // Signed in users only. No guest reporting!
            if (Gdn::session()->UserID) {
                $this->addFlagButton($Sender, $Args);
            }
        }
    

    to this

        /**
         * Add 'Flag' link for comments.
         */
        public function discussionController_afterCommentMeta_handler($Sender, $Args) {
            // Signed in users only. No guest reporting!
            if (Gdn::session()->UserID) {
                $this->addFlagButton($Sender, $Args);
            }
        }
    
Sign In or Register to comment.