-
Author
-
March 3, 2014 at 17:01 #11782
thendsproject
ParticipantHi! Thanks so much for the help with the ArrowChat levels the other day, it appears to be working!!! I have a bug I need some help with, though.
When I restrict access to Private Messages to only “Not logged in”, “Not Members” and “FREE” memberships, it disables it for every member level. Can you help me see what is wrong there? The “Private Message” button disappears for everyone, if I restrict it at all.
Thanks!
BradMarch 6, 2014 at 01:51 #12044Abe
KeymasterPrivate message button is disappearing from other cause. Those settings are doing redirects of the page
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 7, 2014 at 14:45 #12187FD
ParticipantHi,
We also have some trouble with the private message restrictions for one of our levels.
We have three level:
Freelevel : Turisten (Just, read, not send without upgrading)
Paid level: Spideren (Can send and read messages)
Paid level: Eventyreren (Can send and read messages)We have restricted the level “Turisten” to not be able to send messages, just read (Not restricted for “Restrict Messages page” and restricted for “Restrict users from sending private messages”).
This does not work anymore.When a paid level member sends a message to a free level member, he is able to answer without upgrading. We need the free level member to be redirected to PMPRO memberships level page so he can upgrade before he can answer.
How do we fix this?
Thanks for helping us. 🙂site:
fjelldate.nologin:
l:seventhqueen
p:7theQueen!March 10, 2014 at 20:49 #12445Abe
KeymasterThere is no option like “Restrict Messages page” by default. Please see your added code since the problem it is obviously from your settings/code/etc
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 11, 2014 at 14:34 #12525FD
ParticipantMaybe not by default, but according to this topic it´s possible to add: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to
I have used the code from the forum post and the other restrictions is working.
This is my code:
COPY CODE/* Medlemskapsrestriksjoner - 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' => __('Lese private meldinger','kleo_framework'), 'name' => 'message' ), //NEW RESTRICTION SHOP page with name: shop array( 'title' => __('Restrict Shop page','kleo_framework'), 'front' => __('Tilgang til butikken','kleo_framework'), 'name' => 'shop' ), array( 'title' => __('Restrict members directory','kleo_framework'), 'front' => __('Se medlemskatalog','kleo_framework'), 'name' => 'members_dir' ), array( 'title' => __('Restrict viewing other profiles','kleo_framework'), 'front' => __('Se medlemsprofiler','kleo_framework'), 'name' => 'view_profiles' ), array( 'title' => __('Restrict access to groups directory','kleo_framework'), 'front' => __('Tilgang til gruppekatalog','kleo_framework'), 'name' => 'groups_dir' ), array( 'title' => __('Restrict access to single group page','kleo_framework'), 'front' => __('Tilgang til grupper','kleo_framework'), 'name' => 'view_groups' ), array( 'title' => __('Restrict users from viewing site activity','kleo_framework'), 'front' => __('Fjellveggen for hele siden','kleo_framework'), 'name' => 'show_activity' ), array( 'title' => __('Restrict users from sending private messages','kleo_framework'), 'front' => __('Sende private meldinger','kleo_framework'), 'name' => 'pm' ), array( 'title' => __('Restrict users from adding media to their profile using rtMedia or bpAlbum','kleo_framework'), 'front' => __('Laste opp bilder','kleo_framework'), 'name' => 'add_media' ) ); return $settings; } // Setter restriksjoner for sending av meldinger (Restrict profile area - Messages page) add_action('kleo_pmro_extra_restriction_before_my_profile','kleo_my_custom_restrict'); 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' => 1, //Restricts "Turisten" //'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; }Any ideas what´s wrong?
March 13, 2014 at 11:10 #12622Abe
KeymasterYou have the function named kleo_my_custom_restrict1 but your action
add_action(‘kleo_pmro_extra_restriction_before_my_profile’,’kleo_my_custom_restrict’); adds kleo_my_custom_restrict function which does not exist probablyHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 13, 2014 at 12:19 #12630FD
ParticipantOk, I did not see that. Thanks 🙂
Then you also have to update the code in this post: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to
After updating the add_action with kleo_my_custom_restrict1 instead of kleo_my_custom_restrict I´ve tried it again. I did not work after the code update either. 🙁 I also tried the these restrictions:
Restrict users from sending private messages
Restrict users from adding media to their profile using rtMedia or bpAlbumNeither of them work as they should.
Something is very wrong. 🙁
March 16, 2014 at 10:41 #12772Abe
KeymasterDefault restrictions should definitely work. Make sure you are not admin and checked which levels to restrict
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 17, 2014 at 00:12 #12822FD
ParticipantHi,
I have checked that I´m not admin and that the right levels are restricted.
What to do?
March 19, 2014 at 01:35 #12971Abe
KeymasterWhat is your website? give me a test account that should be restricted and an admin one to see the settings done
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.