We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    Nicola (Banzai) Reply #1, 12 years ago
    I'm tryng to create my first config file for multiTV Database Manager.
    This is my very simple config test:

    {
        "table": "web_users",
        "caption": "Users",
        "fields": {
            "id": {
                "caption": "user ID"
            },
            "username": {
                "caption": "Username"
            }
        },
        "columns": [
            {
                "fieldname": "id",
                "width": "10"
            },
            {
                "fieldname": "Username",
                "width": "90"
            }
        ],
        "form": [
            {
                "caption": "Users",
                "content": {
                    "id": {},
                    "username" {}
                }
            }
        ],
        "configuration": {
            "radioTabs": 1,
            "sorting": 1
        }
    }


    what i'm doing wrong?


    Result:
      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design
      • 13428 ☆ A M B ☆
      • 1,031 Posts
      The JSON is invalid. Missing colon after "username" in line 27.
        • 2762
        • 1,198 Posts
        Nicola (Banzai) Reply #3, 12 years ago
        Ok, i'm very myopic, Thank you smiley

        Is there a way to "join" tables?
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design
          • 13428 ☆ A M B ☆
          • 1,031 Posts
          You could copy every processor needed into a custom subfolder and add this subfolder name in your config by
          "processors": "subfoldername",


          multiTV database manager uses the subfoldername/xxx.processor.inc.php then if it is available.

          You could even create custom buttons with your config …

              "buttons": {
                  "coupons": {
                      "position": "topright",
                      "buttons": {
                          "generate": {
                              "caption": "ButtonCaption",
                              "icon": "ButtonIcon.png", // searches in multitv/css/images folder 
                              "processor": "generate", // processor runs after form is sent
                              "form": [
                                  {
                                      "caption": "FormCaption", // this form is opened clicking on the button
                                      "content": {
                                          "count": {},
                                          "discount": {},
                                          "validuser": {},
                                          "validgroup": {},
                                          "validuntil": {},
                                          "maxuse": {}
                                      }
                                  }
                              ]
                          }
                      }
                  }
              },
          
            • 13428 ☆ A M B ☆
            • 1,031 Posts
            I have updated the documentation a bit with button configs and added one button to the log_event demo.