Ticket #2464 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Greymatter import support missing

Reported by: bungeman Assigned to: anonymous
Priority: normal Milestone: 2.1
Component: Administration Version: 2.0.1
Severity: normal Keywords: greymatter, import, bg|has-patch
Cc:

Description

So I went and installed Wordpress 2.0.1 and greymatter.php is 0kb. While this is a very zen solution, most people don't appreciate the wonder of this.

Attachments

greymatter.php (11.3 kB) - added by bungeman on 02/16/06 20:36:21.
greymatter import for 2.0.1. It worked for me.
2464.diff (17.0 kB) - added by szepter on 02/16/06 22:08:38.
greymatter.php as unified diff against the current revision
greymatter.diff (12.1 kB) - added by bungeman on 02/16/06 23:57:49.
this file should be used instead of the other two, it has about 3 lines difference, mostly adding 'published' status instead of 'draft'.
greymatter.2.php (11.5 kB) - added by bungeman on 02/16/06 23:59:46.
I'm putting this (final) version here so people can just use it if they wish.
greymatter.2.diff (9.6 kB) - added by bungeman on 02/17/06 19:02:31.
full (and hopefully last) diff for greymatter importing
greymatter.3.php (9.1 kB) - added by bungeman on 02/17/06 19:05:29.
newest version of the file, interface cleaned up, all DB stuff removed, all of ryan's sugestions incorporated
greymatter.3.diff (9.6 kB) - added by bungeman on 02/17/06 20:30:08.
really, last time, replaced addslashes with $wpdb->escape
greymatter.4.php (9.1 kB) - added by bungeman on 02/17/06 20:31:02.
same as above, just easier to download, if needed
greymatter.4.diff (10.2 kB) - added by bungeman on 02/17/06 21:02:12.
ok, I swear its the last time, this one doesn't duplicate entries if you import again. There, I'm going outside now.
greymatter.5.php (9.7 kB) - added by bungeman on 02/17/06 21:02:36.
you know the drill

Change History

02/16/06 20:36:21 changed by bungeman

  • attachment greymatter.php added.

greymatter import for 2.0.1. It worked for me.

02/16/06 20:41:21 changed by bungeman

  • keywords changed from greymatter, import to greymatter, import, bg|has-patch.

02/16/06 22:08:38 changed by szepter

  • attachment 2464.diff added.

greymatter.php as unified diff against the current revision

02/16/06 23:57:49 changed by bungeman

  • attachment greymatter.diff added.

this file should be used instead of the other two, it has about 3 lines difference, mostly adding 'published' status instead of 'draft'.

02/16/06 23:59:46 changed by bungeman

  • attachment greymatter.2.php added.

I'm putting this (final) version here so people can just use it if they wish.

02/17/06 00:06:44 changed by bungeman

This may end up on another ticket, but since this is using wp_insert_post it sends the 'publish_post' signal which by default runs generic_ping, and if the ping hangs you get a random error message involving class-IXR and the import just up and dies. Signal handlers like generic_ping need to keep in mind that they can bring down a lot more than just themselves.

02/17/06 00:47:01 changed by ryan

  • milestone set to 2.1.

Avoiding the generic_ping() during import is will be fixed in 2.1. Importers should be using wp_insert_post().

A few things need to change though:

Use username_exists() instead of doing a SELECT on user_login.

Remove the call to upgrade_all(). It is not necessary.

Remove the SELECT * on $wpdb->posts. It doesn't look like it is really needed.

Never use mysql_query. Use $wpdb for all database operations.

Thanks.

02/17/06 17:33:51 changed by bungeman

Cool beans. I know the thing needs a lot of work, I just took bits of the old import-greymatter.php and threw it into the outline of the new mt.php with enough modifications to make it work. I've never seen Wordpress before two days ago, so I'm still finding my way about a bit.

02/17/06 19:02:31 changed by bungeman

  • attachment greymatter.2.diff added.

full (and hopefully last) diff for greymatter importing

02/17/06 19:05:29 changed by bungeman

  • attachment greymatter.3.php added.

newest version of the file, interface cleaned up, all DB stuff removed, all of ryan's sugestions incorporated

02/17/06 20:30:08 changed by bungeman

  • attachment greymatter.3.diff added.

really, last time, replaced addslashes with $wpdb->escape

02/17/06 20:31:02 changed by bungeman

  • attachment greymatter.4.php added.

same as above, just easier to download, if needed

02/17/06 21:02:12 changed by bungeman

  • attachment greymatter.4.diff added.

ok, I swear its the last time, this one doesn't duplicate entries if you import again. There, I'm going outside now.

02/17/06 21:02:36 changed by bungeman

  • attachment greymatter.5.php added.

you know the drill

02/18/06 00:06:25 changed by ryan

Looks good. It needs some i18n work, but we can take care of that separately.

02/18/06 00:06:35 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [3546]) greymatter importer from bungeman. fixes #2464