Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
VAOZ

Спойлер на форум

Recommended Posts

<script type="text/javascript">   
e=document.getElementsByTagName("TD");   
for(k=15; k<e.length;k++) {   
if(e[k].className=='posttdMessage') {   
s=e[k].innerHTML;   
while (s.indexOf('') != -1){   
s=s.replace('','<fieldset><legend><font style="font-size: 10px; font-family: Verdana; color:red;">Спойлер</font></legend><div style="margin: 3px; margin-top:1px;"><div class="smallfont" style="margin-bottom:1px"><a href="#" onclick="return spoiler_js(this);"><span style="color:blue;"><b>Показать спойлер</b></span><span style="display:none;color:blue;"><b>Скрыть спойлер</b></span></a></div><div style="margin: 0px; padding:3px; display: none;">'); s=s.replace('   
','</div></div></fieldset>');   
e[k].innerHTML=s; } } }   
</script>   
<script type="text/javascript">   
function spoiler_js(obj) {   
var obj_content = obj.parentNode.parentNode.getElementsByTagName('div')[1];   
var obj_text_show = obj.getElementsByTagName('span')[1];   
var obj_text_hide = obj.getElementsByTagName('span')[0];   
if (obj_content.style.display != '') {   
obj_content.style.display = '';   
obj_text_show.style.display = '';   
obj_text_hide.style.display = 'none';   
} else {   
obj_content.style.display = 'none';   
obj_text_show.style.display = 'none';   
obj_text_hide.style.display = '';   
}   
return false;   
}   
</script>

В Упраление дизайном>Форум>"Форма добавления сообщений" после $BBCODES$ ставим: 
 

<input type="button" accesskey="s" value="spoiler" onclick="simpletag('spoiler','','','message',''); return false;" class="codeButtons" title="Включить содержимое в спойлер" name="spoiler" />[spoiler]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×