inherit
28960
0
Jul 30, 2005 13:39:48 GMT -8
quickquestion
50
August 2004
quickquestion
|
Post by quickquestion on Jun 22, 2005 11:56:08 GMT -8
the board i post to was recently upgraded and now the smileys in the drop-down box don't appear in the response box when selected. will this be fixed at some point?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jun 22, 2005 14:44:16 GMT -8
No...
The function to add anything to the text area has changed...
Here's a similar code, put it in your global footer.....
<SCRIPT language=JavaScript> <!--
/* Extra Smilies, with preview, drop down menu and option to view all by Todge (Todge-@ntlworld.com) Copyright © 2005 Please keep this header intact */
if (location.href.indexOf('action=headersfooters') == -1) {
var smilieCode = ' '; var smCode = new Array(); var smilie = new Array(); var content = ' ';
// 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...
// Cache smilies... document.write('<font ID="theSmilies" style="display: none;">'); for(t=0; t<smilie.length; t++) { smCode[t] = '#'+smilie[t].split('/')[smilie[t].split('/').length-1].split('.')[0]+'#'; document.write(' <a href=\'javascript:add(" '+smCode[t]+' ")\'><img src="'+smilie[t]+'" border="0" alt=" '+smCode[t]+' "/></a> '); } document.write('</font>');
// 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); smilieWindow.document.bgcolor = 'red'; }
// 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; } }
// show smilies in posts var post = document.getElementsByTagName('TD'); for(pc=0; pc<post.length; pc++) { if(post[pc].colSpan =='3' && post[pc].vAlign == 'top') { for(t=0; t<smCode.length; t++) { post[pc].getElementsByTagName('font')[0].innerHTML = post[pc].getElementsByTagName('font')[0].innerHTML.replace(new RegExp(smCode[t],"g"),'<img src="'+smilie[t]+'" border="0">'); } } } } // --> </script>
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 ALL you have to do, there is no need to add anything to your censored words list.
|
|