Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    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.