Adding TinyMCE buttons without removing plugin buttons?

tiny_mce_before_init is a filter that gets the whole TinyMCE configuration, but there are filters that act on smaller parts of it, like mce_buttons for only the buttons. The advantage here is that they act on arrays, so it’s easy to add or remove parts from them. This is how Vipers Video Quicktags does it too.

You can change your code to the following snippet to insert the buttons at the right places and not remove buttons that other plugins have added:

add_filter( 'mce_buttons', 'wpse17686_mce_buttons' );
function wpse17686_mce_buttons( $old_buttons )
{
    $new_buttons = array();
    foreach ( $old_buttons as $button ) {
        $new_buttons[] = $button;
        if ( 'italic' == $button ) {
            $new_buttons[] = 'underline';
        }
        if ( 'justifyright' == $button ) {
            $new_buttons[] = 'justifyfull';
        }
    }
    return $new_buttons;
}