Post by Peter on Oct 27, 2004 10:07:17 GMT
Code created by Hechizero[/color]
Script Name: Smileys Box
Description: Adds a box next to the message area (to the left) with the pre-defined smileys of the board plus any other smiley that you specify.
Hack Type: Post-Modifier
Version: 3.4
Preview: Preview #1
How to Customize it?:
1. Extra Smileys Image Array
Find this part of the script:
var smls= new Array();
smls[0]="4d5.net/boardimages/buttons/www_sm.gif|:home:";
smls[1]="4d5.net/boardimages/buttons/message_sm.gif|:im:";
smls[2]="4d5.net/boardimages/male.gif|:male:";
smls[3]="4d5.net/boardimages/female.gif|:female:";
smls[4]="4d5.net/boardimages/ip.gif|:ip:";
Change the red urls with the url of the smiley that you want to show on the Smileys Box and the blue part with the word that represent that smiley. If you want to add more smileys just keep adding this:
smls[#]="SMILEY URL|SMILEY WORD";
And edit the orange part with the next number of the array, the yellow part with the same number that you used for the orange part, the green part with the url to the image and the pink part with the smiley word.
Note: If you delete all the extra smileys options DO NOT delete the array part:
var smls= new Array();
2. 'Get More' Link
Find this part in the script:
var mores="www.mysmileys.com/";
And change the red url with the url of the page with your extra smileys.
3. 'Get More' Text
Find this part in the code:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And change the red part with the text that you want to display.
4. Enclosing Characters
Search for this part:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And edit the red part with your wanted character or delete it.
5. 'Smiley Box' Text
Find this part in the script:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And edit the red text with the Text that you want to appear as the tittle of the Smileys Box.
6. Edit the "Smileys per Row" Variable
The default is to display four smileys per row but you can edit it. Search the script for this part:
var smprow=4;
And change the number with the amount of smileys that you want to show per row.
7. Smileys Box Appereance
All the colors are updated depending on the settings of your board.
Location: All Footers (including the Main Page Footer if you want it to be displayed when sending PMs).
Script Name: Smileys Box
Description: Adds a box next to the message area (to the left) with the pre-defined smileys of the board plus any other smiley that you specify.
Hack Type: Post-Modifier
Version: 3.4
Preview: Preview #1
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Smileys Box next to Textarea v3.4
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
if(document.postmodify){var tds = document.getElementsByTagName('td');
for(t=0;t<tds.length;t++){if(tds[t].className=='windowbg2' && tds[t].width=='23%' && tds[t].innerHTML.match(/Add Smileys:/i)) {tds[t].parentNode.style.display='none';var smsep=tds[t+1].getElementsByTagName('a');break;}}
var smls= new Array();
smls[0]="http://4d5.net/boardimages/buttons/www_sm.gif|:home:";
smls[1]="http://4d5.net/boardimages/buttons/message_sm.gif|:im:";
smls[2]="http://4d5.net/boardimages/male.gif|:male:";
smls[3]="http://4d5.net/boardimages/female.gif|:female:";
smls[4]="http://4d5.net/boardimages/ip.gif|:ip:";
var mores="http://www.mysmileys.com/";
var smprow=4;
var smcont='';
for (b=0;b<16;b++) {if (b%smprow==0) {smcont+='<tr>';}
smcont+="<td class='windowbg' align='center'><a href="+smsep[b].href.replace('>',decodeURIComponent('%26')+'gt;')+">"+smsep[b].innerHTML+"</a></td>";
if ((b+1)%smprow==0) {smcont+='</tr>';}}
for (c=0;c<smls.length;c++) {if ((c+16)%smprow==0) {smcont+='<tr>';}
smcont+="<td class='windowbg' align='center'><a href=javascript:adds(\""+smls[c].split('|')[1]+"\")><img src='"+smls[c].split('|')[0]+"' border='0'></a></td>";
if ((c+17)%smprow==0 || c+1==smls.length) {smcont+='</tr>';}}
if (smls.length==0 && 16%smprow!=0) {smcont+='</tr>';}
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
</script>
How to Customize it?:
1. Extra Smileys Image Array
Find this part of the script:
var smls= new Array();
smls[0]="4d5.net/boardimages/buttons/www_sm.gif|:home:";
smls[1]="4d5.net/boardimages/buttons/message_sm.gif|:im:";
smls[2]="4d5.net/boardimages/male.gif|:male:";
smls[3]="4d5.net/boardimages/female.gif|:female:";
smls[4]="4d5.net/boardimages/ip.gif|:ip:";
Change the red urls with the url of the smiley that you want to show on the Smileys Box and the blue part with the word that represent that smiley. If you want to add more smileys just keep adding this:
smls[#]="SMILEY URL|SMILEY WORD";
And edit the orange part with the next number of the array, the yellow part with the same number that you used for the orange part, the green part with the url to the image and the pink part with the smiley word.
Note: If you delete all the extra smileys options DO NOT delete the array part:
var smls= new Array();
2. 'Get More' Link
Find this part in the script:
var mores="www.mysmileys.com/";
And change the red url with the url of the page with your extra smileys.
3. 'Get More' Text
Find this part in the code:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And change the red part with the text that you want to display.
4. Enclosing Characters
Search for this part:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And edit the red part with your wanted character or delete it.
5. 'Smiley Box' Text
Find this part in the script:
document.postmodify.message.parentNode.parentNode.previousSibling.lastChild.innerHTML='<table border="1px" width="95%" cellspacing="1px" class="windowbg" align="center"><tr><td class="titlebg" colspan="'+smprow+'" align="center"><font size="2" class="titletext"><b>Smileys Box</b></font></td></tr>'+smcont+'<tr><td class="windowbg" align="center" colspan="'+smprow+'"><font size="2" class="titletext">[<a href="'+mores+'" target="_blank">Get More</a>]</font></td></tr></table>';}
And edit the red text with the Text that you want to appear as the tittle of the Smileys Box.
6. Edit the "Smileys per Row" Variable
The default is to display four smileys per row but you can edit it. Search the script for this part:
var smprow=4;
And change the number with the amount of smileys that you want to show per row.
7. Smileys Box Appereance
All the colors are updated depending on the settings of your board.
Location: All Footers (including the Main Page Footer if you want it to be displayed when sending PMs).