Как убрать спойлер, который был недавно внедрен на форумы?
У нас стоит свой и ничего нового нам в этом роде не нужно. Я хочу убрать его
Спойлер
Сообщений 1 страница 9 из 9
Поделиться12012-04-09 16:08:47
Поделиться22012-04-09 18:23:21
Практичнее использовать возможности сервиса.
В HTML-верх:
<script type="text/javascript">
FORUM.remove('editor.spoiler');
</script>Поделиться32012-04-09 20:46:51
Практичнее, но свое всегда можно настроить 
Кстати, скрипт убрал лишь кнопку, а сам спойлер остался 
Поделиться42012-04-10 06:05:49
НиктОм, возврата к старым скриптам не будет.
Переход на спойлер сервиса завершён.
Да, код убирает только кнопку.
Но спойлер сервиса полностью настраиваемый дополнительными кодами 
Поделиться52012-04-10 17:47:04
Босс ЖивыеФорумы.ру
Новый спойлер просто отвратный, если честно
<script type="text/javascript">
function tag_spoiler_2(){
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;"><a id="' + open + '" class="spoiler" style="width:100%;font-size:10px; margin:0;border:none;cursor:pointer;text-align:left;">'+close+'</a></cite><blockquote class="quote-box" style="display:none; width: 95%;border: 1px solid black;margin:0;">' + txt + '</blockquote></div>'
return txt;
}
$(document).ready(function(){
$("div.quote-box > cite > a.spoiler").click(function(){
$(this).parents("div.quote-box:first").find("blockquote.quote-box:first").toggle("slow");
var a = this.innerHTML;
this.innerHTML= $(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)
}
}
</script>Скрипт спойлера, который стоял у нас. Он же лучше в тысячи раз! В МИЛЛИОНЫ!
Можно ли как-то сделать так, чтобы это УЖАСНОЕ нововведение выглядело также, как в этом скрипте?
Поделиться62012-04-11 17:31:30
НиктОм, спойлер сервиса -- отличное нововведение!
Так подойдёт?
В HTML-верх:
<style type="text/css"> /*Спойлер */
.punbb .quote-box.spoiler-box{
border:#C6C6CF 1px solid;
border-radius:5px;
-webkit-border-radius:5px;
-khtml-border-radius:5px;
-moz-border-radius:5px;
-o-border-radius:5px;
box-shadow: 0px 2px 4px #8E8E8E;
-webkit-box-shadow: 0px 2px 4px #8E8E8E;
-khtml-box-shadow: 0px 2px 4px #8E8E8E;
-moz-box-shadow: 0px 2px 4px #8E8E8E;
}
.post-content .spoiler-box > blockquote.visible {
display: none;}.punbb .spoiler-box blockquote {
min-width: 100%!important;
}
.post-content .spoiler-box span.hide{
display:none;
}
td#button-spoiler {background:url('http://img706.imageshack.us/img706/1943/spoiler.gif') no-repeat center !important;}
</style>
<script type="text/javascript">
function tag_spolier(){
var enter = prompt("Введите описание открытой кнопки", 'Спойлер');
var enter2 = prompt("Введите описание закрытой кнопки", 'Закрыть');
bbcode('[spoiler='+enter+'|'+enter2+']','[/spoiler]');}
FORUM.set('editor.spoiler',{name:'Спойлер', onclick:function(){tag_spolier()}});
</script>В HTML-низ:
<script type="text/javascript">
$(document).ready(function(){
$(".post-box .quote-box.spoiler-box div[onclick*='toggleClass']").each(function() {
$(this).html('<button type=button style="margin-left:-20px;">'+$(this).html().replace(/(.*)?\|(.*)?/img,'<span class="visible">$1</span><span class="hide">$2</span>')+'</button>')
});
$(".post-box .quote-box.spoiler-box div[onclick*='toggleClass']").live("click", function(){
$(this).next('blockquote').toggle('Slow');
$(this).find('span:eq(0),span:eq(1)').toggleClass('hide').toggleClass('visible');
});
});
</script>Поделиться72012-04-11 19:18:23
А можно сделать так, чтобы название спойлера было не в виде кнопок, а в виде ссылок?
Поделиться82012-04-11 20:03:29
НиктОм, заменить код в HTML-низу на:
<script type="text/javascript">
$(document).ready(function(){
$(".post-box .quote-box.spoiler-box div[onclick*='toggleClass']").each(function() {
$(this).html('<a href="#" onclick="return false;">'+$(this).html().replace(/(.*)?\|(.*)?/img,'<span class="visible">$1</span><span class="hide">$2</span>')+'</a>')
});
$(".post-box .quote-box.spoiler-box div[onclick*='toggleClass']").live("click", function(){
$(this).next('blockquote').toggle('Slow');
$(this).find('span:eq(0),span:eq(1)').toggleClass('hide').toggleClass('visible');
});
});
</script>Поделиться92012-04-12 01:10:41
Босс ЖивыеФорумы.ру
спасибо огромное! Теперь спойлер выглядит и работает просто шикарно!