If you are seeing this message, it is possible the page did not load properly. Please hit reload/refresh on your browser.
If you still see this message, you probably do not have a browser that supports web standards, although its content is accessible to any browser or Internet device.

Cool Tips & Tricks Cool Tips & Tricks

Help Communities:
Help Forums Bug Base
<< Prev Topic | Next Topic >>
Cool Tips & Tricks ::: Javascript FAQ ::: Change Profile Link To An Image...
New Topic    Add Reply
Topic: Change Profile Link To An Image...  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
Te1emachus

Registered User
Posts: 146
Posted: 2/6/05 9:18 am    
Change Profile Link To An Image...
In response to This Request, will change the listed members' profile links to the image of your choice for each, and can be set to work for the Who's Online box only, as well.





<head> code </head> » (First Box):

           
<script type="text/javascript">

/* Options To Configure */

membersNames = new Array("Member","Another Member");
membersImages = new Array("http://www.somewhere.com/images/image.gif","http://www.somewhere.com/images/anotherimage.gif");

/* End Of Configuration Area */


/*  !!! DO NOT ALTER ANYTHING BELOW !!!  */

function linkImage(onlineOnly){
        dl = document.links;
        if (membersNames.length = membersImages.length){
                for (j = 0; j < membersNames.length; j++){
                        for (t = 0; t < dl.length; t++){
                                if ((!onlineOnly) || (onlineOnly) && dl[t].parentNode.parentNode.parentNode.parentNode.className == "whosonline"){
                                        if (dl[t].href.match(membersNames[j].toLowerCase().replace(/([\s]*)/ig,"")) && dl[t].href.match("PublicProfile")){
                                                dl[t].innerHTML = "<img src='" + membersImages[j] + "' border='0px' alt='" + dl[t].innerHTML + "' />";
                                        }
                                }
                        }
                }
        }
        else{
                alert("Script Error: Array length uneven!");
        }
}
</script>




Custom Footer » (Fourth Box):

           
<script type="text/javascript">
linkImage(false);        // Only affect Who's Online links? true or false
</script>






Edit: Oops, forgot to account for the two different formats of profile URLs.


Edited by: Nutrocker at: 2/10/05 1:58 pm

  reply to this message

Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend

New Topic    Add Reply

jump to:
Topic Control Image::: Topic Commands
<< Prev Topic | Next Topic >>

Icon Legend

reply button:::Reply to Post Button   edit button:::Edit Post Button  delete button:::Delete Post Button (Moderator Only)

subscribe/unsubscribe to thread button:::Subscribe to Thread Button   email to friend button:::Email to Friend Button  



- Cool Tips & Tricks - Javascript FAQ -

Communitiesezboard Help Communities:

Help Forums Help Forums Bug Base Bug Base





Powered By ezboard® Ver. 7.32
Copyright ©1999-2007 ezboard, Inc.