$action=$ui->getAction();// current mode: create, edit, list
$type=$ui->getEventName();// 'wmessage', 'news' etc.
$config=array();
//TODO Add support for type='method'. (ie. extending the form-handler. )
switch($type)
{
case"page":
case"news":
if($this->twitterActive==true)
{
$config['fields']['twitter']=array('title'=>"Post to Twitter",'type'=>'text','tab'=>1,'writeParms'=>array('size'=>'xxlarge','placeholder'=>'Type your tweet here.'),'width'=>'auto','help'=>'','readParms'=>'','class'=>'left','thclass'=>'left',);
}
break;
}
//Note: 'twitter' will be returned as $_POST['x_social_twitter']. ie. x_{PLUGIN_FOLDER}_{YOURKEY}