David Harrison | 18 May 2010 23:00
Picon
Gravatar

[webmin-devel] Function to return the name of the current module

Hi,

Is there a built-in Webmin function that returns the internal name of the active module?
e.g. "mysql" if the user is using the MySQL module.

This information would seem to be available via $ENV{SCRIPT_NAME}, but I'm sure there's an easier way of getting it.
(Plus I am not sure how $ENV{SCRIPT_NAME} behaves if Webmin is in a subdirectory)

Background:
In my theme I want to include a <body class="$modulename"> tag so that I can better target CSS rules.
e.g. body.mysql form.ui_form { }


Regards,


David
------------------------------------------------------------------------------

-
Forwarded by the Webmin development list at webmin-devel <at> webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
Jamie Cameron | 18 May 2010 23:24

Re: [webmin-devel] Function to return the name of the current module

Hi David,

You can get this from the global variable $module_name

 - Jamie

On 18/May/2010 14:00 David Harrison <david.harrison <at> stress-free.co.nz> wrote ..

Hi,
Is there a built-in Webmin function that returns the internal name of the active module?
e.g. "mysql" if the user is using the MySQL module.

This information would seem to be available via $ENV{SCRIPT_NAME}, but I'm sure there's an easier way of getting it.
(Plus I am not sure how $ENV{SCRIPT_NAME} behaves if Webmin is in a subdirectory)

Background:
In my theme I want to include a <body class="$modulename"> tag so that I can better target CSS rules.
e.g. body.mysql form.ui_form { }


Regards,


David

------------------------------------------------------------------------------

-
Forwarded by the Webmin development list at webmin-devel <at> webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
David Harrison | 18 May 2010 23:40
Picon
Gravatar

Re: [webmin-devel] Function to return the name of the current module

Perfect. Cheers.



On Wed, May 19, 2010 at 9:24 AM, Jamie Cameron <jcameron <at> webmin.com> wrote:

Hi David,

You can get this from the global variable $module_name

 - Jamie

On 18/May/2010 14:00 David Harrison <david.harrison <at> stress-free.co.nz> wrote ..

Hi,
Is there a built-in Webmin function that returns the internal name of the active module?
e.g. "mysql" if the user is using the MySQL module.

This information would seem to be available via $ENV{SCRIPT_NAME}, but I'm sure there's an easier way of getting it.
(Plus I am not sure how $ENV{SCRIPT_NAME} behaves if Webmin is in a subdirectory)

Background:
In my theme I want to include a <body class="$modulename"> tag so that I can better target CSS rules.
e.g. body.mysql form.ui_form { }


Regards,


David


------------------------------------------------------------------------------


-
Forwarded by the Webmin development list at webmin-devel <at> webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel


------------------------------------------------------------------------------

-
Forwarded by the Webmin development list at webmin-devel <at> webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel

Gmane