Error setting automatic forum role for subscribed users.
I set the automatic form route as the detector in settings->forums.
However, when a user subscribes, it is set to the participant role.
What should I do?
I have something funny going on.
I have this code running as a snippet:
// Redirect Registration Page
function my_registration_page_redirect()
{
global $pagenow;
// Standard Registration Redirect
if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['action']) == 'register') ) {
wp_redirect( home_url('/register/') );
}
// Redirection after successful registration
if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['checkemail']) == 'registered') ) {
wp_redirect( home_url('/registration-complete/') );
}
}
add_filter( 'init', 'my_registration_page_redirect' );
Now, I start a browser and go to my website:
About Theocratic Software
I scroll to the bottom and I see my existing username and password in the login box (but not logged in).
I hit the Register button and it goes to my registration form.
I fill it in and tick the recaptcha and hit the register button.
There is a momentary delay and it just moves to the stbndard wp-login.php page with the existing username and password prefilled. I get no emails to the new account i filled in the form.
So, I hit back in my browser and my new account is filled in the form. I tick the recaptcha again and hit register again. This tie, after a delay, it takes me to my registration complete page and I do indeed get the email re: password and account activation.
I thought I had understood the registry redirection correctly so why do I get the initial issue? It has happened twice for me now.
Thank you for your help. It took me a while to figure out what’s going on. It seems bbPressNotify is the culprit. I once installed this plugin and modified the message with it. But then when I found out it allows forum to notify only one of the three forums unless I pay for the add-on subscription, I deleted the plugin. Apparently it is still in effect. That is why it only sends a notification to the Editor forum with the message I originally defined a long time ago with bbPressNotify. I don’t know how to delete the leftover data of this plugin.
Just for clarification, was bbPress could have done what I need without any plugin? Just recap, what I need is:
We have 3 forums
1) Editor forum (hidden from all) – editors subscribed
2) Contributor forum (hidden from public) – contributors and editors subscribed
3) Subscribers forum (public) – all registered users subscribed
Notification from each forum new post/reply
Did I really need bbP Private Groups plugin, and did I really need notification plugin for sending out notifications, or bbP could have done this without plugins?
Hi,
I have never edited any of our users’ roles. Some users have the bbp_participant role, but not all.
When does this (default) role get assigned?
How can I set all those that have no bbp role?
The checkbox “Automatically give registered visitors the PARTICIPANT forum role ” is checked.
Wordpress 5.2.4.
BBPress 2.5.14
Many thanks Robin.
I now have my text and login widget on Discussion Forum page.
Trouble now is the forum topic pages are not registering that the user is logged in!
Are you able to help with this issue?
Thanks again, Anne
I noticed that bb_register_view is now bbp_register_view. But when I changed that the whole website threw a wobbly!
I tried to import and activate this plugin and i got an error on activation:
Fatal error: Uncaught Error: Call to undefined function bb_register_view() in …/wp-content/plugins/ts-member-list-view/member-list.php:8 Stack trace: #0 …/wp-admin/includes/plugin.php(2141): include() #1 …/wp-admin/plugins.php(175): plugin_sandbox_scrape(‘ts-member-list-…’) #2 {main} thrown in …/wp-content/plugins/ts-member-list-view/member-list.php on line 8
I also have the same problem that I do a test and the registration email is intercepted as a suspected bot. I get redirected to https://mysite.org/wp-login.php?action=register
I am using WP Mail SMTP, I and I did a check mail which worked… and I have the correct host email name in settings/general, so I don’t see why the above is happening.
very doubtful that bbpress would add this – you’d need to register a trac ticket
it has a class of ‘bbp-register-link’ – is there an issue with using this ?
This works:
// Redirect Registration Page
function my_registration_page_redirect()
{
global $pagenow;
// Standard Registration Redirect
if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['action']) == 'register') ) {
wp_redirect( home_url('/register/') );
}
// Redirection after successful registration
if ( (strtolower($pagenow) == 'wp-login.php') && (strtolower($_GET['checkemail']) == 'registered') ) {
wp_redirect( home_url('/registration-complete/') );
}
}
add_filter( 'init', 'my_registration_page_redirect' );
So we have the login/register widget.
– User clicks Register
– It then shows the custom Register page
– Fill in details
When a user clicks the “Register” button it then takes you to the default wordpress login page with a small message in the middle saying the registration is complete and to check email.
This is confusing to the user and provides an inconsistent experience. Is it possible in any way to either redirect them to another custom page with the “results” or display it on our page own register page?
On the login widget it has a register button. But it has no ID, so I had no choice but to use .user-submit
like this:
/* Main buttons */
#bbp_user_edit_submit,
#bbp_topic_submit,
#bbp_reply_submit, #bbp_topic_content-tmce,
#bbp_topic_content-html,
#bbp_reply_content-tmce,
#bbp_reply_content-html,
#bbp_search_submit,
.user-submit {
text-shadow: none;
font-style: normal;
background: #d35438 !important;
color: #000 !important;
text-align: center;
border-radius: 4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
border: white 1px solid;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
/* Main buttons - hover */
#bbp_user_edit_submit:hover, #bbp_topic_submit:hover, #bbp_reply_submit:hover,
#bbp_topic_content-tmce:hover,
#bbp_topic_content-html:hover,
#bbp_reply_content-tmce:hover,
#bbp_reply_content-html:hover,
#bbp_search_submit:hover,
.user-submit:hover {
color: #fff !important;
-moz-box-shadow: inset 0 0 20px #000 !important;
-webkit-box-shadow: inset 0 0 20px #000 !important;
box-shadow: inset 0 0 20px #000 !important;
}
It would be nice for consistency that this button have an official ID along with any other buttons missing the ID.
Is there an API that I can call when a user registers on our product website?
Users
If they are logged in to our product and click on SUPPORT/Forums, how do I go about having them automatically logged in?
mzybe
WordPress REST API – OAuth 1.0a Server
And my last question is if I can create new topics and replies to them with custom dates/times? For example, I want to create a new post with a date of a week ago, and then reply with a date from 6 days ago?
Just add/edit the topics and replies from the back end – there you can changed then publish date
Hmmm, it seems that Thomas Zhu’s plugin, bbpress Member’s Only Pro plugin might do what I’m asking.
# Restricts your bbPress topics to Logged in/Registered members only.
# Restricts your bbPress replies to Logged in/Registered members only.
# Restricts your bbPress forums based on user roles.
# Restricts your bbPress topics based on user roles.
It also allows different levels of access based on different bbpress user roles, which is something I am also after. I’ll report back on whether this does what I want it to do, in case there is anyone else out there who has the same issues as me.
Hi, I couldn’t find this using search but I am sure someone has done this before.
We have our own web-based software that users register/login to. We would like them to seamlessly be able to also go to forums to get support using bbpress (we are on version 2.5.14).
Is there an API that I can call when a user registers on our product website?
If they are logged in to our product and click on SUPPORT/Forums, how do I go about having them automatically logged in?
And my last question is if I can create new topics and replies to them with custom dates/times? For example, I want to create a new post with a date of a week ago, and then reply with a date from 6 days ago?
If that’s not possible, perhaps there is an ability to import posts from excel where I could have different date/times?
Your help is much appreciated.
I’ve been using SMF for a while and I’m trying to transition to bbpress. One of the plugins I liked to use in SMF simply helped to hide outgoing links by replacing the URL with something like:
“To check this link, please register or login first”
Has anyone found anything that can do a similar function in bbpress?
This thing made 10 years ago, is the most approximate thing I’ve found so far
Hide Links
Maybe I can capitalize on that and rewrite something more adequate. Or maybe have build something more advanced in the past decade.
Hi,
Strange request but I would like to hide a forum completely when the user is logged in. This is because I’m using this forum as an info page for new visitors. Once a user is registered and logged in, they don’t need to see the forum, so I’d like to remove the entire < ul >. I’m hoping this is a simple addition to my functions.php file, something along the lines of:
if ( bbp_is_user_logged_in() ) {
echo "<some css that did ul.bbp-forum-40250 {display:none;}
}
Except I know that’s probably not the best way to achieve this. What would be the best way to hide the forum to logged in users?
Thanks.
I’m confused, I don’t allow guest users without accounts to post yet I’m starting to get notices from Askimet of spam posts. When I go look to see what it prevented from posting, they aren’t from users that have ever existed on the site and they don’t even have email addresses.
I’ve been running this site for about 3 years now and have never see this before. Is there some other setting I could be missing?
Thanks,
Tim
this will close topics with no activity in the last 10 days
/*
Plugin Name: BBPress Close Old Posts
Description: Close BBPress 2.0+ posts that haven't been updated in X days.
Author: Raygun
Version: 0.1
Author URI: http://madebyraygun.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
register_activation_hook(__FILE__, 'bbpress_topic_scheduler');
add_action('bbpress_daily_event', 'bbpress_close_old_topics');
function bbpress_topic_scheduler() {
wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
}
function bbpress_close_old_topics() {
// Auto close old topics
$topics_query = array(
'author' => 0,
'show_stickies' => false,
'parent_forum' => 'any',
'post_status' => 'publish',
'posts_per_page' => -1
);
if ( bbp_has_topics( $topics_query ) )
while( bbp_topics() ) {
bbp_the_topic();
$topic_id = bbp_get_topic_id();
$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
if ($last_active < strtotime( '-10 days') )
bbp_close_topic( $topic_id );
}
}
?>
Dear all
I want to hide the forum and its posts from the visitors, only the login in users can see the posts or the forum
now I hide the forum page but if anyone have a post link he can see the content even if he is not registered with us
Hey Robin and everyone else who might read this! I thought I would post the really simple solution! After TONS of staging site/plugin/permissions/theme/cache/etc. tests, Robin, you were right about it being in the “dashboard>settings>discussion settings” area — it was my list of moderated (blacklisted) words that was causing things not to work. It’s unfortunate, since I definitely don’t want instances of “www” or “.com” or “dot com” showing up in forum posts by people who are trying to bypass spam filters, but I had to remove those from the moderation list because I didn’t realize that it affects anyone who is writing a post on the site. From the description above the moderation field a comment that includes any of the blacklisted or moderated words that not only are included in the post, but also come from the “…name, URL, email, or IP address” of the poster, will be held for moderation (or deleted, in the case of blacklisting). Since everyone coming to our site has www or https or http or .com or something along those lines in their login info/email address, there’s no way to stop comments that include those since it also stops all users who are registered on our site via an email address. Once I removed those phrases from my moderation list and blacklist, we’re able to post freely and immediately (at least it looks like for now!).
While I really regret that we can’t blacklist/moderate *just* the posts/replies that contain phrases like .com or www etc., it’s still great to find the problem — thank you, Robin!
Hi Robin,
I have a feedback from digimember.
Is is:
“We can provide you the Digimember-API, you can make your own Connections and Modifications with.
https://digimember-hilfe.de/api/
Please note, that we can’t give any support regarding to this and you’ll need some programming basics for that.”
Does this help us?
Furthermore I found a menu called “webhooks” in the Digimember-Menu in WordPress.
There can some webhooks be added, but there is no more information about which one.
Another menu item is “Orders”, where one can see the Email-Adress of the registered User and the Product-Name and the Order-Number of the Product the User ordered.
I hope this Informations can help.
If I have to get some new informations or do some further steps, please let me know 🙂
Thxs, best, Roman
cu, Roman
Thanks for your reply.
My course is hosted outside of WordPress, on a platform called “teachable”, so my students are not members of my WordPress site. I’m wondering if there is a way to automatically register someone, when they purchase my course. I can automatically add them to Mailchimp, Convert Kit, etc, b so I’m wondering if it is possible with bb Press (WordPress).
Cheers.
Hello,
I’m working on a new website with a forum. I would like the link for the forum to be trregister.be/forum but the closest I’m getting is ” http://trregister.be/forums/forum/tr-register-belgium-forum/ “.
How can I change this?
Thanks in advance and greetings,
Jordi