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 -------------------------------------------------//
Code: Select all
=> array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
I just installed RC5 and I didn't notice any incompatibilities.cyb0rg wrote:will this be updated for RC5?
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()
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, '')
Oups my bad but both go together anywayprimehalo 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: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.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, '')
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.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: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.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, '')
And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
Thanks for the correction. It's been a while since I worked with SQL. So I should probably change the SQL instructions from this:iyeru42 wrote:The "INSERT INTO" statement doesn't overwrite anything, "UPDATE TABLE" does. "INSERT INTO" creates a new row.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: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.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, '')
And this is for the Prime Moved Topic Info MOD, not the Prime Recycle Bin MOD.
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, '')
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)
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....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?
Thanks, that'd be great!SkyKnight wrote:If you need russian translation just let me know