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

Hooking the report system

Discussion in 'XenForo Development Discussions' started by dmurphy, May 12, 2015.

  1. dmurphy

    dmurphy Member

    Hey there,

    I have created an addon for the XF install I am working with that adds custom user content to the site, however, I would like to add the functionality for users to report this content if it is breaching the rules in any way.

    Are there any examples out there that will help me with accomplishing this? I would rather not create a whole new report system when there is a perfectly good one in XF already.

  2. Xon

    Xon Well-Known Member

    You will need to implement a report handler, that extends XenForo_ReportHandler_Abstract, and install that handler for the content type (use Content Type Management addon to help with this).

    Have a look at the class LiamW_AlterEgoDetector_ReportHandler_AlterEgo from the addon Alter Ego Detector that I maintain has an example of reportable custom content.
    dmurphy likes this.
  3. dmurphy

    dmurphy Member

    Excellent! That is exactly the information I was after. Thank you very much.
    Xon likes this.

Share This Page