how to redirect to mcp index page after approving post

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
kirang
Registered User
Posts: 4
Joined: Thu Feb 01, 2018 12:03 pm

how to redirect to mcp index page after approving post

Post by kirang »

I am using 3.1.4
I want to customize the flow as :

After apporving/disapproving the post from the following interface "Posts awaiting approval" :
domain.com/forums/mcp.php?i=mcp_queue&mode=unapproved_posts

I want to redirect from "Approve post" - domain/forums/mcp.php?i=queue&p=9999&f=01 interface to the above "Posts awaiting approval" : domain.com/forums/mcp.php?i=mcp_queue&mode=unapproved_posts

Currently its redirect with the "F" parameter which fixes the forum category. I want to see all pending post again for all forums.
kirang
Registered User
Posts: 4
Joined: Thu Feb 01, 2018 12:03 pm

Re: how to redirect to mcp index page after approving post

Post by kirang »

I had tried in mcp_queue.php but no luck.
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: how to redirect to mcp index page after approving post

Post by mrgoldy »

You'll have to adjust this line in includes/mcp/mcp_queue.php.
(This is phpBB 3.2 GitHub pages, but should still be pretty much the same for 3.1.4)

I guess something like append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i={$id}&mode={$mode}"); could do the trick.
NOTE: I haven't tested this and wrote it on the fly. Nor looked into where else the $redirect variable, set on this line, is used.
So first test it on a local test board and see how it affects your board.
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
Post Reply

Return to “phpBB Custom Coding”