Спойлер
Код:
<!-- Спойлер -->
<style type="text/css">
.punbb .spoiler-box blockquote {
min-width:100%;
}
.punbb .quote-box.spoiler-box img{
max-width:600px!important;
max-height:1200px !important;
}
#button-spoiler {
background:url('https://showpic.ru/upload/080616/57582574cca34.png
') no-repeat center !important;
}
.post-content .spoiler-box span.hide {
display:none;
}
</style>
<script type="text/javascript">
function tag_spolierr(){
var enterTITLE = prompt("Введите описание закрытой кнопки", 'Тык!');
bbcode('[spoiler='+enterTITLE+']','[/spoiler]');
}
var image_Spl="<img width=\"34\" src=\"https://forumstatic.ru/files/0013/9f/44/69562.gif\" class=\"Sp-button\" style=\"margin:-8px 6px 0 -28px;float:left;\" alt=\"'Кнопка'\"/>";
$(document).ready(function() {a='<img onclick="tag_spolierr()" title="Скрыть в спойлер" src="/i/blank.gif"/>'
$("#form-buttons td#button-spoiler img").replaceWith(a);
$(".post-box .quote-box.spoiler-box div[onclick*='toggleClass']").each(function() {
var b = this.getAttribute('onclick').replace(".next().toggleClass('visible')",".next().toggle('Slow')");
this.setAttribute('onclick',b);
$(this).html($(this).html().replace(/(.*)?\|(.*)?/img,'<span class="visible">$1</span><span class="hide">$2</span>'))
$(this).prepend(image_Spl)
});
});
</script>
<!-- Спойлер. Конец. -->Пример - здесь.