[MODDB] Prime Trash Bin - Keep deleted topics & posts

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!
Get Involved
Locked
ReverbDev
Registered User
Posts: 49
Joined: Thu Mar 26, 2009 3:15 pm

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by ReverbDev » Sat Jun 13, 2009 7:21 am

Just wanted to say thanks for the mod.

When you get bad posts and need them around but not viewable by normal users, it works great. Now when I get the spammers in, I can have the forum global moderator and admins having access to a private "trash bin" forum where deleted posts get put to. Moderators are set to not delete, so it moves them to the bucket where they belong. I can now take the time to review them as needed. I don't get fancy with what I need, and for admin functions it does everything I want.

User avatar
knmt
Registered User
Posts: 110
Joined: Fri Aug 29, 2008 10:13 am
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by knmt » Sat Jun 13, 2009 10:52 am

I think I have found some bugs.

If we temporarily delete a post, and then go to MCP to delete that post again, it will throw a warning of using an undefined constant: PRIME_DELETE_POST_MIX_NOTICE in prime_trash_bin_2.php. Moreover, it will decrease the post count of the author of that post the second time.

Thanks!

ZDarkness
Registered User
Posts: 45
Joined: Sun Oct 14, 2007 2:39 am
Location: Brasil, SP, Sorocity
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by ZDarkness » Sat Jun 13, 2009 5:44 pm

knmt wrote:I think I have found some bugs.

If we temporarily delete a post, and then go to MCP to delete that post again, it will throw a warning of using an undefined constant: PRIME_DELETE_POST_MIX_NOTICE in prime_trash_bin_2.php. Moreover, it will decrease the post count of the author of that post the second time.

Thanks!
What version are you using?!

User avatar
knmt
Registered User
Posts: 110
Joined: Fri Aug 29, 2008 10:13 am
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by knmt » Sun Jun 14, 2009 5:24 am

Lol sorry, didn't check the latest version. He has already fixed that. My bad ^^

Ilsagon
Registered User
Posts: 58
Joined: Sun Mar 08, 2009 7:11 pm

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Ilsagon » Wed Jun 24, 2009 5:36 pm

Hi and sorry in advance if this question was already mentioned before, tried to look it up but didn't find anything.

Is it possible, that deleted posts won't count to the postlimit per page? I had a page in a topic on my forum and deleted about 10 posts. The result was, that one page of the topic just consisted of "Post deleted" placeholders. I just want the page to show 10 + x posts, where x is the number of deletet posts. If I delete 3 posts on a page, the page should show 13 posts, 10 proper posts + the 3 deleted placeholders. Hope that anyone understood my problem and could help me!

Edit: Found another problem. When I delete the last post of a topic (Not completely, just in that way, that it is restorable), the Forumsoverview still shows the deleted post to be the last post of the subforum. It should just use the post that was created before as the last post, because the last post that is shown doesn't exist anymore (for the users)!

Holger
Registered User
Posts: 1760
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Holger » Mon Jul 06, 2009 7:57 pm

Hi Ken, thank you for this excellent piece of code!

I have one issue though.
When updating the moderators permissions in the ACP I get:
SQL ERROR [ mysql4 ]

Duplicate entry '11-0' for key 1 [1062]

SQL

INSERT INTO cmnforum_acl_roles_data (role_id, auth_option_id, auth_setting) VALUES (11, 32, 1), (11, 34, 1), (11, 0, 1), (11, 35, 1), (11, 40, 1), (11, 0, 1), (11, 31, 1)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/db/dbal.php
LINE: 450
CALL: dbal_mysql->sql_query()

FILE: includes/acp/auth.php
LINE: 986
CALL: dbal->sql_multi_insert()

FILE: includes/acp/acp_permission_roles.php
LINE: 214
CALL: auth_admin->acl_set_role()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_permission_roles->main()

FILE: adm/index.php
LINE: 78
CALL: p_master->load_active()
What am I doing wrong? :oops:
Similar problem as this one: http://www.phpbb.com/community/viewtopi ... 5#p9365925

/Holger

User avatar
primehalo
Former Team Member
Posts: 2848
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by primehalo » Mon Jul 06, 2009 9:16 pm

As you've probably read from the other thread with the similar problem, I have no idea why this MOD would cause that error. The MOD never touches that database table, an dthe error message never mentions any of the functions found in this MOD. Maybe it's not this MOD that's causing the problem? Maybe it's another MOD that is somehow conflicting?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Holger
Registered User
Posts: 1760
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Holger » Tue Jul 07, 2009 6:52 am

Could it be that there is an interference with the Soft Delete-Mod?
Hmmmm ... because I installed Soft Delete before your mod. Then I put back the original files but I did not change back the DB.

This is the DB-install from Soft Delete:

Code: Select all

<?php
/**
*
* @package phpBB3 Soft Delete Install
* @copyright (c) 2007 EXreaction, Lithium Studios
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

// Stuff required to work with phpBB3
define('IN_PHPBB', true);
$phpbb_root_path = ((isset($phpbb_root_path)) ? $phpbb_root_path : './');
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
$user->add_lang('mods/soft_delete');

if ($user->data['user_type'] != USER_FOUNDER)
{
	trigger_error('FOUNDER_ONLY');
}

include($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);

$auth_admin = new auth_admin();
$db_tool = new phpbb_db_tools($db);

$db_tool->sql_column_add(POSTS_TABLE, 'post_deleted', array('UINT', 0));
$db_tool->sql_column_add(POSTS_TABLE, 'post_deleted_time', array('TIMESTAMP', 0));

$db_tool->sql_column_add(TOPICS_TABLE, 'topic_deleted', array('UINT', 0));
$db_tool->sql_column_add(TOPICS_TABLE, 'topic_deleted_time', array('TIMESTAMP', 0));
$db_tool->sql_column_add(TOPICS_TABLE, 'topic_deleted_reply_count', array('UINT', 0));

$db_tool->sql_column_add(FORUMS_TABLE, 'forum_deleted_topic_count', array('UINT', 0));
$db_tool->sql_column_add(FORUMS_TABLE, 'forum_deleted_reply_count', array('UINT', 0));

$permissions = array(
	'local'      => array(
		'm_harddelete',
	),
	'global'   => array(
		'm_harddelete',
	)
);
$auth_admin->acl_add_option($permissions);

$cache->purge();

trigger_error('SOFT_DELETE_INSTALL_COMPLETE');
?>
Maybe this part?

Code: Select all

$auth_admin->acl_add_option($permissions);

User avatar
primehalo
Former Team Member
Posts: 2848
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by primehalo » Tue Jul 07, 2009 7:44 am

That certainly seems possible. Try removing what it added to the database.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Holger
Registered User
Posts: 1760
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Holger » Tue Jul 07, 2009 8:03 am

How can I see what it did?
Because I suspect that it not only added
post_deleted
post_deleted_time
topic_deleted
topic_deleted_time
topic_deleted_reply_count
forum_deleted_topic_count
forum_deleted_reply_count

What does this do?

Code: Select all

$permissions = array(
   'local'      => array(
      'm_harddelete',
   ),
   'global'   => array(
      'm_harddelete',
   )
);
$auth_admin->acl_add_option($permissions);

User avatar
primehalo
Former Team Member
Posts: 2848
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by primehalo » Tue Jul 07, 2009 8:10 am

No idea, I don't think I ever used that function. Might want to ask the Soft Delete author, I'm sure he'd know how to remove everything that was added to the database. Might even have an uninstall script.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Holger
Registered User
Posts: 1760
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Holger » Tue Jul 07, 2009 8:14 am

Hups, sorry, yes of course! :oops:

User avatar
Garret_Dark
Registered User
Posts: 14
Joined: Fri Jan 16, 2009 11:29 am
Location: Russia

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Garret_Dark » Sun Jul 12, 2009 10:07 am

Hi!
Is it possible to make the deleted messages did not see the guests and ordinary users?
In advance thank

Avdon
Registered User
Posts: 186
Joined: Tue Jun 02, 2009 4:55 pm
Location: Germany
Name: Danny Alkhaldy

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by Avdon » Sun Jul 12, 2009 11:27 pm

I hope you can make the posts move to trash bin like topics, and maybe be arranged in a topic (in trash forum) has the same name as the original topic .

jjeff
Registered User
Posts: 3
Joined: Wed Dec 06, 2006 11:34 am

Re: [BETA] Prime Trash Bin - Keep deleted topics & posts

Post by jjeff » Tue Jul 14, 2009 10:35 pm

HI, I need help
I give the moderators permission to only soft delete posts, and when the moderator try to delete a post from (mcp board), SQL error with code [0] page appeared but when the moderator try to delete a post from the view topic page, everything is ok. but this issue does not happen to the administrator.

Did I missed something?

sorry for my english

Locked

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