|
Kankuro
|
Aug 18 2014, 02:52 PM
Post #1
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
Board: http://w11.zetaboards.com/GamesAndAnime/index/ Software: Zeta
I'm looking for somebody to tweak this code so that when you hover over the icons/profile fields it will display a specific name. I'd prefer being able to add the hover name myself, but if you can't do that then just making it so it displays the name of the profile field would be sufficient enough.
- Code:
-
<style type="text/css"> dt.user_profile_links img { margin:2px; } </style> <script type="text/javascript"> var profileField = new Array(); var profilePre = new Array(); var profilePost = new Array(); var profileImg = new Array(); var profileCount = 0;
function profileIcon (fieldName, pre_url, post_url, img_url) { profileField[profileCount] = fieldName; profilePre[profileCount] = pre_url; profilePost[profileCount] = post_url; profileImg[profileCount] = img_url; profileCount++; };
/* profileIcons go here */ // format: profileIcon ("Field name", "Link prefix", "Link suffix", "Image URL"); profileIcon ("Gamertag", "https://account.xbox.com/en-US/Profile?gamerTag=", "", "http://z5.ifrm.com/30458/170/0/f5291097/xbox.png"); profileIcon ("PSN ID", "http://psnprofiles.com/" , "" , "http://z5.ifrm.com/30458/170/0/f5291093/playstation.png"); profileIcon ("Steam", "http://steamcommunity.com/id/", "", "http://z5.ifrm.com/30458/170/0/f5291094/steam.png"); profileIcon ("DeviantArt", "http://", ".deviantart.com/", "http://z5.ifrm.com/30458/170/0/f5291087/deviantart.png"); profileIcon ("Facebook", "https://www.facebook.com/" , "" , "http://z5.ifrm.com/30458/170/0/f5291088/facebook.png"); profileIcon ("Twitter", "https://twitter.com/" , "" , "http://z5.ifrm.com/30458/170/0/f5291096/twitter.png"); profileIcon ("Google+", "https://plus.google.com/+" , "" , "http://z5.ifrm.com/30458/170/0/f5291089/google.png"); profileIcon ("YouTube", "https://www.youtube.com/user/" , "" , "http://z5.ifrm.com/30458/170/0/f5291098/youtube.png"); profileIcon ("MyAnimeList", "http://myanimelist.net/profile/" , "" , "http://z5.ifrm.com/30458/170/0/f5291091/myanimelist.png"); profileIcon ("Myspace", "https://myspace.com/", "", "http://z5.ifrm.com/30458/170/0/f5291092/myspace.png"); profileIcon ("Instagram", "http://instagram.com/", "", "http://z5.ifrm.com/30458/170/0/f5291090/instagram.png"); profileIcon ("Tumblr", "https://", ".tumblr.com/", "http://z5.ifrm.com/30458/170/0/f5291095/tumblr.png"); profileIcon ("Skype", "skype:", "?chat", "http://z5.ifrm.com/30458/170/0/f5291102/skype.png");
$("td.c_user").each(function () { $(this).children("dl.user_profile").append("<dt class='user_profile_links'></dt>"); var fieldCount = 0; var urlTemp; for (fieldCount = 0; fieldCount < profileField.length; fieldCount++) { if ($(this).children("dl.user_profile").children("dt:contains('" + profileField[fieldCount] + "')").html() != null) { urlTemp = profilePre[fieldCount] + $(this).children("dl.user_profile").children("dt:contains('" + profileField[fieldCount] + "')").next("dd").html() + profilePost[fieldCount]; $(this).children("dl.user_profile").children("dt:contains('" + profileField[fieldCount] + "')").hide().next("dd").hide() $(this).find("dt.user_profile_links").append("<a href='" + urlTemp + "' target='_blank'><img src='" + profileImg[fieldCount] + "' alt='" + profileField[fieldCount] + "' /></a>"); } } }); </script>
|