How to hide/show plugins to and from members?

If you aren't speaking german, you can ask for support or post your request here.
Antworten
Benutzeravatar
amitabhmca
Beiträge: 104
Registriert: 18. Apr 2018, 02:44
Wohnort: Singapore

How to hide/show plugins to and from members?

Beitrag von amitabhmca »

Dear All,

Can someone guide me how can i hide or show plugins to and from logged in members?

In the below screenshow, i want to hide membership plugin from logged in members? How to achieve this?
plugins in member area.PNG
plugins in member area.PNG (3.23 KiB) 3243 mal betrachtet
Thanks,
Amitabh
Benutzeravatar
amitabhmca
Beiträge: 104
Registriert: 18. Apr 2018, 02:44
Wohnort: Singapore

Re: How to hide/show plugins to and from members?

Beitrag von amitabhmca »

I was able to figure it out. Please refer below:-

Modify /adm_themes/modern/my_body_bottom.php before line 121 where it says " echo $moduleMenu->show();"

Code: Alles auswählen

       if(hasRole('Administrator') || hasRole('Association Board'))
                    {
                $pluginMenu = new Menu('plugins', 'Plugins');
               
                include(SERVER_PATH. '/adm_plugins/mitgliedsbeitrag/mitgliedsbeitrag.php');
                include(ADMIDIO_PATH. FOLDER_PLUGINS. '/categoriereport/kategoriereport.php');
                include(SERVER_PATH.'/adm_plugins/formfiller/formfiller.php');
                
                 echo $pluginMenu->show();
                 
                    }
Thanks,
Amitabh
Benutzeravatar
amitabhmca
Beiträge: 104
Registriert: 18. Apr 2018, 02:44
Wohnort: Singapore

Re: How to hide/show plugins to and from members?

Beitrag von amitabhmca »

Just to mention that, the code may not be necessary as plugin comes with an option where you can deselect member role to hide respective plugin..

Thanks,
Amitabh
Antworten