MyBB Community Forums

Full Version: Post Key Of Reputations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm trying to make a thing that takes off all rep of from a user.

I know that I need a post key to do that, where can it be found in Templates?
You can disable rep in that Administrator CP.
You totally misunderstood my question.

I want rep, but i'm developing a thing that removes all rep from a user at one click.
So like, set the rep system back to default, so everyone is on 0?

That shouldn't be too hard, considering it'd just be wiping a table from the Database.
Let me play around for a second, and I'll see what I can come up with.
Sorry, maybe you should've included that in the first post.
I'm not sure how exactly LaBrocca pulled that off, hopefully he'll read this thread and have an answer. Sounds like a plugin he's made.
Actually I talked to him on MyBB Central, he said that I could find the post key in templates.

But I don't know where?
You just put {$mybb->post_code} in the URL or as a hidden input field in a form, depending on how you're doing it, and then check for the existence of it in your code when performing the action.
Where do I check for the existence?
I have the URL setup now, but when I click it it only reloads.

How my url looks : http://www.elitev2.com/reputation.php?action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}
You'd put this as the first line in the chunk of code for the action you're performing:

verify_post_check($mybb->input['my_post_key']);

All this is there for is to check you're actually performing a valid action, it's for security.
Pages: 1 2