Код ставим после $MESSAGE$в Страница материалов и коментариев к ниму.
Code
<script type="text/javascript">
function selectCode(a){
var e = a.parentNode.parentNode.getElementsByTagName('code')[0];
if (window.getSelection){
var s = window.getSelection();
if (s.setBaseAndExtent){
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}else{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);}
}else if (document.getSelection){
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}else if (document.selection){
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();}}
codediv=document.getElementsByTagName('div');
for(i=0;i<codediv.length;i++){
if(codediv[i].className=="bbCodeBlock"){
s=codediv[i].innerHTML;
s=s.replace('>Code<\/div>','>Код: |<a href="#" onclick="selectCode(this); return false;"> Выделить всё<\/a><\/div>').replace('<!--uzc-->','<!--uzc--><code>').replace('<!--\/uzc-->','<\/code><!--\/uzc--> ');
codediv[i].innerHTML=s;}}
</script>
<div id="showurls" style="display: block;"><table style="border: 0px none ;" border="0" cellpadding="4" cellspacing="0" width="100%"><tbody><tr><td style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><center>BBCode: <input id="newslinkbbcode" readonly="readonly" class="newslink" onclick="this.select()" value=""></center><center>HTML: <input id="newslink" readonly="readonly" class="newslink" onclick="this.select()" value=""> </center></td></tr></tbody></table></div><center style="display: none;" id="showurl">[ <a href="#" onclick="return false;">Получить прямую ссылку на новость</a> ]</center><center id="hidenax" style="display: block;">[ <a href="#" onclick="return false;">Скрыть ссылки</a> ]</center><script type="text/javascript">$(document).ready(function() {$('#showurl').click(function(){$('#showurls').show('slow'); $('#showurl').hide('fast'); $('#hidenax').show('fast');}); $('#hidenax').click(function(){$('#showurls').hide('slow'); $('#hidenax').hide('fast'); $('#showurl').show('fast');});}); document.getElementById('newslink').value='<a href="'+location.href+'" title="$ENTRY_NAME$">$ENTRY_NAME$</a>'; document.getElementById('newslinkbbcode').value='[url='+location.href+']+location.href+[/url]'</script>