Клуб WEB Мастеров
Ср, 25.06.2025, 14.27.40
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Цитирование в мини-чате
KazrexДата: Пт, 02.03.2012, 08.15.51 | Сообщение # 1
Admin
Группа: Администраторы
Сообщений: 570
Статус: Ofline
Установка: Заходим в ПУ-->Управление дизайном-->Мини-
чат-->вид материалов, и вставляем в самый верх
скрипт:
Code
<script type="text/javascript">function Insert
(qname,text){if (text!=""){ qname=qname.replace
(/[\[\]]/g, "|");
parent.window.document.getElementById
('mchatMsgF').focus
();parent.window.document.getElementById ('mchatMsgF').value+=("[quote="+qname+"]"+text
+"[/quote]\n");} else {_uWnd.alert('Выделите текст
для цитирования','',{w:200,h:30,tm:3000});}}
function paste(text,flag){if
((document.selection)&&(flag))
{document.addform.message.focus ();document.addform.document.selection.createRange
().text = text;} else
document.addform.message.value += text;}
function get_selection() {if (window.getSelection)
{selection = window.getSelection().toString();}else if
(document.getSelection) {selection = document.getSelection();}else {selection =
document.selection.createRange().text;}}</script>

Затем, в месте где нужно вывести ссылку
вызывающую цитирование ставим код:
Code
<a href="javascript:Insert('$USERNAME
$',selection);" onmouseover="get_selection()"
class="postQuote">[Цит.]</a>


suite

New York
  • Страница 1 из 1
  • 1
Поиск:
KAZREX © 2025