Post by Todge on Apr 13, 2007 9:07:35 GMT -8
This will help you to manage (add, remove and re-order) your smilies IF you are using my smilie code..
Put it in your Global Footer BELOW the smilie code.. Full instructions are below the code..
After inserting the code, go to Admin >> Skins / Forum Colors
You should now see the new option to 'Edit Extra Smilies' after the Customize Images option..
Click it and you'll be given the full list of all your smilies in their current order with 2 links top and bottom.. 'Update List' and 'Get New Array'..
To the left of each smilie is a blank area and to the right is the URL of the smilie..
To delete a smilie from the list simply delete the URL to it's right..
To replace a smilie add the new URL in place of the old one..
To add a smilie BEFORE another, put the new URL in the box to the LEFT of the smilie..
And to add new smilies to your list, simply add the URLs in the boxes at the bottom, you can add 5 at a time..
Using those rules you can switch and swap, remove, replace or re-order your smilies in one go..
At any time, clicking on 'Update List' will do just that.. It will apply all the changes made so far..
When you have finished, click 'Get New Array' and you'll be given the FULL new smilie array, simply copy and paste it into the code over the top of your current array in your Global Footer...
Put it in your Global Footer BELOW the smilie code.. Full instructions are below the code..
<script type="text/javascript">
<!--
/*
Help manage your smilies
by Todge
Copyright © 2007
Please keep this header intact
Global Footer BELOW the smilie code
*/
if(location.href.match(/action=skins/))
{
function editSmilies(smCell){
var B = document.getElementsByTagName('b');
for(b=0; b<B.length; b++)
{
if(B[b].innerHTML == 'Skins / Forum Colors')
{
B[b].innerHTML = 'Extra Smilies';
break;
}}
smCell.innerHTML = '';
var smTable = '<center><a href="javascript:updateSmilies()"><b>Update List</b></a></center>';
smTable += '<center><a href="javascript:getList()"><b>Get New Array</b></a></center><br>';
smTable += '<table width="100%" cellpadding="0" cellspacing="0" border="1"><tr><td width="40%" align="center">Inserted smilie URL</td>';
smTable += '<td width="20%" align="center">Current Smilie</td>';
smTable += '<td width="40%" align="center">Current URL</td></tr>';
var sm=0;
for(s=0; s<smilie.length; s++)
{
smTable += '<tr><td align="center"><input id="smilie'+sm+'" size="30" value=""></td>';
sm++;
smTable += '<td align="center"><img src="'+smilie[s]+'" alt="smilie"></td>';
smTable += '<td align="center"><input id="smilie'+sm+'" size="30" value="'+smilie[s]+'"></td></tr>';
sm++;
}
smTable += '<tr><td align="center" colspan="3">Insert URL to add smilie: <input id="smilie'+sm+'" size="70" value=""></td></tr>';
sm++;
smTable += '<tr><td align="center" colspan="3">Insert URL to add smilie: <input id="smilie'+sm+'" size="70" value=""></td></tr>';
sm++;
smTable += '<tr><td align="center" colspan="3">Insert URL to add smilie: <input id="smilie'+sm+'" size="70" value=""></td></tr>';
sm++;
smTable += '<tr><td align="center" colspan="3">Insert URL to add smilie: <input id="smilie'+sm+'" size="70" value=""></td></tr>';
sm++;
smTable += '<tr><td align="center" colspan="3">Insert URL to add smilie: <input id="smilie'+sm+'" size="70" value=""></td></tr></table>';
smTable += '<center><a href="javascript:updateSmilies()"><b>Update List</b></a></center>';
smTable += '<center><a href="javascript:getList()"><b>Get New Array</b></a></center>';
smCell.innerHTML = smTable;
return;
}
function updateSmilies()
{
smilie.length = 0;
var sm = document.getElementsByTagName('input');
for(s=0; s<sm.length; s++)
{
if(sm[s].id.match('smilie') && sm[s].value.match('http://'))
{
smilie[smilie.length] = sm[s].value;
}}
editSmilies(sCell);
}
function getList()
{
sCell.align="center";
sCell.innerHTML = 'Below is your new smilie array, please copy and paste it into the code in your Global Footer.<br>';
sCell.innerHTML += '<textarea rows="50" cols="100" id="smilie">';
for(s=0; s<smilie.length; s++)
{
document.getElementById('smilie').value += 'smilie['+s+']="'+smilie[s]+'";\n';
}}
var lks = document.links;
for(l=0; l<lks.length; l++)
{
if(lks[l].href.match('action=skinsimages'))
{
var sCell = lks[l].parentNode;
sCell.appendChild(document.createTextNode(' - '));
var actionS = document.createElement('A');
actionS.innerHTML = 'Edit Extra Smilies';
actionS.setAttribute('href','javascript:editSmilies(sCell)');
sCell.appendChild(actionS);
sCell = sCell.parentNode.parentNode;
break;
}}}
// -->
</script>
After inserting the code, go to Admin >> Skins / Forum Colors
You should now see the new option to 'Edit Extra Smilies' after the Customize Images option..
Click it and you'll be given the full list of all your smilies in their current order with 2 links top and bottom.. 'Update List' and 'Get New Array'..
To the left of each smilie is a blank area and to the right is the URL of the smilie..
To delete a smilie from the list simply delete the URL to it's right..
To replace a smilie add the new URL in place of the old one..
To add a smilie BEFORE another, put the new URL in the box to the LEFT of the smilie..
And to add new smilies to your list, simply add the URLs in the boxes at the bottom, you can add 5 at a time..
Using those rules you can switch and swap, remove, replace or re-order your smilies in one go..
At any time, clicking on 'Update List' will do just that.. It will apply all the changes made so far..
When you have finished, click 'Get New Array' and you'll be given the FULL new smilie array, simply copy and paste it into the code over the top of your current array in your Global Footer...