View file system/inc/classes/text_list.class.php

File size: 2.05Kb
<?
class text_list
{
function text_lister() {
return  '
<script language="JavaScript" type="text/javascript"> 
function tag(text1, text2) { 
if ((document.selection)) { 
document.form.msg.focus(); 
document.form.document.selection.createRange().text = text1+document.form.document.selection.createRange().text+text2; 
} else if(document.forms[\'form\'].elements[\'text\'].selectionStart!=undefined) { 
var element = document.forms[\'form\'].elements[\'text\']; 
var str = element.value; 
var start = element.selectionStart; 
var length = element.selectionEnd - element.selectionStart; 
element.value = str.substr(0, start) + text1 + str.substr(start, length) + text2 + str.substr(start + length); 
} else document.form.msg.value += text1+text2; 
}
</script>

<div class="code_textarea">
      <a href="#form" onclick="javascript:tag(\'[b]\', \'[/b]\');"><span title="Текст жирным шрифтом">B</span></a>
   <a href="#form" onclick="javascript:tag(\'[i]\', \'[/i]\');"> <span title="Текст курсивом">I</span></a>
  <a title="sa" href="#form" onclick="javascript:tag(\'[u]\', \'[/u]\');"><span title="Подчеркнутый текст">U</span></a>
  <a href="#form" onclick="javascript:tag(\'[s]\', \'[/s]\');" title="Зачеркнутый текст"><span title="Зачеркнутый текст">S</span></a>
   <a href="#form" onclick="javascript:tag(\'[img]\', \'[/img]\');"><span title="Вставка картинки">IMG</span></a>
   <a href="#form" onclick="javascript:tag(\'[php]\', \'[/php]\');"><span title="Вставка php кода">PHP</span></a>
    <a href="#form" onclick="javascript:tag(\'[url=http://]\', \'[/url]\');"><span title="Вставка ссылки">URL</span></a>
    <a href="#form" onclick="javascript:tag(\'[hide]\', \'[/hide]\');"><span title="Скрытый текст">HIDE</span></a>
	  <a href="#form" onclick="javascript:tag(\'[spoiler=]\', \'[/spoiler]\');"><span title="Спрятать содержимое в спойлер">SPOILER</span></a>
</div>';
}}
$text_list = new text_list;
?>