so with this it works with ns 4.7 so 6 i hope
1) add this to template
before /header
Code:
<script language="JavaScript" src="scripts.js"></script>
2) add this to the same template each time where you want in the template (with a good image)
each time you add an image with a bbcode be careful about addcode('') you need to put the good action
Code:
<img src="img/bbcode/gras" border="0" alt="Mettre le texte en gras : texte" onMouseUp="addCode('gras')">
2) open scripts.txt and remplace replier to the name of your textarea (name="" in template)
3) modify the code as you want (it's in french so don't worry

)
4)save to scripts.js
5) upload scripts.js to your forum directory