Overriding theme sections, what's the best practice?

3 posts / 0 new
Last post
#1 Mon, 12/02/2019 - 07:18

Overriding theme sections, what's the best practice?

I'm trying to change what's displayed on virtualmin's sidebar section and found this on the code (view_domain.cgi):

# Show actions for this domain, unless the theme vetos it (cause they are on
# the left menu)
if (!$main::basic_virtualmin_domain) {

Is there a non-hacky way to do it? It seems authentic-theme can add Perl syntax on scripts.pm, but I'm not seeing any hook-type style of functions to override UI methods. Any suggestions?

Mon, 12/02/2019 - 07:20

Oooh. So "basic_virtualmin_domain" is the hook. Trying this one out. Nope. misunderstood this.

Tue, 12/03/2019 - 04:22

If anyone is wondering, what you'll be looking for is webmin_menu.pl in virtual-servers. I made an addon permissions module (just a simple file) to go through the links, and also disallow access when the page is visited (attaching to virtual-server-lib-funcs.pl). So, yeah, no hooks that I found.