Xfire Icon Code:

Global Footer:

<script type="text/javascript"><!--
//Xfire Icon v1.0 [CB]

//Copyright 11-20-2005 ~Wonder
//May be reposted anywhere as long as this header remains in tact

//Enter URL of the image you want to appear as Xfire icon
xfireIcon="http://img505.imageshack.us/img505/6027/xfire0fe.gif";

if(location.href.match(/action=(display|goto|viewprofile|pmview|recent)/))
{
var td=document.getElementsByTagName("td");
for(i=0;i<td.length;i++)
{
if(td[i].width=="20%" && td[i].className.match(/windowbg/) && td[i].innerHTML.match(/\[x\=(.+?)\]/m))
{
xid=RegExp.$1;bp=new RegExp("(<br><br>)?\\[x\\="+xid+"\\]","i");
c=td[i].getElementsByTagName("center");
xid=xid.replace(/\W/,"");
for(j=0;j<c.length;j++){if(c[j].innerHTML.match(bp)){c[j].innerHTML+="<a href=\"xfire:add_friend?user="+xid+"\"><img src=\""+xfireIcon+"\" border=0 alt=\"[xfire]\"></a>";}}
td[i].innerHTML=td[i].innerHTML.replace(bp,"");
}
}
}
if(location.href.match(/action\=modifyprofile/))
{tab=document.modifyForm.aim.parentNode.parentNode.parentNode.parentNode.parentNode;
document.modifyForm.personaltext.value.match(/\[x\=(\w+)\]/)==null?xid="":xid=RegExp.$1;p=document.modifyForm.personaltext;p.onblur=bb;p.onfocus=br;
temprow=tab.insertRow(-1);temp=temprow.insertCell(0);temp.innerHTML="<font size=\"-1\">Xfire:</font>";temp.width=160;temp.vAlign="top";temp=temprow.insertCell(1);
temp.innerHTML="<font size=\"-1\"><input name=\"xid\" size=35 maxlength=\"25\" value=\""+xid+"\"></font>";
temp.width=245;temp.valign="top";document.modifyForm.xid.onkeyup=bb;temp=temprow.insertCell(2);
temp.innerHTML="<font size=\"-2\">Enter your Xfire id.</font>";
temp.width=245;temp.valign="top";}
function bb(){xid=document.modifyForm.xid.value.replace(/ |\W/,"");(xid.length>0)?p.value=p.value.replace(/\[x\=\w+\]/,"")+"[x="+xid+"]":br();}
function br(){p.value=p.value.replace(/\[x\=\w+\]/,"");}
//--></script>

Code Database:

If you have a Code Database (a forum that serves as a collection of scripts) on your message board, you may paste the following code into that forum to add it your own code list.

[b]Title:[/b] [url=http://proboards.gamingmedley.com/codes/xfire-icon.html]Xfire Icon[/url]
[b]Creator:[/b] Wonder
[b]Cross-Browser:[/b] Yes
[b]Placement:[/b] Global Footer
[code]<script type="text/javascript"><!--
//Xfire Icon v1.0 [CB]

//Copyright 11-20-2005 ~Wonder
//May be reposted anywhere as long as this header remains in tact

//Enter URL of the image you want to appear as Xfire icon
xfireIcon="http://img505.imageshack.us/img505/6027/xfire0fe.gif";

if(location.href.match(/action=(display|goto|viewprofile|pmview|recent)/))
{
var td=document.getElementsByTagName("td");
for(i=0;i<td.length;i++)
{
if(td[i].width=="20%" && td[i].className.match(/windowbg/) && td[i].innerHTML.match(/\[x\=(.+?)\]/m))
{
xid=RegExp.$1;bp=new RegExp("(<br><br>)?\\[x\\="+xid+"\\]","i");
c=td[i].getElementsByTagName("center");
xid=xid.replace(/\W/,"");
for(j=0;j<c.length;j++){if(c[j].innerHTML.match(bp)){c[j].innerHTML+="<a href=\"xfire:add_friend?user="+xid+"\"><img src=\""+xfireIcon+"\" border=0 alt=\"[xfire]\"></a>";}}
td[i].innerHTML=td[i].innerHTML.replace(bp,"");
}
}
}
if(location.href.match(/action\=modifyprofile/))
{tab=document.modifyForm.aim.parentNode.parentNode.parentNode.parentNode.parentNode;
document.modifyForm.personaltext.value.match(/\[x\=(\w+)\]/)==null?xid="":xid=RegExp.$1;p=document.modifyForm.personaltext;p.onblur=bb;p.onfocus=br;
temprow=tab.insertRow(-1);temp=temprow.insertCell(0);temp.innerHTML="<font size=\"-1\">Xfire:</font>";temp.width=160;temp.vAlign="top";temp=temprow.insertCell(1);
temp.innerHTML="<font size=\"-1\"><input name=\"xid\" size=35 maxlength=\"25\" value=\""+xid+"\"></font>";
temp.width=245;temp.valign="top";document.modifyForm.xid.onkeyup=bb;temp=temprow.insertCell(2);
temp.innerHTML="<font size=\"-2\">Enter your Xfire id.</font>";
temp.width=245;temp.valign="top";}
function bb(){xid=document.modifyForm.xid.value.replace(/ |\W/,"");(xid.length>0)?p.value=p.value.replace(/\[x\=\w+\]/,"")+"[x="+xid+"]":br();}
function br(){p.value=p.value.replace(/\[x\=\w+\]/,"");}
//--></script>[/code]