Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Vesta Web Interface
  • Search

Can modules be disabled?

Questions regarding the Web Interface
GUI
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Grunthos
Posts: 5
Joined: Tue Jan 20, 2015 1:19 am

Can modules be disabled?
  • Quote

Post by Grunthos » Tue Feb 03, 2015 4:31 pm

Can modules that aren't required be disabled in the web interface easily?

Stopping the services is simple enough but I'm looking to remove or diable DNS and MAIL from the interface if i can.

GTF
Top

Grunthos
Posts: 5
Joined: Tue Jan 20, 2015 1:19 am

Re: Can modules be disabled?
  • Quote

Post by Grunthos » Tue Feb 03, 2015 5:03 pm

Answering my own post:

Easy. Code some php around each href in panel.html and they're selectable.

GTF
Top

ivanh
Posts: 41
Joined: Sun Mar 23, 2014 6:40 am

Re: Can modules be disabled?
  • Quote

Post by ivanh » Fri Feb 06, 2015 1:28 am

What was your PHP method? I was personally thinking editing the HTML with comments.
Top

Grunthos
Posts: 5
Joined: Tue Jan 20, 2015 1:19 am

Re: Can modules be disabled?
  • Quote

Post by Grunthos » Fri Feb 06, 2015 2:11 am

I've already scrubbed the install i was playing with to test someting else but it was something like:

A function allowed_option takes a username and the option to check.
Reads a flatfile with something similar to:

"username","0","1","0","1"...etc

0 returns false, 1 returns true. If true output the HTML.

Code: Select all

<?php if (!allowed_option($userName,"/list/web"){
}
else {?>
                <a class="nav-lnk" href="/list/web/">
                <span class="nav-<?php if($TAB == 'WEB' ) echo 'selected-' ?>block">
                    <p class="nav-<?php if($TAB == 'WEB' ) echo 'selected-' ?>header">
                        <?php print __('WEB');?>
                    </p>
                    <p class="nav-counters">
                        <?php print __('domains');?>: <? echo $panel[$user]['U_WEB_DOMAINS']?><br>
                        <?php print __('aliases');?>: <? echo $panel[$user]['U_WEB_ALIASES']?><br>
                        <?php print __('spnd');?>: <? echo $panel[$user]['SUSPENDED_WEB']?>
                    </p>
                    <p class="marker"></p>
                </span>
                </a>
<?php}?>  
I was considering using the first part of the if to output a greyed out, non selectable option.
Crude but it worked ok for the test.


Hope that helps.

GTF
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Interface”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password