SubDevo
Administrator
Creator of LSD...
Posts: 109
|
Post by SubDevo on Aug 27, 2009 17:30:11 GMT -5
Link Avatar to Profile Page by SubDevoTested in IE, FF, Opera and Safari This code makes all forum avatars into a link that goes to that member's profile page. (makes the avatar clickable). Simple enough! Note:I've written this to be compatible with most (if not all) mini-profile codes out there. You may have to place this code above or below those codes, but it should work. If for some reason you have an issue, don't hesitate to ask! Enjoy!!! SubDevo Location: Global FooterNo editing required. <script type="text/Javascript"> <!-- /* Link Avatar to Profile Page by SubDevo */ /* Global Footer - Please leave this header intact. Do not repost. */ /* [url]http://interoceandesigns.proboards.com[/url] or [url]http://lsdp.proboards.com[/url] */
var n=document.images; if(pb_action.match(/(calendar|pm|pre)view|viewprofile|search2|display/i)){ for(var x=0;x<n.length;x++){ if(n[x].alt.match(/\[avatar\]/i)){ var i=0; var nT=n[x]; nT.border="0"; while(!nT.nodeName.match(/td/i)&&nT.width!="20%"){nT=nT.parentNode;} var nL=nT.getElementsByTagName("a"); var aL=document.createElement("a"); while(!nL[i].href.match(/viewprofile/i)){i++;} aL.href=nL[i].href; aL.appendChild(n[x].cloneNode(true)); n[x].parentNode.replaceChild(aL,n[x]); }}} // --> </script>
|
|