Support Forum
Hi,
I am complete rebuilding my site and I have run into a tricky situation. I know Simple Press integrates with WP user roles to controll access to forums and categories. This works well with normal content drip sites where the user can automatically be moved from one user role to another and thereby automatically get access to the respective simple press forums.
The problem for me is that I am not doing a pure content drip site but more of a modular product site where ideally the WP user roles would stack. Unfortunately Wordpress doesn't work well with stacked user roles since it only recognise one primary WP user role.
If there is a way to do that I would love to learn how
I wonder if it is possible for Simple Press to look at WP User Capabilities in a similar fashion that it checks WP user roles to determine category and forum access since WP does allow user capabilities to stack?
Getting this to work for me is crucial as otherwise I will need to manually add users to their respective simple press user groups which of course isn't ideal...
Perhaps I should state what I intend to run the new site on using Wordpress.
Theme:
Definition by Woothemes
Plugins:
Sensei (lms) by Woothemes
WooCommerce also by Woothemes
Woocommerce integrates with Klarna & Dibs which is the standard payment solution in Sweden
so I am therefor basing my entire site tech structure around this.
Groups
Will handle the different membership levels (custom capabilities that integrates with WooCommerce).
Documentation & API information here: http://www.itthinx.com/documen.....on/groups/
Thats basically it. Since WP is depreciating normal user levels in favor of Capabilities and user roles
(If I understood things correctly) it also makes sense for me to move into this way of building
my site as well.
When a customer buys a product they get the appropriate WP User Capability that gives them access
to the appropriate posts & pages and I would love it if Simple Press could check for this WP User Capability
and give access to the (by me) defined Forums & Categories.
Just to make things clear, SP does not use WP roles to control access but can, optionally, use WP roles to assign users to specific SP User Groups. And I am unsure quite what you mean by 'stack' but I assume you mean be a member of more than one WP role.
The bottom line, as you already know, is that SP doesn't work off of WP capabilities and trying to do so could get somewhat messy. And after all, all a WP role actually is, is a defined set of capabilities.
And you basically seem to infer that this is happening when you say:
When a customer buys a product they get the appropriate WP User Capability that gives them access to the appropriate posts & pages
This, surely, means that custom WP roles have to be defined. Which is our recommendation in these sort of circumstances - that you use the WP roles to your advantage and simply define more of them, each with the set of capabilities you wish them to have, so your new users are assigned into the correct roles to begin with. Most membership plugins allow for this sort of mapping which can then, in turn, be mapped to SP user groups.
I would add that we have had a few problems with Woo Commerce (and possibly Woo Themes) here and there in the past because, if I recall correctly, of their tendency to break the WP API in supplying their own versions of jQuery libraries which leads to incompatibilities. Hopefully they have corrected these issues these days but just in case, these things are usually quite easily corrected.
YELLOW
SWORDFISH
|
With Stack I mean the following.
Product A - is a deliver straight away content product with it's respective Simple Press forum.
Product B - is a deliver straight away content product with it's respective Simple Press forum.
Product C - is a deliver straight away content product with it's respective Simple Press forum.
Product D - is a deliver straight away content product with it's respective Simple Press forum.
If a customer has Product A he does not see product B, as the customer buys more products he also gets access to more of simple press forums.
there is also
Produce E - Monthly subscription course
Produce F - Monthly subscription course
Produce G - Monthly subscription course
Produce H - Monthly subscription course
Following a similar approach as above.
Sure it is "doable" to do a WP user role integration but I would end up having to create a WP user role for every single possible combination between the products above.
User Role 1: Product A
User Role 2: Product A + Product B
User Role 3: Product A + Product B + Product C
User Role 4: Product A + Product G
Etc, the number of user roles required would grow exponentially the more products I add which obviously isn't an effective way of delivering products in regards to managing forum access.
With stack I mean that the customer who buys product A, gets the right access but keep their WP Role or Capaility, upon buying another product that product / capability / role is then added to the customers existing role or capability and he isn't "moved" to a a new user role but rather get that added to him.
That way I only need to setup permissions, roles capabilities once per product & relevant forums rather setting up roles for every possible combination of products. Sure if I was only doing a few products I could get away with it but I have many products and variations of products planned which make it super messy with a WP user role solution.
That is of course unless you know of a more effective or clever way of doing it then I do?
Hmm it seems I cannot access the API information despite being a silver member, I took some "basic" programming classes way back in school and I figured I would give reading through the API a shot to see if I can get a better understand of how simple press works in regards to forum permissions.
Wouldn't it stand to reason and or logic that if Simple press can check for a wp user role it could be made to check if a WP capability of a custom type exists if so then show the forum. If not then don't display the forum in a similar manner to how the wp role check is done?
I understand that it doesn't do it right now and that my best bet is to handle this manually but I am REALLY interested in getting this to work in a more automated way.
My apologies - I have been a bit slow picking up on this. Yes - there appeared to be a problem with the account using the Codex - a problem we hoped and thought we had solved a few weeks back. I have now fixed that and apologise for you having to wait.
Having said that some of the APi you may want to look at is still in the process of being written up - we have been concentrating on the display side of things primarily as that is the area most want to work with.
However, what you asking for here doesn't really fall within an API at all as it is more fundamental than that. As a WP plugin we support WP methods and structures. The roles and capabilities may be very limited and immature but they are what we have to play with.
Yes - obviously things can be done differently but it would take us some time to analyse whether that could be done with a simple add-on plugin (for example) or if it would need custom, one-off re-engineering work. Bit - I have thrown up open for others to comment on and I am sure they will later tonight.
YELLOW
SWORDFISH
|
still a little confused... you can map a wp role to an sp usergroup... on forum - usergroups - map users to usergroups... so you can make wp roles get specific permissions via the usergroups as assigned to a forum... users can also belong in multiple usergroups, so they can get the 'best' permission...
does that give you what you want?
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
still a little confused... you can map a wp role to an sp usergroup... on forum - usergroups - map users to usergroups... so you can make wp roles get specific permissions via the usergroups as assigned to a forum... users can also belong in multiple usergroups, so they can get the 'best' permission...does that give you what you want?
Thanks Mr Papa for your suggestion. I fully understand how Simple press integrates with WP user roles and how to controll category & forum access using WP roles.
My problem is that Wordpress doesn't allow you to have multiple WP roles assigned. At least not in a way that I have to work.
Like I shared with Swordfish, yes it is "possible" for me to use the WP roles to do what I want with my site it's really not effectivly doable since I will be doing quite a few product launches, e-courses etc so I would need one unique WP Role for every possible combination of product sales since I only want to give forum & category access on a per product, per course basis.
So as you can see it is "doable" but in the long run not very practicle.
A really neat way of doing this (out of an admins point of view and not a programmer/coders point of view) is to create a custom wordpress capability just like you have capabilities such as post comments, edit pages, admin stuff etc.
You as an admin could create wp capabilities such as
Category 1
- Forum 1
- Forum 2
- Forum 3
Category 2
- Forum 1
- Forum 2
- Forum 3
Then Simple press in a similar fashion to assigning WP user roles could also or instead off check for a wordpress user capability above and I would just define the same string that I inputed into the wp user capability table into simple press.
Since wordpress allows for WP user capabilities works with stacking (a wp user role can have a gazillion capabilities vs WP only allowing 1 primary WP role) it makes total sense for me to implement WP user capability for Simple Press. This would also be another unique selling point for you guys since I haven't seen anyone else do this at all.
Overall end conclusion is that this would be a massivly more flexible and effective way to control forum access controll for sites that have a lot of products and yes this is more of a plugin addon for simple press then a core update.
I just spent some time wrapping my head around this on how this could be logically administrated (again from an administrator non programmer point of view).
A suggested admin interface for this could be this.
In Simple Press Admin:
Goto User Groups
Manage, Edit or Create Groups
There you have the options of enable / disable
Allow users to join usergroup
Is moderator
Here another field could be added in a similar fashion that says something like this
Is wp_capability _____________ (you can define multiple capabilities with , ex. publish_pages,delete_pages)
Obviously the wp capabilities wouldn't be those, in my case it woupd be something like groups_grundkurs etc. The idea is to have the admin write whatever he has called the respective wp capability into the admin and then simple press checks to see if a user has that wp_user_capability and grants access to the forum.
The _________ is obviously a text field the admin can write in to define the above mentioned wanted capability.
again im no programmer but wouldn't this be a more "simple check" to see if a user have a capability or not and if so grant access?
Something like: if user capability is publish_pages or deletpages give access else don't give access?
I know this will be more complicated and ellaborate then this but I hope it might be helpful...
The simple press plugin could simply add the above mentioned function for the user groups?
1 Guest(s)