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:
Locked Topic
[ C ] How to make XBOX Avatar appear as Forum Avatar
Topic Started: Jun 7 2013, 07:58 PM (863 Views)
Byzantine
Member Avatar
Zathyus Networks Greek
[ *  *  *  * ]
Board Address: http://forums.scorpion-rising.com/index/
Board Software: (ZetaBoards or InvisionFree) ZetaBoards
Description: (What you want your code to do) I'd like a code that will set my Avatar from my XBOX LIVE Gamertag to appear as my Forum Avatar.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('td.c_user').each(function () {
$(this).find('dl.user_profile dt:contains(Xbox Live Gamertag)').next('dd').andSelf().hide();
var gamertag = $(this).find('dl.user_profile dt:contains(Xbox Live Gamertag) + dd').html();

if (location.href.indexOf('/profile/') !== -1) {
$('td.c_mark img.member, td.c_mark div[style*="max-height"]').replaceWith(gamertag);
} else if (location.href.indexOf('/topic/') !== -1 || location.href.indexOf('/single/') !== -1) {
$(this).find('img.member, div[style*="max-height"]').replaceWith(gamertag);
}
});
//]]>
</script>
Offline Profile Goto Top
 
Byzantine
Member Avatar
Zathyus Networks Greek
[ *  *  *  * ]
Hi Cory,

Unfortunately when I add the code, their gamertag shows in the place their avatar should be, but their avatar is nowhere to be found.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
What are you exactly requesting then? By 'my', did you only mean do this for your account only and no other account?
Offline Profile Goto Top
 
Byzantine
Member Avatar
Zathyus Networks Greek
[ *  *  *  * ]
I'd like the code to allow for anybody's account.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
What the code above does is replaces the users avatar with their gamertag image if they have one.
Offline Profile Goto Top
 
Moonface
Member Avatar


Cory
Jun 24 2013, 02:36 AM
What the code above does is replaces the users avatar with their gamertag image if they have one.
I think specifically they want the avatar image used on their gamertag to be set as their avatar. Not the actual gamertag itself.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
May be possible with some more complex coding, but a simple modification to an off-site iFrame isn't really practical.
Offline Profile Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
I notice one of your admins has a profile field called "xBox Gamertag". The following code works off of that, so it'll only work if a user has entered their gamertag for that field. Place this one in the same part you put Cory's code:

Code:
 
<script type="text/javascript">
//<![CDATA[
$("dl.user_profile dt:contains(xBox Gamertag)").each(function(){
var gt = $(this).next().text().replace(/ /g,"%20"), selector = /\/profile\//.test(location.href) ? $("table.profile img.avatar") : $(this).closest(".c_user").find("img.avatar");
selector.attr("src","http://avatar.xboxlive.com/avatar/"+gt+"/avatarpic-l.png");
});
//]]>
</script>
Offline Profile Goto Top
 
Roby
Member Avatar
#27

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic