Plugins
Add admin menu

Hello !

I'm developing a plugin based on uni_login (only with google) which allow to filter email adresses (a list for example). I wanted to know how is it possible to add an admin menu where I will manage my restriction list when the plugin is enabled.

Do you have any clues ?

Thanks!

Hello ! I'm developing a plugin based on uni_login (only with google) which allow to filter email adresses (a list for example). I wanted to know how is it possible to add an admin menu where I will manage my restriction list when the plugin is enabled. Do you have any clues ? Thanks!
edited Mar 25 '15 at 11:24 am

Hi,

Suppose you want to have settings for a plugin named 'example'

You need to create a folder named 'admin' inside the 'example' plugin folder.
The 'admin' folder will contain two files 'example.admin.php' and 'example.admin.tpl'

In above files, replace 'example' with your plugin name.

You need to render the template file i.e 'example.admin.tpl' inside this file.
To do that, add the following line in 'example.admin.php'

echo Admin_tpl::render('example/admin/example.admin.tpl');

After doing this, you will find that in the plugin list in codoforum backend will show a link named 'settings'.

You can check out how the admin menu for the sso plugin is built.
Just copy the files from the 'sso' plugin and change according to your needs.

Hi, Suppose you want to have settings for a plugin named 'example' You need to create a folder named 'admin' inside the 'example' plugin folder. The 'admin' folder will contain two files *'example.admin.php'* and *'example.admin.tpl'* In above files, replace 'example' with your plugin name. You need to render the template file i.e 'example.admin.tpl' inside this file. To do that, add the following line in 'example.admin.php' ``` echo Admin_tpl::render('example/admin/example.admin.tpl'); ``` After doing this, you will find that in the plugin list in codoforum backend will show a link named 'settings'. You can check out how the admin menu for the sso plugin is built. Just copy the files from the 'sso' plugin and change according to your needs.

Hi,

Thank you for your answer, it was exactly what i needed.

Hi, Thank you for your answer, it was exactly what i needed.
edited Mar 26 '15 at 6:23 pm
247
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft