If you would like to automatically apply membership levels to new members, then this mod is for you.
This can also be useful when wanting to differentiate between
different member groups - ie - making all female members of a female
only member group. Both methods are shown below.
in profile_activate.php
Find
//Promotional membership
if ( getParam('enable_promotion_membership') == 'on' )
{
$memership_days = getParam('promotion_membership_days');
setMembership( $p_arr['Couple'], MEMBERSHIP_ID_PROMOTION, $memership_days, true );
}
}
add underneath
setMembership( $p_arr['ID'], MEMBERSHIP_GROUP_ID, 0, true );
Change MEMBERSHIP_GROUP_ID to the ID of the group you want members to automatically become a member of.
If you wish to target a specific type of member - for example
females, then you need to determine which type the new member belongs
to. In this case instead of the code above, use the following code
instead.
if ($p_arr['Sex'] == 'female') {
setMembership( $p_arr['ID'], FEMALE_MEMBERSHIP_ID, 0, true )
}
Simply change $p_arr['Sex'] to whatever profile field you wish to check for, this also includes any custom profile fields that you have added.
/DM
Please Note:
- Please do not post support questions in the product reviews box, these will be ignored.
- Please do not post support questions by PM - I am not your personal support network.
- Your inability to install software is not my problem, I am happy to help, but if it really is beyond your capability - pay a professional.
- There is a support forum for posting support questions, both here, and on my site.
- If you want to engage my services direct, visit my website and send me an enquiry, including a detailed scope of works. I will then provide you with a fixed price quotation. My standard rate is AU$100/hour.
- If you download one of my products - install the product and try it - if you have an issue - ask a question in the support forum, if you like the product. THEN post your review.
- If you post a review BEFORE trying a product - what exactly are you reviewing??? That you managed to download the mod okay?? In this case - please post a comment on your OWN profile congratulating yourself.
- If I have helped you - why not show some love by leaving a nice positive review on MY profile.
- If I have pissed you off - GOOD - You probably deserved it :)
- When leaving reviews, please consider that the MODS I post are generally free, and that I have given my time freely for YOUR benefit. I feel this is a generous action (see rate above), so if for some reason the mod is not quite what you need, instead of posting a bad review - why not turn that bitterness into something positive, and go hug a tree or something.
Thank you so much for this modification and tutorial at the same time!
Its a real pitty that people take it and not even leave a review. I guess most people never change and live their entire life in greed!
Thanks :-)
www.DeeEmm.com