[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!
Scam Warning
Locked
j4cKiE
Registered User
Posts: 38
Joined: Tue May 22, 2007 2:14 pm
Location: Germany
Contact:

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

Post by j4cKiE »

I've installed 1.0.5 now.

The requested feature (here) works fine and the installation of your mod was easy!

Another great mod of primehalo. Thanks! :)
Image

samwise
Registered User
Posts: 18
Joined: Sat Aug 02, 2008 1:50 pm

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

Post by samwise »

Hi,

First up - this mod and the Prime Post Revisions mod are both really excellent. We've had some annoying users who've taken to accidentally editing or deleting their own posts, which makes the board read like a complete mess. This is an excellent way of fixing it.

I'd like to know if the feature in this post was ever implemented? If not, is that workaround still valid?

I basically want to "hide" deleted posts within a topic from normal users, and only show them to moderators and administrators.

Apologies if this is a FAQ or has been answered before - I've scanned the thread, but it is pretty big!

Cheers,

Sam.

j4cKiE
Registered User
Posts: 38
Joined: Tue May 22, 2007 2:14 pm
Location: Germany
Contact:

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

Post by j4cKiE »

I think I found two bugs.

1. If the permission "Can permanently delete posts" is set to "No", the user still can permanently delete posts.

2. If I want to delete a post (not the whole topic), the text behind the checkbox is "Permanently delete this topic'". This should be "Permanently delete this post".
Image

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post by IPB_Refugee »

j4cKiE wrote:1. If the permission "Can permanently delete posts" is set to "No", the user still can permanently delete posts.
Hi, this might have been solved here (please read the posts before and after, too):

http://www.phpbb.com/community/viewtopi ... 5#p6722055
j4cKiE wrote:2. If I want to delete a post (not the whole topic), the text behind the checkbox is "Permanently delete this topic'". This should be "Permanently delete this post".
I can confirm this minor bug! Up to now this MOD doesn't linguistically distinguish between topics and posts properly. (At least not in the German translation.) And this is indeed a bit confusing.

Regards
Wolfgang

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

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

Post by primehalo »

IPB_Refugee wrote:
j4cKiE wrote:2. If I want to delete a post (not the whole topic), the text behind the checkbox is "Permanently delete this topic'". This should be "Permanently delete this post".
I can confirm this minor bug! Up to now this MOD doesn't linguistically distinguish between topics and posts properly. (At least not in the German translation.) And this is indeed a bit confusing.

Regards
Wolfgang
I cannot comment on the translations, since English is the only language I understand, but I also cannot confirm this for the English version. When I select a post and there is more than one post in the topic, it says "Permanently delete this post". If I select multiple posts via the MCP it says "Permanently delete these posts". If I delete the only post in the topic, it says "Permanently delete this topic".
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

j4cKiE
Registered User
Posts: 38
Joined: Tue May 22, 2007 2:14 pm
Location: Germany
Contact:

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

Post by j4cKiE »

Translations:
en - de
topic = Thema
topics = Themen
post = Beitrag
posts = Beiträge

Language: de
File: prime_trash_bin_2

// Posts - Deleting
'PRIME_DELETE_POST_REASON' => 'Bitte einen Grund für das Löschen angeben',
'PRIME_DELETE_POST_FOREVER' => 'Beitrag endgültig löschen',
'PRIME_DELETE_POSTS_FOREVER' => 'Beiträge endgültig löschen',
'PRIME_DELETE_POST_FOREVER_DENIED' => 'Du kannst keine Beiträge in diesem Forum endgültig löschen.',
'PRIME_DELETE_POST_MIX_NOTICE' => 'Achtung ! Das hat keine Auswirkung auf Beiträge, die schon als gelöscht angezeigt werden.',

This change will fix it. :)


=============================================
IPB_Refugee wrote:
j4cKiE wrote:1. If the permission "Can permanently delete posts" is set to "No", the user still can permanently delete posts.
Hi, this might have been solved here (please read the posts before and after, too):

http://www.phpbb.com/community/viewtopi ... 5#p6722055
It works on my locale machine (without fixing something).
But it doesn't work in the web! But this is a 1:1 copy of my local version.
Anyone an idea?
Image

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post by IPB_Refugee »

Thank you, j4cKiE!

I sent a PM to Thilak, the translator of this MOD.

Regards
Wolfgang

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [BETA] Prime Recycle Bin (0.1.6) - Delete Threads To a Forum

Post by IPB_Refugee »

primehalo wrote:The function that makes the display message for deleted posts is set_recycled_post_msg() and is found in "includes/prime_recycle_bin.php". So if you want to hide the message for certain users then you'll have to do some editing there. I'd say go to the bottom of the function and add something like this:

Code: Select all

if (!$auth->acl_get('m_') && !$auth->acl_get('a_'))
{
		$recycled_msg = '';
}
That says if the user isn't a moderator and isn't an administrator then blank out the deleted message.
Hi Ken,

your MOD came a long way since Aug 21, 2007. :) Can you give me a hint how to hide the deleted message from regular users in the latest version of your MOD, please?

It is this part in viewtopic.php, right?

Code: Select all

//-- mod: Prime Trash Bin (Posts) -------------------------------------------//
// This is where we make the deletion info available for when the script starts
// looping through each post to set the template variables. If we're viewing
// the post's revision history (another MOD), then don't hide the post's content.
	if (!empty($row['post_deleted_time']) && empty($display_history))
	{
		$rowset[$row['post_id']]['post_deleted_from']   = $row['post_deleted_from'];
		$rowset[$row['post_id']]['post_deleted_user']   = $row['post_deleted_user'];
		$rowset[$row['post_id']]['post_deleted_time']   = $row['post_deleted_time'];
		$rowset[$row['post_id']]['post_deleted_reason'] = censor_text($row['post_deleted_reason']);

		// We don't want to display any info about previous edits.
		$rowset[$row['post_id']]['post_edit_reason'] = '';
		$rowset[$row['post_id']]['post_edit_count']  = 0;
	}
//-- end: Prime Trash Bin (Posts) -------------------------------------------//
Can I simply change e.g.

Code: Select all

$rowset[$row['post_id']]['post_deleted_from']   = $row['post_deleted_from'];
to

Code: Select all

$rowset[$row['post_id']]['post_deleted_from']   = ($auth->acl_get('m_') || $auth->acl_get('a_')) ? $row['post_deleted_from'] : '';
Or is there a more elegant solution?

Regards
Wolfgang

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

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

Post by primehalo »

It's worth a shot.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

samwise
Registered User
Posts: 18
Joined: Sat Aug 02, 2008 1:50 pm

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

Post by samwise »

Wolfgang, I think that's what I'm trying to do (see several posts above). However, your code snippet doesn't work for me. Regular users still see the "This post was deleted by ..." message ... :/

Sam.

j4cKiE
Registered User
Posts: 38
Joined: Tue May 22, 2007 2:14 pm
Location: Germany
Contact:

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

Post by j4cKiE »

I found another bug: Even users see the links "Permanently delete this post" and "Undelete this post".
The first link shows an phpBB error (translated: "You have no access for this area").
The second link only works, if it is the users own post. If it's the post of someone else, you also receive an error (translated: "You can only delete your own posts").


// Edit: This bug seems to be the same as this one. The links are only shown in the online version. It works on my local machine (so the links aren't shown here).

Ironically this is what I want: I need this bug as a feature => Standard users should be able to delete their own posts (as they can in a standard phpBB 3 installation). I hope you find the bug and make it as a optional feature (just like the feature that everyone can see soft deleted posts).
Last edited by j4cKiE on Tue Aug 26, 2008 1:29 am, edited 1 time in total.
Image

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post by IPB_Refugee »

@Sam:

I haven't tried the version I posted because I want to find a better solution. It will not be easy because Ken is a really sophisticated coder. :) When I find a solution I'm satisfied with, I will post it here. Just give me some time.

Regards
Wolfgang

j4cKiE
Registered User
Posts: 38
Joined: Tue May 22, 2007 2:14 pm
Location: Germany
Contact:

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

Post by j4cKiE »

Is it possible that my standard users can't soft delete their own posts?
Only my moderators should be able to soft delete (spam-)posts. The other users should only be able to hard delete their own posts. :)

// Edit: There is a bug which makes this feature available. See 2 posts above for more information.
Last edited by j4cKiE on Tue Aug 26, 2008 1:32 am, edited 1 time in total.
Image

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

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

Post by IPB_Refugee »

Hi,

hard deletion is a moderator's right (not a user's right) in this MOD. Your regular users should only be able to soft delete their posts.

Regards
Wolfgang

samwise
Registered User
Posts: 18
Joined: Sat Aug 02, 2008 1:50 pm

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

Post by samwise »

@IPB_Refugee:

Thanks, Wolfgang. Agreed - Ken's mods are clearly well put together!

I'll continue to monitor the thread in the hope you find something that'll do the trick.

Many thanks,

Sam.

Locked

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