-
Author
Tagged: list
-
October 30, 2013 at 19:05 #5419
SQadmin
KeymasterThis topic show how to change the default check-marks in the Paid Memberships Pro (PMPRO) Levels page with your own and an example on how to add restriction to the user messages page
October 30, 2013 at 19:11 #5420SQadmin
KeymasterThe following codes goes to sweetdate-child/functions.php
This manipulates the text that shows in the memberhips page:
COPY CODE/* These restrictions will appear to be configured in Sweetdate - Memberships */ add_filter('kleo_pmpro_level_restrictions', 'kleo_my_levels_checkmarks'); function kleo_my_levels_checkmarks($settings) { $settings = array ( //NEW RESTRICTION MESSAGES page with name: message array( 'title' => __('Restrict Messages page','kleo_framework'), 'front' => __('Access messages page','kleo_framework'), 'name' => 'message' ), //NEW RESTRICTION SHOP page with name: shop array( 'title' => __('Restrict Shop page','kleo_framework'), 'front' => __('Access Shop page','kleo_framework'), 'name' => 'shop' ), array( 'title' => __('Restrict members directory','kleo_framework'), 'front' => __('View members directory','kleo_framework'), 'name' => 'members_dir' ), array( 'title' => __('Restrict viewing other profiles','kleo_framework'), 'front' => __('View members profile','kleo_framework'), 'name' => 'view_profiles' ), array( 'title' => __('Restrict access to groups directory','kleo_framework'), 'front' => __('Access group directory','kleo_framework'), 'name' => 'groups_dir' ), array( 'title' => __('Restrict access to single group page','kleo_framework'), 'front' => __('Access to groups','kleo_framework'), 'name' => 'view_groups' ), array( 'title' => __('Restrict users from viewing site activity','kleo_framework'), 'front' => __('View site activity','kleo_framework'), 'name' => 'show_activity' ), array( 'title' => __('Restrict users from sending private messages','kleo_framework'), 'front' => __('Send Private messages','kleo_framework'), 'name' => 'pm' ), array( 'title' => __('Restrict users from adding media to their profile using rtMedia or bpAlbum','kleo_framework'), 'front' => __('Add media to your profile','kleo_framework'), 'name' => 'add_media' ) ); return $settings; }
This makes the messages page restriction to happen:
COPY CODE// restrict profile area - Messages page add_action('kleo_pmro_extra_restriction_before_my_profile','kleo_my_custom_restrict1'); function kleo_my_custom_restrict1() { //full current url $actual_link = kleo_full_url(); //our request uri $uri = str_replace(untrailingslashit(home_url()),"",$actual_link); //restrict messaging page url if(preg_match("/^\/".bp_get_members_root_slug()."\/". bp_get_loggedin_user_username()."\/messages\/?/", $uri)) { $my_restrictions = array('message' => array( //2 - restrict certain levels. 0 -restrict none; 1 - restrict all 'type' => 2, //levels that you apply the restrictions to 'levels' => array(2,3), //'not_member' => 1, //restrict users without a membership level //'guest' => 1 // restrict not logged in users ) ); //We use the name "message" from the new restriction added above kleo_check_access('message',$my_restrictions); } } //Restrict Shop page add_filter('kleo_pmpro_match_rules', 'kleo_my_custom_restrict2'); function kleo_my_custom_restrict2($restrictions) { //regular expression for shop page $restrictions["/^\/shop\/?$/"] = array('name' => 'shop'); return $restrictions; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 29, 2014 at 01:18 #40504wannabe
ParticipantHow do we add restrictions on other plugins? I installed the ‘poke’ plugin ( https://wordpress.org/plugins/bp-poke/ ) and i want to restrict the use of this plugin to paid members only.
thanks in advance,
JDecember 30, 2014 at 00:51 #40626Abe
Keymaster@wannabe you need to come with a custom code since it depends on the plugin to restrict or allow something it generates.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.September 4, 2015 at 06:40 #76172liam62244
ParticipantI dont know how to use code. Is there any other way or can you help me? I need to add extra features on the membership levels that is show on the levels page
September 18, 2015 at 11:07 #78334Abe
KeymasterHi,
@liam62244 you need a bit of coding skills or editing skills. You need to take the codes as their are and paste them one after the another in the file specified. You should talk with someone that can help you customize the theme as you need.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 12, 2015 at 12:04 #92786Fatbeatz
ParticipantHi , I’m from Germany and use the translater . Hope you can understand me 🙂
In any case this does not work with the Site activities not right . So so that a free users , the site activity can not see . I ask for help , many thanks !
December 16, 2015 at 01:43 #93528Abe
KeymasterHi @fatbeatz
to restrict the activity only you need to make some custom restrictions that are not covered by our theme options.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 17, 2016 at 19:03 #111335ignacio123
ParticipantHi,
I´m looking for this code, but i think that it is different now, because i found the first part of the article, where you put the different arrays, but i can not found where put the code to the page restriction.Thanks!
March 22, 2016 at 17:56 #112231Abe
Keymasterboth codes should go to child theme/ functions.php
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.April 1, 2016 at 16:25 #114110Abe
KeymasterHi there, I think you played with the restrictions settings from Paid Membership pro or another plugin. On the level edit page make sure you haven’t checked categories to restrict
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.September 15, 2017 at 09:24 #173739solokco
ParticipantIs there a way to SHOW different restrictions according to the levels?
I just need the way to make different takes to show in the list, for example:
LEVEL 1 -> list -> 5% discount
LEVEL 2 -> list -> 15% discountAnd so on.
September 15, 2017 at 13:45 #173765Abe
KeymasterHi, I don’t fully understand the question? Can you try to repharase?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.September 16, 2017 at 01:37 #173846solokco
ParticipantHi Abe, sure, let me repharase…
So there is a section in the THEME OPTIONS where you can tell witch sections the members are allowed to access, and these show at the LEVELs page (https://seventhqueen.com/themes/kleo/membership-account/membership-levels/)
I see in the link above, that all levels have the text “SEND PRIVATE MESSAGES” but this text in the BRONZE level shows as if it where OFF or not available.
The question is that… How do I turn OFF some features for some levels and leave them on for the rest.
Hope this explains better my question.
Thanks
Attachments:
You must be logged in to view attached files.September 19, 2017 at 01:00 #174053Abe
KeymasterHi, Those are affected by the settings from Theme options – Memberships
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.September 23, 2017 at 18:56 #174532solokco
ParticipantHi Abe,
Yes I know that, the question is HOW can I add MORE options (custom options) to show on these lists.
Thanks
September 28, 2017 at 16:04 #175089Abe
KeymasterThis current topic gives you the exact info you need: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to/#post-5420
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
You must be logged in to reply to this topic.