New topics need approval

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post by mtrs »

Set it YES, it should work.
Any other group user can approve posts, overrides this permission.
I abandoned all of my mods.

hensie43
Registered User
Posts: 2
Joined: Tue Mar 17, 2009 1:13 pm

Re: New topics need approval

Post 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!

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post 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.
I abandoned all of my mods.

hensie43
Registered User
Posts: 2
Joined: Tue Mar 17, 2009 1:13 pm

Re: New topics need approval

Post 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 ;)

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post 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.
I abandoned all of my mods.

User avatar
edgar davids
Registered User
Posts: 376
Joined: Mon Jan 19, 2009 7:15 am

Re: New topics need approval

Post 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

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post 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.
I abandoned all of my mods.

User avatar
edgar davids
Registered User
Posts: 376
Joined: Mon Jan 19, 2009 7:15 am

Re: New topics need approval

Post 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

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post 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
I abandoned all of my mods.

dnoone
Registered User
Posts: 2
Joined: Thu Jul 09, 2009 11:18 am

Re: New topics need approval

Post 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,

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post by mtrs »

Look for this permission
acp -> forum permissions
Last edited by mtrs on Mon Jul 13, 2009 8:03 am, edited 1 time in total.
I abandoned all of my mods.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17178
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

New topics need approval

Post by DavidIQ »

MOD Updated to version 1.0.2
See first post for Download Link
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: New topics need approval

Post 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
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: New topics need approval

Post by mtrs »

I updated second post with 1.0.1 file edits uninstall instructions http://www.phpbb.com/community/viewtopi ... 5#p8006265
I abandoned all of my mods.

User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: New topics need approval

Post by DoYouSpeakWak »

Thx. now i remember. so simple.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.

Locked

Return to “[3.0.x] MOD Database Releases”