[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
azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Well I have not set permissons for global moderators for recycle bin at all, only for me, the admin. Are you sure there is not something wrong in the code? Have you tried this on your own boards and it works?

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

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

Post by primehalo »

playerfr wrote:
azzurri wrote:But my moderators cant see the recycle bin, yet they can permanently delete posts. I just tried it myself.
Not able to see or not able to delete is to different things, are they allowed to not delete post in that recycle bin ? check that ;)
Yep, you're right. I just took the permission-to-delete code from inside viewtopic.php:

Code: Select all

$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
But apparently that's not good enough as a moderator will still have permission to delete even in forums they do not have access to. So I now I'm doing this kind of check:

Code: Select all

$auth->acl_get('f_delete', $forum_id) && $auth->acl_get('m_delete', $forum_id)
It seems to work, but I'm not sure if it's better to do it that way or to check for 'f_list' or 'f_read' instead of 'f_delete'. The whole permissions setup in phpBB3 is a bit confusing.

Version 0.1.5 is now available and I tested it out with a normal user, a global moderator, and a founder. Hopefully everything will work like it should now. Update instructions are located in the "contrib" directory.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

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

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

Post by primehalo »

izstas wrote:Hello!
I would like to have possibility to switch off function of "incomplete" removal of posts. It is possible? :)

P.S. Use translator :)

Original Russian text:

Здравствуйте! Мне бы хотелось иметь возможность выключать функцию "неполного" удаления сообщений. Можно? :)
I will do my best to understand. If somebody understand Russian and English, please help.

To always delete posts forever: (Перевод Google: Всегда удалять посты навсегда)
Open "includes/prime_recycle_bin.php"
Find:

Code: Select all

	function recycle_post($post_id, $user_id)
	{
Add After:

Code: Select all

return(false);
To always delete topics forever: (Перевод Google: Всегда удалять темы навсегда)
Go to "Administration Control Panel", then "Board Settings", and for "Recycle Bin Forum:" option select "Don't use a recycle bin".
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Hmm, I ran the update, but my moderator could still delete a post permanently.

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

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

Post by primehalo »

azzurri wrote:Hmm, I ran the update, but my moderator could still delete a post permanently.
Does your moderator have any special permissions, are they just a standard Global Moderator? Did you make sure to do both parts of the update, copy the new include file and alter that one line in "posting.php"?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Like you said, the permission system in phpbb3 is confusing, but as far as I know this user only has the global moderator rights. I just put a regular user in the global moderator group.

Yes I did do the one line update and uploaded the file to includes folder which replaced the old file.

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Do I have to add rights for global moderators to recycle bin forum first and then take away their rights to delete posts from that forum or what? I was thinking the code automaticaly would deny the moderator from deleting posts from the bin since they cant even see the bin.

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

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

Post by DJ Skitzo »

Hi,

I have installed this mod and everything seems to work fine apart from 2 things.

I cannot delete threads from the moderator control panel, I just get a white page, I'm pretty sure its trying to process an error but my server is configured not to display errors and I cannot change this. Secondly, if im in viewtopic and try to delete the thread using the quick mod drop down menu I get an error sayin quick mod cannot process this but it lets me delete individual posts

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

DJ Skitzo wrote:Hi,

I have installed this mod and everything seems to work fine apart from 2 things.

I cannot delete threads from the moderator control panel, I just get a white page, I'm pretty sure its trying to process an error but my server is configured not to display errors and I cannot change this. Secondly, if im in viewtopic and try to delete the thread using the quick mod drop down menu I get an error sayin quick mod cannot process this but it lets me delete individual posts
I have non of these problems so Im guessing it must be your server or something.

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

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

Post by primehalo »

azzurri wrote:Like you said, the permission system in phpbb3 is confusing, but as far as I know this user only has the global moderator rights. I just put a regular user in the global moderator group.

Yes I did do the one line update and uploaded the file to includes folder which replaced the old file.
Okay, try this and see if it works. Open "includes/prime_recycle_bin.php" and find the line that contains

Code: Select all

$permission = (($auth->acl_get('f_delete', get_recycle_bin())
On a new blank line after that, add

Code: Select all

$permission = $permission && $auth->acl_gets('f_read', 'f_list', get_recycle_bin());
That should make their permission false if they don't have permission to view the recycle bin forum.
DJ Skitzo wrote:Hi,

I have installed this mod and everything seems to work fine apart from 2 things.

I cannot delete threads from the moderator control panel, I just get a white page, I'm pretty sure its trying to process an error but my server is configured not to display errors and I cannot change this. Secondly, if im in viewtopic and try to delete the thread using the quick mod drop down menu I get an error sayin quick mod cannot process this but it lets me delete individual posts
Damn... well, I'll look into it.
Last edited by primehalo on Sun Aug 19, 2007 10:28 pm, edited 1 time in total.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

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

Post by DJ Skitzo »

Thanks :D

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

primehalo I got:

Code: Select all

Parse error: syntax error, unexpected T_VARIABLE in /home/web27612/domains/mysite.com/public_html/forum/includes/prime_recycle_bin.php on line 102

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

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

Post by primehalo »

azzurri wrote:primehalo I got:

Code: Select all

Parse error: syntax error, unexpected T_VARIABLE in /home/web27612/domains/mysite.com/public_html/forum/includes/prime_recycle_bin.php on line 102
Sorry, there should be a semi-colon at the end of that line I told you to add.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Hmm, primehalo I got this error:

Code: Select all

Parse error: syntax error, unexpected T_VARIABLE in /home/web27612/domains/mysite.com/public_html/forum/includes/prime_recycle_bin.php on line 102

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

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

Post by azzurri »

Wait it seems to work. Maybe I misunderstood you. I added the code like this, is it okay?

$permission = (($auth->acl_get('f_delete', get_recycle_bin())
&& $auth->acl_get('m_delete', get_recycle_bin())) || $auth->acl_get('a_', $forum_id)) ? true : false; $permission = $permission && $auth->acl_gets('f_read', 'f_list', get_recycle_bin());
break;

It seems to work now.

Locked

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