Post by fastheart on Dec 27, 2007 19:08:47 GMT -5
do you want smielys on quick reply? than copy and paste the code into your Global Footer:
<script type="text/javascript">
<!--
/*
Smileys with quick reply - global footers
Created by Peter
This code cannot be reposted at anywhere other than SSDesigns or ProBoards, without permission.
This header must stay intact at all times.
*/
// Base url for the smileys folder
var sBaseImg = "http://www.4d5.net/v4images/";
// List of smileys - [SMILEY FILE, CODE, TITLE]
var iSmileys = [
["smiley.gif", "", "Smiley"],
["wink.gif", "", "Wink"],
["grin.gif", ";D", "Grin"],
["angry.gif", "", "Angry"],
["sad.gif", "", "Sad"],
["shocked.gif", "", "Shocked"],
["cool.gif", "", "Cool"],
["rolleyes.gif", "", "Roll Eyes"],
["tongue.gif", "", "Tongue"],
["embarassed.gif", "", "Embarassed"],
["lipsrsealed.gif", "", "Lips Sealed"],
["undecided.gif", "", "Undecided"],
["kiss.gif", "", "Kiss"],
["cry.gif", "", "Cry"]
];
var iTable = document.getElementsByTagName("table");
function addSmiley(smiley){
var isIE = (document.all)? true : false;
var mArea = document.getElementById("qrform").message;
if(isIE){
mArea.focus();
var iCurSelect = document.selection.createRange();
iCurSelect.text = smiley + iCurSelect.text
} else if(!isIE){
var selStart = mArea.value.substr(0, mArea.selectionStart);
var selEnd = mArea.value.substr(mArea.selectionEnd, mArea.value.length);
var curSelection = mArea.value.replace(selStart, '').replace(selEnd, '');
mArea.value = selStart + smiley + curSelection + selEnd;
} else {
mArea.value += smiley;
}
mArea.focus();
}
for(t = 0; t < iTable.length; t ++){
var iBR = document.createElement("br");
if(iTable.item(t).cellPadding == "4" && iTable.item(t).cellSpacing == "1" && iTable.item(t).rows.item(0).innerHTML.match(/>Quick Reply</)){
var iMCell = iTable.item(t).rows.item(1).cells.item(0);
iTable.item(t).getElementsByTagName("form").item(0).id = "qrform";
iMCell.insertBefore(iBR, iMCell.firstChild);
iSmileys.reverse();
for(s = 0; s < iSmileys.length; s ++){
var sLink = document.createElement("a");
var sImg = document.createElement("img");
sImg.border = "0";
sImg.src = sBaseImg + iSmileys[0];
sImg.title = iSmileys[2];
sLink.href = "javascript: addSmiley(\" " + iSmileys[1] + "\")";
sLink.appendChild(sImg);
iMCell.insertBefore(sLink, iMCell.firstChild);
iMCell.insertBefore(document.createTextNode(" "), iMCell.firstChild);
}
}
}
//-->
</script>
<script type="text/javascript">
<!--
/*
Smileys with quick reply - global footers
Created by Peter
This code cannot be reposted at anywhere other than SSDesigns or ProBoards, without permission.
This header must stay intact at all times.
*/
// Base url for the smileys folder
var sBaseImg = "http://www.4d5.net/v4images/";
// List of smileys - [SMILEY FILE, CODE, TITLE]
var iSmileys = [
["smiley.gif", "", "Smiley"],
["wink.gif", "", "Wink"],
["grin.gif", ";D", "Grin"],
["angry.gif", "", "Angry"],
["sad.gif", "", "Sad"],
["shocked.gif", "", "Shocked"],
["cool.gif", "", "Cool"],
["rolleyes.gif", "", "Roll Eyes"],
["tongue.gif", "", "Tongue"],
["embarassed.gif", "", "Embarassed"],
["lipsrsealed.gif", "", "Lips Sealed"],
["undecided.gif", "", "Undecided"],
["kiss.gif", "", "Kiss"],
["cry.gif", "", "Cry"]
];
var iTable = document.getElementsByTagName("table");
function addSmiley(smiley){
var isIE = (document.all)? true : false;
var mArea = document.getElementById("qrform").message;
if(isIE){
mArea.focus();
var iCurSelect = document.selection.createRange();
iCurSelect.text = smiley + iCurSelect.text
} else if(!isIE){
var selStart = mArea.value.substr(0, mArea.selectionStart);
var selEnd = mArea.value.substr(mArea.selectionEnd, mArea.value.length);
var curSelection = mArea.value.replace(selStart, '').replace(selEnd, '');
mArea.value = selStart + smiley + curSelection + selEnd;
} else {
mArea.value += smiley;
}
mArea.focus();
}
for(t = 0; t < iTable.length; t ++){
var iBR = document.createElement("br");
if(iTable.item(t).cellPadding == "4" && iTable.item(t).cellSpacing == "1" && iTable.item(t).rows.item(0).innerHTML.match(/>Quick Reply</)){
var iMCell = iTable.item(t).rows.item(1).cells.item(0);
iTable.item(t).getElementsByTagName("form").item(0).id = "qrform";
iMCell.insertBefore(iBR, iMCell.firstChild);
iSmileys.reverse();
for(s = 0; s < iSmileys.length; s ++){
var sLink = document.createElement("a");
var sImg = document.createElement("img");
sImg.border = "0";
sImg.src = sBaseImg + iSmileys
sImg.title = iSmileys
sLink.href = "javascript: addSmiley(\" " + iSmileys
sLink.appendChild(sImg);
iMCell.insertBefore(sLink, iMCell.firstChild);
iMCell.insertBefore(document.createTextNode(" "), iMCell.firstChild);
}
}
}
//-->
</script>