How to create links in Tools & Options?

Discussion in 'Tips/Tricks/Mods' started by wpwood3, Oct 11, 2007.

  1. wpwood3

    wpwood3 New Member

    How can I create my own links to programs in the Tools & Options tree?

    For example...
    If I install the Squirrelmail package via Update Manager it places a link in Tools & Options.

    I prefer the "Squirrelmail On Your ISPConfig Server Within 10 Easy Steps" because I can use webmail.mydomain.tld instead. Unfortunately, I no longer have the link to Squirrelmail in Tools & Options.

    How can I create this link myself?

    Is there a guide somewhere that describes how to create ISPConfig packages?
     
  2. jnsc

    jnsc rotaredoM Moderator

  3. wpwood3

    wpwood3 New Member

    Thanks!

    I see...

    After knowing how the packages work I relooked at the Squirrelmail package to see how it creates a link.
    It appears that the "magic" is in the file nav.inc.php

    It contains the following:
    Code:
    <? //if($go_api->auth->check_admin(0,1)) {
    ?>
    <!-- SquirrelMail //-->
    menuDaten.neu(new LinkEintrag('root','<? echo $go_api->lng("SquirrelMail")?>','../../../squirrelmail/index.php','_blank','doc.gif','SquirrelMail','n',''));
    
    <? //} 
    ?>
    This file gets copied into the ISPConfig tools directory by the installer (package.ins) with the following:
    Code:
    CPFILE: "{src}/nav.inc.php"; DestDir: "{app}/web/tools/tools/squirrelmail"; DestName: "nav.inc.php"; Chmod: ""
     
  4. wpwood3

    wpwood3 New Member

    Works great!

    Just to followup on this. It's almost too simple to post but it might help someone. :D
    All of this assumes you have installed SquirrelMail using THIS PROCESS. Also, I'm using CentOS 5. YMMV.
    I got the link working with a few minor changes.

    Create a file nav.inc.php containing this: (Be sure to use your domain)
    Code:
    <? //if($go_api->auth->check_admin(0,1)) {
    ?>
    <!-- SquirrelMail //-->
    menuDaten.neu(new LinkEintrag('root','<? echo $go_api->lng("SquirrelMail")?>','[COLOR="Red"][B]http://webmail.mydomain.com/index.php[/B][/COLOR]','_blank','doc.gif','SquirrelMail','n',''));
    
    <? //} 
    ?>
    Create a new folder:
    Code:
    mkdir /home/admispconfig/ispconfig/web/tools/tools/squirrelmail
    Copy nav.inc.php to the new folder.

    That's it! When you open ISPConfig you'll find a link to Squirrelmail in the Tools & Options tree.
     
    Last edited: Oct 14, 2007
  5. mccharlet

    mccharlet Member HowtoForge Supporter

    Hi,

    I have create a link for un personal php page.
    But i want limited acces to a client or a reseller.

    That's possible?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As a short note, you can add folders and items of your choice to the tree menu in the tools section by adding a subdirectory in /home/admispconfig/ispconfig/web/tools/tools/ which may have any name you like and put a nav.inc.php file in it. Have a look at the nav.inc.php files of the other tools in /home/admispconfig/ispconfig/web/tools/tools/... to get a impression on how to add folders and items.
     

Share This Page