Search Results for '+.+default+.+'
-
AuthorSearch Results
-
October 20, 2020 at 2:35 am #215301
In reply to: bbPress crashes the theme WPLMS
Robin W
Moderatoryou need to confirm that it is JUST wplms and bbpress
follow this
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
October 19, 2020 at 12:59 pm #215295In reply to: Email notifications – nothing working
Robin W
Moderator1. You should be aware that many spam filters strip messages that do not come from the correct address. So if your site is mysite.com and your email address in wordpress settings>general is fred@gmail.com then it is likely that messages will be dumped in transit. You need to set up email to come from your site eg fred@mysite.com, your hosting provider can help if needed.
2. Just bbpress?
Then you need to see if this is wordpress wide or just bbpress.
Try https://wordpress.org/plugins/check-email/it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
and of courseBy default, you do NOT receive emails for your own topics/replies, only if somebody else replies on your subscribed topics
so testing would need two email accounts to prove !
October 19, 2020 at 7:01 am #215285In reply to: TinyMCE editor without html tags
albertoe
Participantyes I see.
And how is possible Visual Editor mantein this format
but if you change to HTML editor, is OK?
How can I do to restore de default format of visual editor?
October 19, 2020 at 6:55 am #215283In reply to: TinyMCE editor without html tags
Robin W
Moderatorif you decativate and delete the plugin and then re-install, then forums, topics etc. will be kept, but css will revert to default
October 16, 2020 at 3:28 am #215241In reply to: full width and remove sidebar
albertoe
ParticipantThanks Robin, I check that a bbpress.php was created with this code:
<?php get_header(); ?> <div class="td-main-content-wrap td-main-page-wrap td-container-wrap"> <div class="td-container"> <div class="td-pb-row"> <div class="td-pb-span8 td-main-content"> <div class="td-ss-main-content"> <?php if (have_posts()) { while ( have_posts() ) : the_post(); ?> <h1 class="entry-title td-page-title"> <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title_attribute() ?>"><?php the_title() ?></a> </h1> <?php the_content(); endwhile; //end loop } ?> </div> </div> <div class="td-pb-span4 td-main-sidebar"> <div class="td-ss-main-sidebar"> <?php dynamic_sidebar( 'td-default' ) ?> </div> </div> </div> <!-- /.td-pb-row --> </div> <!-- /.td-container --> </div> <?php get_footer(); ?>
And I change with for this code:
<?php get_header(); ?> <div class="td-main-content-wrap td-main-page-wrap td-container-wrap"> <div class="td-container"> <div class="td-pb-row"> <div class="td-pb-span8 td-main-content"> <div class="td-ss-main-content"> <?php if (have_posts()) { while ( have_posts() ) : the_post(); ?> <h1 class="entry-title td-page-title"> <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title_attribute() ?>"><?php the_title() ?></a> </h1> <?php the_content(); endwhile; //end loop } ?> </div> </div> </div> <!-- /.td-pb-row --> </div> <!-- /.td-container --> </div> <?php get_footer(); ?>
I refresh cache but nothing happends. Any idea?
October 15, 2020 at 3:24 am #215211In reply to: 404 error issue
Robin W
Moderatorit could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
October 14, 2020 at 7:35 am #215197In reply to: Enable Mention Auto Suggest
wjh
Participant- WordPress 5.4.2
- bbpress 2.6.5
- Buddypress 6.3.0 w/ Activities module activated
- bbp Style pack w/ both form editors (TinyMCE + text) activated
- bbp Mentions suggest
The bbp Mentions suggest plugin by the venerable @robin-w still works and enables autocomplete mentions in TinyMCE as well as in the Text (HTML) tab of the editor … but only on initial page load, since bbpress 2.6.2.
Since bbpress 2.6.2, when clicking on Reply to a specific comment on a subject thread, the dynamic reply form now appears under the comment in question, and the window scrolls to it. Which is a very nice improvement! However, this breaks Robin’s plugin for the TinyMCE editor (mentions do still autocomplete in the Text editor, at least).
I’m not a developer but I’m guessing it has to do with the new version of /bbpress/templates/default/js/reply.js, specifically the
addEditor
function at the end of the file.
@robin-w any ideas how to get your plugin to play nice with the dynamic reply form in bbpress ≥2.6.2?Or anyone else out there?
Cheers in advance!
October 12, 2020 at 7:23 am #215159In reply to: Parent forum disappears
Robin W
ModeratorIn the right sidebar of the Forum Edit page, under Forum Attributes, I select a parent forum from the list. After pressing Update, the field switches back to -No parent-.
I cannot replicate this – forum parents are saved and can be switched back and forth.
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
October 8, 2020 at 6:23 am #215060In reply to: how to remove(hide) bbPress login form
Robin W
Moderatorwow, could be many of these or combination of them or your theme
The best I can suggest is
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
October 6, 2020 at 6:15 am #215016In reply to: how to remove(hide) bbPress login form
Robin W
Moderatorand read https://bbpress.org/forums/topic/how-to-remove-default-bbpress-login/
that should work, it might be that another plugin is overriding this.
what other bbpress related plugins do you have ?
October 6, 2020 at 4:44 am #215013Topic: how to remove(hide) bbPress login form
in forum Troubleshootingpurityboy83
ParticipantHi
I use to bbPress
If not logged in, will see a login form below(under) the forum.
link is this image
https://t1.daumcdn.net/cfile/tistory/993047455F7C2CA713and i use to another login/register plugin, want to member login use only for other login form
link is this image(other login form)
https://t1.daumcdn.net/cfile/tistory/99BCA94C5F7C2CB711I want remove(or hide) to bbPress default login form
and read https://bbpress.org/forums/topic/how-to-remove-default-bbpress-login/
and i tried to your guide , but the login form did not disappear.
(all cache flush and browser cache all purged)Best Regards,
HyunhoSeptember 30, 2020 at 12:50 pm #214876Robin W
ModeratorI suspect that it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
September 29, 2020 at 5:46 pm #214840Topic: Breadcrumbs are buggy
in forum InstallationVidyut
ParticipantThe breadcrumbs don’t appear to respect the actual homepage settings for the blog. If there is a homepage selected, but the setting is actually to show latest posts, the breadcrumbs most frustratingly and seemingly inexplicably show the title of the page selected as homepage instead of latest posts – even if the actual homepage is set to latest posts.
To reproduce, select some page to be homepage. Save. Switch to latest posts (default) for homepage without clearing the selector. The breadcrumbs continue to show the title of the selected inactive setting for page instead of the actual site title, or home or something sane even though the url points to the homepage.
September 29, 2020 at 1:28 pm #214834In reply to: Forum directory display problem
Robin W
Moderatorit could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
September 29, 2020 at 7:15 am #214818In reply to: how to increase to topic writing form size(height)
purityboy83
ParticipantHi
Thank you for support
code insert follow your’s guide
but does not change….
cache(opcache ,wp cache etc..) purge and purge all browser connection info
and reconnect , recheck but text area(write area) height size is samemy sub theme function code is
////////
add_filter (‘bbp_get_title_max_length’,’change_title’) ;Function change_title ($default) {
$default=120 ;
Return $default ;
}add_filter (‘bbp_before_get_the_content_parse_args’ , ‘rew_rows’) ;
function rew_rows ($args) {
$args[‘textarea_rows’] = 20 ;
return $args ;
}/////////////
change_title <== is Has been applied, subject size increase to 120
but rew_rows function does not applycurrent my bbq topic form image
https://t1.daumcdn.net/cfile/tistory/99B813465F7315C530Thanks
Best Regards,
HyunhoSeptember 27, 2020 at 9:13 am #214770In reply to: Documented import from snitz access database
stefyonweb
ParticipantHi again, it seems I managed to import the database, but I get a weird error message in front end: [Incorrect DATETIME value: ‘0’]
SELECT p.ID FROM wp_posts AS p WHERE p.post_date > ‘0’ AND p.post_type = ‘forum’ AND ( p.post_status = ‘publish’ OR p.post_status = ‘private’ OR p.post_status = ‘hidden’ ) ORDER BY p.post_date ASC LIMIT 1Apparently import was ok. Here’s the code.
<?php /** * bbPress Example Converter * * @package bbPress * @subpackage Converters */ /** * Example converter base impoprter template for bbPress * * @since 2.3.0 bbPress (r4689) * * @link Codex Docs https://codex.bbpress.org/import-forums/custom-import */ class snitz extends BBP_Converter_Base { /** * Main Constructor */ public function __construct() { parent::__construct(); } /** * Sets up the field mappings */ public function setup_globals() { /** Forum Section *****************************************************/ // Setup table joins for the forum section at the base of this section // Old forum id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'forum', 'to_fieldname' => '_bbp_old_forum_id' ); // Forum parent id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'CAT_ID', 'to_type' => 'forum', 'to_fieldname' => '_bbp_old_forum_parent_id' ); // Forum topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_TOPICS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_topic_count' ); // Forum reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_reply_count' ); // Forum total topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_TOPICS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_topic_count' ); // Forum total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_reply_count' ); // Forum title. $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_SUBJECT', 'to_type' => 'forum', 'to_fieldname' => 'post_title' ); // Forum slug (Clean name to avoid confilcts) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_SUBJECT', 'to_type' => 'forum', 'to_fieldname' => 'post_name', 'callback_method' => 'callback_slug' ); // Forum description. $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_DESCRIPTION', 'to_type' => 'forum', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_null' ); // Forum display order (Starts from 1) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'FORUM_ORDER', 'to_type' => 'forum', 'to_fieldname' => 'menu_order' ); // Forum type (Category = 0 or Forum = 1, Stored in postmeta) $this->field_map[] = array( // 'from_tablename' => 'FORUM_FORUM', // 'from_fieldname' => 'the_forum_type', 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_type', // 'callback_method' => 'callback_forum_type' 'default' => 'forum' ); // Forum status (Unlocked = 0 or Locked = 1, Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_STATUS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_status', 'callback_method' => 'callback_forum_status' ); // Forum dates. $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt', 'default' => date('Y-m-d H:i:s') ); // Setup the table joins for the forum section /* $this->field_map[] = array( 'from_tablename' => 'groups_table', 'from_fieldname' => 'forum_id', 'join_tablename' => 'forums_table', 'join_type' => 'INNER', 'join_expression' => 'USING groups_table.forum_id = forums_table.forum_id',*/ // 'from_expression' => 'WHERE forums_table.forum_id != 1', /* 'to_type' => 'forum' );*/ /** Forum Subscriptions Section ***************************************/ // Subscribed forum ID (Stored in usermeta) /* $this->field_map[] = array( 'from_tablename' => 'forum_subscriptions_table', 'from_fieldname' => 'the_forum_id', 'to_type' => 'forum_subscriptions', 'to_fieldname' => '_bbp_forum_subscriptions' );*/ // Subscribed user ID (Stored in usermeta) /* $this->field_map[] = array( 'from_tablename' => 'forum_subscriptions_table', 'from_fieldname' => 'the_user_id', 'to_type' => 'forum_subscriptions', 'to_fieldname' => 'user_id', 'callback_method' => 'callback_userid' );*/ /** Topic Section *****************************************************/ // Setup table joins for the topic section at the base of this section // Old topic id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_topic_id' ); // Topic reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_total_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_forumid' ); // Topic author. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_AUTHOR', 'to_type' => 'topic', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Topic author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_IP', 'to_type' => 'topic', 'to_fieldname' => '_bbp_author_ip' ); // Topic content. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_MESSAGE', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Topic title. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_SUBJECT', 'to_type' => 'topic', 'to_fieldname' => 'post_title' ); // Topic slug (Clean name to avoid conflicts) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_SUBJECT', 'to_type' => 'topic', 'to_fieldname' => 'post_name', 'callback_method' => 'callback_slug' ); // Topic status (Open or Closed) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_STATUS', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_closed_status_id', 'callback_method' => 'callback_topic_status' ); // Topic parent forum id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'topic', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_forumid' ); // Sticky status (Stored in postmeta) /* $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_STICKY', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_sticky_status_id', 'callback_method' => 'callback_sticky_status' );*/ $this->field_map[] = array( // 'from_tablename' => 'FORUM_FORUM', // 'from_fieldname' => 'the_forum_type', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_sticky_status_id', // 'callback_method' => 'callback_forum_type' 'default' => 'normal' ); // Topic dates. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST', 'to_type' => 'topic', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST', 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST', 'to_type' => 'topic', 'to_fieldname' => '_bbp_last_active_time', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_MESSAGE', 'join_tablename' => 'thread', 'join_type' => 'INNER', 'join_expression' => 'USING (threadid) WHERE post.parentid = 0', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Setup any table joins needed for the topic section /* $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'join_tablename' => 'FORUM_TOPICS', 'join_type' => 'INNER', 'join_expression' => 'USING FORUM_REPLY.TOPIC_ID = FORUM_TOPICS.TOPIC_ID', 'from_expression' => 'WHERE FORUM_FORUM.TOPIC_ID = 0', 'to_type' => 'topic' );*/ /** Tags Section ******************************************************/ /** Topic Subscriptions Section ***************************************/ /** Favorites Section *************************************************/ // Favorited topic ID (Stored in usermeta) /** Reply Section *****************************************************/ // Setup table joins for the reply section at the base of this section // Old reply id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'REPLY_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_old_reply_id' ); // Reply parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_forumid' ); // Reply parent topic id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 'callback_method' => 'callback_topicid' ); // Reply author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_IP', 'to_type' => 'reply', 'to_fieldname' => '_bbp_author_ip' ); // Reply author. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_AUTHOR', 'to_type' => 'reply', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Reply title and reply slugs // Note: We don't actually want either a reply title or a reply slug as // we want single replies to use their ID as the permalink. // Reply content. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_MESSAGE', 'to_type' => 'reply', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); /* Snizt doesnt use reply order // Reply order. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'the_reply_order', 'to_type' => 'reply', 'to_fieldname' => 'menu_order' ); */ // Reply parent topic id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_topicid' ); // Reply dates. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', 'callback_method' => 'callback_datetime' ); // Setup any table joins needed for the reply section /* $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'TOPIC_ID', 'join_tablename' => 'FORUM_REPLY', 'join_type' => 'INNER', 'join_expression' => 'USING FORUM_TOPICS.TOPIC_ID = FORUM_REPLY.TOPIC_ID', 'from_expression' => 'WHERE FORUM_TOPICS.first_post != 0', 'to_type' => 'reply' );*/ /** User Section ******************************************************/ // Setup table joins for the user section at the base of this section // Store old user id (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'MEMBER_ID', 'to_type' => 'user', 'to_fieldname' => '_bbp_old_user_id' ); // Store old user password (Stored in usermeta serialized with salt) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_PASSWORD', 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 'callback_method' => 'callback_savepass' ); // Store old user salt (This is only used for the SELECT row info for the above password save) /* $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_password_salt', 'to_type' => 'user', 'to_fieldname' => '' );*/ // User password verify class (Stored in usermeta for verifying password) /*$this->field_map[] = array( 'to_type' => 'user', 'to_fieldname' => '_bbp_class', 'default' => 'Example' );*/ // User name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'user_login' ); // User nice name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'user_nicename' ); // User email. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_EMAIL', 'to_type' => 'user', 'to_fieldname' => 'user_email' ); // User homepage. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_HOMEPAGE', 'to_type' => 'user', 'to_fieldname' => 'user_url' ); /* Snitz doesn't use user registered // User registered. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_registration_date', 'to_type' => 'user', 'to_fieldname' => 'user_registered', 'callback_method' => 'callback_datetime' ); */ /* Snitz doesn't use user status // User status. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_status', 'to_type' => 'user', 'to_fieldname' => 'user_status' ); */ // User display name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'display_name' ); // User Profile Field 1 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_AIM', 'to_type' => 'user', 'to_fieldname' => 'aim' ); // User Profile Field 2 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_YAHOO', 'to_type' => 'user', 'to_fieldname' => 'yim' ); // User Profile Field 3 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_SIG', 'to_type' => 'user', 'to_fieldname' => '_bbp_snitz_user_sig' ); // Setup any table joins needed for the user section /* $this->field_map[] = array( 'from_tablename' => 'users_profile_table', 'from_fieldname' => 'the_users_id', 'join_tablename' => 'FORUM_MEMBERS', 'join_type' => 'INNER', 'join_expression' => 'USING users_profile_table.MEMBER_ID = FORUM_MEMBERS.MEMBER_ID', 'from_expression' => 'WHERE FORUM_MEMBERS.MEMBER_ID != -1', 'to_type' => 'user' );*/ } /** * This method allows us to indicates what is or is not converted for each * converter. */ public function info() { return ''; } /** * This method is to save the salt and password together. That * way when we authenticate it we can get it out of the database * as one value. Array values are auto sanitized by WordPress. */ public function callback_savepass( $field, $row ) { $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); return $pass_array; } /** * This method is to take the pass out of the database and compare * to a pass the user has typed in. */ public function authenticate_pass( $password, $serialized_pass ) { $pass_array = unserialize( $serialized_pass ); return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) ); } /** * Translate the forum status from Snitz v3.x numeric's to WordPress's strings. * * @param int $status Snitz v3.x numeric forum status * @return string WordPress safe */ public function callback_forum_status( $status = 1 ) { switch ( $status ) { case 0 : $status = 'closed'; // Snitz forum status closed 'F_STATUS = 0' break; case 1 : default : $status = 'open'; // Snitz forum status open 'F_STATUS = 1' break; } return $status; } /** * Translate the topic status from Snitz v3.x numeric's to WordPress's strings. * * @param int $status Snitz v3.x numeric topic status * @return string WordPress safe */ public function callback_topic_status( $status = 1 ) { switch ( $status ) { case 0 : $status = 'closed'; // Snitz topic status closed 'T_STATUS = 0' break; case 1 : default : $status = 'publish'; // Snitz topic status open 'T_STATUS = 1' break; } return $status; } /** * Translate the topic sticky status type from Snitz 3.x numeric's to WordPress's strings. * * @param int $status Snitz 3.x numeric forum type * @return string WordPress safe */ public function callback_sticky_status( $status = 0 ) { switch ( $status ) { case 1 : $status = 'sticky'; // Snitz Sticky 'T_STICKY = 1' break; case 0 : default : $status = 'normal'; // Snitz normal topic 'T_STICKY = 0' break; } return $status; } }
September 24, 2020 at 10:08 am #214713In reply to: Topics sub-lists in Forum list
sailorneil
ParticipantI remembered where I saw indented sub-lists – it was section 4 of part 2 of the step by step guide. It says there that indented sub-lists are the default but when I created the test child forum mentioned above it appeared left-justified not indented. I think indented looks better. Why shouldn’t the default be working for me?
September 23, 2020 at 12:01 pm #214694Topic: Topics sub-lists in Forum list
in forum Troubleshootingsailorneil
ParticipantI’m new to bbPress. I installed version 2.6.5 two days ago and have now created a basic forum, following the instructions in Part 1 of the Step-by-Step guide, to which I have added two topics. I read that the default view on the main Forum page should include an indented sub-list of topics but mine doesn’t. How do I make the sub-list of topics appear?
Wordpress 5.5.1 and the TwentySeventeen theme. http://www.sunbeamclass.org.ukSeptember 18, 2020 at 9:31 pm #214592Topic: Error Time zone
in forum TroubleshootingAnonymous User 17274932
InactiveMy country’s time zone is UTC+8
When I set the time zone UTC+8 for WordPress, the time of posting the topic and replying is correct.
But my registration time will default to 8 hours before 1 minute… and so on
If I set the WordPress time zone to UTC+0, the registration time is normal, but the theme posting and reply time will increase by 8 hours.September 8, 2020 at 1:35 pm #214400In reply to: Error editing Forum Profile
Robin W
Moderatorjust registered and tried it – not bbpress as such, I can only suggest it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
September 5, 2020 at 11:49 pm #214292Topic: Changing overall Template
in forum Installationricks03
ParticipantMy current theme (Responsive) comes with several templates.
By default, bbPress appears to be using the (unsurprisingly) “Default” template, and I just want to change bbPress to use the “Full Width” template. I don’t see a setting for that. Possible?
Can I create a page with a shortcode or something?
September 3, 2020 at 12:20 pm #214223In reply to: How to get Tiny MCE to show for my bbpress forums?
Robin W
Moderatorhmm. cannot access this area without registering, and sorry don’t have time for that.
suggest it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
September 3, 2020 at 6:56 am #214216In reply to: How to change the time format?
Mark Smith
Participantfrom where you want to change the time format. please specify clearly if you want to change on your computer, follow this instruction
Microsoft Outlook uses the country/region settings for your computer to determine how the times appear.
For example, in Calendar in the month view, if you are using the default settings for the United States, Outlook displays a 12-hour clock. After 12:59 P.M., the time is displayed as 1 P.M. Other countries/regions use a 24-hour clock.
You can change how the clock appears in your display. However, changing this display is an option provided by the operating system, not Outlook.
September 3, 2020 at 2:59 am #214209In reply to: Unwanted Menu Items
Robin W
Moderatorit could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
September 2, 2020 at 11:59 am #214187In reply to: Documented import from snitz access database
stefyonweb
ParticipantThank you Robin, here’s the code:
<?php /** * bbPress Example Converter * * @package bbPress * @subpackage Converters */ /** * Example converter base impoprter template for bbPress * * @since 2.3.0 bbPress (r4689) * * @link Codex Docs https://codex.bbpress.org/import-forums/custom-import */ class snitz extends BBP_Converter_Base { /** * Main Constructor */ public function __construct() { parent::__construct(); } /** * Sets up the field mappings */ public function setup_globals() { /** Forum Section *****************************************************/ // Setup table joins for the forum section at the base of this section // Old forum id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'forum', 'to_fieldname' => '_bbp_old_forum_id' ); // Forum parent id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'CAT_ID', 'to_type' => 'forum', 'to_fieldname' => '_bbp_old_forum_parent_id' ); // Forum topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_TOPICS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_topic_count' ); // Forum reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_reply_count' ); // Forum total topic count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_TOPICS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_topic_count' ); // Forum total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_COUNT', 'to_type' => 'forum', 'to_fieldname' => '_bbp_total_reply_count' ); // Forum title. $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_SUBJECT', 'to_type' => 'forum', 'to_fieldname' => 'post_title' ); // Forum slug (Clean name to avoid confilcts) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_SUBJECT', 'to_type' => 'forum', 'to_fieldname' => 'post_name', 'callback_method' => 'callback_slug' ); // Forum description. $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_DESCRIPTION', 'to_type' => 'forum', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_null' ); // Forum display order (Starts from 1) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_ORDER', 'to_type' => 'forum', 'to_fieldname' => 'menu_order' ); // Forum type (Category = 0 or Forum = 1, Stored in postmeta) $this->field_map[] = array( // 'from_tablename' => 'FORUM_FORUM', // 'from_fieldname' => 'the_forum_type', 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_type', // 'callback_method' => 'callback_forum_type' 'default' => 'forum' ); // Forum status (Unlocked = 0 or Locked = 1, Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_FORUM', 'from_fieldname' => 'F_STATUS', 'to_type' => 'forum', 'to_fieldname' => '_bbp_status', 'callback_method' => 'callback_forum_status' ); // Forum dates. $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_date_gmt', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified', 'default' => date('Y-m-d H:i:s') ); $this->field_map[] = array( 'to_type' => 'forum', 'to_fieldname' => 'post_modified_gmt', 'default' => date('Y-m-d H:i:s') ); // Setup the table joins for the forum section /* $this->field_map[] = array( 'from_tablename' => 'groups_table', 'from_fieldname' => 'forum_id', 'join_tablename' => 'forums_table', 'join_type' => 'INNER', 'join_expression' => 'USING groups_table.forum_id = forums_table.forum_id',*/ // 'from_expression' => 'WHERE forums_table.forum_id != 1', /* 'to_type' => 'forum' );*/ /** Forum Subscriptions Section ***************************************/ // Subscribed forum ID (Stored in usermeta) /* $this->field_map[] = array( 'from_tablename' => 'forum_subscriptions_table', 'from_fieldname' => 'the_forum_id', 'to_type' => 'forum_subscriptions', 'to_fieldname' => '_bbp_forum_subscriptions' );*/ // Subscribed user ID (Stored in usermeta) /* $this->field_map[] = array( 'from_tablename' => 'forum_subscriptions_table', 'from_fieldname' => 'the_user_id', 'to_type' => 'forum_subscriptions', 'to_fieldname' => 'user_id', 'callback_method' => 'callback_userid' );*/ /** Topic Section *****************************************************/ // Setup table joins for the topic section at the base of this section // Old topic id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_topic_id' ); // Topic reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic total reply count (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_REPLIES', 'to_type' => 'topic', 'to_fieldname' => '_bbp_total_reply_count', 'callback_method' => 'callback_topic_reply_count' ); // Topic parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_forumid' ); // Topic author. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_AUTHOR', 'to_type' => 'topic', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Topic author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_IP', 'to_type' => 'topic', 'to_fieldname' => '_bbp_author_ip' ); // Topic content. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_MESSAGE', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Topic title. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_SUBJECT', 'to_type' => 'topic', 'to_fieldname' => 'post_title' ); // Topic slug (Clean name to avoid conflicts) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_SUBJECT', 'to_type' => 'topic', 'to_fieldname' => 'post_name', 'callback_method' => 'callback_slug' ); // Topic status (Open or Closed) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_STATUS', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_closed_status_id', 'callback_method' => 'callback_topic_status' ); // Topic parent forum id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'topic', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_forumid' ); // Sticky status (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_STICKY', 'to_type' => 'topic', 'to_fieldname' => '_bbp_old_sticky_status_id', 'callback_method' => 'callback_sticky_status' ); // Topic dates. $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST_DATE', 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_LAST_POST', 'to_type' => 'topic', 'to_fieldname' => '_bbp_last_active_time', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'T_MESSAGE', 'join_tablename' => 'thread', 'join_type' => 'INNER', 'join_expression' => 'USING (threadid) WHERE post.parentid = 0', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); // Setup any table joins needed for the topic section $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'join_tablename' => 'FORUM_TOPICS', 'join_type' => 'INNER', 'join_expression' => 'USING FORUM_REPLY.TOPIC_ID = FORUM_TOPICS.TOPIC_ID', 'from_expression' => 'WHERE FORUM_FORUM.TOPIC_ID = 0', 'to_type' => 'topic' ); /** Tags Section ******************************************************/ /** Topic Subscriptions Section ***************************************/ /** Favorites Section *************************************************/ // Favorited topic ID (Stored in usermeta) /** Reply Section *****************************************************/ // Setup table joins for the reply section at the base of this section // Old reply id (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'REPLY_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_old_reply_id' ); // Reply parent forum id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'FORUM_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 'callback_method' => 'callback_forumid' ); // Reply parent topic id (If no parent, then 0. Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 'callback_method' => 'callback_topicid' ); // Reply author ip (Stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_IP', 'to_type' => 'reply', 'to_fieldname' => '_bbp_author_ip' ); // Reply author. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_AUTHOR', 'to_type' => 'reply', 'to_fieldname' => 'post_author', 'callback_method' => 'callback_userid' ); // Reply title and reply slugs // Note: We don't actually want either a reply title or a reply slug as // we want single replies to use their ID as the permalink. // Reply content. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_MESSAGE', 'to_type' => 'reply', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' ); /* Snizt doesnt use reply order // Reply order. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'the_reply_order', 'to_type' => 'reply', 'to_fieldname' => 'menu_order' ); */ // Reply parent topic id (If no parent, then 0) $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'TOPIC_ID', 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 'callback_method' => 'callback_topicid' ); // Reply dates. $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_date', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 'callback_method' => 'callback_datetime' ); $this->field_map[] = array( 'from_tablename' => 'FORUM_REPLY', 'from_fieldname' => 'R_DATE', 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', 'callback_method' => 'callback_datetime' ); // Setup any table joins needed for the reply section /* $this->field_map[] = array( 'from_tablename' => 'FORUM_TOPICS', 'from_fieldname' => 'TOPIC_ID', 'join_tablename' => 'FORUM_REPLY', 'join_type' => 'INNER', 'join_expression' => 'USING FORUM_TOPICS.TOPIC_ID = FORUM_REPLY.TOPIC_ID', 'from_expression' => 'WHERE FORUM_TOPICS.first_post != 0', 'to_type' => 'reply' );*/ /** User Section ******************************************************/ // Setup table joins for the user section at the base of this section // Store old user id (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'MEMBER_ID', 'to_type' => 'user', 'to_fieldname' => '_bbp_old_user_id' ); // Store old user password (Stored in usermeta serialized with salt) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_PASSWORD', 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 'callback_method' => 'callback_savepass' ); // Store old user salt (This is only used for the SELECT row info for the above password save) /* $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_password_salt', 'to_type' => 'user', 'to_fieldname' => '' );*/ // User password verify class (Stored in usermeta for verifying password) /*$this->field_map[] = array( 'to_type' => 'user', 'to_fieldname' => '_bbp_class', 'default' => 'Example' );*/ // User name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'user_login' ); // User nice name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'user_nicename' ); // User email. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_EMAIL', 'to_type' => 'user', 'to_fieldname' => 'user_email' ); // User homepage. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_HOMEPAGE', 'to_type' => 'user', 'to_fieldname' => 'user_url' ); /* Snitz doesn't use user registered // User registered. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_registration_date', 'to_type' => 'user', 'to_fieldname' => 'user_registered', 'callback_method' => 'callback_datetime' ); */ /* Snitz doesn't use user status // User status. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'the_users_status', 'to_type' => 'user', 'to_fieldname' => 'user_status' ); */ // User display name. $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_NAME', 'to_type' => 'user', 'to_fieldname' => 'display_name' ); // User Profile Field 1 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_AIM', 'to_type' => 'user', 'to_fieldname' => 'aim' ); // User Profile Field 2 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_YAHOO', 'to_type' => 'user', 'to_fieldname' => 'yim' ); // User Profile Field 3 (Stored in usermeta) $this->field_map[] = array( 'from_tablename' => 'FORUM_MEMBERS', 'from_fieldname' => 'M_SIG', 'to_type' => 'user', 'to_fieldname' => '_bbp_snitz_user_sig' ); // Setup any table joins needed for the user section /* $this->field_map[] = array( 'from_tablename' => 'users_profile_table', 'from_fieldname' => 'the_users_id', 'join_tablename' => 'FORUM_MEMBERS', 'join_type' => 'INNER', 'join_expression' => 'USING users_profile_table.MEMBER_ID = FORUM_MEMBERS.MEMBER_ID', 'from_expression' => 'WHERE FORUM_MEMBERS.MEMBER_ID != -1', 'to_type' => 'user' );*/ } /** * This method allows us to indicates what is or is not converted for each * converter. */ public function info() { return ''; } /** * This method is to save the salt and password together. That * way when we authenticate it we can get it out of the database * as one value. Array values are auto sanitized by WordPress. */ public function callback_savepass( $field, $row ) { $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); return $pass_array; } /** * This method is to take the pass out of the database and compare * to a pass the user has typed in. */ public function authenticate_pass( $password, $serialized_pass ) { $pass_array = unserialize( $serialized_pass ); return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) ); } /** * Translate the forum status from Snitz v3.x numeric's to WordPress's strings. * * @param int $status Snitz v3.x numeric forum status * @return string WordPress safe */ public function callback_forum_status( $status = 1 ) { switch ( $status ) { case 0 : $status = 'closed'; // Snitz forum status closed 'F_STATUS = 0' break; case 1 : default : $status = 'open'; // Snitz forum status open 'F_STATUS = 1' break; } return $status; } /** * Translate the topic status from Snitz v3.x numeric's to WordPress's strings. * * @param int $status Snitz v3.x numeric topic status * @return string WordPress safe */ public function callback_topic_status( $status = 1 ) { switch ( $status ) { case 0 : $status = 'closed'; // Snitz topic status closed 'T_STATUS = 0' break; case 1 : default : $status = 'publish'; // Snitz topic status open 'T_STATUS = 1' break; } return $status; } /** * Translate the topic sticky status type from Snitz 3.x numeric's to WordPress's strings. * * @param int $status Snitz 3.x numeric forum type * @return string WordPress safe */ public function callback_sticky_status( $status = 0 ) { switch ( $status ) { case 1 : $status = 'sticky'; // Snitz Sticky 'T_STICKY = 1' break; case 0 : default : $status = 'normal'; // Snitz normal topic 'T_STICKY = 0' break; } return $status; } }
-
AuthorSearch Results