diff --git a/packages/mybb.php b/packages/mybb.php index af1b5a57..0ad2e720 100644 --- a/packages/mybb.php +++ b/packages/mybb.php @@ -18,6 +18,7 @@ 'Passwords' => 1, 'Avatars' => 1, 'Bookmarks' => 1, + 'Attachments' => 1, ); class MyBB extends ExportController { @@ -128,6 +129,28 @@ public function forumExport($ex) { 'BBCode' as Format from :_posts p", $comment_Map); + // Media + $media_Map = array( + 'aid' => 'MediaID', + 'pid' => 'ForeignID', + 'uid' => 'InsertUserId', + 'filesize' => 'Size', + 'filename' => 'Name', + 'height' => 'ImageHeight', + 'width' => 'ImageWidth', + 'filetype' => 'Type', + 'thumb_width' => array('Column' => 'ThumbWidth', 'Filter' => array($this, 'filterThumbnailData')), + ); + $ex->exportTable('Media', " + select a.*, + 600 as thumb_width, + concat('attachments/', a.thumbnail) as ThumbPath, + concat('attachments/', a.attachname) as Path, + 'Comment' as ForeignTable + from :_attachments a + where a.pid > 0 + ", $media_Map); + // UserDiscussion. $userDiscussion_Map = array( 'tid' => 'DiscussionID',