mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 20:53:42 +08:00
a71b219c9a
* FEATURE: Import attachments * FEATURE: Add support for importing multiple forums in one * FEATURE: Add support for category and tag mapping * FEATURE: Import groups * FIX: Add spaces around images * FEATURE: Custom mapping of user rank to trust levels * FIX: Do not fail import if it cannot import polls * FIX: Optimize existing records lookup Co-authored-by: Gerhard Schlager <mail@gerhard-schlager.at> Co-authored-by: Jarek Radosz <jradosz@gmail.com>
137 lines
4.8 KiB
YAML
137 lines
4.8 KiB
YAML
# This is an example settings file for the phpBB3 importer.
|
|
|
|
database:
|
|
type: MySQL # currently only MySQL is supported
|
|
host: localhost
|
|
port: 3306
|
|
username: root
|
|
password:
|
|
schema: phpbb
|
|
table_prefix: phpbb_ # Change this, if your forum is using a different prefix. Usually all table names start with phpbb_
|
|
batch_size: 1000 # Don't change this unless you know what you're doing. The default (1000) should work just fine.
|
|
|
|
import:
|
|
# Set this if you import multiple phpBB forums into a single Discourse forum.
|
|
#
|
|
# For example, when importing multiple sites, prefix all imported IDs
|
|
# with 'first' to avoid conflicts. Subsequent import runs must have a
|
|
# different 'site_name'.
|
|
#
|
|
# site_name: first
|
|
#
|
|
site_name:
|
|
|
|
# Create new categories
|
|
#
|
|
# For example, to create a parent category and a subcategory.
|
|
#
|
|
# new_categories:
|
|
# - forum_id: foo
|
|
# name: Foo Category
|
|
# - forum_id: bar
|
|
# name: Bar Category
|
|
# parent_id: foo
|
|
#
|
|
new_categories:
|
|
|
|
# Category mappings
|
|
#
|
|
# For example, topics from phpBB category 1 and 2 will be imported
|
|
# in the new "Foo Category" category, topics from phpBB category 3
|
|
# will be imported in subcategory "Bar category", topics from phpBB
|
|
# category 4 will be merged into category 5 and category 6 will be
|
|
# skipped.
|
|
#
|
|
# category_mappings:
|
|
# 1: foo
|
|
# 2: foo
|
|
# 3: bar
|
|
# 4: 5
|
|
# 6: SKIP
|
|
#
|
|
category_mappings:
|
|
|
|
# Tag mappings
|
|
#
|
|
# For example, imported topics from phpBB category 1 will be tagged
|
|
# with 'first-category', etc.
|
|
#
|
|
# tag_mappings:
|
|
# 1:
|
|
# - first-category
|
|
# 2:
|
|
# - second-category
|
|
# 3:
|
|
# - third-category
|
|
#
|
|
tag_mappings:
|
|
|
|
# Rank to trust level mapping
|
|
#
|
|
# Map phpBB 3.x rank levels to trust level
|
|
# Users with rank at least 3000 will have TL3, etc.
|
|
#
|
|
# rank_mapping:
|
|
# trust_level_1: 200
|
|
# trust_level_2: 1000
|
|
# trust_level_3: 3000
|
|
#
|
|
rank_mapping:
|
|
|
|
# WARNING: Do not activate this option unless you know what you are doing.
|
|
# It will probably break the BBCode to Markdown conversion and slows down your import.
|
|
use_bbcode_to_md: false
|
|
|
|
# This is the path to the root directory of your current phpBB installation (or a copy of it).
|
|
# The importer expects to find the /files and /images directories within the base directory.
|
|
# You need to change this to something like /var/www/phpbb if you are not using the Docker based importer.
|
|
# This is only needed if you want to import avatars, attachments or custom smilies.
|
|
phpbb_base_dir: /shared/import/data
|
|
|
|
site_prefix:
|
|
# this is needed for rewriting internal links in posts
|
|
original: oldsite.example.com/forums # without http(s)://
|
|
new: http://discourse.example.com # with http:// or https://
|
|
|
|
# Enable this, if you want to redirect old forum links to the the new locations.
|
|
permalinks:
|
|
categories: true # redirects /viewforum.php?f=1 to /c/category-name
|
|
topics: true # redirects /viewtopic.php?f=6&t=43 to /t/topic-name/81
|
|
posts: false # redirects /viewtopic.php?p=2455#p2455 to /t/topic-name/81/4
|
|
# Append a prefix to each type of link, e.g. 'forum' to redirect /forum/viewtopic.php?f=6&t=43 to /t/topic-name/81
|
|
# Leave it empty if your forum wasn't installed in a subfolder.
|
|
prefix:
|
|
|
|
avatars:
|
|
uploaded: true # import uploaded avatars
|
|
gallery: true # import the predefined avatars phpBB offers
|
|
remote: false # WARNING: This can considerably slow down your import. It will try to download remote avatars.
|
|
|
|
# When true: Anonymous users are imported as suspended users. They can't login and have no email address.
|
|
# When false: The system user will be used for all anonymous users.
|
|
anonymous_users: true
|
|
|
|
# Enable this, if you want import password hashes in order to use the "migratepassword" plugin.
|
|
# This will allow users to login with their current password.
|
|
# The plugin is available at: https://github.com/discoursehosting/discourse-migratepassword
|
|
passwords: false
|
|
|
|
# By default all the following things get imported. You can disable them by setting them to false.
|
|
bookmarks: true
|
|
attachments: true
|
|
private_messages: true
|
|
polls: true
|
|
|
|
# When true: each imported user will have the original username from phpBB as its name
|
|
# When false: the name of each imported user will be blank unless the username was changed during import
|
|
username_as_name: false
|
|
|
|
# Map Emojis to smilies used in phpBB. Most of the default smilies already have a mapping, but you can override
|
|
# the mappings here, if you don't like some of them.
|
|
# The mapping syntax is: emoji_name: 'smiley_in_phpbb'
|
|
# Or map multiple smilies to one Emoji: emoji_name: ['smiley1', 'smiley2']
|
|
emojis:
|
|
# here are two example mappings...
|
|
smiley: [':D', ':-D', ':grin:']
|
|
heart: ':love:'
|