Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/23/2013 11:19:34 AM (12 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/Mingle.php

    r5160 r5170  
    163163        );
    164164
     165        // Sticky status (Stored in postmeta))
     166        $this->field_map[] = array(
     167            'from_tablename'  => 'forum_threads',
     168            'from_fieldname'  => 'status',
     169            'to_type'         => 'topic',
     170            'to_fieldname'    => '_bbp_old_sticky_status',
     171            'callback_method' => 'callback_sticky_status'
     172        );
     173
    165174        // Topic dates.
    166175        $this->field_map[] = array(
     
    436445            default :
    437446                $status = 'publish';
     447                break;
     448        }
     449        return $status;
     450    }
     451
     452    /**
     453     * Translate the topic sticky status type from Mingle numeric's to WordPress's strings.
     454     *
     455     * @param int $status Mingle numeric forum type
     456     * @return string WordPress safe
     457     */
     458    public function callback_sticky_status( $status = 0 ) {
     459        switch ( $status ) {
     460            case 'sticky' :
     461                $status = 'sticky';       // Mingle Sticky 'status = sticky'
     462                break;
     463
     464            case 'open'  :
     465            default :
     466                $status = 'normal';       // Mingle Normal Topic 'status = open'
    438467                break;
    439468        }
Note: See TracChangeset for help on using the changeset viewer.