В шаблон мини чата «Вид материалов», в самый верх, добавляем следующее:
Код
<?if($NUMBER$='1')?> <style type="text/css">.mDetails{display:none;}</style> <script type="text/javascript"> function getSel(i){var d=document,a=d.getElementById(i),w=window;return (a&&a.value)? a.value.substring(a.selectionStart,a.selectionEnd):w.getSelection?w.getSelection():d.getSelection?d.getSelection():d.selection?d.selection.c reateRange().text:false} function chatInsert(a,b){if(b!=""){a=a.replace(/[\[\]]/g,"|");chatPaste("[quote="+a+"]"+b+"[/quote]\n",0)}else{alert('Выделите текст для цитирования')}}; function chatPaste(a,b){var d=parent.window.document,frm=d.getElementById('MCaddFrm');if((document.selection)&&(b)){frm.mcmessage.focus();frm.document.selection.createRange().text=a}else frm.mcmessage.value+=a}; if(parent.window.document.getElementById('mchatMsgF')){document.write('<style type="text/css">.mDetails{display:block;}</style>');} </script> <?endif?>
В том же шаблоне, по месту, добавляем кнопку/ссылку для цитирования: