Re: How to hide a paid subscription option from specific membergroups?

Started by terminus, December 22, 2014, 08:05:56 PM

Previous topic - Next topic

terminus

I have a slightly different issue, although it has to do with subscriptions.  In the Sources/Subs.php file I have made the following entry:

'subscribe' => array(
                                'title' => 'Subscribe',
                                'href' => $scripturl . '?action=profile;area=subscriptions;u=4',
                                'show' =>  !$user_info['is_guest'] && !$user_info['is_admin'] && !$user_info['is_mod'], 
                                'sub_buttons' => array(
                                ),
                                'is_last' => !$context['right_to_left'],
                        ),


While this works, I would also like to hide this "Subscribe" menu option from people who have already subscribed.  There is a member group that I've created called "Subscriber".  How would I add someone who already belongs to the "Subscriber" group to the "show" list so a false value is returned and thus hiding the "Subscribe" option from them?




Kindred

Please start your own support thread next time...  Split.

You would have to add a check for the group in the show call...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: