Premium Player Links

General Chat, Comments
Post Reply
illusions
Posts: 31
Joined: Thu Mar 06, 2014 12:46 pm

Premium Player Links

Post by illusions »

it is possible to create links that only premium members can see

open up the menu.php file of the link you wish too hide and do this

Code: Select all

<?php
if (! IsPremiumMember())
    return;
$menuEntries[]=new MenuEntry("Mix","Actions");
Mix is the name of the Module and Actions is the category menu where that link will become visible to premium members
illusions
Posts: 31
Joined: Thu Mar 06, 2014 12:46 pm

Re: Premium Player Links

Post by illusions »

another trick for example if you dont want none premium members to send money or items from the messages section simply do this find

Code: Select all

RunHook("message_compose.php", "moduleLink");
and change too

Code: Select all

if (IsPremiumMember()) {
    RunHook("message_compose.php", "moduleLink");
	
	}
and that's that
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Premium Player Links

Post by KyleMassacre »

The thing about restricting the hook from non premium members is that it does just that. I would add the condition to the actual hook itself. Or maybe something like this would work:

Code: Select all

if (function_exists('RunHook'))
{
    function RunHook($fileName,$variable = null,$run = true)
    {
        if($run == true)
        {
            return RunHook($fileName,$variable);
        }
    }
}
then you can do: RunHook('somefile.php',null,IsPremiumMember());
Post Reply

Return to “General”