Post by buzzy on Mar 9, 2009 9:20:51 GMT
Hi LR - for some reason I have lost my "Extra Smiles" box on the LHS in reply Message section. The coding seems to be intact in 'Global Footers' and yet the smilies don't appear? If you would check my coding I would be grateful.
<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...
var topSmilies = 0;
smilie[0]="";
smilie[1]="";
smilie[2]="";
smilie[3]="";
smilie[4]="";
smilie[5]="";
smilie[6]="";
smilie[7]="";
smilie[8]="";
smilie[9]="";
smilie[10]="";
smilie[11]="";
smilie[12]="";
smilie[13]="";
smilie[14]="";
smilie[15]="";
smilie[16]="";
smilie[17]="";
smilie[18]=” i40.tinypic.com/69dslf.jpg”;
// Edit above here...
var content = ' ';
var smilieCode = ' ';
var smilieToCheck;
var smCode = new Array();
var postBox;
if(topSmilies==0 || topSmilies>smilie.length)
{
topSmilies = smilie.length;
}
// 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<topSmilies;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 onBlur="self.close()">';
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('#').join('#');
post = post.split('#').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
<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...
var topSmilies = 0;
smilie[0]="";
smilie[1]="";
smilie[2]="";
smilie[3]="";
smilie[4]="";
smilie[5]="";
smilie[6]="";
smilie[7]="";
smilie[8]="";
smilie[9]="";
smilie[10]="";
smilie[11]="";
smilie[12]="";
smilie[13]="";
smilie[14]="";
smilie[15]="";
smilie[16]="";
smilie[17]="";
smilie[18]=” i40.tinypic.com/69dslf.jpg”;
// Edit above here...
var content = ' ';
var smilieCode = ' ';
var smilieToCheck;
var smCode = new Array();
var postBox;
if(topSmilies==0 || topSmilies>smilie.length)
{
topSmilies = smilie.length;
}
// 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<topSmilies;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 onBlur="self.close()">';
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('#').join('#');
post = post.split('#').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
.type=='submit')
{
posting
.onmousedown=function()
{
post=postBox.value;
for(t=0; t<smCode.length; t++)
{
post = post.replace(new RegExp(smCode[t],"g"),'[img src="'+smilie[t]+'"]');
}
postBox.value = post;
}
}
}
}
showSmilies();
}
// -->
</script>