Forum Replies Created
-
In reply to: how can I change x “days” ago
so can you post the exact code you tried, and say where you put it
In reply to: how can I change x “days” agook, try this
add_filter ('bbp_get_time_since' , 'rew_time_since_translate' ) ; function rew_time_since_translate ($output) { $output = preg_replace('/years/', 'new word', $output); $output = preg_replace('/year/', 'new word', $output); $output = preg_replace('/days/', 'new word', $output); $output = preg_replace('/day/', 'new word', $output); return $output ; }
so change ‘new word’ in each case for what you want to show
you can add as many lines as you need, but always do the plural first so ‘years’ followed by ‘year’
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
In reply to: After installation, nothing in Dashboardok, thanks that is useful feedback re the troubleshooting tool, so thanks for letting me know.
So yes I would suggest it was a plugin activation/load order issue.
glad you are fixed ๐
In reply to: how can I change x “days” agoIn bbpress 2.6.x the date freshness format has changed.
If your translation has not been updated this will still display in English.install
once activated go to
dashboard>settings>bbp style pack>Freshness Display
and you will be able to enter translations there
In reply to: After installation, nothing in Dashboardok, so you are not seeing topic, replies and forums in the dashboard with just bbpress active and a default theme such as twenty twenty – yes ?
In reply to: After installation, nothing in Dashboardok, can you see what bbpress level you are
dashboard>users>and select yourself – you should show as ‘keymaster’ to see the dashboard items
bbpress just uses wordpress.
I’d suggest 2 things
1. test using an email tester eg
2. get details of your SMTP email configuration form your host and use
In reply to: How to automatic Topic Approval?great – glad you are fixed ๐
In reply to: After installation, nothing in Dashboardit could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, 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
In reply to: disable topics outside thematicmake your top level a ‘category’ and the forums members of that category.
then no one can post in the category, but can in a forum that is a sub-forum to that category
In reply to: changing forum titles๐
In reply to: Custom bbPress login page instead of WordPress loginbbpress just uses wordpress login, so anything that works for wordpress will also work for bbpress
I’m not a bbpress author, but many find the widget useful
what plugin are you using to get the ‘upvotes’ ?
bbpress just uses wordpress registration and login, so anything that works for wordpress registration will be fine.
In reply to: Audio upload dropping out only once after uploadcan you confirm this is the same on multiple devices and multiple browsers?
purplepโs instructions are for version 1 of bbpress which was 7 years ago
you would I think do better amending the files that display the forum
the hierarchy for these is
SINGLE FORUM
bbpress 2.6.6\templates\default\bbpress\content-single-forum.php
lists sub forums (if needed) using loop-forums.php
calls
loop-topics.php
calls
form topic.phpbbpress 2.6.6\templates\default\bbpress\loop-topics.php
does topic list headerscalls loop-single-topic.php
bbpress 2.6.6\templates\default\bbpress\loop-single-topic.php
lists each topic in the forum, last post and freshnesslists topic content.php
My standard text for how to amend bbpress template files is below with loop-single-reply.php as an example
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.phptransfer this to your pc and edit
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.phpbbPress will now use this template instead of the original
In reply to: How do I create a header for a forum?In reply to: error 401without knowing how you are set up, I cannot answer, and as I say I cannot visit your site to see where the login is.
but try dashboard>permalimks and just click save – this resets the permalinks and may help.
Otherwise where are your users logging in ? a page, or widget and if so what shortcode for the page or what widget?
In reply to: error 401sorry, I cannot see your site as it is protected, and I do not understand your question.
In reply to: The matter of backslashesyou might also post this in buddypress support, as that filter is a buddypress one
@mike80222 looking again, your code might need
$subscription = $event->get_data(); $user = $subscription->user(); $user_id = something more to get the ID ;
but I’d suggest you raise a ticket or look through the documentation.
BOTH
You will need to test the below, as I don’t use either plugin on any forum site.
PM PRO
for PMpro you have the following hooks :
I am guessing that
pmpro_membership_post_membership_expiry
is the correct hook.so the code you need is :
add_action( 'pmpro_membership_post_membership_expiry', 'rew_remove_subscriptions') ; function rew_remove_subscriptions ($user_id=0) { $forums = bbp_get_user_subscribed_forum_ids ($user_id) ; foreach ($forums as $forum=>$id) { bbp_remove_user_subscription ($user_id, $id, 'post' ) ; } $topics = bbp_get_user_subscribed_topic_ids ($user_id) ; foreach ($topics as $topic=>$id) { bbp_remove_user_subscription ($user_id, $id , 'post' ) ; } }
MEMBERPRESS
for Memberpress you have the following links
https://docs.memberpress.com/article/325-action-hooks-in-memberpress
I am guessing that ‘mepr-event-subscription-stopped`
is the correct one, but you might need to query with memberpress
so for memberpress you would have
add_action( 'mepr-event-subscription-stopped', 'rew_remove_subscriptions') ; function rew_remove_subscriptions ($event) { $subscription = $event->get_data(); $user_id = $subscription->user(); $forums = bbp_get_user_subscribed_forum_ids ($user_id) ; foreach ($forums as $forum=>$id) { bbp_remove_user_subscription ($user_id, $id, 'post' ) ; } $topics = bbp_get_user_subscribed_topic_ids ($user_id) ; foreach ($topics as $topic=>$id) { bbp_remove_user_subscription ($user_id, $id , 'post' ) ; } }
BOTH
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
I’m playing with some code, give me a while to work it out !!