Community Support Forums — WordPress® ( Users Helping Users ) — 2010-12-11T14:47:16-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=1104 2010-12-11T14:47:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1104&p=5082#p5082 <![CDATA[Re: An "Aha!" moment with "can" and "is"]]>

Statistics: Posted by Bobbie — December 11th, 2010, 2:47 pm


]]>
2010-11-26T01:30:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1104&p=4883#p4883 <![CDATA[Re: An "Aha!" moment with "can" and "is"]]>
In your case, Bobbie, do you everyone above a certain group to see it or just members from a certain group. Example: Do you want members from level_3 and up to see, which would also included level_3 and level_4, you'd use the setting current_user_can. If you just want people from level_3 to see it, you'd use current_user_is.

I"m going to assume since you want people to upgrade, you're more interested in people with level_1 and level_2 to not be able to see the content, where level_3 and level_4 can. You'd use current_user_can.

You'd want this:

Code:
<?php if (current_user_can("access_s2member_level3")){ ?>
    You'd put in content for Members who are logged in with level_3 or level_4 access
<?php } else { ?>
    This is what everyone else would see.  It could be a teaser along with a note to upgrade.  You could style it in such a way with DIV or SPAN tags to it's a different color background, font, etc.
<?php } ?>

Statistics: Posted by Jwrbloom — November 26th, 2010, 1:30 am


]]>
2010-11-25T12:02:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1104&p=4878#p4878 <![CDATA[Re: An "Aha!" moment with "can" and "is"]]> Statistics: Posted by Bobbie — November 25th, 2010, 12:02 pm


]]>
2010-10-27T10:51:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1104&p=4308#p4308 <![CDATA[An "Aha!" moment with "can" and "is"]]>
I don't know how many other folks are beginners like me with coding and recognizing function names and capabilities, so I thought to post it here as a "sharing" moment with other beginners. These two points are probably only a starting point, but hopefully it will help another newbie type folk.

"is" is restrictive. It is only for that which is specified. In s2, this usually means a member can only access the material at the specified level and none other.

"can" is inclusive. It includes all that which it gives permissions for. In s2, this usually means a member can access the specified level and all lesser levels.

Cheers and bright days.

Statistics: Posted by KirkWard — October 27th, 2010, 10:51 am


]]>