latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Membership Levels & Content by ccaps

Home Forums Community Forum Membership Levels & Content by ccaps

Tagged: ,

This topic contains 17 replies, has 2 voices. Last updated by  cassel 3 years ago.

Topic Author Topic
Posted: Friday Jan 3rd, 2014 at 7:15 am #62377
John Cook
Username: wisehippo

I have just submitted this question to the human support but I realized I don’t know if they are back at work yet. I just need an urgent solution.

It’s clear to me that I am doing something wrong here as this cannot be as difficult as I am making it.

Membership Level 2 is INSTRUCTORS
‘Trainee’ Instructor are at Level 2 BUT they have ccap = trainee

On the welcome page I have Content A & B

Level 2 Instructor should see BOTH Content A & B
Level 2 Instructors with ccap = trainee should see ONLY Content B

I have tried so many variations I can’t list them all but here is what it is currently set to.

[s2If current_user_is(s2member_level2)]

Instructors' Area
Content A

[/s2If]

[s2If current_user_is(s2member_level2) AND current_user_can(access_s2member_ccap_trainee)]

Trainee Instructor
Content B

[/s2If]

Help please


Regards

John

List Of Topic Replies

Viewing 17 replies - 1 through 17 (of 17 total)
Author Replies
Author Replies
Posted: Friday Jan 3rd, 2014 at 10:34 am #62383
cassel
Username: cassel

Since both levels are Level 2, maybe you don’t need to add this to the conditional (unless you have other levels/ccaps to distinguish them from).

The code you are displaying seems ok. Where are you getting the wrong display? What do you get instead?
Are you testing as an admin? Do you have some restrictions set on the top right box in the dashboard when you create a content page? Basically, what result are you getting that you should not be getting (or vice versa)?

Posted: Friday Jan 3rd, 2014 at 10:44 am #62384
John Cook
Username: wisehippo

Thanks for your reply Cassel…

I’ve still been trawling through the forums to get this sorted, around 6 hours now but have found nothing!

I am using separate logins to test this. It works for other Membership levels, it just this ccap (trainee) for level 2 (Instructors) that has the issue.


When I log in as an Instructor I ONLY get Content A – when all I want Content A & B

When I log in as a Trainee I get Content A & B – when all I only want B


Do you know an easy way to redirect to a specific (separate) page on log in?
This would solve all my problems and be the best solution…the holy grail for me. Again searching the forums and KB has drawn a blank for an easy method of doing this

Thanks


John

  • This reply was modified 3 years ago by  John Cook.
Posted: Friday Jan 3rd, 2014 at 10:49 am #62386
cassel
Username: cassel

Try this code instead (change the AND by OR):

[s2If current_user_is(s2member_level2)]

Instructors' Area
Content A

[/s2If]

[s2If current_user_is(s2member_level2) OR current_user_can(access_s2member_ccap_trainee)]

Trainee Instructor
Content B

[/s2If]
Posted: Friday Jan 3rd, 2014 at 10:56 am #62387
John Cook
Username: wisehippo

No, that just shows the same Content (A & B) for BOTH Instructor and Trainee Log ins.

:-(

Posted: Friday Jan 3rd, 2014 at 11:04 am #62388
cassel
Username: cassel

Are you testing this as an admin? Or do you have a test user without admin privileges?

Posted: Friday Jan 3rd, 2014 at 11:10 am #62390
John Cook
Username: wisehippo

I have separate ‘test’ accounts for Instructor and Trainee.

The Instructor User Account settings has nothing in the ccaps field and the Trainee has trainee in the ccaps field.

As a way around this I have just posted another forum request on ‘Redirection’ here:

http://www.s2member.com/forums/topic/redirect-to-separate-pages-on-log-in/

This may be a better path!

It’s not easy this S3 lark is it?

Your help is much appreciated


John

Posted: Friday Jan 3rd, 2014 at 11:26 am #62391
cassel
Username: cassel

In fact, it is easy with s2M… the problem is that the system is so “down to the letter” that it cannot read our mind! We just have to think EXTREMELY literal.
Sometimes, you have to look at this from the content angle and not the member’s angle. So you have this:

Content A = for only those with “trainee” ccap
Content B = for all

You want this content B to be accessible to all.

[s2If current_user_is(s2member_level2)]
Instructors' Area
Content B
[/s2If]

Now you want content A ONLY for those with the trainee ccap:

[s2If current_user_is(s2member_level2) AND current_user_can(access_s2member_ccap_trainee)]
Trainee Instructor
Content A
[/s2If]

It is just switching things the other way. Does this work?
Also, the idea of a redirection would still require the use of some conditional so if it is not clear for s2M how to work with this code, it would likely be the same issue with a redirect (I do use redirect on my site, so I am familiar with it too).

  • This reply was modified 3 years ago by  cassel.
Posted: Friday Jan 3rd, 2014 at 11:38 am #62394
John Cook
Username: wisehippo

It’s actually the other way round.

Content A AND B is displayed for those Level2s that DO NOT have “trainee” ccap

Content B = is the ONLY thing that is displayed for Level2s that DO have ccaps “trainee”

I’ve tried this with out luck:

[s2If current_user_is(s2member_level2)]Instructors' Area
Instructors' Area
Content A

[/s2If]

[s2If current_user_is(s2member_level2) AND current_user_can(access_s2member_ccap_trainee)]
Trainee Instructor
Content B

[/s2If]

:-)

Posted: Friday Jan 3rd, 2014 at 11:43 am #62395
cassel
Username: cassel

And with this code, everyone sees everything? No restriction?

Posted: Friday Jan 3rd, 2014 at 11:46 am #62396
John Cook
Username: wisehippo

Trainee – Sees Content A & B (should ONLY be B)

Instructor – Just sees Content A (should be A AND B)

Posted: Friday Jan 3rd, 2014 at 12:02 pm #62397
cassel
Username: cassel

I have had a similar situation on my site and I found out that the easiest way was to copy the content like this:

[s2If current_user_is(s2member_level2) AND !current_user_can(access_s2member_ccap_trainee)]
Instructors' Area
Content A + B 
[/s2If]

[s2If current_user_is(s2member_level2) AND current_user_can(access_s2member_ccap_trainee)]
Trainee Instructor
Content B
[/s2If]

It can be annoying to duplicate the content, but I found out it works for me and is simpler to “reason”.
Worth a try?

Posted: Friday Jan 3rd, 2014 at 12:42 pm #62399
John Cook
Username: wisehippo

I do sincerely appreciate your time here Cassel..but that does not work either (I hope you are seeing that S3 is actually not that easy) and also…we should not have to ‘work around’ these issues – there should be a way for us to do it and easy documentation to boot. This feels like ‘standard’ stuff to me and its the wonderful community spirit in the forums that is actually papering over these issues. I hope they are looking at this post.

Anyway…

This Code:

[s2If current_user_is(s2member_level2) AND !current_user_can(access_s2member_ccap_trainee)]
Instructors' Area
Content A + B 
[/s2If]

[s2If current_user_is(s2member_level2) AND current_user_can(access_s2member_ccap_trainee)]
Trainee Instructors' Area
Content B
[/s2If]

Gives
Instructor displays A + B
Trainee displays A + B + B again

Posted: Friday Jan 3rd, 2014 at 12:48 pm #62400
cassel
Username: cassel

The code is correct. You got it pretty much from the start. There seems to be something else.
Can you double-check on the ccap (or absence of) for both of your test account?
Can you make sure one of them does NOT have an admin role as this will override everything?

Posted: Friday Jan 3rd, 2014 at 1:08 pm #62401
John Cook
Username: wisehippo

Account Name: Instructor – set as Instructor and has no ‘trainee’ in the ccap field
Account Name: Trainee – set as Instructor and has only ‘trainee’ in the ccap field

BOTH are approved users

What do I do now? SUPPORT are you seeing this? Please HELP….(I’ve had no reply from the direct email I sent to them earlier!)

I am hurting bad!!! Been on this ‘one thing’ ALL DAY…it’s like putting £20 notes down the drain one by one by one! S3 Member may not be financially viable for much longer in truth.


J

Posted: Friday Jan 3rd, 2014 at 1:20 pm #62402
cassel
Username: cassel

Do you mean that Instructor is a role they have? Could you try changing that to S2Member Level 2 and see how it affects the outcome? I have never used other than the s2M levels, subscribers (which means level0) and admin (for me) so I am not sure how it would play but that is something to look into. Maybe those roles do not play well with something else?

Posted: Friday Jan 3rd, 2014 at 1:38 pm #62403
John Cook
Username: wisehippo

I have

Level 0 – Free Subscriber
Level 1 – Client
Level 2 – Instructor ( which I have ccap trainee as a second Level 2 option)
Level 3 – Not Used
Level 4 – Administrator

S3 lead you to believe that its really easy and straightforward to use ccaps for multiple membership levels within a Level.

My scenario does fit into what they ‘say’ it can do but I agree with you my code looks correct but its not working but maybe my frst post when I said “…It’s clear to me that I am doing something wrong here as this cannot be as difficult as I am making it….’ Is correct! Somewhere I Am doing SOMETHING WRONG…it can’t be this hard!

If you can access level two AND cannot access trainee show this content
If you can access level two AND can access ‘trainee’ show this content

Support? Don’t you think you should chip in here…..Cassel here has been working his butt off all day trying to help me! Jason? Anyone? Please!


J

Posted: Friday Jan 3rd, 2014 at 1:57 pm #62404
cassel
Username: cassel

Maybe some simple troubleshooting first:
– do you have the most updated version of s2M?
– did your conditional EVER worked and stopped working?
– do you have OTHER conditionals that work ok?

Viewing 17 replies - 1 through 17 (of 17 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.