My phpBB database is 3.2.7
I was trying to look at your source code for the phpBB importer but I can’t quite follow the logic.
I was not able to use the previous phpBB importer as it was failing right at the start. This new version seems to work better! However, I have some comments about this.
1/ A possible problem.
Here is my log (which I paused in the end):
Import Stopped (by User.)
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
9.Calculating topic stickies (0 through 99 of 100)0%
8.No anonymous topic authors to import
7.All topics imported100%
7.Converting topics (900 through 928 of 928)90%
7.Converting topics (800 through 899 of 928)80%
7.Converting topics (700 through 799 of 928)70%
7.Converting topics (600 through 699 of 928)60%
7.Converting topics (500 through 599 of 928)50%
7.Converting topics (400 through 499 of 928)40%
7.Converting topics (300 through 399 of 928)30%
7.Converting topics (200 through 299 of 928)20%
7.Converting topics (100 through 199 of 928)10%
7.Converting topics (0 through 99 of 928)0%
6.No forum subscriptions to import
5.All forum parents imported100%
5.Calculating forum hierarchy (0 through 25 of 25)0%
4.All forums imported100%
4.Converting forums (0 through 30 of 30)0%
3.Skipping password clean-up
2.Skipping user clean-up
1.Skipping sync-table clean-up
Starting Import...
Ready to go.
The issue was step 9 where it seemed to be in a ever repeating cycle of:
9.Calculating topic stickies (7 through 100 of 100)100%
9.Calculating topic stickies (100 through 7 of 7)100%
2/ Feature Request
Because I was not able to previously import content I came up with a new simplified set of forum categories etc in my bbPress forum. Therefore, ideally I would love to be presented with a list of forums that are going to be imported so that I can map them to the existing forums I have created. So some would be merging several into one if that makes sense.
At the moment (even though I hit stop on point 9) I was able to view the forum and could seem many boards imported – a quick look it looked great. It is just that I wanted control over how the topics were imported. Thus my idea for the mapping from old forums to current forums.
Can this be done?
Please let me know if I need to give more info.
I don’t know if this should be a “trac ticket” or not.
Well done guys.
Andrew
PS. The related question (which can be closed and linked to this new one is: https://bbpress.org/forums/topic/importing-from-phpbb-5/).
We have shortcodes for the login and password reset process.
The login form has a logout button that avoids the confirmation prompt.
The default logout experience asks the user to confirm.
What would be nice is ability for a logout shortcode that we can put on our own page so that the question is asked consistent with the theme.
I am using My Theme Login plugin so I can specify what page to use for logout.
As mentioned, the login form is avoiding the prompt but it would be nice if it was optional to show the prompt and that it could be done on our own page.
ok, found the setting for this item …
“* How do I remove this from the menu?”
… under the bbp style pack
But, the second issue still is a problem and prevents me from using the bbpress edit profile method …
*When that menu item is clicked, “Edit Profile”, it reaches this page…
…/forumslug/users/emailgmail-c*o*m/edit (added * to get this to post)
And it gives this error…
“Sorry, This Page Is Gone.
The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”
Why is this link incorrect and can it be corrected?
I use a shortcode for the forum user profile and works and the link is this…
…/forumslug/users/emailgmail-c*o*m (added * to get this to post)
(the “… /edit” is missing from this link and it works)
I pulled down the latest from the repo because I saw quite a bit of work was going on… Very excited to see the movement, and wanting to get in on the testing to be sure things are working ok. Maybe I jumped in the middle of some commits and that is my problem, but…
I am updating an earlier v2.6 dev release, which was working fine. But after doing the update and starting to test, a rather large error showed up on the first page where the shortcode [bbp-forum-index] is showing the list of forums, but none of the subforums under them.
I was trying to track this down via WP-CLI, but doing the shortcode from there, or even calling bbp_list_formums() is returning nothing at all, so the context must not be set up properly. I can’t figure out how to use that as a debugging path, and don’t really know offhand what is the right way.
If this isn’t the right location in the forums here, please let me know which section is better. 🙂
WP Version 5.2.4
bbPress Version 2.5.14
bbp style pack Version 4.3.2
When logged in, the main nav is showing “Edit Profile” and links to
…/forumslug/users/emailgmail-c*o*m/edit (added * to get this to post)
Two questions:
* How do I remove this from the menu?
(I have checked the main menu and it’s not showing this item under Appearance > Menus
I have deactivated all plugins… also tried wp2019 theme … no change)
*When that menu item is clicked, it reaches this page…
“Sorry, This Page Is Gone.
The page you are trying to view no longer exists or has been moved. You may try the search form below to find it.”
Why is this link incorrect and can it be corrected?
I use a shortcode for the forum user profile and works and the link is this…
…/forumslug/users/emailgmail-c*o*m (added * to get this to post)
(the “… /edit” is missing from this link and it works)
Mahalo!
Thanks for this. I couldn’t work out why HTML tags were displaying for other users except me then I spotted the question about user roles.
Adding this code in appears to fix the issue.
private forums overrides bbpress, and you would simply need to make any ‘hidden’ forums only accessible to a group that say contains admins.
I think this still works
Remove Private: label prefix
Put this in your child theme’s function file – or use
Code Snippets
ok, the code works in my test site, so a reply edit admin link show ‘hello’ instead of ‘Edit’.
If this is not the case, then 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
ok, where did you put the code?
ok, so this (untested) one should put the class in for the edit, and change the word edit to ‘hello’
can you test and let me know that it works, and I’ll look at the others.
add_filter ('bbp_before_get_reply_edit_link_parse_args' , 'rew_get_reply_edit_link' ) ;
function rew_get_reply_edit_link ($args) {
$args['link_before'] = '<i class="fa fa-edit">' ;
$args['link_after'] = '</i>' ;
$args['edit_text'] = 'hello' ;
return $args ;
}
Put this in your child theme’s function file – or use
Code Snippets
I want to be able to edit each of the Link – Let’s say for example I want to Change ‘Reply’ to ‘Respond’ and also add a fontawesome icon with the html i element.
hmm…that’s awkward as would involve some custom code to fix, probably added to the above plugin.
I don’t have time to do this at the moment
ok, the existing function is
function bbp_get_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) {
$topic_id = bbp_get_topic_id( $topic_id );
// 4 days, 4 hours ago
if ( !empty( $humanize ) ) {
$gmt_s = !empty( $gmt ) ? 'U' : 'G';
$date = get_post_time( $gmt_s, $gmt, $topic_id );
$time = false; // For filter below
$result = bbp_get_time_since( $date );
// August 4, 2012 at 2:37 pm
} else {
$date = get_post_time( get_option( 'date_format' ), $gmt, $topic_id, true );
$time = get_post_time( get_option( 'time_format' ), $gmt, $topic_id, true );
$result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
}
return apply_filters( 'bbp_get_topic_post_date', $result, $topic_id, $humanize, $gmt, $date, $time );
}
so we can filter this as follows :
add_filter ('bbp_get_topic_post_date' , 'rew_date' , 10 , 6) ;
function rew_date ($result, $topic_id, $humanize, $gmt, $date, $time) {
$result = 'hello' ;
return $result ;
}
This should then say ‘hello’ so all we want to do is change $result to read whatever you want – so what do you want it to say ?
I have been doing that from the start of the whole process of the project, I have all the bbpress templates copied over to my theme directory, I am doing an edit on exactly all the template.
But the bbp_topic_post_date('d M, Y') doesn’t work is the thing.
I would like to add Icons to the Admin Links, But I do not want use the ::before or ::after, I would like to filter and dictate the content it outputs by adding some html element to it such like <i class="fa fa-reply"></i>
I hope this is possible
The Plugin is kind of disturbing my function in the way I have set them up already… And it only works on the Freshness Display, it doesn’t work on the topics and reply post dates.
I want one that can work similarly like the WordPress the_date('d M, Y') to look like bbp_topic_post_date('d M, Y') to dictate the exact date format I want for that function to return. I do not really want plugins, I’m trying to build with little to no plugins at all.
Yep, that’s great. Thanks again, Robin.
If anyone else is interested, in addition to the above code placed in functions.php, I amended loop-single-topic.php in my child theme thus:
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?>
<?php $forum_id = bbp_get_forum_id();
if (( $forum_id == 41371) ){
?>
- <?php echo bbp_get_topic_author(); ?></a>
<?php
}
else {?>
</a>
<?php
}?>
<?php do_action( 'bbp_theme_after_topic_title' ); ?>
<?php bbp_topic_pagination(); ?>
<?php do_action( 'bbp_theme_before_topic_meta' ); ?>
<p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
<?php $forum_id = bbp_get_forum_id();
if (( $forum_id == 41371) ){
?>
<?php
}
else {?>
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
<?php
}?>
This selects a specific forum and within that forum it removes the ‘started by’ meta info that normally appears under the title. Instead it places the topic author’s display name (not user name) as an extension of the topic title, separated by a hyphen. The link to the author is removed and instead becomes part of the link to the topic.
Hi Robin,
If you instead go to Dashboard>Forums>Edit and a set “Visibility” to “Hidden”, the forum is still visible (listed) to a user with the Forum Role of “Participant” (although they cannot visit the forum).
Can you confirm? This isn’t the expected, default bbPress behavior for a “Hidden” forum according to forum visibility documentation.
By “default” I mean bbPress without “bbp Private Forums” installed. I understand you are the author (awesome job!). If “Hidden” actually hid a forum, I wouldn’t require “bbp Private Forums” and I’d skip the need to donate to you :).
try this
function rew_login_redirect_url ($redirect) {
//quit if it's not a redirect
if (strpos($_SERVER['REQUEST_URI'], '?redirect_to=') == false ) return $redirect;
$redirect = 'url' ;
return $redirect ;
}
add_filter ('bbp_user_login_redirect_to' , 'rew_login_redirect_url', 5 , 1) ;
change ‘url’ to where you want it to go
Put this in your child theme’s function file – or use
Code Snippets
if that code does what you want then just use the same logic you did in
How to reorder topics in one forum?
eg
function rkk_topic_av() {
$thisforumid = bbp_get_forum_id();
if($thisforumid == 43135) {
echo bbp_get_topic_author_link( array( 'size' => '48' , 'type' => 'avatar'));
}
}
add_action('bbp_theme_before_topic_title','rkk_topic_av');
Counting Topic Favorites:
<?php
$topic = bbp_get_topic_id();
$users = get_users() ;
$countfav = 0;
foreach ($users as $user) {
$topicfav_listarray = get_usermeta ($user->id, 'wp__bbp_subscriptions', true) ;
$topicfav_list = explode (',' , $topicfav_listarray) ;
if (in_array ($topic , $topicfav_list)) $countfav++ ;
}
echo $countfav;
?>;
Counting Topic Subscriptions:
<?php
$topic = bbp_get_topic_id();
$users = get_users() ;
$countsub = 0;
foreach ($users as $user) {
$topicsub_listarray = get_usermeta ($user->id, 'wp__bbp_subscriptions', true) ;
$topicsub_list = explode (',' , $topicsub_listarray) ;
if (in_array ($topic , $topicsub_list)) $countsub++ ;
}
echo $countsub;
?>;
Now those are the things that worked.
Thank you, Robin! I hope this helps someone in the future
<?php
$topic = bbp_get_topic_id();
$users = get_users() ;
$countsub = 0;
foreach ($users as $user) {
$topicsub_list = array(get_usermeta ($user->id, 'wp__bbp_subscriptions', false)) ;
if (in_array ($topic , $topicsub_list)) $countsub++ ;
}
echo $countsub;
?>
Now it’s understandable that this also didn’t work on the topic I tested it with, because the user has subscribed to multiple topics.
Oh wow!
<?php
$topic = bbp_get_topic_id();
$users = get_users() ;
$countfav = 0;
foreach ($users as $user) {
$topicfav_listarray = get_usermeta ($user->id, 'wp__bbp_subscriptions', true) ;
$topicfav_list = explode (',' , $topicfav_listarray) ;
if (in_array ($topic , $topicfav_list)) $countsub++ ;
}
echo $countfav;
?>
This worked now Robin! Thank you!