Page 3 of 10

Re: New topics need approval

Posted: Thu Jun 11, 2009 12:58 am
by mtrs
Set it YES, it should work.
Any other group user can approve posts, overrides this permission.

Re: New topics need approval

Posted: Mon Jun 15, 2009 1:31 pm
by hensie43
This topic was high on my wish-list, so thanx to the original poster. But I ran into a problem. In my case phpbb did send out email notifications to all who watched the particular forum for new topics. This despite the fact that the new topic wasn't approved by a moderator.

I can't say for certain if the problem is with this mod or with any of the other mod's i had installed. In any case I added some code which solved my problem. If you don't have any problems then ignore this message. If you recognize this behaviour then this might help you:

Code: Select all

-> includes/functions_posting.php. 
 
Add before function user_notification (around line 1146)
=======================================
/***

* Helper function for "topic need approval mod"

* Email was sent out before topic was approved

* Checks if topic is already appoved

*/ 

function topicIsApproved ($topic_id) {

global $db;

$sql = 'SELECT topic_approved 

FROM phpbb_topics 

WHERE topic_id ='.$topic_id;

$result = $db->sql_query($sql);

$db->sql_fetch_row;

while ($row = $db->sql_fetchrow($result)) {

$approved = $row['topic_approved'];

}

$db->sql_freeresult($result); 

return $approved;

}

Code: Select all

-> includes/functions_posting.php. 
around 1136 - Add before  "if (!topicIsApproved($topic_id)){"
======================================

if (!topicIsApproved($topic_id)){

//if topic is not approved then do not send out notifications

return;

}

Apply this at your own risk this information is posted here "as is" i can not support this!

Re: New topics need approval

Posted: Mon Jun 15, 2009 9:30 pm
by mtrs
hensie43 wrote:I ran into a problem. In my case phpbb did send out email notifications to all who watched the particular forum for new topics. This despite the fact that the new topic wasn't approved by a moderator.
Actually, the code below, should prevent that happening.

includes/functions_posting.php around line 2520

Code: Select all

	// Send Notifications
	if ($mode != 'edit' && $mode != 'delete' && $post_approval)
	{
		user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id']);
	}
I wonder, if you're using bot posters.

Re: New topics need approval

Posted: Mon Jun 15, 2009 11:57 pm
by hensie43
@mtrs Thx for your reply. I went over the code again and found out what went wrong.

There was another mod installed (=sending postbody in email notifications) which edited the same code on line 2520 and the code from this mod was commented out. Now I've seen it myself it's easily corrected but my colleage who installed this will get a "virtual" beating ;)

Re: New topics need approval

Posted: Tue Jun 16, 2009 10:35 am
by mtrs
hensie43 wrote:There was another mod installed (=sending postbody in email notifications) which edited the same code on line 2520 and the code from this mod was commented out.
This mod doesn't add any code around line 2520, the codes above are from a vanilla phpBB3 functions_posting file.

Re: New topics need approval

Posted: Sat Jun 27, 2009 2:11 am
by edgar davids
What do I set the following too if I want the New topic to be approved by an Admin/Moderator;

Can start new topics with approval
Can start new topics with approval

thanks

Re: New topics need approval

Posted: Sat Jun 27, 2009 7:02 am
by mtrs
edgar davids wrote:What do I set the following too if I want the New topic to be approved by an Admin/Moderator;
If an Admin/Moderator can approve posts, then they can also approve new topics.

Re: New topics need approval

Posted: Sun Jun 28, 2009 12:40 pm
by edgar davids
mtrs wrote:
edgar davids wrote:What do I set the following too if I want the New topic to be approved by an Admin/Moderator;
If an Admin/Moderator can approve posts, then they can also approve new topics.
I'll re-phrase my question.

What do I set the following to if I want the New topic to be approved only, and all subsequent posts "not needing approval", i.e; first post only.

Can start new topics with approval
Can start new topics with approval

Re: New topics need approval

Posted: Sun Jun 28, 2009 12:44 pm
by mtrs
edgar davids wrote:What do I set the following to if I want the New topic to be approved only, and all subsequent posts "not needing approval", i.e; first post only.
Can start new topics with approval -- YES

Re: New topics need approval

Posted: Thu Jul 09, 2009 11:22 am
by dnoone
I have just installed this mod, but I am unable to locate the area to switch it on.
Sorry this is very basic I am a little new to this one.
Just need to know where to activate it.
I have ran the install_ntna.php and Purge the cache
Thanks,

Re: New topics need approval

Posted: Thu Jul 09, 2009 5:27 pm
by mtrs
Look for this permission
acp -> forum permissions

New topics need approval

Posted: Mon Jul 13, 2009 1:47 am
by DavidIQ
MOD Updated to version 1.0.2
See first post for Download Link

Re: New topics need approval

Posted: Mon Jul 13, 2009 5:36 pm
by DoYouSpeakWak
Thx for the update and umil, makes it easier for me.

Only thing i wanna ask about is the update info.I just says uninstall 1.0.1 and install 1.0.2, but i cant seem to find the old mod zip file. Any chance of putting it in first or second topic ?

DYSW

Re: New topics need approval

Posted: Mon Jul 13, 2009 5:48 pm
by mtrs
I updated second post with 1.0.1 file edits uninstall instructions http://www.phpbb.com/community/viewtopi ... 5#p8006265

Re: New topics need approval

Posted: Mon Jul 13, 2009 6:07 pm
by DoYouSpeakWak
Thx. now i remember. so simple.