diff --git a/includes/admin/converters/bbPress1.php b/includes/admin/converters/bbPress1.php
index 9c3ecee..85dcef5 100644
|
a
|
b
|
|
| 4 | 4 | * bbPress 1.1 Converter |
| 5 | 5 | * |
| 6 | 6 | * @since bbPress (rxxxx) |
| | 7 | * @link Codex Docs http://codex.bbpress.org/import-forums/bbpress-1-x-buddypress-group-forums |
| 7 | 8 | */ |
| 8 | 9 | class bbPress1 extends BBP_Converter_Base { |
| 9 | 10 | |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 32 | 33 | 'to_fieldname' => '_bbp_forum_id' |
| 33 | 34 | ); |
| 34 | 35 | |
| 35 | | // Forum parent id (If no parent, 0. Stored in postmeta) |
| | 36 | // Forum parent id (If no parent, then 0. Stored in postmeta) |
| 36 | 37 | $this->field_map[] = array( |
| 37 | 38 | 'from_tablename' => 'forums', |
| 38 | 39 | 'from_fieldname' => 'forum_parent', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 56 | 57 | 'to_fieldname' => '_bbp_reply_count' |
| 57 | 58 | ); |
| 58 | 59 | |
| 59 | | // Forum topic count (Stored in postmeta) |
| | 60 | // Forum total topic count (Stored in postmeta) |
| 60 | 61 | $this->field_map[] = array( |
| 61 | 62 | 'from_tablename' => 'forums', |
| 62 | 63 | 'from_fieldname' => 'topics', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 64 | 65 | 'to_fieldname' => '_bbp_total_topic_count' |
| 65 | 66 | ); |
| 66 | 67 | |
| 67 | | // Forum reply count (Stored in postmeta) |
| | 68 | // Forum total reply count (Stored in postmeta) |
| 68 | 69 | $this->field_map[] = array( |
| 69 | 70 | 'from_tablename' => 'forums', |
| 70 | 71 | 'from_fieldname' => 'posts', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 138 | 139 | 'to_fieldname' => '_bbp_topic_id' |
| 139 | 140 | ); |
| 140 | 141 | |
| 141 | | // Reply count (Stored in postmeta) |
| | 142 | // Topic reply count (Stored in postmeta) |
| 142 | 143 | $this->field_map[] = array( |
| 143 | 144 | 'from_tablename' => 'topics', |
| 144 | 145 | 'from_fieldname' => 'topic_posts', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 147 | 148 | 'callback_method' => 'callback_topic_reply_count' |
| 148 | 149 | ); |
| 149 | 150 | |
| 150 | | // Forum id (Stored in postmeta) |
| | 151 | // Topic parent forum id (If no parent, then 0. Stored in postmeta) |
| 151 | 152 | $this->field_map[] = array( |
| 152 | 153 | 'from_tablename' => 'topics', |
| 153 | 154 | 'from_fieldname' => 'forum_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 195 | 196 | 'callback_method' => 'callback_html' |
| 196 | 197 | ); |
| 197 | 198 | |
| 198 | | // Post status (Spam, Trash or Publish) |
| | 199 | // Topic status (Spam, Trash or Publish) |
| 199 | 200 | $this->field_map[] = array( |
| 200 | 201 | 'from_tablename' => 'posts', |
| 201 | 202 | 'from_fieldname' => 'post_status', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 207 | 208 | 'callback_method' => 'callback_status' |
| 208 | 209 | ); |
| 209 | 210 | |
| 210 | | // Author ip. |
| | 211 | // Topic author ip (Stored in postmeta) |
| 211 | 212 | $this->field_map[] = array( |
| 212 | 213 | 'from_tablename' => 'posts', |
| 213 | 214 | 'from_fieldname' => 'poster_ip', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 218 | 219 | 'to_fieldname' => '_bbp_author_ip' |
| 219 | 220 | ); |
| 220 | 221 | |
| 221 | | // Forum id (If no parent, 0) |
| | 222 | // Topic parent forum id (If no parent, then 0) |
| 222 | 223 | $this->field_map[] = array( |
| 223 | 224 | 'from_tablename' => 'topics', |
| 224 | 225 | 'from_fieldname' => 'forum_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 294 | 295 | |
| 295 | 296 | /** Reply Section *****************************************************/ |
| 296 | 297 | |
| 297 | | // Post id. Stores in postmeta. |
| | 298 | // Reply id (Stored in postmeta) |
| 298 | 299 | $this->field_map[] = array( |
| 299 | 300 | 'from_tablename' => 'posts', |
| 300 | 301 | 'from_fieldname' => 'post_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 302 | 303 | 'to_fieldname' => '_bbp_post_id' |
| 303 | 304 | ); |
| 304 | 305 | |
| 305 | | // Topic id (Stores in postmeta) |
| | 306 | // Reply parent topic id (If no parent, then 0. Stored in postmeta) |
| 306 | 307 | $this->field_map[] = array( |
| 307 | 308 | 'from_tablename' => 'posts', |
| 308 | 309 | 'from_fieldname' => 'topic_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 311 | 312 | 'callback_method' => 'callback_topicid' |
| 312 | 313 | ); |
| 313 | 314 | |
| 314 | | // Forum id (Stored in postmeta) |
| | 315 | // Reply parent forum id (If no parent, then 0. Stored in postmeta) |
| 315 | 316 | $this->field_map[] = array( |
| 316 | 317 | 'from_tablename' => 'posts', |
| 317 | 318 | 'from_fieldname' => 'forum_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 320 | 321 | 'callback_method' => 'callback_forumid' |
| 321 | 322 | ); |
| 322 | 323 | |
| 323 | | // Topic title (for reply title). |
| | 324 | // Reply title. |
| | 325 | // Note: We join the topics table because post table does not include topic title. |
| 324 | 326 | $this->field_map[] = array( |
| 325 | 327 | 'from_tablename' => 'topics', |
| 326 | 328 | 'from_fieldname' => 'topic_title', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 332 | 334 | 'callback_method' => 'callback_reply_title' |
| 333 | 335 | ); |
| 334 | 336 | |
| 335 | | // Author ip. |
| | 337 | // Reply author ip (Stored in postmeta) |
| 336 | 338 | $this->field_map[] = array( |
| 337 | 339 | 'from_tablename' => 'posts', |
| 338 | 340 | 'from_fieldname' => 'poster_ip', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 349 | 351 | 'callback_method' => 'callback_userid' |
| 350 | 352 | ); |
| 351 | 353 | |
| 352 | | // Reply status |
| | 354 | // Reply status (Spam, Trash or Publish) |
| 353 | 355 | $this->field_map[] = array( |
| 354 | 356 | 'from_tablename' => 'posts', |
| 355 | 357 | 'from_fieldname' => 'post_status', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 375 | 377 | 'to_fieldname' => 'menu_order' |
| 376 | 378 | ); |
| 377 | 379 | |
| 378 | | // Topic id. If no parent, than 0. |
| | 380 | // Reply parent topic id (If no parent, then 0) |
| 379 | 381 | $this->field_map[] = array( |
| 380 | 382 | 'from_tablename' => 'posts', |
| 381 | 383 | 'from_fieldname' => 'topic_id', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 412 | 414 | |
| 413 | 415 | /** User Section ******************************************************/ |
| 414 | 416 | |
| 415 | | // Store old User id. Stores in usermeta. |
| | 417 | // Store old User id (Stored in usermeta) |
| 416 | 418 | $this->field_map[] = array( |
| 417 | 419 | 'from_tablename' => 'users', |
| 418 | 420 | 'from_fieldname' => 'ID', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 420 | 422 | 'to_fieldname' => '_bbp_user_id' |
| 421 | 423 | ); |
| 422 | 424 | |
| 423 | | // Store old User password. Stores in usermeta. |
| | 425 | // Store old User password (Stored in usermeta) |
| 424 | 426 | $this->field_map[] = array( |
| 425 | 427 | 'from_tablename' => 'users', |
| 426 | 428 | 'from_fieldname' => 'user_pass', |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 521 | 523 | /** |
| 522 | 524 | * Verify the topic reply count. |
| 523 | 525 | * |
| 524 | | * @param int $count bbPress 1.x reply count |
| | 526 | * @param int $count bbPress 1.x topic and reply counts |
| 525 | 527 | * @return string WordPress safe |
| 526 | 528 | */ |
| 527 | 529 | public function callback_topic_reply_count( $count = 1 ) { |
| … |
… |
class bbPress1 extends BBP_Converter_Base { |
| 566 | 568 | */ |
| 567 | 569 | protected function callback_html( $field ) { |
| 568 | 570 | require_once( bbpress()->admin->admin_dir . 'parser.php' ); |
| 569 | | $bbcode = BBCode::getInstance(); |
| | 571 | $bbcode = BBCode::getInstance(); |
| 570 | 572 | $bbcode->enable_smileys = false; |
| 571 | 573 | $bbcode->smiley_regex = false; |
| 572 | 574 | return html_entity_decode( $bbcode->Parse( $field ) ); |