link_text_prompt = "текст отображаемый для ссылки (необязательно)";
link_url_prompt = "полный адрес для ссылки";
link_email_prompt = "e-mail для ссылки";
list_type_prompt = "какой тип списка необходим? введите '1' для нумерации списка, введите 'a' для алфавитного списка, или оставьте поле пустым для маркированного списка:";
list_item_prompt = "введите позицию списка, оставьте поле пустым или кликните на кнопке 'отмена', если хотите закончить";
tags = new Array();
function getarraysize(thearray) {
for (i = 0; i < thearray.length; i++) {
if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) {
return i;
}
}
return thearray.length;
}
function arraypush(thearray,value) {
thearraysize = getarraysize(thearray);
thearray[thearraysize] = value;
}
function arraypop(thearray) {
thearraysize = getarraysize(thearray);
retval = thearray[thearraysize - 1];
delete thearray[thearraysize - 1];
return retval;
}
function bbcode(theform,bbcode,prompttext) {
inserttext = prompt(tag_prompt+"\n["+bbcode+"]xxx[/"+bbcode+"]",prompttext);
if ((inserttext != null) && (inserttext != "")) {
theform.comment_text.value += "["+bbcode+"]"+inserttext+"[/"+bbcode+"] ";
theform.comment_text.focus();
}
}
function namedlink(theform,thetype) {
linktext = prompt(link_text_prompt,"");
var prompttext;
if (thetype == "URL") {
prompt_text = link_url_prompt;
prompt_contents = "http://";
}
else {
prompt_text = link_email_prompt;
prompt_contents = "";
}
linkurl = prompt(prompt_text,prompt_contents);
if ((linkurl != null) && (linkurl != "")) {
if ((linktext != null) && (linktext != "")) {
theform.comment_text.value += "["+thetype+"="+linkurl+"]"+linktext+"[/"+thetype+"] ";
}
else {
theform.comment_text.value += "["+thetype+"]"+linkurl+"[/"+thetype+"] ";
}
}
theform.comment_text.focus();
}
function dolist(theform) {
listtype = prompt(list_type_prompt, "");
if ((listtype == "a") || (listtype == "1")) {
thelist = "[list="+listtype+"]\n";
listend = "[/list="+listtype+"] ";
}
else {
thelist = "[list]\n";
listend = "[/list] ";
}
listentry = "initial";
while ((listentry != "") && (listentry != null)) {
listentry = prompt(list_item_prompt, "");
if ((listentry != "") && (listentry != null)) {
thelist = thelist+"[*]"+listentry+"[/*]\n";
}
}
theform.comment_text.value += thelist+listend;
theform.comment_text.focus();
}
вв-код
предыдущая Макро снежинки
следующая Фея
Популярное на портале
Ждешь ребенка
Совместные покупки
Авторынок Днепропетровска
Знакомства и признания
Бытовые товары и техника
Фотогалерея Днепропетровска
Форумы
Город Днепропетровск
Политика
Новости Днепропетровска
Дом и семья
Кулинария
Наши дети
Доска объявлений
Досуг и развлечения
Музыка
Торренты
Коллекционирование
Компьютеры и программы
Мобильная связь и интернет
Работа в Днепропетровске
Профессиональные форумы
Он и она...
Беседка
Товары
Магазины Днепропетровска Каталог цен и товаров Совместные покупки Объявления UaShopping
Развлечения
Гороскопы
Сонник
Тайна имени
Видео ролики
Онлайн игры Дневники Форум Днепропетровска