Statistics: Posted by Cristián Lávaque — August 30th, 2011, 4:41 pm
Statistics: Posted by peeld — August 29th, 2011, 10:59 pm
Statistics: Posted by Cristián Lávaque — August 29th, 2011, 5:52 pm
Statistics: Posted by peeld — August 29th, 2011, 4:29 pm
if (bp_is_groups_component() && bp_current_item() == 'goal-setting-and-mental-management' && !current_user_can('access_s2member_ccap_goalsettingworking') && !current_user_can('access_s2member_ccap_goalsettingauditing')) {
header('Location: ' . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit;
}
Statistics: Posted by Cristián Lávaque — August 29th, 2011, 4:26 pm
if (( bp_is_groups_component() && 'goal-setting-and-mental-management' == bp_current_item() && !current_user_can('access_s2member_ccap_goalsettingworking')) || (bp_is_groups_component() && 'goal-setting-and-mental-management' == bp_current_item() && !current_user_can('access_s2member_ccap_goalsettingauditing')))
{
header ('Location: '. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
Statistics: Posted by peeld — August 29th, 2011, 2:04 pm
if ((has_tag('music') && !current_user_can('access_s2member_ccap_music')) || (has_tag('jazz') && !current_user_can('access_s2member_ccap_jazz'))) {
header('Location: ' . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit;
}
Statistics: Posted by Cristián Lávaque — August 29th, 2011, 1:43 pm
//==================================================================================
//Start out assuming the user does NOT have permissions...
$Permissions_Flag = "N";
//First, check for a simple tag of "R" which I will add to ALL pages I want to restrict, in addition to one
//or more specific tags. If the "R" tag does not exist, by my definition I do not want to restrict this
//page, so no need to check further...
if !has_tag("R")
$Permissions_Flag = "Y";
//Specific permissions tests based on specific tags follow...
else if ((has_tag("music") && current_user_can("access_s2member_ccap_music"))
$Permissions_Flag = "Y";
else if ((has_tag("jazz") && current_user_can("access_s2member_ccap_jazz"))
$Permissions_Flag = "Y";
endif;
//If the permission checks failed to remove the restriction, user will be sent to the
// membership options page...
if $Permissions_Flag == "N" {
header ("Location: ". S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit (); }
endif;
//===============================================================================
Statistics: Posted by Lonaldo — August 28th, 2011, 12:10 pm
Statistics: Posted by Cristián Lávaque — August 28th, 2011, 2:23 am
1) Can you use the technique you described to assign more than one tag to the same page? For example, I might want a general "Music" tag that I would use to assign the page to a deluxe membership, and another specialized tag for "Jazz" that I would assign to a less all-inclusive membership. (I realize there are other ways to accomplish this with single page tags, but this would be the most convenient for the application I have in mind).
2) Does this use the same "tagging" technique as some of the other Page tagging applications, like "Page Tagger"? The reason I ask is because it would be convenient for me to see the tags on the Page List screen at a glance, rather than to have to open up every individual page to see the tag (I have many pages on my site).
Statistics: Posted by cassel — August 27th, 2011, 8:26 pm
Statistics: Posted by Lonaldo — August 27th, 2011, 8:05 pm
Statistics: Posted by Cristián Lávaque — August 27th, 2011, 2:23 am
Statistics: Posted by cassel — August 26th, 2011, 10:25 pm
Statistics: Posted by Lonaldo — August 26th, 2011, 5:55 pm