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

Put text into a post when banning someone?

#1
Hello. I am trying to use $_GET to make it so when an admin bans someone, if he did it from a post, the post will be automatically edited so there will be a text "User was banned for this" in the bottom.

The thing is, i dont have any clue how to change the post itself, like how to put it in so when you click on the "Ban" button, it will add a text to the post.

The question is, how do i put a text into a already existing post? I got the postID.

Thank you!
 

Jake Bunce

XenForo moderator
Staff member
#2
You need to use the datawriter to update an existing post. See this function as an example:

XenForo_ControllerPublic_Post::actionSave