[MODDB] Approval MOD v2.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: Database repair

Post by uncle.f » Sun Sep 09, 2007 1:44 pm

robert.bbs wrote:Is there a way to get these numbers in sync with the current state of the board? Note in the example above "unjuddy" has no post waiting to be approved, it has already been deleted.
Try this: in the admin panel go to the "Forum Admin" -> "Management", for each forum click on the "Resync" link.

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: [RC] Approval MOD v2.0

Post by uncle.f » Sun Sep 09, 2007 1:53 pm

superblue wrote:How easy would it be to add a delete link to be included in the notify email along with the approve/view links?
Quite easy in fact.

Open your language /lang_..../email/approve_notify.tpl file and add something like this to it:

Code: Select all

You can use the following link to delete that post:

{U_DELETE}
Now open your /includes/functions_approve.php and locate the following line:

Code: Select all

'U_APPROVE' => $server_protocol . $server_name . $server_port . $script_name_approve . "?mode=approve&" . POST_POST_URL . "=$post_id")
Directly before that line insert the following:

Code: Select all

'U_DELETE' => $server_protocol . $server_name . $server_port . $script_name_approve . "?mode=delete&" . POST_POST_URL . "=$post_id"),
Let me know if that worked..

busl
Registered User
Posts: 2
Joined: Sun Sep 09, 2007 6:42 pm

Re: [RC] Approval MOD v2.0

Post by busl » Sun Sep 09, 2007 7:28 pm

Hello,

I'm a newbie with phpBB, so this may be an offtop question - in such case I would be grateful if anyone out there could point me out on the right thread. I'm running phpBB 2.0.22 and I'm looking for a mod, which requires moderators to approve only first post of each new user - and after that post is approved, the user is allowed to post to the forum without further approval.

Thanks in advance.

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: [RC] Approval MOD v2.0

Post by uncle.f » Sun Sep 09, 2007 8:58 pm

busl wrote:I'm looking for a mod, which requires moderators to approve only first post of each new user - and after that post is approved, the user is allowed to post to the forum without further approval.
You could achieve that using this MOD. Please read the documentation with the special attention to ranks approval options.
Last edited by uncle.f on Mon Sep 10, 2007 8:34 am, edited 1 time in total.

busl
Registered User
Posts: 2
Joined: Sun Sep 09, 2007 6:42 pm

Re: [RC] Approval MOD v2.0

Post by busl » Sun Sep 09, 2007 9:15 pm

Oh.. well, I can see now - stupid question, indeed.
Thank you very much, uncle.f - I'm going to try this out.

threeeyedtoad
Registered User
Posts: 23
Joined: Tue May 22, 2007 8:34 pm

Re: [RC] Approval MOD v2.0

Post by threeeyedtoad » Thu Sep 13, 2007 2:18 pm

Is there any trick to making this mod work with Announces Suite 3.0.2a? I've installed them both, and gotten SQL errors on viewtopic. The installation documents indicate they should work together...

Thanks for the assistance...

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: [RC] Approval MOD v2.0

Post by uncle.f » Thu Sep 13, 2007 5:08 pm

threeeyedtoad wrote:Is there any trick to making this mod work with Announces Suite 3.0.2a? I've installed them both, and gotten SQL errors on viewtopic. The installation documents indicate they should work together...
I have just made a clean install of phpBB2.0.22 (subSilver, english), followed by EasyMOD installation.
I have downloaded the Announces Suite MOD (v3.0.2a) from here and installed it using EasyMOD. I had to make two tiny modifications to MOD-announces-part1.txt file because EasyMOD refused to find the correct lines. I guess it is because the Announces Suite MOD hasn't been updated for 3 years now, but those were really 2 character changes each and not related at all to the Approval MOD. The MOD-announces-part2.txt and MOD-announces-part3.txt installed fine without corrections. Following this, I installed the Approval MOD v2 which I downloaded from the link in the first post of this topic. I used EasyMOD again and I received no warnings or errors during installation. After that I have checked my forum and there is no problem at all with the viewtopic.php. All functions the way it should which tells me that there is something else on your board that modified the viewtopic.php file OR you are not using the latest version of the Approval MOD 2.0 but one of the early release candidates that had issues with the Announces Suite.
Last edited by uncle.f on Thu Sep 13, 2007 6:41 pm, edited 1 time in total.

threeeyedtoad
Registered User
Posts: 23
Joined: Tue May 22, 2007 8:34 pm

Re: [RC] Approval MOD v2.0

Post by threeeyedtoad » Thu Sep 13, 2007 6:01 pm

If the order you described installing the MODs is critical, then I may be out of luck. I have a relatively clean install of phpBB 2.0.22, to which I've installed the Approval MOD successfully. Since then, I've been using the discussion board extensively, and now I wish to add the Announces MOD. You described the installation in the reverse order.

Has anyone documented the files that are modified by both Announces and Approval? Is it possible to hand-modify the SQL statements to allow these two to work together, even if Approval is installed first?

Thanks!

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: [RC] Approval MOD v2.0

Post by uncle.f » Thu Sep 13, 2007 6:41 pm

threeeyedtoad wrote:Has anyone documented the files that are modified by both Announces and Approval? Is it possible to hand-modify the SQL statements to allow these two to work together, even if Approval is installed first?
As mentioned in the documentation the order is critical for compatibility.

The files modified by any MOD are normally listed at the very beginning of the MOD script.

I could send you the viewtopic.php from the test installation I've just done. You can compare it to yours and make the relevant changes. There is a 99.99% chance that the only changes you would have to make is in 1 SQL query that gets all the topic's posts. If you do not have any other MODs that modify viewtopic.php you can use my file straight away. Please send me a PM with you e-mail if you want that file..

robert.bbs
Registered User
Posts: 3
Joined: Sat Sep 08, 2007 12:11 pm

Re: Database repair

Post by robert.bbs » Fri Sep 21, 2007 4:27 pm

uncle.f wrote:
robert.bbs wrote:Is there a way to get these numbers in sync with the current state of the board? Note in the example above "unjuddy" has no post waiting to be approved, it has already been deleted.
Try this: in the admin panel go to the "Forum Admin" -> "Management", for each forum click on the "Resync" link.
Thanks for the suggestion. Unfortunately it made no difference. The Index still reports 4 posts that need approval even though there are none that do. Any other suggestions?

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: Database repair

Post by uncle.f » Fri Sep 21, 2007 5:08 pm

robert.bbs wrote:Thanks for the suggestion. Unfortunately it made no difference. The Index still reports 4 posts that need approval even though there are none that do. Any other suggestions?
Ok, I looked inside the code and found a couple of funny things... There exist admin functions to sync everything but there is no way to access them from the web interface! (Nothing to do with the Approval MOD, btw). So that sync link you were trying earlier would only synchronize forum's overall stats, but topics would still be left unsynchronized.

I have created a mini add-on that invokes the hidden 'sync-all' functions. You can put directly into your '/admin' folder (call the file: 'admin_sync_all.php'). Afterwards, you should see a new menu item called 'Sync All' in your 'Forums' section of the admin index (left admin frame). Try it and hopefully it is better this time... If that does not help, then there is nothing much I can do other than to suggest clearing all 'unapproved' flags with some SQL queries thus resetting all to the approved state. However, the function below should essentially do the same while preserving the real posts' status.

Code: Select all

<?php  // total sync

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
	$file = basename(__FILE__);
	$module['Forums']['Sync All'] = $file;
	return;
}

$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);

sync('all topics');
sync('all forums');

message_die(GENERAL_MESSAGE, 'Sync is complete');

?>

robert.bbs
Registered User
Posts: 3
Joined: Sat Sep 08, 2007 12:11 pm

Re: Database repair

Post by robert.bbs » Sat Sep 22, 2007 1:38 am

uncle.f wrote: I have created a mini add-on that invokes the hidden 'sync-all' functions. You can put directly into your '/admin' folder (call the file: 'admin_sync_all.php').
Excellent, the new "sync all" feature made the 4 unapproved posts re-appear in the forum, and I was able to delete them (they were SPAM). Once deleted, all is well. Thanks so much for your help!!!

User avatar
crackerboy
Registered User
Posts: 255
Joined: Sun Jul 15, 2007 5:49 pm

Re: [RC] Approval MOD v2.0

Post by crackerboy » Tue Sep 25, 2007 5:25 pm

Will this mod be ported to olympus?

User avatar
uncle.f
Registered User
Posts: 253
Joined: Thu Mar 25, 2004 11:42 am
Location: Purple Yonder
Contact:

Re: [RC] Approval MOD v2.0

Post by uncle.f » Tue Sep 25, 2007 7:29 pm

crackerboy wrote:Will this mod be ported to olympus?
There are no current plans for that.
By the way, Olympus has some approval functionality out of the box (although not as flexible as phpbb2.0 with this MOD).

User avatar
crackerboy
Registered User
Posts: 255
Joined: Sun Jul 15, 2007 5:49 pm

Re: [RC] Approval MOD v2.0

Post by crackerboy » Wed Sep 26, 2007 12:23 pm

How much money for do this mod for olympus then?

Locked

Return to “[2.0.x] MODs in Development”