Create common function for inserting button for the plugins
|Reported by:||kim@…||Owned by:||gogo|
ref. thread :
Looking at the plugins there seems to be several ways of inserting the button, not to say placing the button. It seems that people have come up with several ways of doing this, and we should make a common function for this which all plugins should use.
My suggestion would be, that after the button is registered we should place it something like this.
This would be the name of the button, and if this button alreay exist in the buttons array it will be overwritten / replaced.
If the replaceButton doesnt exist, we search for this button, and if we find it we insert the button (parameter1) before/after this button (parameter 3).
string : should we insert the button before or after the serchButton
If all fails, we insert the button in the button array, as parameter 3 would suggest.