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

    r5138 r5170  
    191191        );
    192192
     193        // Sticky status (Stored in postmeta))
     194        $this->field_map[] = array(
     195            'from_tablename'  => 'forum_index',
     196            'from_fieldname'  => 'sticky',
     197            'to_type'         => 'topic',
     198            'to_fieldname'    => '_bbp_old_sticky_status',
     199            'callback_method' => 'callback_sticky_status'
     200        );
     201
    193202        // Topic dates.
    194203        $this->field_map[] = array(
     
    550559
    551560    /**
     561     * Translate the topic sticky status type from Drupal v7.x numeric's to WordPress's strings.
     562     *
     563     * @param int $status Drupal v7.x 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'; // Drupal Sticky 'topic_sticky = 1'
     570                break;
     571
     572            case 0  :
     573            default :
     574                $status = 'normal'; // Drupal Normal 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.