display media plugins: fixed several bugs (javascript and php)