|
Post by Bellatora on Jan 15, 2012 19:39:51 GMT -4
I think this is the spoiler code that let's you name your spoilers.
// 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(/\[spoiler=/) && (posts[p].innerHTML.match(/ google_ad_section_start/) || (document.postForm && posts[p].size=='1' && !posts[p].innerHTML.match(/<(input|select|textarea)/i)))) { 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=(([^\[\]])+)*\]/g,spCell).replace(/\[\/spoiler\]/g,'</div></div></div>'); }}} // --> </script>
|
|
|
Post by Wish on Jan 15, 2012 19:48:03 GMT -4
I have this
<script type="text/javascript"> <!--
/*Spoiler UBBC Tags - By iAlex - Open Source*/
var iSpPic="http://img230.imageshack.us/img230/1641/shhep9.png"; //Spoiler UBBC Image
if(document.postForm && document.postForm.color){ var iSpSpan=document.createElement('span'); iSpSpan.innerHTML='<a href="javascript: add(\'[spoiler]\', \'[/spoiler]\')"><img src="'+iSpPic+'" border="0" alt="Spoiler" title="Spoiler" /></a>'; document.postForm.color.parentNode.parentNode.appendChild(iSpSpan); } if(location.href.match(/action=(display|(user)?recent|(calendar|pm)view|search2)/) || document.postForm){ var iTd=document.getElementsByTagName('td'); var i=iTd.length; while(--i){ if(iTd.item(i).height=="100%" && iTd.item(i).width=="80%" && iTd.item(i).vAlign=="top" && iTd.item(i).align=="left" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).innerHTML.match(/\[spoiler](.+?)\[\/spoiler\]/i) || document.postForm && iTd.item(i).width=="100%" && iTd.item(i).className.match(/windowbg2/) && iTd.item(i).innerHTML.match(/\[spoiler\](.+?)\[\/spoiler\]/i) && iTd.item(i).parentNode.parentNode.parentNode.cellPadding=="4"){ iTd.item(i).innerHTML = iTd.item(i).innerHTML.replace(/\[spoiler\](.+?)\[\/spoiler]/gi,'<b'+'r/><b>Spoiler: </b><div><input type="submit" value="Show" onclick="iShowHide(this)" /><div id="iSpoilerHold" style="display:none"><table class="bordercolor" cellspacing="1" cellpadding="4" border="0" width="80%"><tr><td class="windowbg">$1</td></tr></table></div></div></b'+'r/>'); } } } function iShowHide(iButton){ if(iButton.value.match(/Show/)){ iButton.parentNode.getElementsByTagName('div').item(0).style.display=''; iButton.value='Hide'; } else if(iButton.value.match(/Hide/)){ iButton.parentNode.getElementsByTagName('div').item(0).style.display='none'; iButton.value='Show'; } }
//--> </script>
And then what you gave me...
// 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(/\[spoiler=/) && (posts[p].innerHTML.match(/ google_ad_section_start/) || (document.postForm && posts[p].size=='1' && !posts[p].innerHTML.match(/<(input|select|textarea)/i)))) { 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=(([^\[\]])+)*\]/g,spCell).replace(/\[\/spoiler\]/g,'</div></div></div>'); }}} // --> </script>
what do I do? xD
|
|
|
Post by Bellatora on Jan 15, 2012 23:49:08 GMT -4
Um... x.x maybe I didn't get it all... lemme se.... there shoudl be a
<script> at the beginning, but there isn't one... so that's probably all that you need to do. ^^';
|
|
|
Post by Bellatora on Jan 16, 2012 0:40:29 GMT -4
<script type="text/javascript"> <!--
/*Profile Selectable Username Colour - By iAlex - Open Source*/
if(document.modifyForm){ var iDisTr=document.modifyForm.name.parentNode.parentNode.parentNode; var iColourTr=iDisTr.cloneNode(true); iColourTr.childNodes[0].firstChild.innerHTML='Name Colour'; iColourTr.childNodes[2].firstChild.innerHTML='If you wish to have your name displayed in a different colour, insert the hex code here.'; iColourTr.childNodes[1].innerHTML='<input type="text" size="35" maxlength="6" id="iColourInp" />'; iDisTr.parentNode.insertBefore(iColourTr, iDisTr.nextSibling); var iPersonal=document.modifyForm.personaltext; var iColourInp=document.getElementById('iColourInp'); if(iPersonal.value.match(/\[C01:(.+?)\]/)){ iColourInp.value=RegExp.$1; iPersonal.value=iPersonal.value.replace(/\[C01:(.+?)\]/g, ''); } if(document.addEventListener){ document.modifyForm.addEventListener('submit', iSaveColour, false); } else{ document.modifyForm.attachEvent('onsubmit', iSaveColour); } } function iSaveColour(){ var iColourInp=document.getElementById('iColourInp'); if(iColourInp.value!=""){ var iPersonal=document.modifyForm.personaltext; iPersonal.value=iPersonal.value+'[C01:'+iColourInp.value+']'; } } if(location.href.match(/action=(display|viewprofile|(user)?recent|(calendar|pm)view|search2)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){ var iTd=document.getElementsByTagName('td'); var i=iTd.length; while(--i){ if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/\[C01:(.+?)\]/)){ iTd.item(i).getElementsByTagName('b').item(0).firstChild.style.color=RegExp.$1; iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[C01:(.+?)\]/g, ''); } } } //--> </script>
Here is the correct spoiler code too:
<style type="text/css"> <!-- .spoiler { color: silver; font-weight: bold; text-decoration: underline; cursor: pointer; padding: 0px 0px 0px 25px; } .spoilerbody{ color: white; width: 75%; 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://img230.imageshack.us/img230/1641/shhep9.png';
// Add spoiler button to posting page..
function addspoil() { var bname = prompt("what would you like the spoiler to be called?","Spoiler"); add('<div><div><span onclick="if(this.nextSibling.className=='hidden'){this.nextSibling.className='spoilerbody'}else{this.nextSibling.className='hidden'}"><font class="spoiler">'+bname+'</font></span><div class="hidden">','</div></div></div>'); 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(/\[spoiler=/) && (posts[p].innerHTML.match(/ google_ad_section_start/) || (document.postForm && posts[p].size=='1' && !posts[p].innerHTML.match(/<(input|select|textarea)/i)))) { 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=(([^\[\]])+)*\]/g,spCell).replace(/\[\/spoiler\]/g,'</div></div></div>'); }}} // --> </script>
|
|
|
Post by Bellatora on Jan 16, 2012 0:51:04 GMT -4
|
|