[ABD] Move to Trash 2.0.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
theallzaz
Registered User
Posts: 84
Joined: Tue Apr 16, 2013 2:41 pm

Re: [RC] Move to Trash 2.0.0

Post by theallzaz »

I figured out how to add the option "Move to Trash" on moderator control panel :)

With these changes, you will be able to access a forum, then click on the Moderator Control Panel button and select multiple topics to move to trash at once.
Files to edit:

includes/mcp/mcp_forum.php
styles/subsilver2/template/mcp_forum.html
Open: includes/mcp/mcp_forum.php

Find:

Code: Select all

          'S_CAN_MOVE'         => $auth->acl_get('m_move', $forum_id),
Add after:

Code: Select all

          'S_CAN_MOVE_TO_TRASH'      => $auth->acl_get('m_move_to_trash', $forum_id),
Open: styles/subsilver2/template/mcp_forum.html

Find:

Code: Select all

             <!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF -->
Add after:

Code: Select all

             <!-- IF S_CAN_MOVE --><option value="move_to_trash">{L_MOVE_TOPIC_TO_TRASH}</option><!-- ENDIF -->
<the code below will also fix a bug regarding logs (this bug belongs to the original mod, nothing related with the above changes)>
Open: includes/mcp/mcp_main.php
Find:

Code: Select all

if (!$trash_id)
{
	add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
}
Replace with:

Code: Select all

if ($trash_id)
{
	add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name']);
}
New edit required to fix another bug regarding an error in redirecting page:

Open: includes/mcp/mcp_main.php

Find:

Code: Select all

                $redirect = request_var('redirect', "index.$phpEx");
                $redirect = reapply_sid($redirect);

                if (!$success_msg)
                {
                    redirect($redirect);
                }
                else
                {
                    meta_refresh(3, $redirect);

                    $message = $user->lang[$success_msg];
                    $message .= '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
                    $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id") . '">', '</a>'); 
Replace with:

Code: Select all

                $old_redirect = request_var('redirect', "index.$phpEx");
                $old_redirect = reapply_sid($redirect);
                $redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");

                if (!$success_msg)
                {
                    redirect($redirect);
                }
                else
                {
                    meta_refresh(3, $redirect);

                    $message = $user->lang[$success_msg];
                    $message .= '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $old_redirect . '">', '</a>');
                    $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>'); 
Tested and working. :D

Ps: Kamahl19, if you want you can merge it to the next version. :mrgreen:
Last edited by theallzaz on Sat Jul 20, 2013 3:53 pm, edited 9 times in total.

theallzaz
Registered User
Posts: 84
Joined: Tue Apr 16, 2013 2:41 pm

Re: [RC] Move to Trash 2.0.0

Post by theallzaz »

New edits required. Read my last post (above).

Seeeler
Registered User
Posts: 78
Joined: Sat Apr 28, 2012 9:03 pm

Re: [RC] Move to Trash 2.0.0

Post by Seeeler »

No notification on topic move to trash? really needed it

Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: [RC] Move to Trash 2.0.0

Post by Danielx64 »

*Thinks of forking this*
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [RC] Move to Trash 2.0.0

Post by prototech »

This topic has been marked as [ABD] - Abandoned as the mod author has not been active in this topic in over a year. If the MOD author wishes to continue development, please PM anyone on the MOD Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this MOD, or any other mod that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Modifications Team
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

Locked

Return to “[3.0.x] Abandoned MODs”