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/FluxBB.php

    r5139 r5170  
    223223        );
    224224
     225        // Sticky status (Stored in postmeta))
     226        $this->field_map[] = array(
     227            'from_tablename'  => 'topics',
     228            'from_fieldname'  => 'sticky',
     229            'to_type'         => 'topic',
     230            'to_fieldname'    => '_bbp_old_sticky_status',
     231            'callback_method' => 'callback_sticky_status'
     232        );
     233
    225234        // Topic dates.
    226235        $this->field_map[] = array(
     
    595604
    596605    /**
     606     * Translate the topic sticky status type from FluxBB v1.5.3 numeric's to WordPress's strings.
     607     *
     608     * @param int $status FluxBB v1.5.3 numeric forum type
     609     * @return string WordPress safe
     610     */
     611    public function callback_sticky_status( $status = 0 ) {
     612        switch ( $status ) {
     613            case 1 :
     614                $status = 'sticky';       // FluxBB Sticky 'sticky = 1'
     615                break;
     616
     617            case 0  :
     618            default :
     619                $status = 'normal';       // FluxBB Normal Topic 'sticky = 0'
     620                break;
     621        }
     622        return $status;
     623    }
     624
     625    /**
    597626     * Verify the topic/reply count.
    598627     *
Note: See TracChangeset for help on using the changeset viewer.