[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!
Suggested Hosts
Belongtome
Registered User
Posts: 5
Joined: Sun Sep 23, 2007 1:37 am

Re: [BETA] Prime Trash Bin (0.2.1) - Delete Threads To a Forum

Post by Belongtome »

Well I fixed all those. But now I get this when I try to view the topic that I just deleted.
[phpBB Debug] PHP Notice: in file /includes/prime_trash_bin.php on line 439: Missing argument 3 for set_stifled_topic_template_vars()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4209: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4211: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4212: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4213: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
User avatar
CrimsonThunder
Registered User
Posts: 340
Joined: Sun Sep 02, 2007 10:18 am

Re: [BETA] Prime Trash Bin (0.2.1) - Delete Threads To a Forum

Post by CrimsonThunder »

Looks nice. :)

Perhaps in a future update you could make it so users know whos post it was that got deleted? :)
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [BETA] Prime Trash Bin (0.2.1) - Delete Threads To a Forum

Post by primehalo »

Belongtome wrote:Well I fixed all those. But now I get this when I try to view the topic that I just deleted.
[phpBB Debug] PHP Notice: in file /includes/prime_trash_bin.php on line 439: Missing argument 3 for set_stifled_topic_template_vars()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4209: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4211: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4212: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4213: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3720)
Did you try just fixing the first one, not all three of them? Since it was only giving an error on that one function, I thought it might work. But if it did and you did have to change all three, then yeah I know exactly why you're getting that current error. You'll need to search for all occurrences of the functions "set_stifled_topic_template_vars" and "set_stifled_post_template_vars". Any one that doesn't have three arguments, you'll need to add ($blockname = true) as the 3rd argument. So for instance, in viewtopic.php:

Code: Select all

    $template_vars = set_stifled_topic_template_vars($topic_data, $topic_data['topic_title']);  
would become

Code: Select all

    $template_vars = set_stifled_topic_template_vars($topic_data, $topic_data['topic_title'], ($blockname = true));  
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: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [BETA] Prime Trash Bin (0.2.1) - Delete Threads To a Forum

Post by primehalo »

CrimsonThunder wrote:Looks nice. :)

Perhaps in a future update you could make it so users know whos post it was that got deleted? :)
That's already possible to do, it's just not an option in the ACP yet. Open "includes/prime_trash_bin.php" and search for all occurrences of "S_IGNORE_POST", and if its value is true then change it to false.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
Belongtome
Registered User
Posts: 5
Joined: Sun Sep 23, 2007 1:37 am

Re: [BETA] Prime Trash Bin (0.2.1) - Delete Threads To a Forum

Post by Belongtome »

Ok I think everything is working for me now. Thanks for all your help, the idea of this mod is just great and I am going to get good use of it.
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Hi Primehalo,

I was hoping you were able to help me with a couple of errors I am dealing with at the moment with this MOD?

This is the first one I am getting whilst trying to move a topic to another section:

Code: Select all

Fatal error: Cannot redeclare is_recycle_bin() (previously declared in /home/****/public_html/phpbb3/includes/prime_recycle_bin.php:27) in /home/****/public_html/phpbb3/includes/prime_recycle_bin.php on line 29
And there is also one I get occasionally when trying to delete a topic (ie. move to recycle bin) which is related to id's or something - but as I dont have a copy of this error on hand, I will have to supply it next time it happens.

But would really appreciate any help you are able to give me with the above error, I apologise if the solution has already been posted as I did look through this thread but couldn't find anything.

Cheers,

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

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by primehalo »

What version are you using? The prime_recycle_bin is from a version prior to 0.2.0.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Yeah oops sorry about that, I only realised after posting that that an update had been released :oops:

I have just gone through to install the new one and this is the first error I have had come up for search:
Parse error: syntax error, unexpected T_IF in /home/***/public_html/phpbb3/search.php on line 896
895-906 is he following:

Code: Select all

//-- mod: Prime Trash Bin (Posts) -------------------------------------------//
			if (!empty($row['topic_deleted_time']))
			{
				include($phpbb_root_path . 'includes/prime_trash_bin.' . $phpEx);
				set_stifled_topic_template_vars($row, $topic_title, ($blockname = 'searchresults'));
			}
			if (!empty($row['post_deleted_time']))
			{
				include($phpbb_root_path . 'includes/prime_trash_bin.' . $phpEx);
				set_stifled_post_template_vars($row, $row['post_text'], $row['post_subject'], ($blockname = 'searchresults'));
			}
//-- end: Prime Trash Bin (Posts) -------------------------------------------//
Any ideas? Thanks again :D
Last edited by RedTrinity on Mon Sep 24, 2007 6:13 am, edited 1 time in total.
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by primehalo »

RedTrinity wrote:Yeah oops sorry about that, I only realised after posting that that an update had been released :oops:

I have just gone through to install the new one and this is the first error I have had come up for search:
Parse error: syntax error, unexpected T_IF in /home/redtrin/public_html/phpbb3/search.php on line 896
895-906 is he following:

Code: Select all

//-- mod: Prime Trash Bin (Posts) -------------------------------------------//
			if (!empty($row['topic_deleted_time']))
			{
				include($phpbb_root_path . 'includes/prime_trash_bin.' . $phpEx);
				set_stifled_topic_template_vars($row, $topic_title, ($blockname = 'searchresults'));
			}
			if (!empty($row['post_deleted_time']))
			{
				include($phpbb_root_path . 'includes/prime_trash_bin.' . $phpEx);
				set_stifled_post_template_vars($row, $row['post_text'], $row['post_subject'], ($blockname = 'searchresults'));
			}
//-- end: Prime Trash Bin (Posts) -------------------------------------------//
Any ideas? Thanks again :D
That error sounds like there is a missing ending parenthesis or semicolon on the line above. On mine, the line above is this:

Code: Select all

            ));  
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Thanks Primehalo, small error on my part - I put the block of code before the )); instead of after!

Ok so there is no error messages now from what I can see! Now does the delete post function work the same as the previous version (compacting it with the reason for deletion) as I have just deleted a post to test try it out, and it just deleted the post completely on me :S

This is using the normal X delete mode at the top right corner of a post.

Thanks again for your help, its really appreciated :D

Edited to add: I should also add that it didn't ask me to enter a reason for deletion after going to the delete confirmation page.
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by primehalo »

RedTrinity wrote:Thanks Primehalo, small error on my part - I put the block of code before the )); instead of after!

Ok so there is no error messages now from what I can see! Now does the delete post function work the same as the previous version (compacting it with the reason for deletion) as I have just deleted a post to test try it out, and it just deleted the post completely on me :S

This is using the normal X delete mode at the top right corner of a post.

Thanks again for your help, its really appreciated :D

Edited to add: I should also add that it didn't ask me to enter a reason for deletion after going to the delete confirmation page.
It should work the same as the previous version, and deleted posts should look similar. If the confirmation page does not ask you for a reason, then you will be permanently deleting. If it does ask you for a reason, then you will only be marking it as deleted. It's a good indicator so you don't accidentally delete something permanently. Try purging the board's cache to see if that helps.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Ok tried purging the cache but it didn't seem to make a difference. Where else should I check for problems?

Thanks again :D
User avatar
primehalo
Former Team Member
Posts: 2997
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by primehalo »

RedTrinity wrote:Ok tried purging the cache but it didn't seem to make a difference. Where else should I check for problems?

Thanks again :D
Did you go to the ACP and change the setting so it won't permanently delete?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Ahh you know what, I just realised that I haven't set the ACP controls for this :oops:

I am so sorry for my daftness today, its been one of those days with me functioning on not enough hour's sleep!!

I will go and sort that out now and let you know how I go ;) Apologies again for stuffing you around so much.

Nikki.
RedTrinity
Registered User
Posts: 1327
Joined: Sat May 06, 2006 3:32 am

Re: [BETA] Prime Trash Bin (0.2.2) - Delete Threads To a Forum

Post by RedTrinity »

Ok cool, its working now *buries head in sand*

I do have one question though - I just used a test account and noticed that the deleted topic & reason are only viewable by admin. Is it possible to set it so that members can see it as well?

Thanks again and promise not to harrass you any further lol.

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