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.
Oops, sorry about that. Try the new version in my previous post.
Thanks again, added that and did some furthermore modifications and it works.
But I don't know what this thing does, can you explain?
$report = $db->num_rows($check);
No problem, glad I could help.
But I don't know what this thing does, can you explain?
$report = $db->num_rows($check);
It checks how many rows are in the table with the specified pid.