cosmetic issues

Discussion in 'Developers' Forum' started by djtremors, Dec 31, 2006.

  1. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Hi all,

    Been away for a while and have updated to the latest stable release 2.2.9 and noticed a few still bugs which i know many would still see constantly and others which are only little annoying things... so here's my list.

    1. When using New Reseller, why does the country always have to default to "Deutschland" when ISPC is used world wide (well i hope so one day)? Little annoying but it's been there since the day dot.

    2. Many screens jump back to the status screen and others jump back to the previous screen. eg. User & Email screen, editing a user password and clicking Save will take you back to the User & Email screen, clicking Cancel will take you to the status screen. I think all screens should take you back to the previous screen saving you to navigate back there.

    3. Can we make the secondary DNS servers show a table list of whats inside it. Better than a showing just a "DNS-Master IP:" option. If DNS isn't working it's alot easier for users to detect it's not updating or working if they can see some uneditable records. I think a straight html table list will do.

    4. Firewall: Allow source address IP for people to allow DNS transfers rather than having ISPC for 1 job and then having to go into shell to make your own firewall rules for another. ISPC firewall does the job well enough, just if it had "source address" or "all" for open address would be good.

    5. plugin hooks support (similar to squirrelmail). So developers can hook into main stream routines to do extra functions without modifying main source code. things like adding a user could also be doing things like setting up external software configuarations for that user, etc or Secondary DNS setup automatically adds firewall rule for primary DNS server for access..etc.etc.etc. things like this could be done and upgrading ISPC won't interfere with changes because they are hooks and not in main code as most of us have been doing so far.

    Point 5. could be more a 2.3.0 or even 3.0 idea but the others are a start. Maybe this whole post could've been better places in feature requests or not but i thought here would be better.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi George,

    1) This can be changed easily in the Form editor. I will but It on my todo list.

    2) This is not so easy to implement as a form does not know what the previous form was and you can not jump back to every form. Maybe we can add a second save button that did save the result without closing the form in a first step.

    3) This should not be a problem.

    4) ok.

    5) On this idea I'am workin already in ISPConfig 3. The server part of ISPConfig 3 is completely based on plugins, so that the core does not contain any functions that modify config files etc. This makes it easy to support a high number of different MTA's for example by simply symlinking the needed modules in the style of the mods-available + mods-enabled directories that most apache2 confihurations use.

    But Backporting a part of this to ISPConfig 2.3 might be possible, at least to provide event hooks for some events like user_insert, user_update etc.
  3. Hans

    Hans Moderator ISPConfig Developer

    I think George is right and i want to thank him for his positive critic, which is necesarry to make things better. :)

    Especially point 2), it is not logical that the system points you to the status screen every time.
    But i do understand that it will not be easy to avoid this.
    Last edited: Dec 31, 2006
  4. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    thanks guys, I was thinking i might get negative vibes but seems like a good positive response.

    2) Can't we use hidden fields in the form indicating a breadcrumb of where it was? i can't follow your source (especially the german) otherwise I'd check this out.

    5) I had been modifying some code for my own tweaks and decided to just do include("mymod.php") in alot of places making it a single line changed. Then I realised that it's better to just do a 'dohook("edit_user")' method which Squirrelmail did was better.. that's when i reliased it was better in main code.

    Symlinking!!!? why symlink,not a fan on it? We could use the SM method as well to write a new config file which tells it what modules to

    $conf['plugins']['mta_postfix'] = true;
    $conf['plugins']['stats_awstats'] = true;

    Squirrelmail guys use perl script from command line but we could do a readdir() to read all plugins in the plugins folder and check it's a valid plugin (contains valid hooks,etc) and then the gui would allow you to click whichever you want and saving would create the config file, then it's active. A separate section could be used as an emergency should a plugin be broken and somhow breaks or something.
    Something like that, make your security conscious vote on it i suppose.

    I haven't check lately but I also remember that some sections still had german titles for text boxes but it's been a while and I'd have to try and find which screen had it.
    Last edited: Dec 31, 2006
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    2) We use such a hidden field already when you open or add a userw hile you are in a website form. But we might have to enhance it to store a full history of pages to solve this issue.

    5) Personally I think symlinking is not so bad. But we might use a config file as well, this makes not a big difference. I think that symlinks are easier to add on the commandline then editing a config file, or we will have to provide a script for adding and removing plugins. As the interface in ISPConfig is not necessarily on the same server then the server side config for the plugins, we can not just write it from the interface. Instead we will have to store it in the dtabase and then write it to the config file by the server daemon script of the server that shall be affected by the configuration change.
    Last edited: Jan 1, 2007
  6. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    it's not so bad but also not so easy to control as it's global. eg. using a config file would allow us to allow certain plugins per client/reseller or whatever whereas a symlink you kinda can't.
    $config['plugins']['stats_awstats']['web1'] # could be to allow "awstats" for a particular user... (just an example, not serious :P )
    $config['plugins']['stats_webalizer']['web2'] # this user prefers webalizer.
    etc.etc. just an example.
    There could be a plugin tester php file which checks the added plugin by including it and then checking what hooks it wants and that the function exists. this would be called by a system call or something so if the plugin is broken it doesn't break the page it's called from... dunno if there's a better way of doing it.. just an idea.
    Otherwise it would have to be a command line config editor.i've never tried a php input poll for keyboard before but i know it's possible.
  7. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    When I want to return to the same place after inserting some data to mysql I do it this way, when processing the form

    if ($_POST["save_form"] == LAN_BUTTON_SAVE_AND_COME_BACK)
    $api->redirect($api->tpl->turl("sameform", array("act" => "edit""id" => $api->db->insert_id())));


    Uhm, maybe the navigation could use something like that. turl function just worries about the session id and url vars:
    public function turl($url$url_vars=false)

    $tail "";

        if (
            foreach (
    $url_vars  as $var => $value)
    $tail .= $var."=".urlencode($value)."&";

    $tail substr($tail0strlen($tail) - strlen("&"));

        if (
    $tail != ""$tail "&".$tail;

    Is not ideal, but it could be done in some hours...
  8. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    My previous post is like saving and continue editing... just that.

Share This Page