Часто так бывает, что при создании темы надо сообщить о ее создании в мини-чат, что многие и делают, т.к. её просмотрят быстрее а значат быстрее ответят, так вот, с помощью данного скрипта, только администрация сайта (и у кого есть доступ к модерской панели) сможет быстро сообщить о созданной темы на форуме в мини-чат...
Code
<textarea class="temaForumaVchatWebo4kaRu" style="display:none;"></textarea>
<script type="text/javascript">
a = location.href.replace('http://', '');
a = a.substring(a.search('/')+1,a.length);
a = a.substring(a.search('/')+1,a.length);
a = a.substring(0,a.search('-'));
b = location.href.replace('http://', '');
b = b.substring(b.search('/')+1,b.length);
b = b.substring(b.search('/')+1,b.length);
b = b.substring(b.search('-')+1,b.length);
b = b.substring(0,b.search('-'));
function moderopt(){var mopt = document.moderoptions.modopt.value;
if(mopt==26){if (confirm('Постить тему в мини-чат?')){mchat = $('.temaForumaVchatWebo4kaRu').val();$.post('/mchat/',{mcmessage:mchat,a:18}); _uWnd.alert('<font color="green" style="font-size: 15px;"><b>Сообщение в чат было отправлено!</b></font>', 'Капитан Очевидность', {w: 288, h: 88, tm: 5000});} else{_uWnd.alert('<font color="red" style="font-size: 15px;"><b>Сообщение в чат не было отправлено!</b></font>', 'Капитан Очевидность', {w: 288, h: 88, tm: 5000});} }
else {if (mopt==0){return false;} else if (mopt==20){new _uWnd('Et','Изменить/переместить тему',-440,-150,{autosize:1,closeonesc:1,resize:1,align:'left'},{url:'/forum/'+a+'-'+b+'-0-20-1'});return false;}document.getElementById('modBut2').disabled=true;window.location.href='/forum/'+a+'-'+b+'-0-'+mopt; };
};
$('.moderOptions').html($('.moderOptions').html()+'<option value="26">Постить в чат</option>');
$('.temaForumaVchatWebo4kaRu').append('Просьба всех заглянуть в эту [url='+window.location+']тему[/url]');
</script>