I got it. just replace Popup template ( shoutbox ) with hookGlobalShoutbox template. and replace all $d with $data will work. (also the javascript is needed to be inserted at the top)
<script type='text/javascript' src='public/js/shoutbox.js'></script>
<script type='text/javascript' src='public/sounds/soundmanager2-nodebug-jsmin.js'></script>
save and go..
but after that any shout edit cannot be done ..