[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
User avatar
LTcolor
Registered User
Posts: 52
Joined: Fri Aug 24, 2007 7:39 am

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

Post by LTcolor »

can this be used on phpbb3

"NEVER MIND THIS POST" I noticed it was under the phpbb3
User avatar
LTcolor
Registered User
Posts: 52
Joined: Fri Aug 24, 2007 7:39 am

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

Post by LTcolor »

mods works just fine, and one thing I had to switch the code on the

acp_board.php on about line: 70 - 72
It came up with an error going into the board settings so I moved the:

Code: Select all

//-- mod: Prime Recycle Bin -------------------------------------------------//
						'recycle_bin_forum'		=> array('lang' => 'PRIME_RECYCLE_BIN',		'validate' => 'string',	'type' => 'select', 'function' => 'make_recycle_bin_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => true),
//-- end: Prime Recycle Bin -------------------------------------------------//
Down a bit, right after :

Code: Select all

=> array('lang' => 'OVERRIDE_STYLE',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

That's where the instructions said to put it:
Image
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
cyb0rg
Registered User
Posts: 177
Joined: Thu Aug 02, 2007 12:03 am

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

Post by cyb0rg »

will this be updated for RC5?
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

cyb0rg wrote:will this be updated for RC5?
I just installed RC5 and I didn't notice any incompatibilities.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
cyb0rg
Registered User
Posts: 177
Joined: Thu Aug 02, 2007 12:03 am

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

Post by cyb0rg »

ok sweet,

i need to update the mod anyway cus im using an older version
User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

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

Post by playerfr »

Updated my RC4 to RC5 and here is an error I get when i try to post a new message :

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Field 'topic_moved_from' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (2, 1188334271, 19, 0, 1, 'test', 'S h A m I', 'DCCC00', 0, 0, 0)

BACKTRACE

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

FILE: includes/functions_posting.php
LINE: 1803
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1028
CALL: submit_post()
If I changed the attribute to Null then it pass adn then i get same error on :

Field 'topic_moved_user' doesn't have a default value [1364]

If I attrbute null to this it goes on next field error and it continue till end. So to fix I haev put Null on field in phpmyadmin. But I dont know if it is good solution so if you can tell what has changed in RC5 that it cause such problem :(

Same porblem goes on country flag mod of stargateportal so I think RC5 has changed a big code and it is causing error when there is no default value for a Field in a Mod.

Thanks for your help :)
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

Ah, I never specified the SQL statement that would fill in those fields with default values. Here is the SQL that will provide the default values:

Code: Select all

INSERT INTO phpbb_topics(topic_moved_from, topic_moved_user, topic_moved_time, topic_moved_last_post_id, topic_moved_reason) VALUES (0, 0, 0, 0, '')
Unfortunately if you already have values stored then they will be overwritten. Sorry about that. There's probably some way to specify only adding the value if one does not exist, but I'm not aware of how to do that off the top of my head.

And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

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

Post by playerfr »

primehalo wrote:Ah, I never specified the SQL statement that would fill in those fields with default values. Here is the SQL that will provide the default values:

Code: Select all

INSERT INTO phpbb_topics(topic_moved_from, topic_moved_user, topic_moved_time, topic_moved_last_post_id, topic_moved_reason) VALUES (0, 0, 0, 0, '')
Unfortunately if you already have values stored then they will be overwritten. Sorry about that. There's probably some way to specify only adding the value if one does not exist, but I'm not aware of how to do that off the top of my head.

And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
Oups my bad :oops: but both go together anyway :P

Do I have to change back attributes to No null ? or i can leave them Null ? doese this change any thing ?

Thanks :)
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

You might be able to leave them as NULL, I'm not really sure if it will affect anything. I wouldn't expect it to, but since I haven't tested it I can't say for sure.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
LRdM
Registered User
Posts: 10
Joined: Tue Apr 08, 2003 7:26 am

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

Post by LRdM »

Great work again on another useful mod! I skimmed the thread and didn't see this mentioned but I noticed that the topic and post count as well as the last post information for a forum does not update when I first delete a post to the recycling bin. For example, if I go and delete the last post in a forum, the forum still shows that post as being the last post.

I also noticed that the mod does not cover posts which are deleted when a user is deleted. If I delete a user and select the option to delete their posts as well, their posts are immediately and permanently deleted from the recycling bin. Would it be possible to add a feature to cover this?
User avatar
iyeru42
Registered User
Posts: 1120
Joined: Wed Feb 01, 2006 7:22 pm
Location: Madison, WI

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

Post by iyeru42 »

primehalo wrote:Ah, I never specified the SQL statement that would fill in those fields with default values. Here is the SQL that will provide the default values:

Code: Select all

INSERT INTO phpbb_topics(topic_moved_from, topic_moved_user, topic_moved_time, topic_moved_last_post_id, topic_moved_reason) VALUES (0, 0, 0, 0, '')
Unfortunately if you already have values stored then they will be overwritten. Sorry about that. There's probably some way to specify only adding the value if one does not exist, but I'm not aware of how to do that off the top of my head.

And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
The "INSERT INTO" statement doesn't overwrite anything, "UPDATE TABLE" does. "INSERT INTO" creates a new row.
My Website | My MOD Requests | Foreign Key Docs (some topics are not requests)
"It's easy to rebel, but it's hard to be recognized."
User avatar
SkyKnight
Registered User
Posts: 30
Joined: Wed Jun 06, 2007 7:22 pm
Location: Langen, Germany

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

Post by SkyKnight »

If you need russian translation just let me know :)
User avatar
primehalo
Former Team Member
Posts: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

iyeru42 wrote:
primehalo wrote:Ah, I never specified the SQL statement that would fill in those fields with default values. Here is the SQL that will provide the default values:

Code: Select all

INSERT INTO phpbb_topics(topic_moved_from, topic_moved_user, topic_moved_time, topic_moved_last_post_id, topic_moved_reason) VALUES (0, 0, 0, 0, '')
Unfortunately if you already have values stored then they will be overwritten. Sorry about that. There's probably some way to specify only adding the value if one does not exist, but I'm not aware of how to do that off the top of my head.

And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
The "INSERT INTO" statement doesn't overwrite anything, "UPDATE TABLE" does. "INSERT INTO" creates a new row.
Thanks for the correction. It's been a while since I worked with SQL. So I should probably change the SQL instructions from this:

Code: Select all

ALTER TABLE phpbb_topics ADD (`topic_moved_from` mediumint(8) UNSIGNED NOT NULL, `topic_moved_user` mediumint(8) UNSIGNED NOT NULL, `topic_moved_time` int(11) UNSIGNED NOT NULL, `topic_moved_last_post_id` mediumint(8) UNSIGNED NOT NULL, `topic_moved_reason` blob NOT NULL)

INSERT INTO phpbb_topics(topic_moved_from, topic_moved_user, topic_moved_time, topic_moved_last_post_id, topic_moved_reason) VALUES (0, 0, 0, 0, '')
To this:

Code: Select all

ALTER TABLE phpbb_topics ADD (`topic_moved_from` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, `topic_moved_user` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, `topic_moved_time` int(11) UNSIGNED DEFAULT '0' NOT NULL, `topic_moved_last_post_id` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, `topic_moved_reason` blob  DEFAULT '' NOT NULL)
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: 2992
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA

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

Post by primehalo »

LRdM wrote:Great work again on another useful mod! I skimmed the thread and didn't see this mentioned but I noticed that the topic and post count as well as the last post information for a forum does not update when I first delete a post to the recycling bin. For example, if I go and delete the last post in a forum, the forum still shows that post as being the last post.

I also noticed that the mod does not cover posts which are deleted when a user is deleted. If I delete a user and select the option to delete their posts as well, their posts are immediately and permanently deleted from the recycling bin. Would it be possible to add a feature to cover this?
Man, this MOD really turned out to be a pain in the ass. It was really simple when it was just moving a topic to a specific forum....

Okay, for your first request, I had looked into it but came to feel that it really wasn't a good idea to adjust the first_post/last_post because those variables are used a lot and it could really screw up some other stuff.

For your second request, sure, I suppose I could alter the admin panel to do the faux deleting as well. Though that poses another question....

I'm adding an option to the delete confirmation screen that will allow you to permanently delete the topic/post. For the admin panel, when an admin chooses to delete a user's posts or delete a user and not keep their posts, should they then automatically have permission to have the ability to permanently delete the user's posts, even if they don't have permission to delete from the recycle bin?
SkyKnight wrote:If you need russian translation just let me know :)
Thanks, that'd be great!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

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