启用可视化编辑器

启用可视化编辑器

在 bbPress 2.3.1 中,WordPress 的可视化编辑器默认为关闭。要重新打开它,请在插件或主题的 functions.php 文件中尝试以下代码片段:

function bbp_enable_visual_editor( $args = array() ) {
    $args['tinymce'] = true;
    return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

您还可以通过在函数中添加更多参数来自定义可视化编辑器。

使用下面的此功能仅显示可视化编辑器,而根本不显示 html 编辑器。

function bbp_enable_visual_editor( $args = array() ) {
    $args['tinymce'] = true;
    $args['quicktags'] = false;
    return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

如果您使用像 TinyMCE Advanced 这样的插件,您还可以显示其他媒体按钮,如表情按钮以插入表情。

使用下面的这个函数代替添加新的参数,以便能够添加新的媒体,如表情按钮。

function bbp_enable_visual_editor( $args = array() ) {
    $args['tinymce'] = true;
    $args['teeny'] = false;
    return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

请注意,如果您在可视化编辑器中禁用 teeny 模式并通过 TinyMCE Advanced 插件允许其他媒体按钮,您可能需要添加到此功能并将其放入您的子主题 functions.php 文件中,以允许您的用户使用一些按钮,如表格按钮。

在某些情况下,粘贴到可视化编辑器中的文本会带来不需要的样式和 HTML 标记。您可以使用另一个函数来强制清除粘贴的文本。这将删除诸如杂散 HTML 之类的内容,但保留粗体和斜体等基础知识。

function bbp_tinymce_paste_plain_text( $plugins = array() ) {
    $plugins[] = 'paste';
    return $plugins;
}
add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );

 

Mingle

Mingle

Mingle
Codex Home → Getting Started → Importing Data → Import Forums → Mingle
Mingle Forums WordPress Plugin v1.0.33.3 Importer for bbPress
FAQ & Known Issues
Forums

Forum 『Categories』 are not imported from wp_forums_groups you will need to manually create these 『parent forums』 and assign the forums to these after the import and recounts have finished.

Topics & Replies
Sticky topics 『topic status』 are not set during import, manually 『stick』 any topics after import and recounts are complete. (See trac ticket #2126)
Custom BBCodes are not supported eg. [youtube] – You will have to manually change these yourself after importing into bbPress using phpMyAdmin.
Smilies are rendered as images if contained in 『code』 tags eg. :)
You may find extra page breaks
and paragraph

elements in topics and replies and is less than ideal and is from the way the BBCodes are converted during the forum import conversion. You will find these primarily around 『blockquotes』 and 『lists』
If you are using bbPress 『Show Lead Topic』 some of the formatting will be broken, it has been converted correctly and is an issue with the content-single-topic-lead.php template, see trac # (Ticket to follow).
elements seem to be a hit and miss at the moment, they render sometimes and sometimes not depending on the import. (not very helpful I know, still digging around this issue)
are not currently enabled to be embedded inline in bbPress by default with topics and replies, everything was converted correctly and we just need to throw some switches and push some buttons before the next release of bbPress to make it work, watch this space.

Users
If you are going to use the same WordPress install for your import you do not need to import the users as they are already in the WordPress wp_users table. If you are setting up a fresh install of WordPress simple check the 『convert users』 option before you start your import.
Any custom Mingle Moderators or Groups are not converted, any users you wish to make 『moderators』 or 『keymasters』 you will have to assign these roles manually via the main WordPress Admin User panel (/wp-admin/users.php).
User 『Favourites』, 『Subscribed Topics』 or 『Personal Messages (PM』s) are not supported or imported.

References
Importing Mingle Forums into bbPress?

Notes

Drupal

Drupal

Drupal
Codex Home → Getting Started → Importing Data → Import Forums → Drupal
Drupal v7.22 Importer for bbPress
Note: This current implementation is for the Drupal 『Out of the Box』 forums, if you are looking to convert 『Drupal Advanced Forums』 or 『Artesian Forum』 for Drupal create a ticket on Trac and we will see how we go.
FAQ & Known Issues
Forums

Forum 『Categories』 are imported as a 『Forum』 – You must manually configure the forum types for 『category』 forum type after the import and recounts have finished.

Topics & Replies

Sticky topics 『topic status』 are not set during import, manually 『stick』 any topics after import and recounts are complete. (See trac ticket #2126)

Users

User passwords are NOT converted when importing existing Drupal users, during the import you will see the following error which can be ignored though your users will have to reset their passwords manually with WordPress or request a password reset. Please see Trac Ticket #2375 for more details.

Notice: Undefined variable: user_pass in /home/ntwb/public_html/dev.ntwb.co/wp-includes/user.php on line 1297

Any custom Drupal roles are not converted, any users you wish to make 『moderators』 or 『keymasters』 you will have to assign these roles manually via the main WordPress Admin User panel (/wp-admin/users.php).
Users who have been disabled are now imported, if the user content was 「unpublished」 these are now imported to bbPress with status 「pending」 and need to be 「approved」, if the user was disabled and the user content kept, the user topics and replies will be published with the user ID set to Anoyomous, this mimics Drupal』s existing behaviour for handing disabled and deleted users and content.

References
Original Importer and discussion by @vogelsang https://bbpress.org/forums/topic/importing-from-drupal/
Drupal v8 Importer for bbPress
Drupal v8 is now in 『alpha』 and will be supported once the final v8 is released.

Invision

Invision

Invision
Codex Home → Getting Started → Importing Data → Import Forums → Invision
Invision IPB v3.1x, v3.2x, v3.3x & v3.4x Importer for bbPress
FAQ & Known Issues
Forums

Forum visibility such as moderator or admin only forums will be publicly visible after importing and you need to secure these manually.
『Link Forums』 will be imported as a standard forum without any URL redirect link.
『Locked Forums』 will be imported as like a normal open forum, again you can close/lock these via the forums panel in wp-admin and setting the forum attributes status to closed.

Topics & Replies
Announcement and Sticky topics 『topic status』 are not set during import, manually 『stick』 any topics after import and recounts are complete. (See trac ticket #2126)
Custom BBCodes are not supported eg. [youtube] – You will have to manually change these yourself either before importing in Invision/IPB or after importing into bbPress using phpMyAdmin.
BBCodes not converted: [post=』123′]abc[/post] & [topic=』456′]def[/topic]
Smilies are rendered as images if contained in 『code』 tags eg. :)
Smilies NOT converted::huh:, :wacko:, ^_^, :wub:, -_-, <_ < & :ph34r:
No file attachments are imported.
All 『Ordered Lists』

    will be displayed as numerical lists.
    You may find extra page breaks
    and paragraph

    elements in topics and replies and is less than ideal and is from the way the BBCodes are converted during the forum import conversion. You will find these primarily around 『blockquotes』 and 『lists』
    If you are using bbPress 『Show Lead Topic』 some of the formatting will be broken, it has been converted correctly and is an issue with the content-single-topic-lead.php template, see trac # (Ticket to follow).
    elements seem to be a hit and miss at the moment, they render sometimes and sometimes not depending on the import. (not very helpful I know, still digging around this issue)
    are not currently enabled to be embedded inline in bbPress by default with topics and replies, everything was converted correctly and we just need to throw some switches and push some buttons before the next release of bbPress to make it work, watch this space.

    Users
    Invision does not support user profile support for 『First Name』 and 『Last Name』 only 『name』 and 『display_name』 and 『name』 will be the WordPress Username.
    Existing passwords are converted during the import so users can login to WordPress/bbPress as soon as the import and recounts have finished.
    Invision/IPB Moderators, Groups, Ranks are not imported, any users you wish to make 『moderators』 or 『keymasters』 you will have to assign these roles manually via the main WordPress Admin User panel (/wp-admin/users.php).
    User 『Favourites』, 『Subscribed Topics』 or 『Personal Messages (PM』s) are not supported or imported.

    References
    Notes

Kunena (Joomla)

Kunena (Joomla)

Kunena (Joomla)
Codex Home → Getting Started → Importing Data → Import Forums → Kunena (Joomla)
Kunena v3.x Forums for Joomla 2.x Importer for bbPress
Placeholder Text
Notes: If your database table prefix is anything other than jos_ you will have to manually edit the table join in the replies section.
Attachments: @cybnet has written a Kunenta attachments to bbPress attachments import tool. Further details can be found in the forum here.

bbPress 1.x & BuddyPress Group Forums

bbPress 1.x & BuddyPress Group Forums

bbPress 1.x & BuddyPress Group Forums
Codex Home → Getting Started → Importing Data → Import Forums → bbPress 1.x & BuddyPress Group Forums
bbPress 1.x
To import the old bbPress 0.x/1.x standalone forums to bbPress 2.x you must upgrade to bbPress 1.2.
A good starting point on how to this is in the following topic.