Blogger Importer - Version 0.9.1

Version Description

  • Add support for WordPress 6.1
Download this release

Release Info

Developer githubsync
Plugin Icon 128x128 Blogger Importer
Version 0.9.1
Comparing to
See all releases

Code changes from version 0.9 to 0.9.1

Files changed (3) hide show
  1. blogger-importer-blogitem.php +1 -1
  2. blogger-importer.php +55 -40
  3. readme.txt +20 -17
blogger-importer-blogitem.php CHANGED
@@ -108,7 +108,7 @@ if (!class_exists('WP_SimplePie_Blog_Item'))
108
  }
109
 
110
  //Don't Sanitize the ID, the default get_id was cleaning our IDs and that meant that nested comments did not work
111
- function get_id($hash = false)
112
  {
113
  if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
114
  {
108
  }
109
 
110
  //Don't Sanitize the ID, the default get_id was cleaning our IDs and that meant that nested comments did not work
111
+ function get_id($hash = false, $fn = 'md5')
112
  {
113
  if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
114
  {
blogger-importer.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/blogger-importer/
5
  Description: Import posts, comments, and categories from a Blogger blog and migrate authors to WordPress users.
6
  Author: wordpressdotorg
7
  Author URI: http://wordpress.org/
8
- Version: 0.9
9
  License: GPLv2
10
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  Text Domain: blogger-importer
@@ -21,7 +21,11 @@ define( 'IMPORT_DEBUG', false );
21
  // Load Importer API
22
  require_once ABSPATH . 'wp-admin/includes/import.php';
23
 
24
- require_once ABSPATH . WPINC . '/class-feed.php';
 
 
 
 
25
 
26
  // Custom classes used by importer
27
  require_once dirname( __FILE__ ) . '/blogger-importer-sanitize.php';
@@ -42,19 +46,26 @@ if ( ! class_exists( 'WP_Importer' ) ) {
42
  */
43
  if ( !class_exists( 'Blogger_Importer' ) ) {
44
  class Blogger_Importer extends WP_Importer {
45
- const IMPORT_IMG = true; // Should we import the images (boolean)
46
  const LARGE_IMAGE_SIZE = '1024'; // The size of large images downloaded (string)
47
- const POST_PINGBACK = 0; // Turn off the post pingback, set to 1 to re-enabled(bool)
48
-
49
- var $id; // XML attachment ID
50
-
51
- var $authors = array();
52
-
53
- // mappings from old information to new
54
- var $processed_authors = array();
55
- var $author_mapping = array();
56
-
57
- function Blogger_Importer() { /* nothing */ }
 
 
 
 
 
 
 
58
 
59
  /**
60
  * Registered callback function for the Blogger Importer
@@ -142,11 +153,11 @@ class Blogger_Importer extends WP_Importer {
142
  }
143
 
144
  $this->import_data = $import_data;
145
-
146
  // <link rel='alternate' type='text/html' href='http://example.blogspot.com/'/>
147
  $links = $import_data->get_links('alternate');
148
  $this->host = parse_url($links[0], PHP_URL_HOST);
149
-
150
  $this->images_progress = 0;
151
  $this->images_skipped = 0;
152
  $this->links_done = 0;
@@ -201,7 +212,7 @@ class Blogger_Importer extends WP_Importer {
201
 
202
  $this->id = (int) $file['id'];
203
  $import_data = $file['file'];
204
-
205
  if ( is_wp_error( $import_data ) ) {
206
  echo '<p><strong>' . __( 'Sorry, there has been an error.', 'blogger-importer' ) . '</strong><br />';
207
  echo esc_html( $import_data->get_error_message() ) . '</p>';
@@ -219,9 +230,9 @@ class Blogger_Importer extends WP_Importer {
219
  * @param array $import_data Data returned by a WXR parser
220
  */
221
  function get_authors_from_import( $import_data ) {
222
-
223
  $feed = $this->parse($import_data);
224
-
225
  $authors = $feed->get_authors();
226
 
227
  foreach ($authors as $author) {
@@ -352,7 +363,7 @@ class Blogger_Importer extends WP_Importer {
352
  */
353
  function process_posts() {
354
  $feed = $this->import_data;
355
-
356
  foreach ( $feed->get_items() as $item ) {
357
  // check that it is actually a post first
358
  // <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#post'/>
@@ -364,7 +375,7 @@ class Blogger_Importer extends WP_Importer {
364
  break;
365
  }
366
  }
367
-
368
  // only import posts for now
369
  if ( ! $is_post ) {
370
  continue;
@@ -380,7 +391,7 @@ class Blogger_Importer extends WP_Importer {
380
  $blogentry->title = $item->get_title();
381
  $blogentry->content = $item->get_content();
382
  $blogentry->geotags = $item->get_geotags();
383
-
384
  // map the post author
385
  $blogentry->bloggerauthor = sanitize_user( $item->get_author()->get_name(), true );
386
  if ( isset( $this->author_mapping[$blogentry->bloggerauthor] ) )
@@ -390,7 +401,7 @@ class Blogger_Importer extends WP_Importer {
390
 
391
  $blogentry->links = $item->get_links(array('replies', 'edit', 'self', 'alternate'));
392
  $blogentry->parselinks();
393
-
394
  foreach ( $cats as $cat ) {
395
  if ( false === strpos( $cat, 'http://schemas.google.com') ) {
396
  $blogentry->categories[] = $cat;
@@ -407,7 +418,7 @@ class Blogger_Importer extends WP_Importer {
407
  $post_id = $blogentry->import();
408
  $this->posts_done++;
409
  }
410
- }
411
  }
412
 
413
  /**
@@ -415,7 +426,7 @@ class Blogger_Importer extends WP_Importer {
415
  */
416
  function process_comments() {
417
  $feed = $this->import_data;
418
-
419
  foreach ( $feed->get_items() as $item ) {
420
  // check that it is actually a comment first
421
  // <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#comment'/>
@@ -427,12 +438,12 @@ class Blogger_Importer extends WP_Importer {
427
  break;
428
  }
429
  }
430
-
431
  // we only import comments here
432
  if ( ! $is_comment ) {
433
  continue;
434
  }
435
-
436
  $commententry = new CommentEntry();
437
 
438
  $commententry->id = $item->get_id();
@@ -441,10 +452,10 @@ class Blogger_Importer extends WP_Importer {
441
  $commententry->author = $item->get_author()->get_name();
442
  $commententry->authoruri = $item->get_author()->get_link();
443
  $commententry->authoremail = $item->get_author()->get_email();
444
-
445
  $replyto = $item->get_item_tags('http://purl.org/syndication/thread/1.0','in-reply-to');
446
  $commententry->source = $replyto[0]['attribs']['']['source'];
447
-
448
  $commententry->source = $item->get_source();
449
  $parts = parse_url($commententry->source);
450
  $commententry->old_post_permalink = $parts['path']; //Will be something like this '/feeds/417730729915399755/posts/default/8397846992898424746'
@@ -473,14 +484,14 @@ class Blogger_Importer extends WP_Importer {
473
  } else {
474
  $this->comments_skipped++;
475
  }
476
- }
477
  }
478
 
479
  /*
480
  * Search for either a linked image or a non linked image within the supplied html
481
  * <a href="xxx" yyyy><img src="zzz" ></a> or <img src="zzz" >
482
  * Ref: http://www.the-art-of-web.com/php/parse-links/
483
- * "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"
484
  * http://wordpress.org/extend/plugins/blogger-image-import/
485
  * "<a[^>]+href\=([\"'`])(.*)\\1[^<]*?<img[^>]*src\=([\"'`])(.*)\\3[^>]*>"
486
  */
@@ -511,7 +522,7 @@ class Blogger_Importer extends WP_Importer {
511
  $lowrez[$match[2]] = '';
512
  }
513
  }
514
-
515
  //Remove any rows from this second set that are already in the first set and merge two sets of results
516
  $images = array_merge($lowrez, $highrez);
517
  return $images;
@@ -533,10 +544,10 @@ class Blogger_Importer extends WP_Importer {
533
  $batchsize = 20;
534
 
535
  $loadedposts = get_posts( array(
536
- 'meta_key' => 'blogger_blog',
537
- 'meta_value' => $this->host,
538
- 'posts_per_page' => $batchsize,
539
- 'offset' => $postsprocessed,
540
  'post_status' => array('draft', 'publish', 'future')
541
  ));
542
 
@@ -620,7 +631,7 @@ class Blogger_Importer extends WP_Importer {
620
  or
621
  <img src="mylowrezimage.jpg">
622
 
623
- If the high resolution (linked) file is not an image then the low resolution version is downloaded.
624
  */
625
  $lowrez_old = $lowrez;
626
  $highrez_old = $highrez;
@@ -668,7 +679,7 @@ class Blogger_Importer extends WP_Importer {
668
  if ( empty( $description ) ) {
669
  $description = $new_name;
670
  }
671
-
672
  $att_id = media_handle_sideload($file_array, $post_id, $description);
673
  if (is_wp_error($att_id)) {
674
  @unlink($file_array['tmp_name']);
@@ -737,7 +748,7 @@ class Blogger_Importer extends WP_Importer {
737
  return $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts p INNER JOIN $wpdb->postmeta m ON p.ID = m.post_id AND meta_key = 'blogger_permalink' WHERE post_type = 'attachment' AND meta_value = %s LIMIT 0 , 1",
738
  $lowrez));
739
  }
740
-
741
  function process_links() {
742
  //Update all of the links in the blog
743
  global $wpdb;
@@ -844,7 +855,11 @@ class Blogger_Importer extends WP_Importer {
844
  // Display import page title
845
  function header() {
846
  echo '<div class="wrap">';
847
- screen_icon();
 
 
 
 
848
  echo '<h2>' . __( 'Import Blogger', 'blogger-importer' ) . '</h2>';
849
  }
850
 
5
  Description: Import posts, comments, and categories from a Blogger blog and migrate authors to WordPress users.
6
  Author: wordpressdotorg
7
  Author URI: http://wordpress.org/
8
+ Version: 0.9.1
9
  License: GPLv2
10
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  Text Domain: blogger-importer
21
  // Load Importer API
22
  require_once ABSPATH . 'wp-admin/includes/import.php';
23
 
24
+ if ( version_compare( get_bloginfo('version'), '4.7.0', '>=' ) ) {
25
+ require_once ABSPATH . WPINC . '/class-simplepie.php';
26
+ } else {
27
+ require_once ABSPATH . WPINC . '/class-feed.php';
28
+ }
29
 
30
  // Custom classes used by importer
31
  require_once dirname( __FILE__ ) . '/blogger-importer-sanitize.php';
46
  */
47
  if ( !class_exists( 'Blogger_Importer' ) ) {
48
  class Blogger_Importer extends WP_Importer {
49
+ const IMPORT_IMG = true; // Should we import the images (boolean)
50
  const LARGE_IMAGE_SIZE = '1024'; // The size of large images downloaded (string)
51
+ const POST_PINGBACK = 0; // Turn off the post pingback, set to 1 to re-enabled(bool)
52
+
53
+ private $id = null; // XML attachment ID
54
+ private $author_mapping = array();
55
+ private $authors = array();
56
+ private $comments_done = 0;
57
+ private $comments_skipped = 0;
58
+ private $host = null;
59
+ private $images_done = 0;
60
+ private $images_progress = 0;
61
+ private $images_skipped = 0;
62
+ private $import_data = null;
63
+ private $links_done = 0;
64
+ private $links_progress = 0;
65
+ private $posts_done = 0;
66
+ private $posts_skipped = 0;
67
+ private $processed_authors = array();
68
+ private $version = null;
69
 
70
  /**
71
  * Registered callback function for the Blogger Importer
153
  }
154
 
155
  $this->import_data = $import_data;
156
+
157
  // <link rel='alternate' type='text/html' href='http://example.blogspot.com/'/>
158
  $links = $import_data->get_links('alternate');
159
  $this->host = parse_url($links[0], PHP_URL_HOST);
160
+
161
  $this->images_progress = 0;
162
  $this->images_skipped = 0;
163
  $this->links_done = 0;
212
 
213
  $this->id = (int) $file['id'];
214
  $import_data = $file['file'];
215
+
216
  if ( is_wp_error( $import_data ) ) {
217
  echo '<p><strong>' . __( 'Sorry, there has been an error.', 'blogger-importer' ) . '</strong><br />';
218
  echo esc_html( $import_data->get_error_message() ) . '</p>';
230
  * @param array $import_data Data returned by a WXR parser
231
  */
232
  function get_authors_from_import( $import_data ) {
233
+
234
  $feed = $this->parse($import_data);
235
+
236
  $authors = $feed->get_authors();
237
 
238
  foreach ($authors as $author) {
363
  */
364
  function process_posts() {
365
  $feed = $this->import_data;
366
+
367
  foreach ( $feed->get_items() as $item ) {
368
  // check that it is actually a post first
369
  // <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#post'/>
375
  break;
376
  }
377
  }
378
+
379
  // only import posts for now
380
  if ( ! $is_post ) {
381
  continue;
391
  $blogentry->title = $item->get_title();
392
  $blogentry->content = $item->get_content();
393
  $blogentry->geotags = $item->get_geotags();
394
+
395
  // map the post author
396
  $blogentry->bloggerauthor = sanitize_user( $item->get_author()->get_name(), true );
397
  if ( isset( $this->author_mapping[$blogentry->bloggerauthor] ) )
401
 
402
  $blogentry->links = $item->get_links(array('replies', 'edit', 'self', 'alternate'));
403
  $blogentry->parselinks();
404
+
405
  foreach ( $cats as $cat ) {
406
  if ( false === strpos( $cat, 'http://schemas.google.com') ) {
407
  $blogentry->categories[] = $cat;
418
  $post_id = $blogentry->import();
419
  $this->posts_done++;
420
  }
421
+ }
422
  }
423
 
424
  /**
426
  */
427
  function process_comments() {
428
  $feed = $this->import_data;
429
+
430
  foreach ( $feed->get_items() as $item ) {
431
  // check that it is actually a comment first
432
  // <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/blogger/2008/kind#comment'/>
438
  break;
439
  }
440
  }
441
+
442
  // we only import comments here
443
  if ( ! $is_comment ) {
444
  continue;
445
  }
446
+
447
  $commententry = new CommentEntry();
448
 
449
  $commententry->id = $item->get_id();
452
  $commententry->author = $item->get_author()->get_name();
453
  $commententry->authoruri = $item->get_author()->get_link();
454
  $commententry->authoremail = $item->get_author()->get_email();
455
+
456
  $replyto = $item->get_item_tags('http://purl.org/syndication/thread/1.0','in-reply-to');
457
  $commententry->source = $replyto[0]['attribs']['']['source'];
458
+
459
  $commententry->source = $item->get_source();
460
  $parts = parse_url($commententry->source);
461
  $commententry->old_post_permalink = $parts['path']; //Will be something like this '/feeds/417730729915399755/posts/default/8397846992898424746'
484
  } else {
485
  $this->comments_skipped++;
486
  }
487
+ }
488
  }
489
 
490
  /*
491
  * Search for either a linked image or a non linked image within the supplied html
492
  * <a href="xxx" yyyy><img src="zzz" ></a> or <img src="zzz" >
493
  * Ref: http://www.the-art-of-web.com/php/parse-links/
494
+ * "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"
495
  * http://wordpress.org/extend/plugins/blogger-image-import/
496
  * "<a[^>]+href\=([\"'`])(.*)\\1[^<]*?<img[^>]*src\=([\"'`])(.*)\\3[^>]*>"
497
  */
522
  $lowrez[$match[2]] = '';
523
  }
524
  }
525
+
526
  //Remove any rows from this second set that are already in the first set and merge two sets of results
527
  $images = array_merge($lowrez, $highrez);
528
  return $images;
544
  $batchsize = 20;
545
 
546
  $loadedposts = get_posts( array(
547
+ 'meta_key' => 'blogger_blog',
548
+ 'meta_value' => $this->host,
549
+ 'posts_per_page' => $batchsize,
550
+ 'offset' => $postsprocessed,
551
  'post_status' => array('draft', 'publish', 'future')
552
  ));
553
 
631
  or
632
  <img src="mylowrezimage.jpg">
633
 
634
+ If the high resolution (linked) file is not an image then the low resolution version is downloaded.
635
  */
636
  $lowrez_old = $lowrez;
637
  $highrez_old = $highrez;
679
  if ( empty( $description ) ) {
680
  $description = $new_name;
681
  }
682
+
683
  $att_id = media_handle_sideload($file_array, $post_id, $description);
684
  if (is_wp_error($att_id)) {
685
  @unlink($file_array['tmp_name']);
748
  return $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts p INNER JOIN $wpdb->postmeta m ON p.ID = m.post_id AND meta_key = 'blogger_permalink' WHERE post_type = 'attachment' AND meta_value = %s LIMIT 0 , 1",
749
  $lowrez));
750
  }
751
+
752
  function process_links() {
753
  //Update all of the links in the blog
754
  global $wpdb;
855
  // Display import page title
856
  function header() {
857
  echo '<div class="wrap">';
858
+
859
+ if ( version_compare( get_bloginfo( 'version' ), '3.8.0', '<' ) ) {
860
+ screen_icon();
861
+ }
862
+
863
  echo '<h2>' . __( 'Import Blogger', 'blogger-importer' ) . '</h2>';
864
  }
865
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Blogger Importer ===
2
  Contributors: wordpressdotorg, Otto42, Workshopshed, SergeyBiryukov, rmccue
3
- Donate link:
4
  Tags: importer, blogger
5
  Requires at least: 3.0
6
- Tested up to: 4.3
7
- Stable tag: 0.9
8
  License: GPLv2 or later
9
 
10
  Imports posts, images, comments, and categories (blogger tags) from a Blogger blog then migrates authors to WordPress users.
@@ -34,7 +34,7 @@ The Blogger Importer imports your blog data from a Google Blogger site into a Wo
34
 
35
  = Prerequisites =
36
 
37
- The importer connects your server to the blogger server to copy across the posts. For this to work you need to have connectivity from the server to the internet and also have at least one of the remote access protocols enabled, e.g. curl, streams or fsockopen. You can use the Core Control plugin to test if these are working correctly. The importer connects to Google over a secure connection so OpenSSL needs to be enabled on your server.
38
  The importer uses the SimplePie classes to read and process the data from blogger so you will need the php-xml module installed on your webserver.
39
 
40
  = Preparation =
@@ -62,7 +62,7 @@ Simply upload the XML file again. Already imported posts will be skipped and not
62
 
63
  No, you can remove the plugin once you've completed your migration.
64
 
65
- = How do I know which posts were imported? =
66
 
67
  Each of the posts loaded is tagged with a meta tags indicating where the posts were loaded from. The permalink will be set to the visible URL if the post was published or the internal ID if it was still a draft or scheduled post
68
 
@@ -84,7 +84,7 @@ This version of the importer imports these too, but you can disable this via a s
84
 
85
  = What size are the images? =
86
 
87
- The importer will attempt to download the a large version of the file if one is available. This is controlled by the setting "LARGE_IMAGE_SIZE" and defaults to a width of 1024. The display size of the images is the "medium" size of images as defined on WordPress. You can change this in advance if you want to show a different size.
88
 
89
  = How do I know what images are skipped? =
90
 
@@ -100,7 +100,7 @@ No, WordPress and Blogger handle the permalinks differently. However, it is poss
100
 
101
  = My posts and comments moved across but some things are stripped out =
102
 
103
- The importer uses the SimplePie classes to process the data, these in turn use a Simplepie_Sanitize class to remove potentially malicious code from the source data. If the php-xml module is not installed then this may result in your entire comment text being stripped out and the error "PHP Warning: DOMDocument not found, unable to use sanitizer" to appear in your logs.
104
 
105
  = The comments don't have avatars =
106
 
@@ -112,19 +112,19 @@ The most common reasons for this are lack of memory and timeouts, these should a
112
 
113
  = How do I make the images bigger or smaller? / My images are fuzzy =
114
 
115
- The importer will attempt to download a large version of images but it displays them on the blog at the medium size. If you go into your settings->media options then you can display a different size "medium" image by default. You can't make this bigger than the file that has been downloaded which is where the next setting comes in.
116
 
117
- The default size for the large images is 1024, you can change this to an even larger size by changing the following line in the blogger-import.php file.
118
 
119
  const LARGE_IMAGE_SIZE = '1024';
120
 
121
  The file downloaded won't be bigger than the origional file so if it was only 800x600 to start with then it won't be any bigger than that.
122
 
123
- If your origional blog has hardcoded width and height values that are larger than the medium size settings then that might result in your images becoming fuzzy.
124
 
125
- = I've run out of disk space processing the images =
126
 
127
- The importer is designed to download the high resolution images where they are available. You can either disable the downloading of images or you can change the constant LARGE_IMAGE_SIZE string in the blogger-importer.php file to swap the links with a smaller image.
128
 
129
  == Reference ==
130
 
@@ -134,7 +134,7 @@ The following were referenced for implementing the images and links
134
 
135
  * http://wordpress.org/extend/plugins/remote-images-grabber
136
  * http://notions.okuda.ca/wordpress-plugins/blogger-image-import/
137
- * http://wordpress.org/extend/plugins/cache-images/
138
  * http://wordpress.org/extend/plugins/tumblr-importer/
139
  * http://core.trac.wordpress.org/ticket/14525
140
  * http://wpengineer.com/1735/easier-better-solutions-to-get-pictures-on-your-posts/
@@ -164,6 +164,9 @@ Filter - blogger_importer_congrats - Passes the list of options shown to the use
164
 
165
  == Changelog ==
166
 
 
 
 
167
  = 0.9 =
168
  * Complete rewrite to use XML files instead.
169
 
@@ -176,11 +179,11 @@ Filter - blogger_importer_congrats - Passes the list of options shown to the use
176
  * Simplified functions to reduce messages in the log
177
 
178
  = 0.7 =
179
- * Fixed issue with drafts not being imported in the right state
180
  * Added extra error handling for get_oauth_link to stop blank tokens being sent to the form
181
  * Restructured code to keep similar steps in single function and to allow testing of components to be done
182
  * Re-incorporated the "congrats" function and provided a sensible list of what to do next
183
- * Add a geo_public flag to posts with geotags
184
  * Dropped _normalize_tag after confirming that it's handled by SimplePie
185
  * Added image handling http://core.trac.wordpress.org/ticket/4010
186
  * Added setting author on images
@@ -220,9 +223,9 @@ Filter - blogger_importer_congrats - Passes the list of options shown to the use
220
  * Tested comments from source blog GMT-8, destination London (currently GMT-1), comment dates transferred correctly.
221
  * Fixed typo in oauth_get
222
  * Added screen_icon() to all pages
223
- * Added GeoTags as per spec on http://codex.wordpress.org/Geodata
224
  * Change by Otto42, rmccue to use Simplepie XML processing rather than Atomparser, http://core.trac.wordpress.org/ticket/14525 ref: http://core.trac.wordpress.org/attachment/ticket/7652/7652-blogger.diff
225
- this also fixes http://core.trac.wordpress.org/ticket/15560
226
  * Change by Otto42 to use OAuth rather than AuthSub authentication, should make authentication more reliable
227
  * Fix by Andy from Workshopshed to load comments and nested comments correctly
228
  * Fix by Andy from Workshopshed to correctly pass the blogger start-index and max-results parameters to oAuth functions and to process more than one batch http://core.trac.wordpress.org/ticket/19096
1
  === Blogger Importer ===
2
  Contributors: wordpressdotorg, Otto42, Workshopshed, SergeyBiryukov, rmccue
3
+ Donate link:
4
  Tags: importer, blogger
5
  Requires at least: 3.0
6
+ Tested up to: 6.1
7
+ Stable tag: 0.9.1
8
  License: GPLv2 or later
9
 
10
  Imports posts, images, comments, and categories (blogger tags) from a Blogger blog then migrates authors to WordPress users.
34
 
35
  = Prerequisites =
36
 
37
+ The importer connects your server to the blogger server to copy across the posts. For this to work you need to have connectivity from the server to the internet and also have at least one of the remote access protocols enabled, e.g. curl, streams or fsockopen. You can use the Core Control plugin to test if these are working correctly. The importer connects to Google over a secure connection so OpenSSL needs to be enabled on your server.
38
  The importer uses the SimplePie classes to read and process the data from blogger so you will need the php-xml module installed on your webserver.
39
 
40
  = Preparation =
62
 
63
  No, you can remove the plugin once you've completed your migration.
64
 
65
+ = How do I know which posts were imported? =
66
 
67
  Each of the posts loaded is tagged with a meta tags indicating where the posts were loaded from. The permalink will be set to the visible URL if the post was published or the internal ID if it was still a draft or scheduled post
68
 
84
 
85
  = What size are the images? =
86
 
87
+ The importer will attempt to download the a large version of the file if one is available. This is controlled by the setting "LARGE_IMAGE_SIZE" and defaults to a width of 1024. The display size of the images is the "medium" size of images as defined on WordPress. You can change this in advance if you want to show a different size.
88
 
89
  = How do I know what images are skipped? =
90
 
100
 
101
  = My posts and comments moved across but some things are stripped out =
102
 
103
+ The importer uses the SimplePie classes to process the data, these in turn use a Simplepie_Sanitize class to remove potentially malicious code from the source data. If the php-xml module is not installed then this may result in your entire comment text being stripped out and the error "PHP Warning: DOMDocument not found, unable to use sanitizer" to appear in your logs.
104
 
105
  = The comments don't have avatars =
106
 
112
 
113
  = How do I make the images bigger or smaller? / My images are fuzzy =
114
 
115
+ The importer will attempt to download a large version of images but it displays them on the blog at the medium size. If you go into your settings->media options then you can display a different size "medium" image by default. You can't make this bigger than the file that has been downloaded which is where the next setting comes in.
116
 
117
+ The default size for the large images is 1024, you can change this to an even larger size by changing the following line in the blogger-import.php file.
118
 
119
  const LARGE_IMAGE_SIZE = '1024';
120
 
121
  The file downloaded won't be bigger than the origional file so if it was only 800x600 to start with then it won't be any bigger than that.
122
 
123
+ If your origional blog has hardcoded width and height values that are larger than the medium size settings then that might result in your images becoming fuzzy.
124
 
125
+ = I've run out of disk space processing the images =
126
 
127
+ The importer is designed to download the high resolution images where they are available. You can either disable the downloading of images or you can change the constant LARGE_IMAGE_SIZE string in the blogger-importer.php file to swap the links with a smaller image.
128
 
129
  == Reference ==
130
 
134
 
135
  * http://wordpress.org/extend/plugins/remote-images-grabber
136
  * http://notions.okuda.ca/wordpress-plugins/blogger-image-import/
137
+ * http://wordpress.org/extend/plugins/cache-images/
138
  * http://wordpress.org/extend/plugins/tumblr-importer/
139
  * http://core.trac.wordpress.org/ticket/14525
140
  * http://wpengineer.com/1735/easier-better-solutions-to-get-pictures-on-your-posts/
164
 
165
  == Changelog ==
166
 
167
+ = 0.9.1 =
168
+ * Add support for WordPress 6.1
169
+
170
  = 0.9 =
171
  * Complete rewrite to use XML files instead.
172
 
179
  * Simplified functions to reduce messages in the log
180
 
181
  = 0.7 =
182
+ * Fixed issue with drafts not being imported in the right state
183
  * Added extra error handling for get_oauth_link to stop blank tokens being sent to the form
184
  * Restructured code to keep similar steps in single function and to allow testing of components to be done
185
  * Re-incorporated the "congrats" function and provided a sensible list of what to do next
186
+ * Add a geo_public flag to posts with geotags
187
  * Dropped _normalize_tag after confirming that it's handled by SimplePie
188
  * Added image handling http://core.trac.wordpress.org/ticket/4010
189
  * Added setting author on images
223
  * Tested comments from source blog GMT-8, destination London (currently GMT-1), comment dates transferred correctly.
224
  * Fixed typo in oauth_get
225
  * Added screen_icon() to all pages
226
+ * Added GeoTags as per spec on http://codex.wordpress.org/Geodata
227
  * Change by Otto42, rmccue to use Simplepie XML processing rather than Atomparser, http://core.trac.wordpress.org/ticket/14525 ref: http://core.trac.wordpress.org/attachment/ticket/7652/7652-blogger.diff
228
+ this also fixes http://core.trac.wordpress.org/ticket/15560
229
  * Change by Otto42 to use OAuth rather than AuthSub authentication, should make authentication more reliable
230
  * Fix by Andy from Workshopshed to load comments and nested comments correctly
231
  * Fix by Andy from Workshopshed to correctly pass the blogger start-index and max-results parameters to oAuth functions and to process more than one batch http://core.trac.wordpress.org/ticket/19096