How do I add an input field in the Admin CP and create table

Hmm... this was pretty helpful:

/**
* Gets the fields that are defined for the table. This should return an array with
* each key being a table name and a further array with each key being a field in database.
* The value of each entry should be an array, which
* may have the following keys:
* * type - one of the TYPE_* constants, this controls the type of data in the field
* * autoIncrement - set to true when the field is an auto_increment field. Used to populate this field after an insert
* * required - if set, inserts will be prevented if this field is not set or an empty string (0 is accepted)
* * requiredError - the phrase title that should be used if the field is not set (only if required)
* * default - the default value of the field; used if the field isn't set or if the set value is outside the constraints (if a {@link $_setOption} is set)
* * maxLength - for string/binary types only, the maximum length of the data. For strings, in characters; for binary, in bytes.
* * min - for numeric types only, the minimum value allowed (inclusive)
* * max - for numeric types only, the maximum value allowed (inclusive)
* * allowedValues - an array of allowed values for this field (commonly for enums)
* * verification - a callback to do more advanced verification. Callback function will take params for $value and $this.
*
* @return array
*/
 
Hi Andy,

I was following this thread for creating a link in the admincp page and thanks to this post I successfully create the link in the admin.php -> application -> Attachment.
But now I am facing issue while displaying the template on that link.
Can you please help me.
Here is my code.

PHP:
<?php

class Hotlinks_Xenforo_ControllerAdmin_Attachment extends XenForo_ControllerAdmin_Attachment {
 
    public function actionIndex()
    {
//        echo 'into';exit;
        $post = 'test';
        // display andy_smiliecount template
        $viewParams = array('post' => $post);
//        echo 'testing';
        $response = $this->responseView('XenForo_ViewAdmin_Attachment_View','test',$viewParams);
      
        return $response;
      

    }
}
 
Top Bottom