On 06/Apr/2009 13:57 David Harrison wrote ..
> Hi,
> Is it possible to automatically (and efficiently) construct a list of
> Webmin modules that have the corresponding system software installed?
> e.g. If the MySQL binary/package is not installed on the system do not
> show a link to the MySQL Webmin module (even if the module itself is
> installed).
>
> I've been asked if it is possible to add a 'list modules only if
> corresponding software is installed' option to my theme, but I get the
> feeling this would be an intensive task if it is not natively
> supported within Webmin.
This is actually supported as of a few versions ago .. in the default
blue-framed theme, modules for which the underlying software is not installed
appear in the 'Un-used modules' category.
The best way to get this information is by calling the get_visible_modules_categories
function, which returns a list of category hash refs with the keys :
code - A short category code, like 'system' or 'servers'
desc - The human-readable category name
modules - An array ref of modules in the category
unused - Set to 1 for the special un-used category, which contains modules
whose underlying servers are not installed.
- Jamie
|