MyBB Community Forums

Full Version: Disallow Multiple Reports?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I know Labrocca has a plugin, I tried but it doesn't work for me.

So I was trying to manually edit the report.php file. I am using the below condition, it still doesn't stop reporting, what might be the exact codes?

if($mybb->post['report'] == 1)
{
    error("This post is already reported.");
}

Thanks.
You'd have to check if the pid is in mybb_reportedposts.
Erm what? I don't get, so what condition to use probably?
Not sure 100%, but try this:

$check = $db->query("SELECT rid FROM mybb_reportedposts WHERE pid = ".$mybb->input['pid']."");

$report = $db->num_rows($check);

if($report > 0) {
error("This post is already reported.");
}
lol doesn't work, I tried that though tried again, even its not reported, it states this post is reported. Sad
Oops, sorry about that. Try the new version in my previous post.
Thanks again, added that and did some furthermore modifications and it works. Smile
But I don't know what this thing does, can you explain?

$report = $db->num_rows($check);
Smile
No problem, glad I could help. Smile
But I don't know what this thing does, can you explain?

$report = $db->num_rows($check);
Smile
It checks how many rows are in the table with the specified pid.
Pages: 1 2