For most buttons it is enough to use the function explained here. It returns an array which contains a string with a formatted itemlist that your buttons can use as is.
linodef_buttonsapi_itemlist
Array ( [data] => Array ( [0] => Array ( [tag] => see description below [desc] => see description below ) etc. (one array for each element with content) ) [name] => 'The label(s) or name of the element you have entered.' [element type][input] => 'The element type of the element you have entered.' [element type][output] => 'The element type of the elements that Buttons API returns.' [element] => 'The element you have entered.' [options] => see description below [content] => see description below )'tag' contains the tag that the button will insert into the textfield. Its a Linodef filter tag. 'desc' contains the corresponding text to the tag which should appear in the selection list of the button. If the user has no access rights for the current node this field may also contain an "access denied" message (then the associated tag key is empty). 'options' is an array if options are set or an empty string. 'content' is a string with an HTML formatted list of linked items created with 'tag' and 'desc' of the 'data' array. This string is ready to be used by your list and popup buttons.
Array ( [content] => 'A message' )