Forum Replies Created
-
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 !!
what membership plugin are you using ?
In reply to: How can I re-order the list of forumsdashboard>forums>edit a forum and on the right hand side you will see Forum Attributes, and under this ‘order’ 0 is the first to be shown, so number the forums in the order you want them to appear
ok, I am trying to help you, and I’ll give this one more go before I give up.
Just telling me you added a table does not help. I need to know exactly what you changed where, so to which file, page, post or whatever did you add the table?
In reply to: Too many search forms๐
In reply to: bbp style pack bugyour second question would need a 2 page essay to do justice.
But in essence the answer is try it and if you think it is slower or can measure it being slower and feel that this slowness is not outweighed by the benefits then don’t use it
But frankly if you are asking the question, then I suspect you are not seeing a difference.
In reply to: bbp style pack bugYou mean ‘the font size does not work on my browser against my site’ – so I’ll need a link to an example and you telling me what it should be
In reply to: Too many search formsI cannot see 2 search forms, can you provide a link to an example please
In reply to: Remove comment “reply” button๐
In reply to: Remove comment “reply” buttononce activated go to
dashboard>settings>bbp style pack>Topic/Reply Display items 17, 18, 19
ok, I’m still need to know what you actually changed to do this, ie the exact files you changed, and what you changed
In reply to: ” START NEW POST ‘ box required on home pagethe way above is both easy and the best way to do it
In reply to: Remove comment “reply” button.bbp-reply-to-link {
display: none;
}In reply to: Remove comment “reply” buttonso what is the benefit to NOT having reply option within a reply?
If you have lots of replies, having to scroll back to the topic is a pain, and if you have threads turned off, then replying to a reply is the same as replying to the topic.
In reply to: Remove comment “reply” buttonI think you mean threaded replies, in which case turn this off in
dashboard>settings>forums
In reply to: Remove Category Hyperlink?๐
In reply to: Block spam users and their poststhen go into the user profile, and you can list their topics and replies and delete each.
I don’t think there is an easy way to bulk do that