How to remove "Link" tab from "Add Items" upload menu ?

vkdk

Joined: 2010-10-24
Posts: 3
Posted: Sun, 2010-10-24 19:55

I'd like to remove the subj. from the registered users permissions. What would I have to edit and in what file ?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-10-24 20:50
 
vkdk

Joined: 2010-10-24
Posts: 3
Posted: Sun, 2010-10-24 22:35

I would just like to remove it for Registers users only.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-10-24 23:43

gallery2/modules/linkitem/ItemAddLinkItem.inc
function loadTemplate add these few lines to the beginning of the function::

        list ($ret, $isAdmin) = GalleryCoreApi::isUserInSiteAdminGroup();
        if($ret){
            return array($ret, null, null);
        }
        if(!$isAdmin){
            return array(null, null, null);
        }

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2