Post by Corro on Apr 26, 2011 15:48:58 GMT -5
I just got done posting a HUGE post and it looks horrible because of the ridiculous length of the post. Spoilers can help quite a bit, especially if people are making tutorials or posting large images.
I found a code that allows the use of spoilers HERE.
You put the code in the Global footer or Board Footer and just add:
Edit this line with the URL of the button you'd like added to posting page..
var spButton = 'images.proboards.com/new/shocked.gif';
You can edit this part of the CSS to give your spoilers different effects/colors..
.spoiler { color: black; font-weight: bold; cursor: pointer; padding: 0px 0px 0px 25px; }
.spoilerbody{ color: blue; width: 70%; padding: 0px 5px 5px 55px; !important; }
All credit goes to Todge
I found a code that allows the use of spoilers HERE.
You put the code in the Global footer or Board Footer and just add:
<style type="text/css">
<!--
.spoiler { color: black; font-weight: bold; cursor: pointer; padding: 0px 0px 0px 25px; }
.spoilerbody{ color: blue; width: 70%; padding: 0px 5px 5px 55px; !important; }
.hidden { display: none; }
-->
</style>
<script type="text/javascript">
<!--
/*
Spoiler tags by Todge
Copyright © 2010
Please keep this header intact
Global or Board Footer
*/
var spButton = 'http://images.proboards.com/new/shocked.gif';
// Add spoiler button to posting page..
function addspoil()
{
var bname = prompt("what would you like the spoiler to be called?","Spoiler");
add('[spoiler='+bname+']','[/spoiler]');
return;
}
if(document.postForm)
{
var spb = document.createElement('a');
spb.innerHTML = '<img src="'+spButton+'" border="0">';
spb.href = 'javascript:addspoil()';
document.postForm.color.parentNode.appendChild(spb);
}
// Find and create spoilers..
if(pb_action.match(/(display|preview|(modify)?post|search2)/) )
{
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++)
{
if(posts[p].innerHTML.match(/google_ad_section_start/) || (posts[p].size == '1' && pb_action.match(/preview|(modify)?post/)))
{
if(document.postForm)
{
var qPost = document.postForm.message.value;
}
var spCell = '<div><div>';
spCell += '<span onclick="if(this.nextSibling.className==\'hidden\')';
spCell += '{this.nextSibling.className=\'spoilerbody\'}else';
spCell += '{this.nextSibling.className=\'hidden\'}"><font class="spoiler">$1</font>';
spCell += '</span><div class="hidden">';
posts[p].innerHTML = posts[p].innerHTML.replace(/\[spoiler=((\w|\s|-|\/)+)*\]/g,spCell).replace(/\[\/spoiler\]/g,'</div></div></div>');
if(document.postForm)
{
document.postForm.message.value = qPost;
}
}}}
// -->
</script>
Edit this line with the URL of the button you'd like added to posting page..
var spButton = 'images.proboards.com/new/shocked.gif';
You can edit this part of the CSS to give your spoilers different effects/colors..
.spoiler { color: black; font-weight: bold; cursor: pointer; padding: 0px 0px 0px 25px; }
.spoilerbody{ color: blue; width: 70%; padding: 0px 5px 5px 55px; !important; }
All credit goes to Todge