bbp_topic_author_link
Codex Home → bbp_topic_author_link
Description
The 『bbp_topic_author_link』 function is used to display the current topic author』s user role, avatar and username linked to their profile
Where is it used
Templates: content-single-topic-lead.php
How to use it
$args (optional) – Accepts an array of arguments to configure display ( post_id, link_title, type, size, sep, show_role )
Uses bbp_get_topic_author_link()
Sample code example
Displays the linked avatar and username for the current topic author
' ', 'show_role' => true ) ); ?>
Displays the current topic author and user role separated by an HTML element
' ', 'show_role' => true, 'size' => 32 ) ); ?>
Displays the current topic author and user role separated by an HTML element and sets their avatar to a size of 32px wide and 32px tall
' ', 'show_role' => false, 'type' => 'avatar' ) ); ?>
Displays only the current topic author user』s avatar without their display name or user role
' ', 'show_role' => false, 'type' => 'name' ) ); ?>
Displays only the current topic author user』s display name without their avatar or user role
Related
bbp_author_link()
bbp_reply_author_link()
bbp_show_lead_topic()
//filter to add description after forums titles on forum index function rw_singleforum_description() { echo '<div class="bbp-forum-content">'; echo bbp_forum_content(); echo '</div>'; } add_action( 'bbp_template_before_single_forum' , 'rw_singleforum_description');
/** * Redirect back to homepage and not allow access to * WP backend for Subscribers. */ function rkk_redirect_admin(){ if ( ! current_user_can( 'edit_posts' ) ){ wp_redirect( site_url() ); exit; } } add_action( 'admin_init', 'rkk_redirect_admin' );
您可能還想為參與者禁用 WordPress 工具欄。
/** * Disable toolbar on the frontend of your website * for subscribers. */ function rkk_disable_admin_bar() { if( ! current_user_can('edit_posts') ) add_filter('show_admin_bar', '__return_false'); } add_action( 'after_setup_theme', 'rkk_disable_admin_bar' );
SimplePress Codex Home → Getting Started → Importing Data → Import Forums → SimplePress Simple Press v5.x Importer for bbPress FAQ & Known Issues Versions Latest tested version: v5.5.2 – Build 12017 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. 『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
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. Topic Tags are not imported as this is a paid extension of SimplePress File attachments are left as is in the WordPress media library, any posts with attachments the URL』s will have to be manually updated after import.
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 SimplePress 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 Notes Redirecting from your old forum to your new https://bbpress.org/forums/topic/v2-simple-press-importer-and-first-thoughts/page/2/#post-124953 by @shrewdies
<?php /* * * The template for displaying all bbPress pages * * This is the template that displays all bbPress pages by default. * Please note that this is the template of all bbPress pages * and that other 'pages' on your WordPress site will use a * different template. * * @package WordPress * @subpackage Theme */ /* Self explanatory its a functions that gets your header template. */ get_header(); ?> <?php /* Surrounding Classes for the site These are different every theme and help with structure and layout These could be SPANs or DIVs and with entirely different classes. */ ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* This is the start of the page and also the insertion of the post classes. Post classes are very handy to style your forums. */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php /* This is the title wrapped in a header tag and a class to better style the title for your theme */ ?> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> </header> <?php /* This is the content wrapped in a div and class to better style the content */ ?> <div class="entry-content"> <?php the_content(); ?> </div> <!-- .entry-content --> <?php /* End of Page */ ?> </article> <!-- #post --> <?php endwhile; // end of the loop. ?> </div> <!-- #content --> </div> <!-- #primary --> <?php /* This is code to display the sidebar and the footer. Remove the sidebar code to get full-width forums. This would also need CSS to make it actually full width. */ ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
為 bbPress 論壇呈現自定義模板程式碼的另一種方法是在 PHP if 語句中使用條件標記,例如 is_bbpress() 。
這是一個例子。
<?php if ( is_bbpress() ) : ?> <div class="abc"> This content should show if it is bbPress </div> <?php else : ?> <div class="xyz"> This should show if it is not bbPress </div> <?php endif; ?>
phpBB Codex Home → Getting Started → Importing Data → Import Forums → phpBB phpBB v3.x 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.
Topics & Replies
『Announcement』 and 『Global』 stickies are imported as bbPress 『Super Stickies』, standard forum 『stickies』 are imported as bbPress 『Stickies』. Custom phpBB BBCodes are not supported eg. [youtube] – You will have to manually change these yourself either before importing in phpBB or after importing into bbPress using phpMyAdmin. Smilies are rendered as images if contained in 『code』 tags eg. :) 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
phpBB does not support user profile support for 『First Name』 and 『Last Name』 only 『member_name』 and that 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. phpBB 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 『Personal Messages (PM』s) are not supported or imported. User 『Avatars』 are also not supported 『out of the box』 by either WordPress or bbPress, if the users email address is registered with a 『Gravatar this will automatically be used by WordPress and bbPress, otherwise this is plugin territory. (See Note #1 below) phpBB Signatures, Location, Occupation and Interests custom profile fields are also not supported by WordPress or bbPress 『out of the box』. (See Note #2 below)
References https://www.phpbb.com/community/faq.php?mode=bbcode Notes Note #1 – phpBB User Avatars The phpBB avatar filename used in phpBB user avatars is imported and stored in the wp_usermeta table as 『_bbp_phpbb_old_user_avatar_filename』. phpBB stores user avatars in /phpbbv3/images/avatars/upload/ and with some tom foolery I am quite sure these can be imported into WP』s media library and with the right plugin enabled quite easily. Note #2 – phpBB custom user profile fields stored in wp_usermeta. The following custom profile fields are imported into wp_usermeta and as you build your community with WordPress and bbPress, maybe BuddyPress also this should help down the road in converting these values to whatever plugins and profile extensions you decide to use.
ICQ – 『_bbp_phpbb_old_user_icq』 MSN Messenger – 『_bbp_phpbb_old_user_msnm』 Occupation – 『_bbp_phpbb_old_user_occ』 User Insterests – 『_bbp_phpbb_old_user_interest Location 『_bbp_phpbb_old_user_location』 Signature 『_bbp_phpbb_old_user_signature』 (All BBCode is also converted here into HTML)
Introduction
bbPress is a fully-integrated forum plugin for the popular WordPress web software. It provides forum functionality for over a few hundred thousand WordPress sites, and is most popular for powering the WordPress.com and WordPress.org support sections.
Google Summer of Code is a program in which Google sponsors exceptional college students to develop open source code under the guidance of mentoring open source projects. This year, bbPress is hoping to be a mentoring organisation.
If you know you want to propose a GSoC project around bbPress, but aren』t sure what you want to do, check out our Ideas list below. If you have your own idea for a project, include it in your application and describe it thoroughly. You are not limited to ideas from this list.
Timeline
March 18, 19:00 UTC: Mentoring organizations can begin submitting applications to Google.
March 29, 19:00 UTC: Mentoring organization application deadline.
April 1 – 5: Google program administrators review organization applications.
April 8 19:00 UTC: List of accepted mentoring organizations published on the Google Summer of Code 2013 site.
April 9 – 21: Would-be student participants discuss application ideas with mentoring organizations.
April 22, 19:00 UTC: Student application period opens.
May 3, 19:00 UTC: Student application deadline.
Ideas
Quick Edit forums and topics on dashboard
https://bbpress.trac.wordpress.org/ticket/1394
Provide Quick Edit functionality for forums and topics.
Admin Bar Support
https://bbpress.trac.wordpress.org/ticket/1439
Add admin bar UI and improve code for marking a user as Spam.
Akismet admin UI
https://bbpress.trac.wordpress.org/ticket/1616
Finishing up the API for and building the bbPress/Akismet admin UI to display the spam history and Akismet results.
Bulk actions for forums
https://bbpress.trac.wordpress.org/ticket/1723
Provide Bulk Actions for forums, such as marking topics as closed/spam/etc.
Moderator control panels
https://bbpress.trac.wordpress.org/ticket/1721
Create a `/moderate` section for moderators to use without needing to visit the `wp-admin` area.
Direct login and register links to bbpress login or register page templates
https://bbpress.trac.wordpress.org/ticket/1756
Create direct login and register pages, and/or a sidebar Widget, for bbPress users to avoid sending them to `wp-login.php`.
Very long load times when posting replies if topic has many subscribers
https://bbpress.trac.wordpress.org/ticket/2162
Create a mail queue on `wp_cron` to avoid long loads when a new reply is posted to a topic with many subscribers.
Auto refreshing new replies
https://bbpress.trac.wordpress.org/ticket/1907
AJAX all of the things!
User signatures/sigfiles
(No ticket yet.)
Mentors
John James Jacoby, jjj
bbPress Lead Developer. Interested in projects around BuddyPress and bbPress.
Jennifer M. Dodd, jmdodd
bbPress Core Contributor. Interested in improving moderator experience and capabilities and adding popular user-requested functionality.
Daniel Dvorkin, MZAWeb
bbPress Contributor. Interested mostly in performance, AJAXifing all the things and security, but always open to fun challenges.
vBulletin
Codex Home → Getting Started → Importing Data → Import Forums → vBulletin
vBulletin v4.x Importer for bbPress
FAQ & Known Issues
Known Issues: Users must reset their password manually using /wp-login.php?action=lostpassword See #1969 for detailed password information.
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
No file attachments are imported.
Users
vBulletin does not support user profile support for 『First Name』 and 『Last Name』 only 『username』 and that will be the WordPress Username.
vBulletin 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 『Personal Messages (PM』s) are not supported or imported.
User 『Avatars』 are also not supported 『out of the box』 by either WordPress or bbPress, if the users email address is registered with a 『Gravatar this will automatically be used by WordPress and bbPress, otherwise this is plugin territory.
vBulletin MSN, Skype custom profile fields are also not supported by WordPress or bbPress 『out of the box』. (See Note #1 below)
References
http://www.vbulletin.com/forum/misc.php?do=bbcode
http://stackoverflow.com/questions/13920322/vbulletin-to-bbpress-conversion-how-can-i-redirect-the-old-urls-to-the-new-one
Notes
Note #1 – vBulletin custom user profile fields stored in wp_usermeta.
The following custom profile fields are imported into wp_usermeta and as you build your community with WordPress and bbPress, maybe BuddyPress also this should help down the road in converting these values to whatever plugins and profile extensions you decide to use.