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

    r5146 r5170  
    261261            'to_fieldname'    => 'post_parent',
    262262            'callback_method' => 'callback_forumid'
     263        );
     264
     265        // Sticky status (Stored in postmeta))
     266        $this->field_map[] = array(
     267            'from_tablename'  => 'thread',
     268            'from_fieldname'  => 'sticky',
     269            'to_type'         => 'topic',
     270            'to_fieldname'    => '_bbp_old_sticky_status',
     271            'callback_method' => 'callback_sticky_status'
    263272        );
    264273
     
    672681        return $status;
    673682    }
     683
     684    /**
     685     * Translate the topic sticky status type from XenForo numeric's to WordPress's strings.
     686     *
     687     * @param int $status XenForo numeric forum type
     688     * @return string WordPress safe
     689     */
     690    public function callback_sticky_status( $status = 0 ) {
     691        switch ( $status ) {
     692            case 1 :
     693                $status = 'sticky';       // XenForo Sticky 'sticky = 1'
     694                break;
     695
     696            case 0  :
     697            default :
     698                $status = 'normal';       // XenForo Normal Topic 'sticky = 0'
     699                break;
     700        }
     701        return $status;
     702    }
     703
    674704    /**
    675705     * Verify the topic reply count.
Note: See TracChangeset for help on using the changeset viewer.