HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Discussion Event handler

I have a plugin that has some routines that needs to run before opening and before saving a discussion.

  • There is a condition that will prevent the discussion form from showing .
  • There is a condition that will prevent the discussion form from saving.

What is the best way to do this?

Thanks

Comments

  • rloyolarloyola New
    edited September 2019

    To those who will encounter this in the future, this is what i did..

    I search for fireEvent in views, models and controllers

    I create a plugin and use the parameter in the fireEvent as event handlers

    • discussionModel_beforeSaveDiscussion_handler
    • postController_beforeFormInputs_handler
Sign In or Register to comment.