Post by MSC™ on Apr 13, 2007 18:17:40 GMT -8
QUICK DESCRIPTION: What it says on the tin. >_>
DETAILED EXPLANATION: This code will remove smilie-related options from the postForm (posting area) and automatically disable smilies in your post.
COMPATIBILITY: Needs to come BEFORE any postForm hacks. Shouldn't be used with other smilie codes, but that seems more like common sense.
LOCATION: Goes in any Footers of your choice. The choice of placement will affect the operation of the code as follows: Global Footers will disable smilies universally, Main Footers will disable smilies when sending a PM, and Board Footers will disable smilies in that particular board.
<script type="text/javascript">
<!--
// Disable smilies, by MegaShadowChao. May not be duplicated, altered, or reposted except by the author. //
var td=document.getElementsByTagName('td');
if(document.postForm){
for(count=0; count<td.length; count++){
if(td[count].width=="30%"){
if(td[count].getElementsByTagName('font').length>0){
if(td[count].getElementsByTagName('font')[0].innerHTML=="Add Smilies:"){
td[count].parentNode.style.display='none';
} else if(td[count].getElementsByTagName('font')[0].innerHTML=="Disable Smilies:"){
td[count+1].getElementsByTagName('input')[0].checked="true";
td[count].parentNode.style.display='none';
}
}
}
}
} else if(document.getElementsByName('message')[0]){
var iput=document.getElementsByTagName('input');
for(count=0; count<iput.length; count++){
if(iput[count].value.match("Post Reply")){
iput[count].onclick=function(){document.getElementsByName('message')[0].innerHTML+="#nosmileys";};
}
}
}
//-->
</script>
No editing is neccessary. Feel free to PM me if you have any questions regarding the code.
EDIT [5/4/07]: Code now disables smilies in Quick Reply too, which I had overlooked before.
DETAILED EXPLANATION: This code will remove smilie-related options from the postForm (posting area) and automatically disable smilies in your post.
COMPATIBILITY: Needs to come BEFORE any postForm hacks. Shouldn't be used with other smilie codes, but that seems more like common sense.
LOCATION: Goes in any Footers of your choice. The choice of placement will affect the operation of the code as follows: Global Footers will disable smilies universally, Main Footers will disable smilies when sending a PM, and Board Footers will disable smilies in that particular board.
<script type="text/javascript">
<!--
// Disable smilies, by MegaShadowChao. May not be duplicated, altered, or reposted except by the author. //
var td=document.getElementsByTagName('td');
if(document.postForm){
for(count=0; count<td.length; count++){
if(td[count].width=="30%"){
if(td[count].getElementsByTagName('font').length>0){
if(td[count].getElementsByTagName('font')[0].innerHTML=="Add Smilies:"){
td[count].parentNode.style.display='none';
} else if(td[count].getElementsByTagName('font')[0].innerHTML=="Disable Smilies:"){
td[count+1].getElementsByTagName('input')[0].checked="true";
td[count].parentNode.style.display='none';
}
}
}
}
} else if(document.getElementsByName('message')[0]){
var iput=document.getElementsByTagName('input');
for(count=0; count<iput.length; count++){
if(iput[count].value.match("Post Reply")){
iput[count].onclick=function(){document.getElementsByName('message')[0].innerHTML+="#nosmileys";};
}
}
}
//-->
</script>
No editing is neccessary. Feel free to PM me if you have any questions regarding the code.
EDIT [5/4/07]: Code now disables smilies in Quick Reply too, which I had overlooked before.