Hello,
First post here...
I've taken over the development of Post Control, an approval MOD for phpBB originally created by Ani' and published on phpbbfrance.org.
I only need to fix one more bug before being able to release a stable, final version...
Posts awaiting validation will not appear within search results; they are hidden. But, the total number of non-validated messages is not susbracted from the total number of posts found.
For example, if a post awaiting validation contains the word Test and you do a search for that word on the board, you will get the following results (assuming Test only appears in that post):
1 post found:
(nothing appears below, since posts awaiting validation do not appear within search results)
In this case, what I would like to achieve is this:
0 post found
(and still, nothing appears below, since posts awaiting validation do not appear within search results)
To achieve this, I was told to do this:
Just before $word_count++ (which is about line 357 of search.php), do a query to check the validation of the post. If the post is not validated, skip the $word_count++ instruction.
Knowing that the flag is set to 1 for unapproved posts inside the phpbb_posts validate table, could anyone tell me what the sql query should look like?
Thanks!