Post by hpmad on Apr 21, 2006 15:22:48 GMT -8
Description:
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.
Global Footer:
<script type="text/javascript">
<!--
/* Custom Member Rank Icons by hpmad
Do not repost or modify without permission from creator
For more codes like this one go to: talkpark.proboards.com */
var newStars = [
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url']
];
var table = document.getElementsByTagName('table');
if(location.href.match(/action=modifyprofile/i)){
for(i=0;i<table.length;i++){
if(table.border=='0' && table.cellPadding=='2' && table.cellSpacing=='2' && table.firstChild.firstChild.firstChild.innerHTML.match(/Member Group/)){
var iFont = document.createElement('font'); iFont.size = '-1';
var iFont2 = document.createElement('font'); iFont2.size = '-2';
iFont.appendChild(document.createTextNode('Rank Icon:'));
iFont2.appendChild(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.'));
var iCell = table.insertRow(1).insertCell(0); iCell.appendChild(iFont);
var iCell2 = table.firstChild.firstChild.nextSibling.insertCell(1);
var iCell3 = table.firstChild.firstChild.nextSibling.insertCell(2);
iCell3.appendChild(iFont2);
var icoSel = document.createElement('select'); icoSel.id = 'icoSel';
icoSel.options[0] = new Option('Default Icons','');
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 = 'icoNum';
icoNum.size = '2'; icoNum.maxLength = '2'; icoNum.datatype = 'num';
var ctform = document.modifyForm.customtitle;
iCell2.appendChild(icoSel);
iCell2.appendChild(document.createTextNode(' # of icons '));
iCell2.appendChild(icoNum);
icoSel.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? RegExp.$1:'';
icoNum.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? RegExp.$2:'';
document.modifyForm.onsubmit = function(){
if(icoNum.value.match(/\D/) || icoNum.value=='') icoNum.value = '5';
if(!ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) && icoSel.value.match(/(\d+)/)){
ctform.value = '[ico'+icoSel.value + '(' + icoNum.value + ')]' + ctform.value;
}else if(ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) && icoSel.value.match(/(\d+)/)){
ctform.value = ctform.value.replace(RegExp.$1, icoSel.value);
ctform.value = ctform.value.replace(RegExp.$2, icoNum.value);
}
}
ctform.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? ctform.value.replace(/\[ico(.+?)\((.+?)\)\]/,''):ctform.value;
}
}
}else if(location.href.match(/action=(viewprofile|display)/)){
var td = document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td.className.match(/windowbg/) && td.width=='20%' && td.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]+'">';
cusicons += td.innerHTML.match(/\[ico(.+?)\((.+?)\)\].+?<br\s?\/?>m/i) ? '<br />':'';
td.innerHTML = td.innerHTML.replace(/\[ico(.+?)\((.+?)\)\]/,cusicons);
var img = td.getElementsByTagName('img');
for(a=0;a<img.length;a++){
if(img.alt=='*' && !img.hasAttribute('width') && !img.previousSibling.hasAttribute('width') && !img.nextSibling.hasAttribute('width')){
img.style.display = 'none';
img.previousSibling.style.display = 'none';
}
}
}
}
}
//-->
</script>
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.
Global Footer:
<script type="text/javascript">
<!--
/* Custom Member Rank Icons by hpmad
Do not repost or modify without permission from creator
For more codes like this one go to: talkpark.proboards.com */
var newStars = [
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url'],
['Rank Icon Name','Rank Icon Url']
];
var table = document.getElementsByTagName('table');
if(location.href.match(/action=modifyprofile/i)){
for(i=0;i<table.length;i++){
if(table.border=='0' && table.cellPadding=='2' && table.cellSpacing=='2' && table.firstChild.firstChild.firstChild.innerHTML.match(/Member Group/)){
var iFont = document.createElement('font'); iFont.size = '-1';
var iFont2 = document.createElement('font'); iFont2.size = '-2';
iFont.appendChild(document.createTextNode('Rank Icon:'));
iFont2.appendChild(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.'));
var iCell = table.insertRow(1).insertCell(0); iCell.appendChild(iFont);
var iCell2 = table.firstChild.firstChild.nextSibling.insertCell(1);
var iCell3 = table.firstChild.firstChild.nextSibling.insertCell(2);
iCell3.appendChild(iFont2);
var icoSel = document.createElement('select'); icoSel.id = 'icoSel';
icoSel.options[0] = new Option('Default Icons','');
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 = 'icoNum';
icoNum.size = '2'; icoNum.maxLength = '2'; icoNum.datatype = 'num';
var ctform = document.modifyForm.customtitle;
iCell2.appendChild(icoSel);
iCell2.appendChild(document.createTextNode(' # of icons '));
iCell2.appendChild(icoNum);
icoSel.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? RegExp.$1:'';
icoNum.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? RegExp.$2:'';
document.modifyForm.onsubmit = function(){
if(icoNum.value.match(/\D/) || icoNum.value=='') icoNum.value = '5';
if(!ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) && icoSel.value.match(/(\d+)/)){
ctform.value = '[ico'+icoSel.value + '(' + icoNum.value + ')]' + ctform.value;
}else if(ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) && icoSel.value.match(/(\d+)/)){
ctform.value = ctform.value.replace(RegExp.$1, icoSel.value);
ctform.value = ctform.value.replace(RegExp.$2, icoNum.value);
}
}
ctform.value = ctform.value.match(/\[ico(.+?)\((.+?)\)\]/) ? ctform.value.replace(/\[ico(.+?)\((.+?)\)\]/,''):ctform.value;
}
}
}else if(location.href.match(/action=(viewprofile|display)/)){
var td = document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td.className.match(/windowbg/) && td.width=='20%' && td.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]+'">';
cusicons += td.innerHTML.match(/\[ico(.+?)\((.+?)\)\].+?<br\s?\/?>m/i) ? '<br />':'';
td.innerHTML = td.innerHTML.replace(/\[ico(.+?)\((.+?)\)\]/,cusicons);
var img = td.getElementsByTagName('img');
for(a=0;a<img.length;a++){
if(img.alt=='*' && !img.hasAttribute('width') && !img.previousSibling.hasAttribute('width') && !img.nextSibling.hasAttribute('width')){
img.style.display = 'none';
img.previousSibling.style.display = 'none';
}
}
}
}
}
//-->
</script>