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)
Locked Topic
[Solved] How to add social profile links on user profile with logos?
Topic Started: Jan 18 2014, 03:05 PM (472 Views)
GodzillaV2
Member
[ *  * ]
Posted Image

How do you add social profile links on user profile with logos?
Edited by GodzillaV2, Jan 18 2014, 03:05 PM.
Offline Profile Goto Top
 
GodzillaV2
Member
[ *  * ]
Bump
Offline Profile Goto Top
 
JadedOne-ZNS
Member Avatar
Member
[ *  *  * ]
There's a code for it somewhere but I can't find it.
Offline Profile Goto Top
 
1days
Member Avatar
Member
[ *  *  * ]
Ok figured out what the issue was. When you create the Profile Fields in your ACP, you need to make sure it's named exactly the way it shows in the code. For ex. Twitter ID will not work if the profile field reads twitter ID.

Use this code. We have it in Above the copyright in the Board Template.

Code:
 
<style type="text/css">
dl.user_profile_links img {
margin-right:1px;
}
</style>
<script type="text/javascript">
var profile_custom = new Array();
var profile_pre = new Array();
var profile_post = new Array();
var profile_img = new Array();

profile_custom[0] = "Twitter ID";
profile_pre[0] = "http://twitter.com/";
profile_post[0] = "";
profile_img[0] = "http://z3.ifrm.com/47/62/0/p329875/twitter16.png";

profile_custom[1] = "Facebook ID";
profile_pre[1] = "http://www.facebook.com/home.php?#!/profile.php?id=";
profile_post[1] = "";
profile_img[1] = "http://z3.ifrm.com/47/62/0/p329872/facebook16.png";

profile_custom[2] = "YouTube Name";
profile_pre[2] = "http://www.youtube.com/user/";
profile_post[2] = "";
profile_img[2] = "http://z3.ifrm.com/47/62/0/p329877/youtube16.png";

profile_custom[4] = "Blogger Name";
profile_pre[4] = "http://";
profile_post[4] = ".blogspot.com/";
profile_img[4] = "http://z3.ifrm.com/47/62/0/p329871/blogger16.png";

profile_custom[5] = "WordPress Name";
profile_pre[5] = "http://";
profile_post[5] = ".wordpress.com/";
profile_img[5] = "http://z3.ifrm.com/47/62/0/p329876/wordpress16.png";

profile_custom[6] = "FanFiction.net ID";
profile_pre[6] = "http://www.fanfiction.net/u/";
profile_post[6] = "";
profile_img[6] = "http://z4.ifrm.com/30090/101/0/p1069274/ffnet.png";

profile_custom[7] = "Google+ ID";
profile_pre[7] = "https://plus.google.com/u/0/";
profile_post[7] = "";
profile_img[7] = "http://z1.ifrm.com/7060/12/0/f5013660/gplus16.png";

$("td.c_user").each(function(){
$(this).children("dl.user_profile").after("<dl class='user_profile_links'><dd></dd></dl>");
var t = 0;var tmp;
for (t = 0; t < profile_custom.length; t++) {
if ($(this).children("dl.user_profile").children("dt:contains('"+profile_custom[t]+"')").html() != null) {
tmp = profile_pre[t] + $(this).children("dl.user_profile").children("dt:contains('"+profile_custom[t]+"')").next("dd").html() + profile_post[t];
$(this).children("dl.user_profile").children("dt:contains('"+profile_custom[t]+"')").hide().next("dd").hide()
$(this).children("dl.user_profile_links").children("dd").append("<a href='"+tmp+"' target='_blank'><img src='"+profile_img[t]+"' alt='"+profile_custom[t]+"' /></a>");
}}})
</script>
Edited by 1days, Jan 20 2014, 11:32 AM.
Offline Profile Goto Top
 
JadedOne-ZNS
Member Avatar
Member
[ *  *  * ]
That's the one. I didn't want to c/p here and screw it up.
Offline Profile Goto Top
 
GodzillaV2
Member
[ *  * ]
Thanks alot. It worked ^_^
Offline Profile Goto Top
 
1days
Member Avatar
Member
[ *  *  * ]
You're welcome GodzillaV2!

Jaded, I made sure to put it on my test board first and figure out why the icons weren't showing correctly. It was really irritating me. LOL
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Support · Next Topic »
Locked Topic