BuddyDev

Search

[Resolved] paiement with featured Member

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18075
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on #18081
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18140
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18464
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on #18526

    Hello Brajesh,
    Must I answer my interest?
    Good day
    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18530

    I haven’t been able to install the plugin yet. Sorry about that. I will be installing the membership plugin and testing the code. Please wait a little more for this(Sunday evening).

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18577

    Hi,
    I have finally worked with it.

    I have seen your code in get interval too and It won’t work. I am posting an update in next 3 hours where you can set the time based on role.

    Please do know that it will apply to all users with that role. In other words, It will apply to users irrespective of how they were featured.

    I will be sharing a method for doing it based on member type too. Please note that you can use only one of these two at one time.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18579

    Hi Herve,
    Here is the updated class.
    https://gist.github.com/sbrajesh/45191a9497649750c607fe1bd43b68c8

    You can see the allowed time by the method

    
    get_role_based_interval()
    

    There. Please feel free to change it.

    Also, I have changed the strategy for storing details/removing users and it won’t work for old featured members.

    The new strategy is:-
    When a user is marked as featured, we find out the feature interval and save the future expiry time(in seconds).

    Using the cron job, we check if the expiry time is less than current time and if yes, we remove those users from featured.

    Hope it helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on #18589

    Hello Brajesh,

    I looked at your code.
    I want to know if I understood correctly.
    a) I put your file under plugins/bp-featured-member-expirable-membership-master/ instead of the old
    b) I put my wordpress token instead of author, editor … to have an expiration date based on the wordpress role (in private function get_role_based_interval( $user_id ) { …).

    I’m not sure I understand when you say:

    “I will be sharing a method of doing it based on member type.”

    “There, please feel free to change it.”

    My wish is to make a duration
    c) longer starring, for a member with xprofile_get_field_data ($ field_jesuis, $ user_id) = “Une femme”
    If not possible to differentiate. The time would multiply by a factor (eg: 1.5)
    c) shorter if it is me who presses manually the button “SET Featured”
    The time would be multiply by a factor (e.g: 0,5)

    Is it impossible or too difficult to do?
    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #18594

    Hi Herve,
    1. I am not sure what that file is , you will need to replace the old class code with the new one.

    For others, Please help me understand better. I am sorry but I am unable to understand the requirements in your message.

    Thank you
    Brajesh

The topic ‘ [Resolved] paiement with featured Member’ is closed to new replies.

This topic is: resolved