Post by Matt on Jun 5, 2006 20:41:53 GMT -5
Created By: Todge
Creator's Comments:
This will add a drop down menu to the left of the text box listing your smilies with a preview box below it. There is also an option to 'view all' smilies which will open a pop-up window containing all of your smilies...
All you have to do is edit this part....
smilie[0]="URL OF SMILIE";
smilie[1]="URL OF SMILIE";
smilie[2]="URL OF SMILIE";
smilie[3]="URL OF SMILIE";
Replace the red text with the FULL URL of your smilies and continue down with:
smilie[4]="URL OF SMILIE";
smilie[5]="URL OF SMILIE";
Etc.
That's ALL you have to do, there is no need to add anything to your censored words list.
Put it in your Global Footer.
Creator's Comments:
This will add a drop down menu to the left of the text box listing your smilies with a preview box below it. There is also an option to 'view all' smilies which will open a pop-up window containing all of your smilies...
All you have to do is edit this part....
smilie[0]="URL OF SMILIE";
smilie[1]="URL OF SMILIE";
smilie[2]="URL OF SMILIE";
smilie[3]="URL OF SMILIE";
Replace the red text with the FULL URL of your smilies and continue down with:
smilie[4]="URL OF SMILIE";
smilie[5]="URL OF SMILIE";
Etc.
That's ALL you have to do, there is no need to add anything to your censored words list.
Put it in your Global Footer.
<script language=JavaScript>
<!--
/*
Extra Smilies, with preview, drop down menu and option to view all (V2)
by Todge
Copyright © 2006
Please keep this header intact
*/
if (location.href.indexOf('action=headersfooters') == -1)
{
var smilie = new Array();
// Edit below here...
smilie[0]="URL OF SMILIE";
smilie[1]="URL OF SMILIE";
smilie[2]="URL OF SMILIE";
smilie[3]="URL OF SMILIE";
// Edit above here...
var content = ' ';
var smilieCode = ' ';
var smilieToCheck;
var smCode = new Array();
var postBox;
// Set smilie codes...
for(t=0; t<smilie.length; t++)
{
smCode[t] = '#'+smilie[t].split('/')[smilie[t].split('/').length-1].split('.')[0]+'#';
}
// set variables
smilieCode += '<br /><br /><table bgcolor="000000" border="0"><TR><TD><select name="selectsmilie" style="width: 120px;" onChange="aS(this.options[this.selectedIndex].value)"><option>Select Smilie';
for (p2=0; p2<smCode.length;p2++)
{
smilieCode += '<option value=" '+smCode[p2]+' ">'+smCode[p2];
}
smilieCode += '</select></TD></TR><TR><TD ID="smile" class="windowbg2" height="60" align="center" valign="middle">';
smilieCode += '</TD></TR>';
smilieCode += '<TR><TD class="windowbg2" align="center" valign="middle" height="15"><a href="javascript:void(0)" onClick="popsmilies()">View all smilies</a></TD></TR></table>';
var winleft = (screen.width/2)-250;
var winatts = 'width=500,height=200,left='+winleft+',top=50,scrollbars';
content = document.getElementsByTagName('style')[0].innerHTML;
content = '<html><head></head><style>'+content+'</style><body>';
content += '<br><table width="450" cellspacing="1" cellpadding="0" border="0" align="center" class="bordercolor">';
content += '<tr><td width="450" class="catbg" align="center"><font>Extra Smilies</font></td></tr>';
content += '<tr><td width="450" class="windowbg2" align="center">'
for(t=0; t<smCode.length; t++)
{
content += " <img src=\""+smilie[t]+"\" border=\"0\" alt=\" "+smCode[t]+" \" style=\"cursor:hand;\" onMouseDown=\"window.opener.add(\' "+smCode[t]+" \');document.focus();\"> ";
}
content += '</td></tr></table></body></html>';
// display smilies
function aS(smiley)
{
for(t=0; t<smCode.length; t++)
{
if(smiley.match(smCode[t]))
{
document.getElementById('smile').innerHTML = ' <a href=\'javascript:add(" '+smCode[t]+' ")\'><img src="'+smilie[t]+'" border="0" alt=" '+smCode[t]+' "/></a> ';
}
}
}
function popsmilies()
{
var smilieWindow = window.open("","newWindow",winatts);
smilieWindow.document.write(content);
}
if(document.postForm)
{
// Replace smilies in post text with codes
var post = document.postForm.message.value;
for(t=0; t<smCode.length; t++)
{
post = post.replace(new RegExp(smilie[t],"g"),smCode[t]);
}
post = post.split('[img]#').join('#');
post = post.split('#[/img]').join('#');
document.postForm.message.value = post;
// list smilies
var TD = document.getElementsByTagName('TD');
for(t=0; t<TD.length; t++)
{
if(TD[t].width == '30%' && TD[t].className == 'windowbg2' && TD[t].innerHTML.match('Message:'))
{
TD[t].vAlign = 'top';
TD[t].innerHTML += smilieCode;
}
}
// get message contents...
postBox = document.postForm.message;
}
// show smilies in posts
function showSmilies()
{
var posting = document.getElementsByTagName('input');
for(p=0; p<posting.length; p++)
{
if(posting[p].type=='submit')
{
posting[p].onmousedown=function()
{
post=postBox.value;
for(t=0; t<smCode.length; t++)
{
post = post.replace(new RegExp(smCode[t],"g"),'[img]'+smilie[t]+'[/img]');
}
postBox.value = post;
}
}
}
}
showSmilies();
}
// -->
</script>