Единый форум поддержки

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Единый форум поддержки » Корзина » Пропали кнопки из формы ответа! (хелп ТТ)


Пропали кнопки из формы ответа! (хелп ТТ)

Сообщений 1 страница 3 из 3

1

Сегодня зашла на форум и обнаружила пропажу кнопок в форме ответа, такие как спойлер (скрипт на месте, даже работает, но приходится вводить бб код вручную), еще была установлена кнопка Бегущая строка в посте (она не так важна). Но как мне вернуть кнопку спойлера? тТ
форум - http://narutodestinies.spybb.ru/

Отредактировано Freya0804 (Ср, 12 Окт 2011 13:45:45)

0

2

Что ето за такой спойлер который в форму ответа идёт? в HTML низ ставятся спойлеры, пропажа из-за того что полезли и убрали случайно всё, бегущая строка в посте тоже идёт в HTML низ.

HTML низ

Freya0804 написал(а):

Бегущая строка в посте

Код:
<!--Бегущая строка v.3 © Romych-->
<script language="javascript">
$(function(){
$('td#button-link').before('<td id="marqueebut" style=\'background-image:url("http://img17.imageshack.us/img17/55/marquees.png")\'><img src="/i/blank.gif" title="Бегущая строка"></td>');
$('.marqur').css('cursor', 'pointer');
$('#marqueebut, .marqur').click(function(){
$('div#marqu').toggle();});
$("div.post-content").map(function () {
text = $(this).html();
if(text.indexOf("[/marqu]") != -1) {
marquees = /\[marqu=(.*?)\]([^`]*?)\[\/marqu\]/gi
$(this).html(text.replace(marquees, "<marquee direction='$1' scrollamount='2' onMouseOver='this.stop()' onMouseOut='this.start()'>$2</marquee>")); }
}); });
</script>
<div id="marqu" class="container"  style="display:none;width:auto;padding:8px;position:absolute;margin-top:-35%;margin-left:35%;">
<div><strong>Выберите направление</strong></div><hr><br>
<div align="center" onclick="bbcode('[marqu=up]', '[/marqu]')"><img class="marqur" src="http://www.iconsearch.ru/uploads/icons/iconza/24x24/up_arrow.png" title="up"></div>
<span onclick="bbcode('[marqu=left]', '[/marqu]')"><img class="marqur" src="http://www.iconsearch.ru/uploads/icons/iconza/24x24/left_arrow.png" title="left"></span><span style="float:right;" onclick="bbcode('[marqu=right]', '[/marqu]')"><img class="marqur" src="http://www.iconsearch.ru/uploads/icons/iconza/24x24/right_arrow.png" title="right"></span>
<div align="center" onclick="bbcode('[marqu=down]', '[/marqu]')"><img class="marqur" src="http://www.iconsearch.ru/uploads/icons/iconza/24x24/down_arrow.png" title="down"></div>
</div>

HTML низ

Freya0804 написал(а):

спойлер

Код:
<style>
#button-spoiler {background-image:url('Тут ваша ссылка на иконку спойлера'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
function tag_spoiler(){
	var y = prompt("Введите описание закрытой кнопки",'');
	if(y!='null' && y!='' && typeof(y)!='object' && typeof(y)!='undefined'){
	var x = prompt("Введите описание открытой кнопки",'');
	if(x=='null' || x=='' || typeof(x)=='object' || typeof(x)=='undefined') bbcode('[spoiler='+y+']','[/spoiler]'); else bbcode('[spoiler='+y+'|'+x+']','[/spoiler]');}
	else bbcode('[spoiler]','[/spoiler]')
}
function addSpoiler(str,from,internal){
	var pos=0,pos2=0,pos_c=0,pos_l=0,newpos=0,string='',close='',open='';
	if((pos=str.indexOf("[spoiler",from))==-1) return str;
	if((pos2=str.indexOf("[/spoiler]"),pos+9)==-1) return str;
	if(((pos_c=str.indexOf("]",pos+8))!=-1) && ((pos_c!=pos+8)&&(pos_c!=pos+9))){
	string = str.substring(pos+9,pos_c);
	if((pos_l = string.indexOf("|"))!=-1){
close = string.substring(0,pos_l);
open = string.substring(pos_l+1,string.length);
	}
	else{
close = string;
open = string;
	}
	}
	else{
close = 'Показать';
open = 'Скрыть';
	}
	newpos=str.indexOf("[spoiler",pos+9)
	if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
	if((pos2=str.indexOf("[/spoiler]",pos+9))==-1) return str;
	str=str.substring(0,pos)+makeSpoiler(str.substring(pos_c+1,pos2),open,close)+str.substring(pos2+10,str.length)
	if( str.indexOf("[spoiler")!=-1 && internal==false) str=addSpoiler(str,0,false)
	return str;
}

function makeSpoiler(txt,open,close){
	txt='<div class="quote-box" style="padding:1px;background: none; border: 0;"><cite style="width:100%;margin:0;"><input id="'+open+'" class="spoiler-button" style="width:140px;font-size:10px; margin:0;" type="button" value="'+close+'"></cite><blockquote class="quote-box" style="display:none; width: 80%;border: 1px solid black;margin:0;">'+txt+'</blockquote></div>'
	return txt;
}

$(document).ready(function(){
	$("div.quote-box > cite > input.spoiler-button").click(function(){
$(this).parents("div.quote-box:first").find("blockquote.quote-box:first").toggle("slow");
var a = $(this).attr('value');$(this).attr('value',$(this).attr('id'));$(this).attr('id',a);
	});
});

if((document.URL.indexOf("viewtopic.php")!=-1) || (document.URL.indexOf("post.php")!=-1)){
	elm=document.getElementById("pun-main").getElementsByTagName("div")
	for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addSpoiler(post.innerHTML,0,false)
	}
}
if(form=document.getElementById("form-buttons"))
	form.getElementsByTagName("tr")[0].insertCell(16).innerHTML="<img  id=\"button-spoiler\" title=\"Спойлер\" onclick=\"tag_spoiler('[spoiler]','[/spoiler]')\" src=\"/i/blank.gif\" />"
</script>

Мне бы ваши проблемы(

0

3

Vojd
а, все ясно,спасибо случайно удалила верхнюю часть кода

0


Вы здесь » Единый форум поддержки » Корзина » Пропали кнопки из формы ответа! (хелп ТТ)