Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/23/2013 11:19:34 AM (13 years ago)
Author:
netweb
Message:

Include 'sticky' and 'super sticky' import capabilities for the following forum importers:

  • AEF, Drupal7, Example, FluxBB, Invision, Mingle, MyBB, phpBB, PHPFox, PunBB, SimplePress, vBulletin v4.x, vBulletin v3.x, Xenforo and XMB forum importers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/converters/MyBB.php

    r5141 r5170  
    210210                );
    211211
     212                // Sticky status (Stored in postmeta))
     213                $this->field_map[] = array(
     214                        'from_tablename'  => 'threads',
     215                        'from_fieldname'  => 'sticky',
     216                        'to_type'         => 'topic',
     217                        'to_fieldname'    => '_bbp_old_sticky_status',
     218                        'callback_method' => 'callback_sticky_status'
     219                );
     220
    212221                // Topic dates.
    213222                $this->field_map[] = array(
    … …  
    550559
    551560        /**
     561         * Translate the topic sticky status type from MyBB v1.6.10 numeric's to WordPress's strings.
     562         *
     563         * @param int $status MyBB v1.6.10 numeric forum type
     564         * @return string WordPress safe
     565         */
     566        public function callback_sticky_status( $status = 0 ) {
     567                switch ( $status ) {
     568                        case 1 :
     569                                $status = 'sticky';       // MyBB Sticky 'topic_sticky = 1'
     570                                break;
     571
     572                        case 0  :
     573                        default :
     574                                $status = 'normal';       // MyBB Normal Topic 'topic_sticky = 0'
     575                                break;
     576                }
     577                return $status;
     578        }
     579
     580        /**
    552581         * Verify the topic/reply count.
    553582         *
Note: See TracChangeset for help on using the changeset viewer.