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

    r5140 r5170  
    240240        );
    241241
     242        // Sticky status (Stored in postmeta))
     243        $this->field_map[] = array(
     244            'from_tablename'  => 'topics',
     245            'from_fieldname'  => 't_sticky',
     246            'to_type'         => 'topic',
     247            'to_fieldname'    => '_bbp_old_sticky_status',
     248            'callback_method' => 'callback_sticky_status'
     249        );
     250
    242251        // Topic dates.
    243252        // Note: We join the 'posts' table because 'topics' table does not include topic dates.
     
    640649
    641650    /**
     651     * Translate the topic sticky status type from AEF 1.x numeric's to WordPress's strings.
     652     *
     653     * @param int $status AEF 1.x numeric forum type
     654     * @return string WordPress safe
     655     */
     656    public function callback_sticky_status( $status = 0 ) {
     657        switch ( $status ) {
     658            case 1 :
     659                $status = 'sticky';       // AEF Sticky 't_sticky = 1'
     660                break;
     661
     662            case 0  :
     663            default :
     664                $status = 'normal';       // AEF normal topic 't_sticky = 0'
     665                break;
     666        }
     667        return $status;
     668    }
     669
     670    /**
    642671     * Verify the topic/reply count.
    643672     *
Note: See TracChangeset for help on using the changeset viewer.