mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 19:03:40 +08:00
1cb45861c5
- Extensive refactoring of the existing importer - Configuration of import with settings.yml instead of editing code - Supports importing from phpBB 3.0.x and 3.1.x - Imports all attachments (not just the ones embedded with [attachment]) from posts and private messages - Imports all existing attachments without the need to configure allowed file extensions or file sizes - Imports polls - Imports bookmarks - Imports sticky topics and (global) announcements as pinned topics - Imports categories in the original order and sets the content of the category description topic - Sets the creation date of category description topics to the creation date of the first topic in each category - Imports additional user attributes: last seen date, registration IP address, website, date of birth, location - Optionally set the user's name to its username - Users that didn't activate their account in phpBB3 are imported as inactive users - All imported, active users are automatically approved - Users that were deactivated in phpBB3 get suspended for 200 years during the import - Anonymous user can be imported as suspended users instead of the system user - Forums of type "link" are not imported as categories anymore - Internal links to posts get rewritten during the import (previously only links to topics got rewritten) - Ordered lists with BBCode [list=a] (which are unsupported in Discourse) get imported as if they would be [list=1] - Importing of avatars, attachments, private messages, polls and bookmarks can be disabled via configuration file - Optional fixing of private messages for forums that have been upgraded from phpBB2 prevents the import of duplicate messages and tries to group related messages into topics - Table prefix (default: phpbb) is configurable - Most of phpBB's default smilies are mapped to Emojis and all other smilies get uploaded and embedded as images. Smiley mappings can be added or overridden in the settings.yml file.
36 lines
852 B
Ruby
36 lines
852 B
Ruby
module ImportScripts::PhpBB3
|
|
class Constants
|
|
ACTIVE_USER = 0
|
|
INACTIVE_REGISTER = 1 # Newly registered account
|
|
INACTIVE_PROFILE = 2 # Profile details changed
|
|
INACTIVE_MANUAL = 3 # Account deactivated by administrator
|
|
INACTIVE_REMIND = 4 # Forced user account reactivation
|
|
|
|
GROUP_ADMINISTRATORS = 'ADMINISTRATORS'
|
|
GROUP_MODERATORS = 'GLOBAL_MODERATORS'
|
|
|
|
# https://wiki.phpbb.com/Table.phpbb_users
|
|
USER_TYPE_NORMAL = 0
|
|
USER_TYPE_INACTIVE = 1
|
|
USER_TYPE_IGNORE = 2
|
|
USER_TYPE_FOUNDER = 3
|
|
|
|
AVATAR_TYPE_UPLOADED = 1
|
|
AVATAR_TYPE_REMOTE = 2
|
|
AVATAR_TYPE_GALLERY = 3
|
|
|
|
FORUM_TYPE_CATEGORY = 0
|
|
FORUM_TYPE_POST = 1
|
|
FORUM_TYPE_LINK = 2
|
|
|
|
TOPIC_UNLOCKED = 0
|
|
TOPIC_LOCKED = 1
|
|
TOPIC_MOVED = 2
|
|
|
|
POST_NORMAL = 0
|
|
POST_STICKY = 1
|
|
POST_ANNOUNCE = 2
|
|
POST_GLOBAL = 3
|
|
end
|
|
end
|