Developer Articles > Hide userCP tab pr group permission/if condentional > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Developer Articles > Hide userCP tab pr group permission/if condentional

wersja drukowalna wersja Microsoft Word wersja HTML

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.

wto, 15 wrzesień 2009

Komentarze:

Brak komentarzy

Imię/Nick:

Adres email:

Strona WWW:

Treść Komentarza: