Post by neko sojo on Feb 24, 2011 2:16:19 GMT
As I have maintained two different Proboards accounts myself i know how codes works with the site. I have came to realize that I have some codes in my employ that is not used on this site. I made this thread to have a place to suggest what codes I use and where anyone can also post their codes.
Name:Spoiler code
Description:This will place a new button in your post area which will then wrap any highlighted section with tags, you also now have the option to name the spoiler whatever you like...
Location:Global Footer or Board Footer
Extras: Edit this line with the URL of the button you'd like added to posting page..
var spButton = 'http://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; }
Name:Spoiler code
Description:This will place a new button in your post area which will then wrap any highlighted section with tags, you also now have the option to name the spoiler whatever you like...
Location:Global Footer or Board Footer
<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(location.href.match(/tion=display/))
{
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++)
{
if(posts[p].innerHTML.match(/google_ad_section_start/))
{
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>');
}}}
// -->
</script>
Extras: Edit this line with the URL of the button you'd like added to posting page..
var spButton = 'http://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; }