Post by hpmad on Jan 1, 2007 22:29:41 GMT -5
Allows a staff member to give a member a custom rank icon (a.k.a. stars, i.e. , ) that's editable in the profile.
['Rank Icon Name','Rank Icon Url'],
Repeat this line (omit the last comma on the last line). Rank icon name is just a nickname of the icon and the rank icon url is the url to the image. Then you can choose which icon a member receives in the profile.
Main Footer
<script type="text/javascript">
/* Custom Member Rank Icons by hpmad
Do not repost or claim without permission from creator
This header must remain intact */
var newStars = [
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url']
];
var table = document.getElementsByTagName('table');
for( i=0;i<table.length;i++){
if( table.item(i).border=='0' && table.item(i).cellPadding=='2' && table.item(i).cellSpacing=='2' && table.item(i).firstChild.firstChild.firstChild.innerHTML.match(/Member Group/) ){
var iFont = document.createElement('font'); iFont.size = '-1';
var iFont2 = document.createElement('font'); iFont2.size = '-2';
var iText = document.createTextNode('Rank Icon:');
var iDes = document.createTextNode('Choose the custom rank icon for this member. It will be displayed in their profile and mini profile. The normal setting will allow the member to retain their normal rank icon for their member group.');
iFont.appendChild(iText); iFont2.appendChild(iDes);
var iCell = table.item(i).insertRow(1).insertCell(0); iCell.appendChild(iFont);
var iCell2 = table.item(i).firstChild.firstChild.nextSibling.insertCell(1);
var iCell3 = table.item(i).firstChild.firstChild.nextSibling.insertCell(2);
iCell3.appendChild(iFont2);
var icoSel = document.createElement('select'); icoSel.id = 'rankico';
icoSel.options[0] = new Option('Normal'); icoSel.options[0].value = 'nml';
for( t=0;t<newStars.length;t++){
icoSel.options[icoSel.options.length] = new Option(newStars[t][0],t);
}
var icoNum = document.createElement('input'); icoNum.id = 'ranknum';
icoNum.size = '2'; icoNum.maxLength = '2'; icoNum.datatype = 'num';
iCell2.appendChild(icoSel);
iCell2.appendChild(document.createTextNode(' # of icons '));
iCell2.appendChild(icoNum);
document.getElementById('rankico').value = (document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) ) ? RegExp.$1:'';
document.getElementById('ranknum').value = (document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) ) ? RegExp.$2:'';
document.modifyForm.onsubmit = function(){
if( document.getElementById('ranknum').value.match(/\D/) || document.getElementById('ranknum').value==''){
document.getElementById('ranknum').value = '5';
}
if( !document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) && document.getElementById('rankico').value.match(/(\d+)/) ){
document.modifyForm.customtitle.value = '[ico'+document.getElementById('rankico').value + '(' + document.getElementById('ranknum').value + ')]' + document.modifyForm.customtitle.value;
}else if( document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) && document.getElementById('rankico').value.match(/(\d+)/) ){
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(RegExp.$1, document.getElementById("rankico").value);
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(RegExp.$2, document.getElementById("ranknum").value);
}
}
if( document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) )
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(/\[ico(.+?)\((.+?)\)\]/,'');
}
}
if( location.href.match(/action=(viewprofile|display)/) ){
var td = document.getElementsByTagName('td');
for( i=0;i<td.length;i++){
if( td.item(i).className.match(/windowbg(2)?$/) && td.item(i).vAlign=='top' && td.item(i).width=='20%' && td.item(i).innerHTML.match(/\[ico(.+?)\((.+?)\)\]/) ){
var icoid = RegExp.$1;
var iconum = RegExp.$2;
var cusicons = '';
for( t=0;t<iconum;t++) cusicons += '<img src="'+newStars[icoid][1]+'">';
td.item(i).innerHTML = td.item(i).innerHTML.replace(/\[ico(.+?)\((.+?)\)\]/,cusicons+'<br>');
var img = td.item(i).getElementsByTagName('img');
for( a=0;a<img.length;a++){
if( img.item(a).alt=='*'){
img.item(a).style.display = 'none';
img.item(a).previousSibling.style.display = 'none';
}
}
}
}
}
</script>
['Rank Icon Name','Rank Icon Url'],
Repeat this line (omit the last comma on the last line). Rank icon name is just a nickname of the icon and the rank icon url is the url to the image. Then you can choose which icon a member receives in the profile.
Main Footer
<script type="text/javascript">
/* Custom Member Rank Icons by hpmad
Do not repost or claim without permission from creator
This header must remain intact */
var newStars = [
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url']
];
var table = document.getElementsByTagName('table');
for( i=0;i<table.length;i++){
if( table.item(i).border=='0' && table.item(i).cellPadding=='2' && table.item(i).cellSpacing=='2' && table.item(i).firstChild.firstChild.firstChild.innerHTML.match(/Member Group/) ){
var iFont = document.createElement('font'); iFont.size = '-1';
var iFont2 = document.createElement('font'); iFont2.size = '-2';
var iText = document.createTextNode('Rank Icon:');
var iDes = document.createTextNode('Choose the custom rank icon for this member. It will be displayed in their profile and mini profile. The normal setting will allow the member to retain their normal rank icon for their member group.');
iFont.appendChild(iText); iFont2.appendChild(iDes);
var iCell = table.item(i).insertRow(1).insertCell(0); iCell.appendChild(iFont);
var iCell2 = table.item(i).firstChild.firstChild.nextSibling.insertCell(1);
var iCell3 = table.item(i).firstChild.firstChild.nextSibling.insertCell(2);
iCell3.appendChild(iFont2);
var icoSel = document.createElement('select'); icoSel.id = 'rankico';
icoSel.options[0] = new Option('Normal'); icoSel.options[0].value = 'nml';
for( t=0;t<newStars.length;t++){
icoSel.options[icoSel.options.length] = new Option(newStars[t][0],t);
}
var icoNum = document.createElement('input'); icoNum.id = 'ranknum';
icoNum.size = '2'; icoNum.maxLength = '2'; icoNum.datatype = 'num';
iCell2.appendChild(icoSel);
iCell2.appendChild(document.createTextNode(' # of icons '));
iCell2.appendChild(icoNum);
document.getElementById('rankico').value = (document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) ) ? RegExp.$1:'';
document.getElementById('ranknum').value = (document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) ) ? RegExp.$2:'';
document.modifyForm.onsubmit = function(){
if( document.getElementById('ranknum').value.match(/\D/) || document.getElementById('ranknum').value==''){
document.getElementById('ranknum').value = '5';
}
if( !document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) && document.getElementById('rankico').value.match(/(\d+)/) ){
document.modifyForm.customtitle.value = '[ico'+document.getElementById('rankico').value + '(' + document.getElementById('ranknum').value + ')]' + document.modifyForm.customtitle.value;
}else if( document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) && document.getElementById('rankico').value.match(/(\d+)/) ){
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(RegExp.$1, document.getElementById("rankico").value);
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(RegExp.$2, document.getElementById("ranknum").value);
}
}
if( document.modifyForm.customtitle.value.match(/\[ico(.+?)\((.+?)\)\]/) )
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(/\[ico(.+?)\((.+?)\)\]/,'');
}
}
if( location.href.match(/action=(viewprofile|display)/) ){
var td = document.getElementsByTagName('td');
for( i=0;i<td.length;i++){
if( td.item(i).className.match(/windowbg(2)?$/) && td.item(i).vAlign=='top' && td.item(i).width=='20%' && td.item(i).innerHTML.match(/\[ico(.+?)\((.+?)\)\]/) ){
var icoid = RegExp.$1;
var iconum = RegExp.$2;
var cusicons = '';
for( t=0;t<iconum;t++) cusicons += '<img src="'+newStars[icoid][1]+'">';
td.item(i).innerHTML = td.item(i).innerHTML.replace(/\[ico(.+?)\((.+?)\)\]/,cusicons+'<br>');
var img = td.item(i).getElementsByTagName('img');
for( a=0;a<img.length;a++){
if( img.item(a).alt=='*'){
img.item(a).style.display = 'none';
img.item(a).previousSibling.style.display = 'none';
}
}
}
}
}
</script>