Jump to content

  •  

  • Tutorial info Visit support topic

    • Added on: Sep 15 2009 01:58 AM
    • Views: 1605
     


    * * * * *
    0 Ratings

    [IPB3]Hide userCP tab pr group permission/if condentional

    If you're developing a userCP only application, you might find yourself in a place where you want to hide the tab for some groups.

    Posted by Martin on Sep 15 2009 01:58 AM
    If you're developing a userCP only application, you might find yourself in a place where you want to hide the tab for some groups.
    I've suggested that IPS add something to the main application that allows us to add raw PHP code, which is executed when forming the ipsRegistry::$applications array, were we could fetch our values for a different setting, and show/hide the application tab according to that. Until them, this will work.

    In the method "getLinks" in your applications usercpForms.php you can add something like this to the very beginning:
    if( expr )
    {
    	return false;
    }
    This will hide the tab, and even deny access if you're using the exact URL to reach it.

    Powered by Tutorials 1.4.1 © 2012, by Michael McCune