Store
Community Documentation

v3 Knowledgebase

Create a new User Group Setting to allow/disallow membership in admincp

Create a new user setting to allow/disallow and a certain membership type to access your pages.

I will use my Links Mod here as example.
If the images are too small, just click on it to make it bigger so you can see it

So I have this page called
http://phpfoxstyles.com/demo2/mylinks/
and I dont want guess to have access to it

So I will go to admincp to add a new set
Go to admincp following the image tips below
adduser.png

Add your settings like this and click on submit
addset.png

you will now see this code
code.png

Now I will open the page class file that I don't want users to see, in my case it will be
/module/mylinks/include/component/controller/index.class.php
and I will add the code like this
Please not that the code that I copied is

PHP:
Phpfox::getUserParam('mylinks.can_view_mylinks_page'

but I will add the TRUE statement to it like this

PHP:
Phpfox::getUserParam('mylinks.can_view_mylinks_page'true); 

So I now have added the code after the
public function process()
see the pic with the arrow
dream.png

and here is my new setting in admincp
page.png

Hope this tutorial help with your settings issues.

Wanna test my settings? try to visit http://phpfoxstyles.com/demo2/mylinks/ without login :D