[ABD] Approve Mod

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.
Locked
tedist_god
Registered User
Posts: 13
Joined: Tue May 11, 2004 3:41 pm

Post by tedist_god » Thu Jul 15, 2004 4:37 am

Ok cool i got it working just fine except for one little problem... I am using easy portal and it takes the topics and displays them on my index page... My problem is that whenever the topic is under question (as in not approved yet..) It is hidden on the actual page but shows up on the portal page how can i fix this... To try it out go to http://www.gorglin.com log in as testdummy
pass: testdummy

And the forum under question is Reviews please help out
thank you...

AceMan
Registered User
Posts: 337
Joined: Thu Nov 15, 2001 6:47 am
Contact:

Post by AceMan » Fri Jul 16, 2004 12:02 am

you'd have to mod the portal page

tedist_god
Registered User
Posts: 13
Joined: Tue May 11, 2004 3:41 pm

Post by tedist_god » Fri Jul 16, 2004 10:44 pm

mod it to what ... ok how bout this what file do the normal topics try to get the information from?

safeTsurfa
I've Been Banned!
Posts: 1959
Joined: Sat May 08, 2004 10:21 am
Location: United Kingdom
Contact:

Post by safeTsurfa » Fri Jul 16, 2004 11:05 pm

tedist_god wrote: mod it to what ... ok how bout this what file do the normal topics try to get the information from?
Topics are displayed by the code in viewtopics.php, and this MOD chages part of that code to make them hidden if they aren't yet approved. You need to use a similar piece of code within the index.php topic display code to achieve the same result.

Demetrio
Registered User
Posts: 1
Joined: Wed Jul 21, 2004 10:36 pm

Is this mode DEAD

Post by Demetrio » Wed Jul 21, 2004 10:42 pm

Was looking forward into looking into this mod and adding it to a simple forum. Is there anywhere else we can download this mod

AceMan
Registered User
Posts: 337
Joined: Thu Nov 15, 2001 6:47 am
Contact:

Post by AceMan » Sun Jul 25, 2004 5:19 pm


ccheng
Registered User
Posts: 6
Joined: Wed Jun 30, 2004 9:24 pm

Possible BUG?

Post by ccheng » Mon Jul 26, 2004 5:33 pm

Hi Aceman! I just found a bug... i dunno if it has already been addressed since there are a whole lot of posts to sift through. Anyways, when I view a user's profile by clicking on the user's name from the index page, under the 'last post' column on the right hand side of the forums table, and then click on 'find all posts by user' I get an SQL error. Any ideas? Btw, this only happens when I'm NOT logged in. Thanx.
Could not obtain forum approval information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.post_id = ap.post_id AND af.forum_id = p.foru

SELECT af.*, ap.post_id, ap.is_post, ap.is_topic FROM phpbb_approve_forums af, phpbb_approve_posts ap, phpbb_posts p, phpbb_forums f WHERE ap.post_id IN ( ) AND p.post_id = ap.post_id AND af.forum_id = p.forum_id AND f.forum_id = af.forum_id

Line : 723
File : c:\inetpub\wwwroot\intern\phpBB2\search.php

timbley
Registered User
Posts: 4
Joined: Wed Jul 28, 2004 4:20 pm

Mod *almost* works

Post by timbley » Wed Jul 28, 2004 4:32 pm

Hey everyone,

I'm completely new to phpbb, but do develop software professionally. I have set up phpbb 2.0.10 and used the Approve_Mod from the file posted as phpBB2_Approve_Mod-1.1.0.9.zip. I thought this was version 1.1.0.9, but what was in the zipfile was actually 1.0.9.

Anyway, the mod seems to have gone okay except for one thing. None of the approve links that are available in the Admin control panel do anything. For example, if I am viewing "Topics Awaiting Approval" and click on the 'approve' link beside a topic, I am just brought back to the "Topics Awaiting Approval" page and the 'approve' link is still there. The topic has not been approved. Same thing if I click on the Topic Title and choose "Approve Topic". I am just brought back to "Topics Awaiting Approval" and the topic has not been approved.

It seems the only way to approve a topic is to actually log into the board, navigate to the topic, and approve it from within the topic page itself.

So, I have a few questions:
1. Do I have the latest version of the Approve_Mod?
2. How do I easily find the latest version? I hunted all through the Mod Database and couldn't find it anywhere.
3. Is this a known problem that has been fixed in a newer version of Approve_Mod?

Thanks,
Tim

timbley
Registered User
Posts: 4
Joined: Wed Jul 28, 2004 4:20 pm

Re: Mod *almost* works

Post by timbley » Wed Jul 28, 2004 4:58 pm

timbley wrote: Anyway, the mod seems to have gone okay except for one thing. None of the approve links that are available in the Admin control panel do anything. For example, if I am viewing "Topics Awaiting Approval" and click on the 'approve' link beside a topic, I am just brought back to the "Topics Awaiting Approval" page and the 'approve' link is still there. The topic has not been approved. Same thing if I click on the Topic Title and choose "Approve Topic". I am just brought back to "Topics Awaiting Approval" and the topic has not been approved.


Well, I answered my own question. Looks like admin_approve.php had some bugs in it. It was missing the querystring parameter extraction lines from the topic and posting select statements. I added them in and it works much better now!

Cheers
Tim

AceMan
Registered User
Posts: 337
Joined: Thu Nov 15, 2001 6:47 am
Contact:

Post by AceMan » Wed Jul 28, 2004 10:21 pm

post the changes u made pls, thx~

Elad Repooc
Registered User
Posts: 8
Joined: Tue Dec 09, 2003 9:11 am

Post by Elad Repooc » Thu Jul 29, 2004 8:35 am

yeah! please! post the changes you've made! :D

timbley
Registered User
Posts: 4
Joined: Wed Jul 28, 2004 4:20 pm

My changes

Post by timbley » Thu Jul 29, 2004 1:29 pm

Sure, here you go. I don't know if there is a standard format for submitting code changes, so I'm just going to be descriptive and hope you guys can figure this out. They are easy changes, so I think you'll do fine.

File to change: admin/admin_approve.php

Find this section:

Code: Select all

if ( $modevar['t'] == true )
{	
		//list of topics currently under moderation, list of topics auto-approved, paginated, searchable
		$template->set_filenames(array(
			"topics" => "admin/approve_topics.tpl")
		);
Insert this code after it:

Code: Select all

		// TRH Fix - 07/28/2004 - extract the querystring parameters
		$s = ($HTTP_GET_VARS['s']) ? $HTTP_GET_VARS['s'] : $HTTP_POST_VARS['s'];
		$p = ($HTTP_GET_VARS['p']) ? $HTTP_GET_VARS['p'] : $HTTP_POST_VARS['p'];
		$id =($HTTP_GET_VARS['id']) ? $HTTP_GET_VARS['id'] : $HTTP_POST_VARS['id'];
		$submit = ( !empty($HTTP_POST_VARS['submit']) ) ? true : false;


Find this section:

Code: Select all

		$template->assign_vars(array(
				"S_MODERATION" => append_sid('admin_approve.'.$phpEx.'?mode=p')
			)
		);
Insert this code after it:

Code: Select all

		// TRH Fix
		$s = ($HTTP_GET_VARS['s']) ? $HTTP_GET_VARS['s'] : $HTTP_POST_VARS['s'];
		$p = ($HTTP_GET_VARS['p']) ? $HTTP_GET_VARS['p'] : $HTTP_POST_VARS['p'];
		$id =($HTTP_GET_VARS['id']) ? $HTTP_GET_VARS['id'] : $HTTP_POST_VARS['id'];
		$submit = ( !empty($HTTP_POST_VARS['submit']) ) ? true : false;
See - pretty easy. Looks like the developer just forgot to do it.

Cheers
Tim

AceMan
Registered User
Posts: 337
Joined: Thu Nov 15, 2001 6:47 am
Contact:

Post by AceMan » Thu Jul 29, 2004 9:34 pm

tim, feel like contributing? i'm updating this script now, but have LOTS to do in life....

the whole thing is in CVS, and I can give u cvs access. lemme know~
browse cvs:
http://cvs.synace.dyndns.org:8000/

todo: i have to add a column to the approve_forums table for last_approved_post_id, which will be inserted for each post within a moderated forum that is NOT submitted for approval (this way we can grab last post in 1 query)

timbley
Registered User
Posts: 4
Joined: Wed Jul 28, 2004 4:20 pm

Post by timbley » Fri Jul 30, 2004 12:39 pm

AceMan wrote: tim, feel like contributing? i'm updating this script now, but have LOTS to do in life....

the whole thing is in CVS, and I can give u cvs access. lemme know~
browse cvs:
http://cvs.synace.dyndns.org:8000/


Sure, I can make the change. PM me with cvs login details.

Cheers
Tim

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

Post by uncle.f » Mon Aug 02, 2004 12:42 pm

Tim,

Thanks for the fix!!!

I was wondering if you could find a fix for another small issue:

Even though you set "NOT to show unnapproved POSTS", they are shown anyway (with the message 'waiting for approval').

(The TOPICS work ok).

Thanks again!

Locked

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