Remembering the template name

Discussion in 'Feature Requests' started by meemu, May 18, 2007.

  1. meemu

    meemu ISPConfig Developer ISPConfig Developer

    Hi, I tried posting in devel but I didn't have permissions. Apologies if this is in the wrong place.
    What I am trying to do is to store the template id together with the actual web. Main reason is for feeding into a billing/registration system at a later stage.
    I understand the templates are stored in isp_isp_web_template and the actual web sites are stored isp_isp_web. Now my question: would it be a good idea just to add a column to isp_isp_web that contains the doc_id from isp_isp_web_template and fill this on form submission or is there anotehr place this would better go?

    Thanks in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I would just add a column to isp_isp_web with the doc_id of the template. Posting to the development forum is only possible for registered developers. If you want to become registered developer, please have a look at the sticky posts in the dev forum.
     
  3. meemu

    meemu ISPConfig Developer ISPConfig Developer

    I have tried looking at /home/admispconfig/ispconfig/web/multidoc/edit/edit.php

    Would I have to edit the doctype entry for isp_web and add vorlage_id to the doctype_def and that would do that trick (also add the column to isp_isp_web)?

    Thanks!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You dont have to edit this file at all, it is the form processor for all forms. You must use the form editor to add the field to the form. The form editor will create the database field for you automatically.

    But as the field should not be visible, it will be ok if you add it just to the database with phpmyadmin.
     
  5. meemu

    meemu ISPConfig Developer ISPConfig Developer

    Ah yes I understand that but I was more thinking of storing the hosting plan you select when you set up a new web.

    It's called from here:

    /home/admispconfig/ispconfig/web/isp_manager/new/web.php

    My reading was that it passes vorlage_id to the form processor but the form processor only saves the values that are defined in doctype.doctype_def
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig forms are action based, you dont have to edit anything in the form processor as this file is for all forms, not just websites you must add your code to the action functions which can be found in the file /home/admispconfig/ispconfig/lib/classes/isp_isp_web.lib.php
     

Share This Page