Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Iconized Fields Tweak
Topic Started: Aug 18 2014, 02:52 PM (377 Views)
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
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>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply