Post by Triad on Dec 7, 2008 15:13:52 GMT -5
If a user has an avatar in his or her profile, this script will make it link to their profile just as their name would.
If you would like to have the avatar link to something else, create a thread in the code support board so I or somebody else can help you modify it.
Global Footers
<script type="text/javascript"><!--
/*
* Link Avatar to Profile
* Created by Triad
*/
if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){
for(var td=document.getElementsByTagName("td"), x= 6; x<td.length; x++){
if(td[x].width == "20%" && td[x].getElementsByTagName("center")[0]){
var center = td[x].getElementsByTagName("center")[0];
if(center.firstChild.src && center.firstChild.alt == "[avatar]"){
var a = td[x].getElementsByTagName("a"), b = a.length, c = 0, name;
while(c < b){
if(a[c].className && a[c].className.match(/group/i)){
name = a[c].href.split("=")[2];
break;
}
c++;
}
var _a = document.createElement("a");
_a.href = "/index.cgi?action=viewprofile&user=" + name;
_a.appendChild(center.firstChild.cloneNode(true));
center.replaceChild(_a, center.firstChild);
}
}
}
}
//--></script>
If you would like to have the avatar link to something else, create a thread in the code support board so I or somebody else can help you modify it.
Global Footers
<script type="text/javascript"><!--
/*
* Link Avatar to Profile
* Created by Triad
*/
if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){
for(var td=document.getElementsByTagName("td"), x= 6; x<td.length; x++){
if(td[x].width == "20%" && td[x].getElementsByTagName("center")[0]){
var center = td[x].getElementsByTagName("center")[0];
if(center.firstChild.src && center.firstChild.alt == "[avatar]"){
var a = td[x].getElementsByTagName("a"), b = a.length, c = 0, name;
while(c < b){
if(a[c].className && a[c].className.match(/group/i)){
name = a[c].href.split("=")[2];
break;
}
c++;
}
var _a = document.createElement("a");
_a.href = "/index.cgi?action=viewprofile&user=" + name;
_a.appendChild(center.firstChild.cloneNode(true));
center.replaceChild(_a, center.firstChild);
}
}
}
}
//--></script>