WordPress-Forum: Reading für every logged-in member, writing for paying clients
-
Hello, I’d like to make a wordpress-forum with the following feature:
The Forum will be part of a free membership, so it will be readable for everyone who is logged-in in the membership area,
but it should only be readable but not writeable (!).
Writing-Access (answer to an existing topic or make a new one) should only be possible for members, who became a higher membership-level by paying an amount before.
Is there a possibility to make that beeing done?Thxs a lot, best,
Roman
-
If you do not allow anonymous posting, then forums can be seen by everyone, but only written to by logged in users, If you make WordPress registration only available to members, then only members will be able to write
Hi Robin,
since the membership plugin uses the same WordPress-Login-Data as bbPress does,
if a user registrates a membership and is logged in, he has automatically full access to the bbPress-Forum.
I found no way to make a difference between logged-in users regarding to read- and write-access.
Is there one?Thxs, best,
Romanyou could use
to set up forums, but you would need to add members to a group on joining
I’ve already installed bbp Private Groups, and I’m wondering, if access-rights can be set automatically (or manually by the user via an optin-form) or only manually by the admin.
The way it should work is: Every logged in user can see the whole forum, all topics and replies,
but only a paying member can access the forum at all (creating new topics, replying, and so on).Thxs, best, Roman
what membership plugin are you using ?
I use the German membership plugin Digimember.
It has a direct connection (API) to Digistore24, the Payment Provider and
Quentn, the used Autoresponder.
The problem is: The membership plugin uses the Standard WordPress-Login-Data as bbPress,
so a logged in User is also logged in to full access in bbPress.
So I can’t differentiate between different user Member levels.ok, you will need to research or find out if digimember has a ‘hook’ on membership joining that can be used to add a member to a group.
so the question to them might be
I am using digimember and need a wordpress hook (action or filter) that I can link a user becoming a member to carry out some further actions.
If they or you can answer, I can give you some simple code
Thxs a lot, Robin,
i wrote to the Digimember-Support and I have to wait for their answer now.
Since today is Sunday, it may take a while… 😉
so long, cu, RomanHi 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, Romanyes, that is helpful
so this code will add a user to private group 1 on paying membership, and take them out on cancellation
add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 ); function digitest_purchase( $user_id, $product_id, $order_id, $reason ) { switch ($reason) { case 'order_paid': // handle paid orders here update_user_meta ($user_id , 'private_group' , '*group1*') ; break; case 'order_cancelled': delete_user_meta ($user_id , 'private_group' ) ; break; case 'payment_missing': // handle missing rebilling payment here break; } }
Put this in your child theme’s function file – or use
Then set up forums so that group 1 users can access the forum, and everyone else just see it
Hi Robin,
thxs a lot for your big help!
Since I’ll do something like that first time, it may take a while…Watching the code, there are a two things I don’t understand:
1. Since I have different products in my digimember-account, where in the code is specified which product the user must have bought to become member of group1?
2. Since “order cencallation” and “payment missing” should both result in finishing the membership of the user, why doesn’t have to be the same “delete user-meta”-parameter in the code for both cases?Thxs again for your help,
cu, Romanso do different products need different groups, or just one product has forum access?
you can add the delete to payment missing if you like, I don’t know enough about how your purchase works to know whether it could have been set earlier.
Indeed only one product has forum access, it’s meant as an Abo-product.
the thing is: I want to give it as a bonus for one month when buying another product.
After that period the forum access is to pay via the Abo.
I don’t know yet, if I can make the forum-access beeing a Bonus of an order of another product at the payment provider,
or perhaps there is another way to make the forum access beeing available for one month when buying another product (?)sorry – no idea what ‘Abo’ means ???
Sorry, my mistake…
I thought the word Abo is the same in English,
but no, it’s subscription 😉ok, as a product you can do
add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 ); function digitest_purchase( $user_id, $product_id, $order_id, $reason ) { switch ($reason) { case 'order_paid': // handle paid orders here if ($product_id == '12') { update_user_meta ($user_id , 'private_group' , '*group1*') ; } break; case 'order_cancelled': if ($product_id == '12') { delete_user_meta ($user_id , 'private_group' ) ; } break; case 'payment_missing': // handle missing rebilling payment here break; } }
where in this case ’12’ is the product id of the subscription product
time period and other conditionals are I’m afraid well beyond free help
Thxs Robin,
everything works fine so far.
The only thing is:
When a non-member-user clicks on a forum-title he gets redirected to the URL set in the Forum Visibility settings of bbP Private Groups.
However the goal is – as written above – that the user has no access to WRITE but he is able to SEE all the topics and replies of the forum.
But since he gets redirected by clicking on a forum-title he can’t see any content of the forum.
Can you tell me how this is to be done?you use topic permissions
dashboard>settings>bbp private groups>topic permissions and enable
dashboard>settings>bbp private groups>assign groups to roles and set subscribers as belonging to say group 2then for each forum, go into edit the forum, you set group 2 to only see, and group 1 (for instance) to have full access
Yes, works fine, thxs!
While working on the project, we came to the decision, that it could be useful to see the topics users wrote, but not see the answers other users gave.
The sense is, that new users see, that existing members have similar questions but aren’t able to see the reactions of other members as long as they are no members yet.
Is there a possibility to implement this feature?hmmm…. that would be quite hard to code, lots of places where you would need filters.
Unlikely I’d look at that.Okay, no matter… it’s not soo important 😉
Thxs a lot for all your help!
I think it will work fine the way you did it so far.
Thxs so much 🙂🙂
by the way:
Do you know why the single-shortcodes of bbPress don’t work?
[bbp-single-topic] [bbp-single-forum] [bbp-single-reply] [bbp-single-tag] and so on
have absolute no effectOr is it possible to jump to only one specific forum via hyperlink or any other way?
Ok, the hyperlink I found myself,
but I can’t guess why the single-shortcodes don’t show anything…
- You must be logged in to reply to this topic.