Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How make PM available only to certain roles or groups?

BVXBVX New
edited September 2012 in Vanilla 2.0 - 2.8

I need to give PM rights to only such people who have attained a certain Karma score on my vanilla forum. How best to achieve this?

Thanks in advance for caring to help.

Comments

  • mcu_hqmcu_hq yippie ki-yay ✭✭✭

    I have not used the karma plugin by x00, but I would infer that the way to do this would be to grab the karma score via simple MYSQL statement, check if higher than set amount, if so, show PM link.

    This would only be hiding the link. If you want to truly disable PM until a score is reached, you may have to put in extra code in the conversations plugin.

  • Since MarketPlace plugin can help members purchase a special role (let's call it Private Messaging Rights), the requirement then becomes:

    How to show Send Private Message link to only those who have "Private Messaging Rights" role.

    So where exactly is the code for links-on-top of messages (flag, like, thanks, etc.) generated?
    and
    What code to put in so "Send {user} a Private Message" gets shown only to a specific role?

  • mcu_hqmcu_hq yippie ki-yay ✭✭✭

    The function on line 27 in class.pm.plugin.php is where you want to put your logic. You will have to see in the database where the marketplace plugin keeps tracks of the roles. Then a simple MYSQL that returns "Yay or Nay" permission to show the link or not.

  • BVXBVX New
    edited September 2012

    I am sorry, but I am not that much of a coder .. specific code to inject from anyone will help. Am slightly conscious for mcu_hq already coming this far to help me out .. and thanks for doing that mcu_hq!

    We need to show "send pm" link to only such members who are into a special role/category.

  • x00x00 MVP
    edited September 2012

    all you need is a permission, with associated logic.

    they you can use KarmaBank, Marketplace + PurchasePremiumRoles.

    set up a role with the permission, then create a PurchasePremiumRoles product in Marketplace, and assign your role to it. Set the expiry period appropriately.

    I don't have time to help further sorry.

    grep is your friend.

  • It is no good that the Conversations application lacks permission settings for say, unverified users. You should be able to disable Conversations for certain users, and this should be a default option. Maybe this was fixed in 2.1. Who knows.

  • @Anonymoose said:
    It is no good that the Conversations application lacks permission settings for say, unverified users. You should be able to disable Conversations for certain users, and this should be a default option. Maybe this was fixed in 2.1. Who knows.

    see

    http://vanillaforums.org/discussion/comment/169912/#Comment_169912

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.